/* =====================================================
   پاندورا ایران — Gift Finder Widget CSS
   فایل: pandora-gift.css
   نسخه اصلاح‌شده: موبایل فشرده و دو ستونه
   ===================================================== */

.pgf-root *,
.pgf-root *::before,
.pgf-root *::after { box-sizing: border-box; }

.pgf-root {
  --pgf-rose:    #c9637a;
  --pgf-rose-lt: #f7eef1;
  --pgf-rose-md: #eed5dc;
  --pgf-dark:    #3a2328;
  --pgf-gray:    #7a6469;
  --pgf-line:    #ecdde1;
  --pgf-white:   #ffffff;
  --pgf-cream:   #fdf8f9;
  --pgf-radius:  14px;
  --pgf-shadow:  0 4px 24px rgba(180,90,110,.10);
  font-family: inherit;
  direction: rtl;
}

.pgf-wrap {
  background: var(--pgf-cream);
  border: 1px solid var(--pgf-line);
  border-radius: var(--pgf-radius);
  overflow: hidden;
  box-shadow: var(--pgf-shadow);
  margin-bottom: 20px;
}

/* ---- هدر ---- */
.pgf-header {
  background: linear-gradient(135deg, #c9637a 0%, #a8415a 100%);
  padding: 20px 24px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pgf-header-text h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}
.pgf-header-text p {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,.82);
}
.pgf-header-icon {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.3rem;
}

/* ---- فرم ---- */
.pgf-form {
  padding: 20px 20px 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pgf-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pgf-field.pgf-full { grid-column: 1 / -1; }

.pgf-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--pgf-gray);
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
}
.pgf-label svg { width: 14px; height: 14px; opacity: .7; flex-shrink: 0; }

.pgf-select {
  width: 100%;
  min-width: 0;
  padding: 9px 12px 9px 30px;
  border: 1.5px solid var(--pgf-line);
  border-radius: 9px;
  background: var(--pgf-white);
  color: var(--pgf-dark);
  font-size: 0.82rem;
  font-family: inherit;
  direction: rtl;
  unicode-bidi: embed;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c9637a' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  cursor: pointer;
  transition: border-color .2s;
}
.pgf-select:focus {
  outline: none;
  border-color: var(--pgf-rose);
  box-shadow: 0 0 0 3px rgba(201,99,122,.12);
}

/* ---- موبایل فشرده ---- */
@media (max-width: 520px) {
  .pgf-header {
    padding: 15px 14px 13px;
  }

  .pgf-header-text h3 {
    font-size: .95rem;
  }

  .pgf-header-text p {
    font-size: .72rem;
    line-height: 1.6;
  }

  .pgf-header-icon {
    width: 36px;
    height: 36px;
    font-size: 1.05rem;
  }

  .pgf-form {
    padding: 14px 12px 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px 8px;
  }

  .pgf-field {
    gap: 4px;
  }

  .pgf-label {
    font-size: .66rem;
    gap: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pgf-label svg {
    width: 12px;
    height: 12px;
  }

  .pgf-select {
    height: 37px;
    padding: 7px 8px 7px 24px;
    font-size: .72rem;
    border-radius: 8px;
    background-position: left 8px center;
    background-size: 10px auto;
  }

  .pgf-field.pgf-full {
    grid-column: 1 / -1 !important;
  }

  .pgf-btn-wrap {
    padding: 0 12px 14px;
  }

  .pgf-btn {
    padding: 10px;
    font-size: .82rem;
    border-radius: 9px;
  }
}

/* برای گوشی‌های خیلی باریک مثل 320px باز هم دو ستونه بماند */
@media (max-width: 360px) {
  .pgf-form {
    gap: 8px 6px;
  }

  .pgf-label {
    font-size: .61rem;
  }

  .pgf-select {
    font-size: .68rem;
    padding-right: 7px;
    padding-left: 22px;
  }
}

/* ---- دکمه اصلی ---- */
.pgf-btn-wrap { padding: 0 20px 20px; }
.pgf-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #c9637a 0%, #a8415a 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity .2s, transform .15s;
}
.pgf-btn:hover { opacity: .92; transform: translateY(-1px); }
.pgf-btn:active { transform: translateY(0); }
.pgf-btn svg { width: 18px; height: 18px; }

/* ---- بارگذاری ---- */
.pgf-loading {
  padding: 32px;
  text-align: center;
  color: var(--pgf-gray);
  font-size: .85rem;
  display: none;
}
.pgf-spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--pgf-line);
  border-top-color: var(--pgf-rose);
  border-radius: 50%;
  animation: pgf-spin .7s linear infinite;
  margin: 0 auto 10px;
}
@keyframes pgf-spin { to { transform: rotate(360deg); } }

