/**
 * Global CSS Variables and Custom Styles
 * Milano E-commerce Theme
 */

:root {
  /* Colors - Primary Palette */
  --color-primary: #1a5d3a;
  --color-primary-dark: #0f3d24;
  --color-primary-light: #2d7a4f;
  
  /* Secondary Colors */
  --color-secondary: #d4af37;
  --color-secondary-dark: #b8941f;
  --color-secondary-light: #e5c866;
  
  /* Accent Colors */
  --color-accent: #8b7355;
  --color-accent-light: #a68b6b;
  
  /* Neutral Colors */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  
  /* Status Colors */
  --color-success: #10b981;
  --color-error: #ef4444;
  --color-warning: #f59e0b;
  --color-info: #3b82f6;
  
  /* Typography */
  --font-heading: 'DM sans', sans-serif;
  --font-body: 'DM sans', sans-serif;
  
  /* Font Sizes */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-size-5xl: 3rem;      /* 48px */
  --font-size-6xl: 3.75rem;   /* 60px */
  
  /* Font Weights */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  
  /* Spacing */
  --spacing-xs: 0.25rem;   /* 4px */
  --spacing-sm: 0.5rem;    /* 8px */
  --spacing-md: 1rem;      /* 16px */
  --spacing-lg: 1.5rem;    /* 24px */
  --spacing-xl: 2rem;      /* 32px */
  --spacing-2xl: 3rem;     /* 48px */
  --spacing-3xl: 4rem;     /* 64px */
  --spacing-4xl: 6rem;     /* 96px */
  
  /* Border Radius */
  --radius-sm: 0.25rem;    /* 4px */
  --radius-md: 0.5rem;     /* 8px */
  --radius-lg: 0.75rem;    /* 12px */
  --radius-xl: 1rem;       /* 16px */
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
  
  /* Breakpoints (for reference, Tailwind handles these) */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
  
  /* Z-index Layers */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  color: var(--color-gray-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  color: var(--color-gray-900);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

/* Utility Classes */
.text-primary {
  color: var(--color-primary);
}

.bg-primary {
  background-color: var(--color-primary);
}

.border-primary {
  border-color: var(--color-primary);
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

/* Loading Spinner */
.loading-spinner {
  border: 3px solid var(--color-gray-200);
  border-top: 3px solid var(--color-primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Section Loading Placeholder */
.section-loading {
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-gray-50);
}

/* Header Shadow */
.header-shadow {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Header Navigation Styling */
nav .container {
  position: relative;
}

/* Badge Styling for Icons */
.wishlist-count,
.cart-count {
  font-weight: 500;
  line-height: 1;
}

/* Header Icon Styling */
.header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.header-icon i {
  font-size: 18px;
  line-height: 1;
}

/* Footer Styling */
footer {
  border-top: 1px solid #e5e7eb;
}

.footer-social-icon {
  transition: all 0.3s ease;
  position: relative;
}

.footer-social-icon i {
  color: #374151;
  transition: color 0.3s ease;
}

.footer-social-icon:hover i {
  color: black;
}

/* Footer Tooltip */
.footer-tooltip {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #000;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
  z-index: 50;
  font-weight: 500;
}

.footer-tooltip::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: #000;
}

.footer-social-icon:hover .footer-tooltip {
  opacity: 1;
  visibility: visible;
}

/* Product Action Button Tooltips */
.product-action-btn {
  position: relative;
}

.product-tooltip {
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background-color: #000;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
  z-index: 100;
  font-weight: 500;
}

.product-tooltip::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: #000;
}

.product-action-btn:hover .product-tooltip,
.wishlist-btn:hover .product-tooltip {
  opacity: 1;
  visibility: visible;
}

#backToTop {
  transition: all 0.3s ease;
}

#backToTop:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Footer Bottom Section */
footer .icon.icon--full-color {
  width: 38px;
  height: 24px;
  display: block;
}

footer .list-unstyled {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Currency Selector Flag Image */
footer .localization-flags {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d1d5db;
  border-radius: 50%;
  overflow: hidden;
}

footer .localization-flags img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#currencyDropdown {
  z-index: 99;
}

/* Mega Menu Styles */
.mega-menu {
  position: absolute;
  top: 100%;
  margin-top: 0.5rem;
  width: 900px;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 50;
  padding: 2rem;
}

.mega-menu-products {
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
}

.mega-menu-parent:hover .mega-menu,
.mega-menu-parent .mega-menu:hover {
  opacity: 1;
  visibility: visible;
}

.mega-menu-parent:hover .mega-menu-products,
.mega-menu-parent .mega-menu-products:hover {
  transform: translateX(-50%) translateY(0);
}

/* Category card hover effect */
.category-card:hover img {
  transform: scale(1.05);
}

/* Pages Dropdown Menu */
.pages-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  min-width: 250px;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 50;
  padding: 0.5rem 0;
}

.pages-menu-parent:hover .pages-dropdown,
.pages-menu-parent .pages-dropdown:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Shop Dropdown Menu */
.shop-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  min-width: 250px;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 50;
  padding: 0.5rem 0;
}

