/* ═══════════════════════════════════════
   PRODUCT CARDS
   ═══════════════════════════════════════ */
.products-section { padding: 48px 0 0; position: relative; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

/* btn-see-all: absolute top-right of section on desktop,
   placed in HTML after the grid(s) as a direct child */
.products-section > .btn-see-all {
  position: absolute;
  top: 48px;
  right: 0;
}

.section-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.section-icon img { display: block; }
.section-icon--vip { width: 24px; height: 22px; }
.section-icon--vip img { width: 100%; height: 100%; object-fit: contain; }
.section-icon--drop { width: 18px; height: 22px; }
.section-icon--drop img { width: 100%; height: 100%; object-fit: contain; }

.btn-see-all {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--white-14);
  border-radius: var(--r-xxl);
  padding: 8px 20px;
  color: var(--white-70);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition), background var(--transition), transform 0.1s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.btn-see-all:hover  { border-color: var(--white-40); color: var(--white); background: var(--white-08); }
.btn-see-all:active { transform: scale(0.97); }

.products-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.product-card--featured {
  background: linear-gradient(180deg, #fee06d 0%, #f4c842 100%);
  border-radius: var(--r-m);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s, background 0.3s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.product-card--featured .card-body {
  background: linear-gradient(180deg, #fee06d 0%, #f4c842 100%);
}
.product-card--featured .card-title {
  color: #1a1a2e;
}
.product-card--featured .card-price {
  color: #0d6b1f;
}
.product-card--featured .card-bottom,
.product-card--featured .card-meta {
  color: rgba(26,26,46,0.7);
}
[data-theme="light"] .product-card--featured {
  background: linear-gradient(180deg, #fee06d 0%, #f4c842 100%);
}

/* Second row */
.products-grid + .products-grid { margin-top: 12px; }

.product-card {
  background: var(--bg-card);
  border-radius: var(--r-m);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s, background 0.3s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}

[data-theme="light"] .product-card {
  box-shadow: 0 2px 12px rgba(26,26,46,0.08);
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.product-card:active { transform: scale(0.97); filter: brightness(0.9); }

.card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
  background: #2e2e45;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.product-card:hover .card-img img { transform: scale(1.04); }

.card-body {
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-title {
  font-size: 14px;
  font-weight: 400;
  color: var(--white);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.3em * 2); /* всегда резервируем место под 2 строки */
  transition: color 0.3s;
}

.card-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--lime);
  line-height: 1;
}

.card-heart {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  background: rgba(30,30,42,0.65);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  border: 1px solid var(--white-14);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background var(--transition), transform 0.12s, border-color var(--transition);
  color: var(--white-70);
}

.card-heart:hover  { background: rgba(139,93,246,0.7); color: #fff; border-color: var(--purple); }
.card-heart:active { transform: scale(0.82); }
.card-heart.liked  { background: rgba(139,93,246,0.85); color: #fff; border-color: var(--purple); }

[data-theme="light"] .card-heart {
  background: rgba(255,255,255,0.9);
  border-color: rgba(0,0,0,0.08);
  color: #1a1a2e;
}

.card-heart svg { margin: 1px 0 0 0; }

/* ── Drop timer (bottom-right of card) ── */
.product-card.is-drop .card-body { padding-bottom: 12px; }

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-drop-timer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: rgba(139,93,246,0.16);
  border: 1px solid rgba(139,93,246,0.45);
  color: var(--purple);
  border-radius: var(--r-xxl);
  font-family: 'Inter', sans-serif;
  font-feature-settings: 'tnum' 1;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.card-drop-timer svg { flex-shrink: 0; }

.card-drop-timer2 {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    background: #ffffff;
    border: 1px solid rgba(139, 93, 246, 0.45);
    color: #9b8adf;
    border-radius: var(--r-xxl);
    font-family: 'Inter', sans-serif;
    font-feature-settings: 'tnum' 1;
    font-size: 21px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.card-drop-timer2 svg { flex-shrink: 0; }

.card-drop-timer--urgent2 {
  background: rgba(252,82,82,0.18);
  border-color: rgba(252,82,82,0.55);
  color: #ff6b6b;
  animation: drop-pulse 1.4s ease-in-out infinite;
}

.card-drop-timer--urgent {
  background: rgba(252,82,82,0.18);
  border-color: rgba(252,82,82,0.55);
  color: #ff6b6b;
  animation: drop-pulse 1.4s ease-in-out infinite;
}

@keyframes drop-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(252,82,82,0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(252,82,82,0);    }
}

[data-theme="light"] .card-drop-timer {
  background: rgba(139,93,246,0.12);
  border-color: rgba(139,93,246,0.4);
}
[data-theme="light"] .card-drop-timer--urgent {
  background: rgba(214,48,49,0.12);
  border-color: rgba(214,48,49,0.45);
  color: #d63031;
}

/* ── City location label ── */
.card-location {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.92);
  padding: 3px 7px 3px 5px;
  display: flex;
  align-items: center;
  gap: 3px;
  line-height: 1;
  z-index: 2;
  pointer-events: none;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .products-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 860px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  /*.card-img { height: 160px; }*/
}

@media (max-width: 640px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  /*.card-img { height: 140px; }*/
}

@media (max-width: 510px) {
  .products-section { padding: 28px 0 0; }

  /* Button flows below grid — extra gap below so next section breathes */
  .products-section > .btn-see-all {
    position: static;
    display: flex;
    width: fit-content;
    margin: 16px auto 20px;
  }

  /* Show max 6 cards per grid section */
  .products-grid .product-card:nth-child(n+7) { display: none; }

  /*.card-img { height: 130px; }*/
}

/* ── VIP badge (используется на всех страницах) ── */
.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.4;
  z-index: 2;
  pointer-events: none;
}

.card-badge--vip {
  background: linear-gradient(135deg, #fee06d 0%, #f5a623 100%);
  color: #1a1a2e;
}

.card-badge--vip2 {
    background: linear-gradient(135deg, #fee06d 0%, #f5a623 100%);
    color: #1a1a2e;
}
.card-badge2 {
    position: absolute;
    top: 18px;
    left: 18px;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.4;
    z-index: 2;
    pointer-events: none;
}