/* ==========================================================================
   STOREFRONT STYLES - LUXURY E-COMMERCE
   ========================================================================== */

/* --- Sticky Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  height: var(--header-height);
  background: rgba(250, 249, 246, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: box-shadow var(--duration-normal), background var(--duration-normal);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 20px -2px rgba(18, 30, 28, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.brand-logo-img {
  height: 48px;
  width: auto;
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--primary-900);
  line-height: 1.2;
}

.brand-tagline {
  font-size: var(--text-xs);
  color: var(--accent-gold);
  letter-spacing: 0.5px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Language switch pill */
.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface-card);
  border: 1px solid var(--border-medium);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--primary-800);
  transition: all var(--duration-fast);
}

.lang-switch-btn:hover {
  border-color: var(--accent-gold);
  background: var(--accent-gold-bg);
}

/* Cart trigger button */
.cart-trigger-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--primary-800);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--duration-fast), background var(--duration-fast);
}

.cart-trigger-btn:hover {
  background: var(--primary-900);
  transform: translateY(-1px);
}

/* --- Hero Banner (Fully Responsive: Mobile, Tablet/iPad, Desktop) --- */
.hero-container-wrap {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
  box-sizing: border-box;
}

.hero-banner {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: clamp(280px, 45vh, 460px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin: var(--space-4) auto var(--space-8);
  display: flex;
  align-items: center;
  background-color: #121E1C;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transition: all var(--duration-normal) var(--ease-smooth);
  box-shadow: var(--shadow-md);
  box-sizing: border-box;
}

/* Height Variations */
.hero-banner.height-compact {
  min-height: clamp(220px, 34vh, 360px);
}
.hero-banner.height-tall {
  min-height: clamp(320px, 54vh, 520px);
}

/* Image Fit Modes */
.hero-banner.fit-contain {
  background-size: contain;
  background-color: #0E1816;
}

/* Overlays for Maximum Legibility */
.hero-overlay {
  position: absolute;
  inset: 0;
  transition: background var(--duration-normal);
  pointer-events: none;
}

/* Balanced Overlay (Default) */
.hero-overlay.overlay-balanced {
  background: linear-gradient(
    90deg,
    rgba(14, 24, 22, 0.90) 0%,
    rgba(14, 24, 22, 0.76) 50%,
    rgba(14, 24, 22, 0.40) 100%
  );
}
html[dir="rtl"] .hero-overlay.overlay-balanced {
  background: linear-gradient(
    270deg,
    rgba(14, 24, 22, 0.90) 0%,
    rgba(14, 24, 22, 0.76) 50%,
    rgba(14, 24, 22, 0.40) 100%
  );
}

/* Strong Overlay (For very bright images) */
.hero-overlay.overlay-strong {
  background: rgba(14, 24, 22, 0.86);
}

/* Light Overlay */
.hero-overlay.overlay-light {
  background: linear-gradient(
    90deg,
    rgba(14, 24, 22, 0.65) 0%,
    rgba(14, 24, 22, 0.35) 60%,
    transparent 100%
  );
}
html[dir="rtl"] .hero-overlay.overlay-light {
  background: linear-gradient(
    270deg,
    rgba(14, 24, 22, 0.65) 0%,
    rgba(14, 24, 22, 0.35) 60%,
    transparent 100%
  );
}

.hero-overlay.overlay-none {
  background: transparent;
}

/* Pure Banner Image Mode (No Text, No Badges, No Overlay) */
.hero-banner.hero-banner-pure {
  padding: 0 !important;
  min-height: auto !important;
  height: auto !important;
  display: block !important;
  cursor: pointer;
  background-color: transparent;
}

.hero-banner.hero-banner-pure .hero-pure-img {
  width: 100%;
  height: auto;
  max-height: clamp(280px, 52vw, 620px);
  object-fit: cover;
  display: block;
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform var(--duration-normal) var(--ease-smooth);
}

.hero-banner.hero-banner-pure.fit-contain .hero-pure-img {
  object-fit: contain;
  background-color: #0E1816;
}

.hero-banner.hero-banner-pure:hover .hero-pure-img {
  transform: scale(1.008);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 660px;
  color: #FFFFFF;
  padding: var(--space-8) var(--space-6);
}

/* Centered alignment variation */
.hero-banner.align-center {
  justify-content: center;
  text-align: center;
}
.hero-banner.align-center .hero-content {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 5px 14px;
  background: rgba(197, 160, 89, 0.22);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: #F7E9CE;
  margin-bottom: var(--space-3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.hero-title {
  font-size: clamp(1.4rem, 4vw, 2.75rem);
  font-weight: var(--weight-bold);
  line-height: 1.25;
  margin-bottom: var(--space-3);
  color: #FFFFFF;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: clamp(0.875rem, 1.8vw, 1.05rem);
  line-height: 1.6;
  color: #E2E8E5;
  margin-bottom: var(--space-6);
  text-shadow: 0 1px 4px rgba(0,0,0,0.25);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive Media Queries: Mobile, Tablet / iPad, Laptop */
@media (max-width: 640px) {
  .hero-container-wrap {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
  }
  .hero-banner {
    min-height: clamp(220px, 36vh, 320px);
    margin: var(--space-3) auto var(--space-5);
    border-radius: var(--radius-lg);
    justify-content: center;
    text-align: center;
  }
  .hero-content {
    padding: var(--space-4) var(--space-3);
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero-title {
    font-size: clamp(1.2rem, 5.5vw, 1.6rem);
    margin-bottom: var(--space-2);
  }
  .hero-subtitle {
    font-size: var(--text-xs);
    line-height: 1.5;
    margin-bottom: var(--space-3);
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
  .hero-badge {
    padding: 3px 10px;
    font-size: 11px;
    margin-bottom: var(--space-2);
  }
  #hero-cta-btn {
    height: 40px;
    padding: 0 var(--space-4);
    font-size: var(--text-xs);
  }
  /* Mobile overlay guarantees text readability from any background angle */
  .hero-overlay.overlay-balanced {
    background: linear-gradient(
      180deg,
      rgba(14, 24, 22, 0.72) 0%,
      rgba(14, 24, 22, 0.86) 60%,
      rgba(14, 24, 22, 0.94) 100%
    );
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  /* Tablet & iPad */
  .hero-banner {
    min-height: clamp(300px, 40vh, 420px);
    margin: var(--space-3) auto var(--space-6);
    border-radius: var(--radius-xl);
  }
  .hero-content {
    padding: var(--space-6) var(--space-5);
    max-width: 580px;
  }
}

/* --- Store Toolbar (Search, Filter, Sort) --- */
.store-toolbar {
  margin-bottom: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.search-sort-row {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.sort-select {
  height: 50px;
  padding: 0 var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  box-shadow: var(--shadow-sm);
  outline: none;
  cursor: pointer;
  min-width: 170px;
}

.sort-select:focus {
  border-color: var(--accent-gold);
}

/* --- Product Grid & Cards --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}

@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
  }
}

.product-card {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--duration-normal) var(--ease-smooth);
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-gold);
}

.product-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 4.5;
  background: var(--surface-muted);
  overflow: hidden;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-smooth);
}

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

.product-card-badge {
  position: absolute;
  top: var(--space-3);
  z-index: 2;
}

html[dir="rtl"] .product-card-badge {
  right: var(--space-3);
}
html[dir="ltr"] .product-card-badge {
  left: var(--space-3);
}

.product-card-body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-category-name {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-bottom: var(--space-1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--primary-900);
  line-height: 1.4;
  margin-bottom: var(--space-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.8em;
}

.product-pricing {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.product-price {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--primary-800);
}

.product-compare-price {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-decoration: line-through;
}

.product-card-actions {
  display: flex;
  gap: var(--space-2);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-4);
  background: var(--surface-card);
  border-radius: var(--radius-xl);
  border: 1px dashed var(--border-medium);
  margin: var(--space-8) 0;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-4);
  color: var(--accent-gold);
  opacity: 0.8;
}

.empty-state-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--primary-900);
  margin-bottom: var(--space-2);
}

.empty-state-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto var(--space-6);
}

/* --- Cart Line Items --- */
.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.cart-item {
  display: flex;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
}

.cart-item-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--surface-muted);
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--primary-900);
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--accent-gold-900);
}

.cart-qty-ctrls {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-muted);
  border-radius: var(--radius-pill);
  padding: 2px 6px;
}

.cart-qty-btn {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  font-size: 14px;
  color: var(--primary-900);
}

.cart-qty-val {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  min-width: 20px;
  text-align: center;
}

.cart-item-remove {
  color: var(--text-tertiary);
  padding: 4px;
}

.cart-item-remove:hover {
  color: var(--status-danger);
}

/* Free shipping bar */
.shipping-progress-wrap {
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  background: var(--primary-50);
  border-radius: var(--radius-md);
}

.shipping-progress-text {
  font-size: var(--text-xs);
  color: var(--primary-800);
  margin-bottom: 6px;
  font-weight: var(--weight-medium);
}

.shipping-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--primary-200);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.shipping-progress-fill {
  height: 100%;
  background: var(--accent-gold);
  border-radius: var(--radius-pill);
  transition: width var(--duration-normal);
}

/* --- Checkout Modal --- */
.checkout-summary-box {
  background: var(--surface-muted);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.summary-row.total {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--primary-900);
  border-top: 1px solid var(--border-medium);
  padding-top: var(--space-2);
  margin-top: var(--space-2);
}

/* --- Footer --- */
.site-footer {
  margin-top: auto;
  background: var(--primary-900);
  color: #D6DDD9;
  padding: var(--space-12) 0 var(--space-6);
  border-top: 2px solid var(--accent-gold);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-10);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-brand {
  max-width: 380px;
}

.footer-logo {
  height: 44px;
  margin-bottom: var(--space-4);
}

.footer-about {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: #A9B5B1;
  margin-bottom: var(--space-4);
}

.footer-heading {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: #FFFFFF;
  margin-bottom: var(--space-4);
  position: relative;
}

.footer-heading::after {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent-gold);
  margin-top: 6px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-link {
  font-size: var(--text-sm);
  color: #A9B5B1;
  transition: color var(--duration-fast);
}

.footer-link:hover {
  color: var(--accent-gold);
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: #A9B5B1;
  margin-bottom: var(--space-2);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: #828F8B;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
  }
}

/* ==========================================================================
   45-DEGREE RED CORNER DISCOUNT RIBBON & SCARCITY URGENCY BADGES
   ========================================================================== */

.discount-ribbon-corner {
  position: absolute;
  top: 0;
  right: 0;
  width: 95px;
  height: 95px;
  overflow: hidden;
  z-index: 10;
  pointer-events: none;
}

.discount-ribbon-corner span {
  position: absolute;
  display: block;
  width: 140px;
  padding: 6px 0;
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 50%, #B91C1C 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.45);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  right: -36px;
  top: 18px;
  transform: rotate(45deg);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.5px;
  line-height: 1.1;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

/* Scarcity / Remaining Stock Urgency Pill */
.scarcity-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #DC2626;
  font-size: 11px;
  font-weight: var(--weight-bold);
  margin-bottom: 8px;
  width: fit-content;
  line-height: 1.2;
}

.scarcity-fire {
  font-size: 12px;
  display: inline-block;
  animation: flicker 1.4s infinite alternate ease-in-out;
}

@keyframes flicker {
  0% { transform: scale(1); }
  100% { transform: scale(1.22); }
}

/* Product Detail Modal Scarcity Banner */
.detail-scarcity-banner {
  background: linear-gradient(135deg, #FEF2F2 0%, #FFF5F5 100%);
  border: 1px solid #FECACA;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 18px;
}

.scarcity-bar-track {
  width: 100%;
  height: 6px;
  background: #FEE2E2;
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: 6px;
}

.scarcity-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #F87171, #DC2626);
  border-radius: var(--radius-pill);
  transition: width var(--duration-normal) var(--ease-smooth);
}