.shop-menu-parent:hover .shop-dropdown,
.shop-menu-parent .shop-dropdown:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Responsive Mega Menu */
@media (max-width: 1024px) {
  .mega-menu {
    width: 100vw;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
  }
  
  .mega-menu-parent:hover .mega-menu,
  .mega-menu-parent .mega-menu:hover {
    transform: translateX(-50%) translateY(0);
  }
  
  .pages-dropdown {
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
  }
  
  .pages-menu-parent:hover .pages-dropdown,
  .pages-menu-parent .pages-dropdown:hover {
    transform: translateX(-50%) translateY(0);
  }
}

@media (max-width: 768px) {
  .mega-menu {
    display: none;
  }
  
  .pages-dropdown {
    display: none;
  }
}

/* Hero Slider Styles */
.hero-slide {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-slide.active {
  display: block;
  position: relative;
}

.hero-slider {
  position: relative;
  height: 600px;
}
.hero-slide p {
  color: var(--color-white);
  /* font-size: 18px; */
}

.hero-slide h1 {
  color: var(--color-white);
}

.banner-btn {
  border-radius: 50px;
}
@media (min-width: 768px) {
  .hero-slider {
    height: 700px;
  }
}

/* Hero Indicator Styles */
.hero-indicator {
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.3s ease;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  padding: 0;
  position: relative;
}

.hero-indicator:hover {
  background-color: rgba(255, 255, 255, 0.6);
}

.hero-indicator.active {
  width: 12px;
  height: 12px;
  background-color: white;
  border: 2px solid white;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

#categories-section .grid {
  gap: 60px !important;
}

/* Best Selling Slider Styles */
.best-selling-slider {
  position: relative;
  padding: 0 0;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.best-selling-slider:active {
  cursor: grabbing;
}

.best-selling-slider a,
.best-selling-slider button {
  user-select: auto;
  -webkit-user-select: auto;
  -moz-user-select: auto;
  -ms-user-select: auto;
}

.best-selling-slider #bestSellingSlider {
  display: flex;
  gap: 1.5rem;
  will-change: transform;
}

.best-selling-slider #bestSellingSlider > div {
  flex-shrink: 0;
}

/* Trending Slider Styles */
.trending-slider {
  position: relative;
  padding: 0 0;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.trending-slider:active {
  cursor: grabbing;
}

.trending-slider a,
.trending-slider button {
  user-select: auto;
  -webkit-user-select: auto;
  -moz-user-select: auto;
  -ms-user-select: auto;
}

.trending-slider #trendingSlider {
  display: flex;
  gap: 1.5rem;
  will-change: transform;
}

.trending-slider #trendingSlider > div {
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .best-selling-prev,
  .best-selling-next {
    width: 36px !important;
    height: 36px !important;
  }
  
  .trending-prev,
  .trending-next {
    width: 36px !important;
    height: 36px !important;
  }
}

/* Badge Styles */
.badge-hot {
  background-color: #ef4444;
  color: white;
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
}

.badge-new {
  background-color: #3b82f6;
  color: white;
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
}

/* Video Section Styles */
.video-card {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
}

.video-card video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.video-card:hover video {
  transform: scale(1.05);
}

.video-btn {
  border-radius: 50px;
  width: 200px;
  align-self: center;
}

/* Product Card Hover Effects */
.product-card {
  position: relative;
}

.product-actions {
  transform: translateX(10px);
  transition: all 0.3s ease;
}

.product-card:hover .product-actions {
  transform: translateX(0);
}

.product-actions button {
  backdrop-filter: blur(10px);
}

