/* ==========================================================================
   ARABIAN SCENTS - LUXURY STOREFRONT THEME STYLES (Google Stitch Specs)
   ========================================================================== */

/* 0. Mobile Viewport & Side Gap Elimination */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0;
  box-sizing: border-box !important;
  position: relative;
}

*, *::before, *::after {
  box-sizing: border-box !important;
}

main, section, header, footer {
  max-width: 100%;
}

/* 1. Color Utilities matching DESIGN.md */
.bg-surface { background-color: #fbf9f3; }
.bg-surface-white { background-color: #ffffff; }
.bg-surface-container-lowest { background-color: #ffffff; }
.bg-surface-container-low { background-color: #f5f3ed; }
.bg-surface-container { background-color: #f0eee8; }
.bg-surface-container-high { background-color: #eae8e2; }
.bg-surface-container-highest { background-color: #e4e2dd; }
.bg-primary { background-color: #0b0c0c; }
.bg-primary-container { background-color: #222222; }
.bg-secondary { background-color: #56624f; }
.bg-secondary-container { background-color: #d9e7ce; }
.bg-tertiary { background-color: #606041; }
.bg-warm-taupe { background-color: #b8aa98; }
.bg-gold-heritage { background-color: #7a6200; }
.bg-charcoal-soft { background-color: #383838; }

.text-on-surface { color: #1b1c18; }
.text-on-surface-variant { color: #444748; }
.text-on-primary { color: #ffffff; }
.text-primary { color: #0b0c0c; }
.text-secondary { color: #56624f; }
.text-warm-taupe { color: #b8aa98; }
.text-gold-heritage { color: #7a6200; }
.text-outline { color: #747878; }
.text-outline-variant { color: #c4c7c7; }
.text-error { color: #ba1a1a; }

.border-olive-border { border-color: #e3e2d8; }
.border-hairline { border-color: #e3e2d8; }
.border-outline-variant { border-color: #c4c7c7; }
.border-warm-taupe { border-color: #b8aa98; }

/* 2. Typography - Cairo Ultra-Crisp Arabic Geometry */
.font-serif-luxury {
  font-family: 'Cairo', system-ui, -apple-system, sans-serif !important;
  letter-spacing: normal !important;
}

.font-sans-arabic {
  font-family: 'Cairo', system-ui, -apple-system, sans-serif !important;
  letter-spacing: normal !important;
}

.text-display-hero {
  font-family: 'Cairo', system-ui, sans-serif;
  font-size: 2.25rem;
  line-height: 1.25;
  font-weight: 800;
}
@media (min-width: 768px) {
  .text-display-hero {
    font-size: 3rem;
    line-height: 1.2;
  }
}

.text-headline-xl {
  font-family: 'Cairo', system-ui, sans-serif;
  font-size: 1.625rem;
  line-height: 1.35;
  font-weight: 700;
}
@media (min-width: 768px) {
  .text-headline-xl {
    font-size: 2.125rem;
  }
}

.text-headline-lg {
  font-family: 'Cairo', system-ui, sans-serif;
  font-size: 1.375rem;
  line-height: 1.4;
  font-weight: 700;
}

.text-headline-md {
  font-family: 'Cairo', system-ui, sans-serif;
  font-size: 1.2rem;
  line-height: 1.45;
  font-weight: 700;
}

.text-headline-sm {
  font-family: 'Cairo', system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.45;
  font-weight: 700;
}

.text-label-md {
  font-size: 0.8125rem;
  line-height: 1.25rem;
  font-weight: 500;
}

.text-label-sm {
  font-size: 0.6875rem;
  line-height: 1rem;
  font-weight: 600;
}

.text-body-md {
  font-size: 0.875rem;
  line-height: 1.5rem;
}

.text-body-sm {
  font-size: 0.75rem;
  line-height: 1.25rem;
}

/* 3. Spacing Tokens - Tight on mobile (10px) to prevent empty side space, generous on desktop */
.px-margin {
  padding-left: 0.625rem;
  padding-right: 0.625rem;
}
@media (min-width: 640px) {
  .px-margin {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}
@media (min-width: 768px) {
  .px-margin {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}
@media (min-width: 1200px) {
  .px-margin {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

/* 4. Luxury Cards & Grids */
.luxury-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid #e3e2d8;
  background-color: #ffffff;
}

.luxury-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px rgba(34, 34, 34, 0.08);
}

.products-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
@media (min-width: 640px) {
  .products-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
}
@media (min-width: 1024px) {
  .products-catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
}
@media (min-width: 1280px) {
  .products-catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
  }
}
@media (min-width: 1600px) {
  .products-catalog-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.75rem;
  }
}

/* 5. Olfactory Pyramid Bento Grid */
.olfactory-tier {
  border: 1px solid #e3e2d8;
  background-color: #ffffff;
  padding: 1.25rem;
  border-radius: 0.375rem;
  position: relative;
  transition: border-color 0.2s ease;
}
.olfactory-tier:hover {
  border-color: #b8aa98;
}

/* 6. Quantity Stepper Controls */
.quantity-box {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e3e2d8;
  background-color: #ffffff;
  border-radius: 0.25rem;
  height: 48px;
  overflow: hidden;
}
.quantity-box button {
  width: 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #1b1c18;
  transition: background-color 0.15s ease;
}
.quantity-box button:hover {
  background-color: #f5f3ed;
}
.quantity-box input.qty-input {
  width: 48px;
  height: 100%;
  text-align: center;
  font-weight: 700;
  font-size: 0.875rem;
  border: none;
  background: transparent;
  outline: none;
  color: #1b1c18;
}

/* 7. Modals & Slide-over Drawers */
.arabian-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  background-color: rgba(11, 12, 12, 0.6) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.arabian-modal-overlay.active {
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

.arabian-modal-card {
  background: #ffffff !important;
  border: 1px solid #e3e2d8 !important;
  border-radius: 0.5rem !important;
  max-width: 92% !important;
  box-shadow: 0 24px 48px -12px rgba(11, 12, 12, 0.15) !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.arabian-modal-overlay.active .arabian-modal-card {
  transform: translateY(0) scale(1);
}

/* 8. Slide-Over Cart & Fast Checkout Drawer */
.arabian-drawer {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(11, 12, 12, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.arabian-drawer.active {
  opacity: 1;
  pointer-events: auto;
}

.arabian-drawer-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-right: 1px solid #e3e2d8;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.arabian-drawer.active .arabian-drawer-panel {
  transform: translateX(0);
}

/* 9. Floating Toast Notification */
.arabian-toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0b0c0c;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.25rem;
  border: 1px solid rgba(227, 226, 216, 0.25);
  box-shadow: 0 12px 28px -6px rgba(0,0,0,0.3);
  font-size: 0.8125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.arabian-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* 10. Free Shipping Progress Bar */
.free-shipping-progress {
  height: 6px;
  border-radius: 9999px;
  background: #eae8e2;
  overflow: hidden;
}
.free-shipping-bar {
  height: 100%;
  background: linear-gradient(90deg, #7a6200 0%, #56624f 100%);
  border-radius: 9999px;
  transition: width 0.4s ease;
}

/* Hide scrollbar utility */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Custom Logo Utility */
.arabian-custom-logo {
  display: inline-block;
  height: auto;
  object-fit: contain;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.arabian-custom-logo:hover {
  opacity: 0.95;
}

/* ==========================================================================
   11. Mobile Phone Specific Polish & Touch Optimizations
   ========================================================================== */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-overflow-scrolling: touch;
}

@media screen and (max-width: 767px) {
  /* Prevent iOS Safari auto-zoom on input tap */
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="tel"],
  input[type="search"],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Catalog grid gap and card spacing for 2-column mobile layout */
  .products-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.625rem !important;
  }

  .luxury-card {
    padding: 0.625rem !important;
    border-radius: 0.375rem;
  }

  /* Sticky bottom navigation bar padding with safe areas */
  nav.fixed.bottom-0 {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  /* Ensure touch targets have comfortable minimum heights */
  button, a.button, input[type="submit"] {
    touch-action: manipulation;
  }
}

/* ==========================================================================
   Butter-Smooth Infinite GPU-Accelerated Brands Marquee (Zero Stutter / 60-120 FPS Mobile & Desktop)
   ========================================================================== */
.arabian-marquee-wrapper {
  position: relative;
  width: 100%;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  cursor: grab;
}

.arabian-marquee-wrapper::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.arabian-marquee-wrapper.is-dragging {
  cursor: grabbing !important;
}

.arabian-marquee-track {
  display: flex !important;
  width: max-content !important;
  will-change: scroll-position;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  animation: none !important;
  -webkit-animation: none !important;
  transform: none !important;
  -webkit-transform: none !important;
}

.arabian-marquee-group {
  display: flex !important;
  align-items: center;
  flex-shrink: 0 !important;
  min-width: 100%;
}

/* ==========================================================================
   Luxury Editorial Aesthetic Enhancements (Cairo Typography & Modern UI)
   ========================================================================== */

/* 12. Frosted Glassmorphism Badges */
.glass-badge {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(227, 226, 216, 0.9) !important;
}

/* 13. Golden Heritage Shimmer Badges */
.badge-gold-shimmer {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(122, 98, 0, 0.25) 100%);
  border: 1px solid rgba(197, 160, 89, 0.5);
  color: #5c4700;
  font-weight: 700;
}

/* 14. Luxury Hero Flacon Radial Ambient Glow */
.hero-stage-glow {
  background: radial-gradient(ellipse at 50% 50%, rgba(197, 160, 89, 0.16) 0%, rgba(251, 249, 243, 0) 72%);
}

/* 15. Tactile Floating Add to Cart Button */
.btn-quick-cart {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background-color: #0b0c0c;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(11, 12, 12, 0.15);
}
@media (min-width: 640px) {
  .btn-quick-cart {
    width: 2.5rem;
    height: 2.5rem;
  }
}
.btn-quick-cart:hover {
  background-color: #7a6200;
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(122, 98, 0, 0.35);
}
.btn-quick-cart:active {
  transform: scale(0.95);
}

/* 16. Brand Card Polish in Marquee */
.arabian-brand-card {
  border-radius: 12px !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.arabian-brand-card:hover {
  border-color: rgba(122, 98, 0, 0.5) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -6px rgba(11, 12, 12, 0.08);
}

/* 17. Refined Product Grid Spacing */
.products-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem;
}
@media (min-width: 640px) {
  .products-catalog-grid {
    gap: 1rem;
  }
}
@media (min-width: 768px) {
  .products-catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
}
@media (min-width: 1024px) {
  .products-catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
  }
}
@media (min-width: 1280px) {
  .products-catalog-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

/* 18. Active Compare Button Highlight */
[data-compare-toggle].is-compared {
  background-color: #0b0c0c !important;
  color: #ffffff !important;
  border-color: #0b0c0c !important;
}
[data-compare-toggle].is-compared:hover {
  background-color: #7a6200 !important;
  border-color: #7a6200 !important;
  color: #ffffff !important;
}

/* 19. Custom Egyptian Checkout Form & WooCommerce Notice Styling */
.arabian-checkout-form .select2-container {
  display: none !important;
}
.arabian-checkout-form select.select2-hidden-accessible {
  position: static !important;
  width: 100% !important;
  height: 2.75rem !important;
  clip: auto !important;
  clip-path: none !important;
  overflow: visible !important;
  opacity: 1 !important;
  margin: 0 !important;
}
.arabian-checkout-form .woocommerce-NoticeGroup-checkout {
  grid-column: 1 / -1;
}
.arabian-checkout-form .woocommerce-error,
.arabian-checkout-form .woocommerce-message,
.arabian-checkout-form .woocommerce-info {
  list-style: none;
  margin: 0 0 1rem 0;
  padding: 0.875rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  line-height: 1.6;
  border: 1px solid #e3e2d8;
  background-color: #f5f3ed;
  color: #1b1c18;
}
.arabian-checkout-form .woocommerce-error {
  border-color: rgba(186, 26, 26, 0.35);
  background-color: #ffdad6;
  color: #93000a;
  font-weight: 600;
}
.arabian-checkout-form .woocommerce-form-coupon-toggle .woocommerce-info {
  margin-bottom: 1rem;
}
.arabian-checkout-form .checkout_coupon {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 1rem;
  margin-bottom: 1.25rem;
  background-color: #ffffff;
  border: 1px solid #e3e2d8;
  border-radius: 0.375rem;
}
.arabian-checkout-form .checkout_coupon input.input-text {
  height: 2.5rem;
  padding: 0 0.75rem;
  border: 1px solid #e3e2d8;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  background-color: #fbf9f3;
}
.arabian-checkout-form .checkout_coupon button[type="submit"] {
  height: 2.5rem;
  padding: 0 1rem;
  border-radius: 0.25rem;
  background-color: #0b0c0c;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
}
.arabian-checkout-form .woocommerce-checkout-review-order-table td.product-total ins {
  text-decoration: none;
}
.arabian-checkout-form .woocommerce-shipping-totals th,
.arabian-checkout-form .woocommerce-shipping-totals td {
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}
.arabian-checkout-form .woocommerce-shipping-totals th {
  text-align: right;
  font-weight: 500;
  color: #444748;
}
.arabian-checkout-form .woocommerce-shipping-totals td {
  text-align: left;
}
.arabian-checkout-form .woocommerce-shipping-totals ul#shipping_method {
  list-style: none;
  margin: 0;
  padding: 0;
}
.arabian-checkout-form #place_order:disabled,
.arabian-checkout-form .blockUI.blockOverlay {
  opacity: 0.6 !important;
  cursor: wait !important;
}


