/* special.css — Special page layout (extends gift-box) */

/* ── Builder spacing ─────────────────────────────────────── */
.sp-builder-section {
  padding-top: 2.5rem !important;
  padding-bottom: 2.5rem !important;
}

.sp-builder-top {
  padding-bottom: 0.25rem;
}

.sp-size-sections {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sp-product-divider {
  border-color: rgba(255, 255, 255, 0.06);
  margin: 1.5rem 0 !important;
}

.sp-order-total {
  margin-top: 1rem;
}

/* ── Square variant selector cards ───────────────────────── */
.sp-variant-grid .sp-variant-card {
  aspect-ratio: 1 / 1;
  height: auto;
  width: 100%;
  max-width: 100%;
}

.sp-variant-qty-meta {
  display: flex;
  gap: 5px;
  margin-top: 8px;
}

.sp-variant-qty-meta--3 .sp-variant-qty-pill {
  padding: 5px 3px;
}

.sp-variant-qty-pill--tiers {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 42px;
}

.sp-variant-tier-line {
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.2;
  white-space: nowrap;
}

.sp-variant-qty-pill {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 6px 4px;
  background: rgba(201, 168, 76, 0.12);
  border: 1px solid rgba(201, 168, 76, 0.28);
  border-radius: 6px;
}

.sp-variant-qty-caption {
  display: block;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.25;
  margin-bottom: 2px;
}

.sp-variant-qty-pill strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.1;
}

.sp-variant-grid .gvc-info {
  bottom: 44px;
  padding: 0 12px;
}

.sp-variant-grid .gvc-label {
  font-size: 1.05rem;
}

.sp-variant-grid .gvc-desc {
  display: none;
}

.sp-variant-grid .gvc-cta {
  font-size: 0.7rem;
  padding: 9px 12px;
}

@media (max-width: 767.98px) {
  .sp-variant-grid .gvc-label {
    font-size: 0.9rem;
  }
  .sp-variant-qty-pill strong {
    font-size: 0.8rem;
  }
}

/* ── Per-size order sections (forced dark — readable on light theme) ─ */
.sp-builder-section .sp-size-section {
  background: linear-gradient(145deg, #1f1f1f, #141414) !important;
  border: 1px solid rgba(201, 168, 76, 0.18) !important;
  border-radius: var(--fra-radius);
  padding: 1rem 1.1rem 1.1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sp-builder-section .sp-size-section.is-active {
  border-color: rgba(201, 168, 76, 0.45) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(201, 168, 76, 0.12) !important;
}

.sp-size-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}

.sp-builder-section .sp-size-section-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff !important;
  margin: 0;
}

.sp-builder-section .sp-size-section-title .text-gold {
  font-size: 0.85em;
  color: var(--gold) !important;
}

.sp-builder-section .sp-size-section-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold) !important;
  background: rgba(201, 168, 76, 0.15) !important;
  border: 1px solid rgba(201, 168, 76, 0.35) !important;
  padding: 4px 10px;
  border-radius: 99px;
}

.sp-builder-section .sp-size-section-note {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85) !important;
  line-height: 1.5;
  margin-bottom: 10px;
  padding: 8px 10px;
  background: rgba(201, 168, 76, 0.1) !important;
  border-left: 3px solid var(--gold) !important;
  border-radius: 0 6px 6px 0;
}

.sp-builder-section .sp-size-section-note strong {
  color: var(--gold) !important;
}

.sp-builder-section .sp-tier-row-label {
  color: rgba(255, 255, 255, 0.72) !important;
}

.sp-builder-section .sp-tier-row-label .text-gold {
  color: var(--gold) !important;
}

.sp-size-section-progress {
  margin-bottom: 12px;
}

.sp-size-section-progress .sp-tier-bar {
  margin-top: 4px;
}

.sp-builder-section .sp-size-empty {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55) !important;
  margin: 0;
  padding: 8px 0 4px;
}

