/* ==========================================================================
   Reusable components — buttons, badges, stars, product cards, circles
   ========================================================================== */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: var(--r-sm);
  font-size: var(--fs-14);
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}

.btn:active { transform: translateY(1px); }

.btn svg { width: 17px; height: 17px; flex: 0 0 auto; }

.btn--yellow {
  background: var(--brand-yellow);
  color: var(--brand-black);
}
.btn--yellow:hover { background: var(--brand-yellow-dark); }

.btn--dark {
  background: var(--brand-ink);
  color: #fff;
}
.btn--dark:hover { background: #000; }

.btn--outline {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text-primary);
}
.btn--outline:hover { border-color: var(--text-faint); background: var(--surface-alt); }

.btn--lg { padding: 13px 26px; font-size: var(--fs-15); }
.btn--sm { padding: 8px 14px; font-size: var(--fs-13); }
.btn--block { width: 100%; }

.btn--cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 8px 10px;
  font-size: var(--fs-13);
  font-weight: 600;
  border-radius: var(--r-sm);
  background: var(--brand-yellow);
  color: var(--brand-black);
}
.btn--cart:hover { background: var(--brand-yellow-dark); }
.btn--cart svg { width: 15px; height: 15px; }

.btn .arrow { font-size: 1em; line-height: 1; }

/* ---------- Badges ---------- */
.badge {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: var(--r-xs);
  font-size: var(--fs-11);
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  background: var(--sale-red);
  letter-spacing: 0.01em;
}

.badge--new { background: var(--badge-new); }
.badge--best { background: var(--badge-best); }
.badge--static { position: static; display: inline-block; }

/* ---------- Wishlist heart ---------- */
.wish {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  color: var(--text-body);
  transition: color var(--t-fast), background var(--t-fast);
}

.wish svg { width: 17px; height: 17px; }
.wish:hover { color: var(--price-red); background: var(--surface-soft); }
.wish.is-on { color: var(--price-red); }
.wish.is-on svg { fill: currentColor; }

/* ---------- Stars ---------- */
.stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: var(--star);
  line-height: 1;
}

.stars svg { width: 13px; height: 13px; }
.stars--md svg { width: 15px; height: 15px; }
.stars--lg svg { width: 26px; height: 26px; }
.stars .is-empty { color: var(--star-empty); }

.rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-12);
  color: var(--text-muted);
}

/* ---------- Price ---------- */
.price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.price__now {
  font-size: var(--fs-16);
  font-weight: 700;
  color: var(--price-red);
}

.price__was {
  font-size: var(--fs-13);
  color: var(--text-faint);
  text-decoration: line-through;
}

.price--plain .price__now { color: var(--text-primary); }

/* ---------- Product card ---------- */
.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px;
  transition: box-shadow var(--t-base), border-color var(--t-base), transform var(--t-base);
}

.pcard:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.pcard__media {
  position: relative;
  aspect-ratio: 1.18 / 1;
  background: var(--surface);
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: var(--r-sm);
}

.pcard__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--t-base);
}

/* dark, full-bleed photography fills the tile instead of sitting inside it */
.pcard__media--fill img { object-fit: cover; }

.pcard:hover .pcard__media img { transform: scale(1.04); }

.pcard__title {
  font-size: var(--fs-13);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pcard__title a:hover { color: var(--info-blue); }

.pcard .price { margin-bottom: 3px; }
.pcard .rating-row { margin-bottom: 10px; }
.pcard .btn--cart { margin-top: auto; }

/* compact variant used in carousels on the product page */
.pcard--mini { padding: 9px; }
.pcard--mini .pcard__title { font-size: var(--fs-12); margin-bottom: 5px; }
.pcard--mini .price__now { font-size: var(--fs-13); }
.pcard--mini .btn--cart { padding: 6px 8px; font-size: var(--fs-11); }
.pcard--mini .btn--cart svg { width: 12px; height: 12px; }
.pcard--mini .rating-row { margin-bottom: 8px; }

/* ---------- Grids ---------- */
.grid-6 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 13px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* ---------- Category circles ---------- */
.circles {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 10px;
}

.circle {
  display: grid;
  justify-items: center;
  gap: 9px;
  text-align: center;
}

.circle__ring {
  width: 70px;
  height: 70px;
  border-radius: var(--r-pill);
  background: var(--surface-soft);
  display: grid;
  place-items: center;
  font-size: 32px;
  line-height: 1;
  transition: background var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}

.circle:hover .circle__ring {
  background: #e9eaee;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.circle__label {
  font-size: var(--fs-13);
  font-weight: 500;
  color: var(--text-body);
}

.circle.is-active .circle__ring {
  background: #fff6c9;
  box-shadow: 0 0 0 2px var(--brand-yellow);
}

.circle.is-active .circle__label { font-weight: 600; color: var(--text-primary); }

.circle--deals .circle__label { color: var(--price-red); font-weight: 600; }

/* ---------- Promo tiles ---------- */
.promos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.promo {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  min-height: 170px;
  display: flex;
  align-items: center;
  isolation: isolate;
}

.promo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  z-index: -2;
}

.promo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg,
    rgba(6, 6, 8, 0.86) 0%,
    rgba(6, 6, 8, 0.62) 26%,
    rgba(6, 6, 8, 0.26) 50%,
    rgba(6, 6, 8, 0) 72%);
}

.promo__body {
  padding: 24px 26px;
  color: #fff;
  max-width: 300px;
}

.promo__kicker {
  font-size: var(--fs-14);
  font-weight: 500;
  line-height: 1.3;
}

.promo__title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.promo__sub {
  font-size: var(--fs-12);
  color: #d9dde3;
  margin-top: 3px;
  margin-bottom: 16px;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
}

.pagination a,
.pagination span {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: var(--fs-13);
  color: var(--text-body);
}

.pagination a:hover { border-color: var(--text-faint); }

.pagination .is-current {
  background: var(--brand-yellow);
  border-color: var(--brand-yellow);
  color: var(--brand-black);
  font-weight: 700;
}

.pagination .is-dots { border: 0; background: none; }

/* ---------- Checkbox / radio rows ---------- */
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-13);
  color: var(--text-body);
  cursor: pointer;
  padding: 4px 0;
}

.check input {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-xs);
  flex: 0 0 auto;
  position: relative;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}

.check input:checked {
  background: var(--info-blue);
  border-color: var(--info-blue);
}

.check input:checked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: no-repeat center/10px 10px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

.check:hover { color: var(--text-primary); }
.check__count { color: var(--text-faint); }

/* ---------- Section spacing ----------
   Rhythm taken from the reference: 21px above a first section,
   44px between two stacked product sections. */
.section { padding-block: 21px 0; }
.section + .section { padding-top: 44px; }
.section--tight.section,
.section + .section--tight { padding-top: 31px; }
.section--flush-top.section { padding-top: 21px; }