.add-to-cart-btn , .buy-now-btn {
  border-radius: 50px;
}

/* Countdown Timer Styles */
.countdown-timer {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
  align-content: center;
  border-radius: 50px;
  width: 220px;
  justify-self: center;
}

/* Product Card Image Overlay on Hover */
.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
  z-index: 15;
  pointer-events: none;
}

.product-card:hover::before {
  background: rgba(0, 0, 0, 0.05);
}

/* Product Detail Page Styles */
.size-btn {
  min-width: 60px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.size-btn:hover {
  border-color: var(--color-primary);
}

.color-btn {
  transition: all 0.2s ease;
  cursor: pointer;
}

.color-btn:hover {
  transform: scale(1.1);
}

.color-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 93, 58, 0.2);
}

/* Product Detail Image Gallery */
#mainProductImage {
  max-height: 600px;
  object-fit: contain;
}

/* Collapsible Sections */
[id$="-content"] {
  transition: all 0.3s ease;
}

/* Mobile Responsive Product Detail */
@media (max-width: 1024px) {
  #mainProductImage {
    max-height: 500px;
  }
}

@media (max-width: 768px) {
  #mainProductImage {
    max-height: 400px;
  }
  
  .size-btn {
    min-width: 50px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
  
  .color-btn {
    width: 40px;
    height: 40px;
}

  .hero-next ,.hero-prev {
    display: none !important;
}
}
/* Notification Modal Styles */
.notification-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease-out;
}

.notification-modal {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 400px;
  width: 100%;
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.notification-modal-header {
  padding: 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--color-gray-200);
}

.notification-modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
}

.notification-modal-icon.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.notification-modal-icon.error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.notification-modal-icon.info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.notification-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: 0.5rem;
}

.notification-modal-body {
  padding: 1.5rem;
  text-align: center;
}

.notification-modal-message {
  color: var(--color-gray-700);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.notification-modal-footer {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  justify-content: center;
}

.notification-modal-btn {
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-size: 1rem;
}

.notification-modal-btn.primary {
  background: var(--color-primary);
  color: white;
}

.notification-modal-btn.primary:hover {
  background: var(--color-primary-dark);
}

.notification-modal-btn.secondary {
  background: var(--color-gray-200);
  color: var(--color-gray-700);
}

.notification-modal-btn.secondary:hover {
  background: var(--color-gray-300);
}

/* Currency Selector Flag Styling */
#currencySelector span[class*="text-base"],
.currency-option span[class*="text-base"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

#currencySelector {
  padding: 2px 0;
}

#currencyDropdown {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.currency-option {
  cursor: pointer;
}

.currency-option:active {
  background-color: #f3f4f6;
}

.nav-link {
  font-weight: 600;
}

.tracking-wider {
  font-weight: 600;
  text-decoration: underline;
}

/* Philosophy Link Animated Underline */
.philosophy-link {
  position: relative;
  text-decoration: none;
  display: inline-block;
  color: #eee4d3;
}

.philosophy-link:hover {
  color: #ffffff;
}

.philosophy-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: currentColor;
}

.philosophy-link:hover::after {
  animation: underlineReveal 1.5s ease-in-out infinite;
}

@keyframes underlineReveal {
  0% {
    width: 0;
    left: 0;
  }
  60% {
    width: 100%;
    left: 0;
  }
  61% {
    width: 0;
    left: 0;
  }
  100% {
    width: 0;
    left: 0;
  }
}

.feature-card {
  text-align: center;
  justify-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 15px;
}

/* Custom 990px breakpoint for filter drawer */
@media (max-width: 990px) {
  .show-below-990 {
    display: block !important;
  }
  .hide-below-990 {
    display: none !important;
  }
  .show-below-990.flex {
    display: flex !important;
  }
}

@media (min-width: 991px) {
  .show-below-990 {
    display: none !important;
  }
  .hide-below-990 {
    display: block !important;
  }
  .hide-below-990.flex {
    display: flex !important;
  }
}

.shop-dropdown a ,
.pages-dropdown li a,
.mega-menu.mega-menu-products li a {
  transition: all 0.3s ease;
  display: inline-block;
}

.shop-dropdown a:hover,
.pages-dropdown li a:hover,
.mega-menu.mega-menu-products li a:hover {
  transform: translateX(8px);
}