/* Order total strip — keep dark on light theme */
.sp-builder-section .gift-total-strip.sp-order-total {
  background: linear-gradient(135deg, #1a1a1a, #222) !important;
  border-color: rgba(201, 168, 76, 0.2) !important;
}

.sp-builder-section .gift-total-strip .gift-total-label,
.sp-builder-section .gift-total-strip .gift-total-sub {
  color: rgba(255, 255, 255, 0.85) !important;
}

.sp-builder-section .gift-total-strip .gift-total-price {
  color: var(--gold) !important;
}

/* ── Compact added-item cards ────────────────────────────── */
.sp-builder-section .sp-cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #252525 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px;
  padding: 8px 10px;
  min-height: 64px;
}

.sp-cart-item-thumb {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--dark-3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-cart-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sp-cart-item-thumb i {
  color: rgba(201, 168, 76, 0.35);
  font-size: 1.1rem;
}

.sp-cart-item-body {
  flex: 1;
  min-width: 0;
}

.sp-builder-section .sp-cart-item-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.sp-builder-section .sp-cart-item-meta {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55) !important;
  margin-top: 2px;
}

.sp-builder-section .sp-cart-item-meta .text-gold {
  font-weight: 700;
  color: var(--gold) !important;
}

.sp-cart-item-remove {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.sp-cart-item-remove:hover {
  background: rgba(220, 80, 80, 0.2);
  color: #f88;
}

.sp-tier-bar {
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.sp-tier-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  border-radius: 999px;
  transition: width 0.35s ease;
}

.sp-tier-row-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  margin-bottom: 3px;
}

.sp-cart-line {
  font-size: 0.9rem;
}

/* ── Special sticky bar (dual stacked buttons) ─────────────── */
.sp-sticky-bar {
  padding: 10px 0 !important;
}

.sp-sticky-inner {
  align-items: center;
}

.sp-sticky-info {
  min-width: 0;
  flex: 1;
}

.sp-sticky-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  flex-shrink: 0;
  width: 132px;
}

.sp-sticky-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 6px 10px !important;
  font-size: 0.68rem !important;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1.2;
  white-space: nowrap;
  border-radius: 6px;
  text-decoration: none;
}

.sp-sticky-btn i {
  font-size: 0.62rem;
}

@media (max-width: 575.98px) {
  .sp-sticky-actions {
    width: 118px;
  }
  .sp-sticky-btn {
    font-size: 0.64rem !important;
    padding: 5px 8px !important;
  }
  .sp-sticky-info .tester-sticky-count,
  .sp-sticky-info .tester-sticky-price {
    font-size: 0.72rem;
  }
}

/* ── Size switcher (below search) ────────────────────────── */
.sp-add-toolbar-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 12px 14px;
  background: var(--page-bg-2, #f5f0e8);
  border: 1px solid var(--border-light, rgba(0, 0, 0, 0.08));
  border-radius: var(--fra-radius);
}

.sp-add-toolbar-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary, #1a1a1a);
  white-space: nowrap;
}

.sp-size-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.sp-size-switch-btn {
  border: 1px solid rgba(201, 168, 76, 0.35);
  background: #fff;
  color: var(--text-primary, #222);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sp-size-switch-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.sp-size-switch-btn.is-active {
  background: linear-gradient(135deg, #c9a84c, #a8873a);
  border-color: var(--gold);
  color: #111;
}

.sp-change-size-picker-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .sp-add-toolbar-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .sp-size-switcher {
    width: 100%;
  }
  .sp-change-size-picker-btn {
    width: 100%;
  }
}

/* ── Display “was” price + 10% OFF chip (product.php layout, compact) ─ */
.sp-item-price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  row-gap: 4px;
}

.sp-item-price .sp-off-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  padding: 2px 6px;
  line-height: 1.2;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid rgba(92, 173, 125, 0.3);
  color: #5cad7d;
  background: transparent;
}

@media (max-width: 575.98px) {
  .sp-item-price {
    gap: 4px;
  }
  .sp-item-price .sp-price-now {
    font-size: 0.88rem;
  }
  .sp-item-price .sp-price-was {
    font-size: 0.66rem;
  }
  .sp-item-price .sp-off-badge {
    font-size: 0.46rem;
    padding: 1px 5px;
    letter-spacing: 0.3px;
  }
}

.sp-item-price .sp-price-now {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
}

.sp-item-price .sp-price-was {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--gray);
  text-decoration: line-through;
}

@media (max-width: 991.98px) {
  .sp-variant-grid > [class*="col-"],
  .sp-size-section .row > [class*="col-"] {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
}