/* ---- نتایج ---- */
.pgf-results { padding: 0 16px 16px; display: none; }
.pgf-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px 14px;
  border-bottom: 1px solid var(--pgf-line);
  margin-bottom: 14px;
}
.pgf-results-header h4 {
  margin: 0;
  font-size: .88rem;
  font-weight: 700;
  color: var(--pgf-dark);
}
.pgf-results-header span {
  font-size: .75rem;
  color: var(--pgf-gray);
  background: var(--pgf-rose-lt);
  padding: 3px 10px;
  border-radius: 99px;
}

/* ---- کارت محصول ---- */
.pgf-cards { display: flex; flex-direction: column; gap: 12px; }

.pgf-card {
  background: var(--pgf-white);
  border: 1px solid var(--pgf-line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  transition: box-shadow .2s;
}
.pgf-card:hover { box-shadow: 0 6px 20px rgba(180,90,110,.13); }

.pgf-card-img {
  width: 90px;
  flex-shrink: 0;
  background: var(--pgf-rose-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pgf-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pgf-card-body {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.pgf-card-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.pgf-badge {
  font-size: .68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--pgf-rose-lt);
  color: var(--pgf-rose);
  border: 1px solid var(--pgf-rose-md);
}
.pgf-badge-n { background: #f0f0f0; color: #888; border-color: #e0e0e0; }

.pgf-card-title {
  font-size: .82rem;
  font-weight: 700;
  color: var(--pgf-dark);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pgf-card-reason {
  font-size: .73rem;
  color: var(--pgf-gray);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pgf-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.pgf-card-price { font-size: .85rem; font-weight: 700; color: var(--pgf-rose); }
.pgf-card-link {
  font-size: .73rem;
  font-weight: 600;
  color: var(--pgf-rose);
  background: var(--pgf-rose-lt);
  border: 1px solid var(--pgf-rose-md);
  padding: 5px 12px;
  border-radius: 7px;
  text-decoration: none;
  transition: background .18s;
  white-space: nowrap;
  flex-shrink: 0;
}
.pgf-card-link:hover { background: var(--pgf-rose-md); }

/* ---- دکمه بیشتر ---- */
.pgf-more-wrap { text-align: center; padding: 8px 0 4px; }
.pgf-more-btn {
  font-size: .8rem;
  color: var(--pgf-rose);
  background: none;
  border: 1.5px solid var(--pgf-rose-md);
  border-radius: 8px;
  padding: 8px 24px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: background .18s;
}
.pgf-more-btn:hover { background: var(--pgf-rose-lt); }

/* ---- پیام خالی ---- */
.pgf-empty {
  text-align: center;
  padding: 24px;
  color: var(--pgf-gray);
  font-size: .83rem;
  background: var(--pgf-rose-lt);
  border-radius: 10px;
}

/* ---- لینک نسخه کامل ---- */
.pgf-fulllink { text-align: center; padding: 10px 0 14px; }
.pgf-fulllink a {
  font-size: .78rem;
  color: var(--pgf-gray);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pgf-fulllink a:hover { color: var(--pgf-rose); }
/* =====================================================
   اصلاح کارت‌های نتایج Gift Finder — موبایل لوکس و عکس کامل
   این بخش را انتهای pandora-gift.css اضافه کن
   ===================================================== */

.pgf-card {
  min-height: 168px;
  align-items: center;
  background: #fff;
  border-radius: 16px;
}

.pgf-card-img {
  width: 132px;
  height: 132px;
  aspect-ratio: 1 / 1;
  margin: 12px 12px 12px 0;
  border: 1px solid #f0e3e7;
  border-radius: 14px;
  background: #fff;
  padding: 8px;
}

.pgf-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.pgf-card-body {
  padding: 14px 14px 14px 10px;
}

.pgf-badge-n {
  display: none !important;
}

.pgf-card-title {
  font-size: .9rem;
  line-height: 1.55;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pgf-card-price {
  font-size: .92rem;
}

@media (max-width: 520px) {
  .pgf-card {
    min-height: 154px;
  }

  .pgf-card-img {
    width: 118px;
    height: 118px;
    margin: 10px 10px 10px 0;
    padding: 7px;
  }

  .pgf-card-body {
    padding: 12px 10px 12px 8px;
    gap: 6px;
  }

  .pgf-card-title {
    font-size: .83rem;
  }

  .pgf-card-reason {
    font-size: .72rem;
    -webkit-line-clamp: 2;
  }

  .pgf-card-link {
    display: none;
  }
}
