/* CSS Variables */
:root {
    --background: #fff;
    --foreground: #030712;
    --card: #fff;
    --card-foreground: #030712;
    --popover: #fff;
    --popover-foreground: #030712;
    --primary: #850200;
    --primary-foreground: #f9fafb;
    --secondary: #020506;
    --secondary-foreground: #101828;
    --muted: #f3f4f6;
    --muted-foreground: #6a7282;
    --accent: #f3f4f6;
    --accent-foreground: #101828;
    --destructive: #e40014;
    --border: #e5e7eb;
    --input: #e5e7eb;
    --ring: #99a1af;
    --radius: 0.625rem;
  
    /* Chart colors */
    --chart-1: #f05100;
    --chart-2: #009588;
    --chart-3: #104e64;
    --chart-4: #fcbb00;
    --chart-5: #f99c00;
  
    /* Sidebar colors */
    --sidebar: #f9fafb;
    --sidebar-foreground: #030712;
    --sidebar-primary: #101828;
    --sidebar-primary-foreground: #f9fafb;
    --sidebar-accent: #f3f4f6;
    --sidebar-accent-foreground: #101828;
    --sidebar-border: #e5e7eb;
    --sidebar-ring: #99a1af;
  
    /* Spacing */
    --spacing: 0.25rem;
  
    /* Container sizes */
    --container-xs: 20rem;
    --container-sm: 24rem;
    --container-md: 28rem;
    --container-lg: 32rem;
    --container-xl: 36rem;
    --container-2xl: 42rem;
    --container-3xl: 48rem;
    --container-4xl: 56rem;
    --container-5xl: 64rem;
    --container-6xl: 72rem;
  }
  
  /* LAB color support */
  @supports (color: lab(0% 0 0)) {
    :root {
      --background: lab(100% 0 0);
      --foreground: lab(1.90334% 0.278696 -5.48866);
      --card: lab(100% 0 0);
      --card-foreground: lab(1.90334% 0.278696 -5.48866);
      --popover: lab(100% 0 0);
      --popover-foreground: lab(1.90334% 0.278696 -5.48866);
      --primary-foreground: lab(98.2596% -0.247031 -0.706708);
      --secondary-foreground: lab(8.11897% 0.811279 -12.254);
      --muted: lab(96.1596% -0.0823438 -1.13575);
      --muted-foreground: lab(47.7841% -0.393182 -10.0268);
      --accent: lab(96.1596% -0.0823438 -1.13575);
      --accent-foreground: lab(8.11897% 0.811279 -12.254);
      --destructive: lab(48.4493% 77.4328 61.5452);
      --border: lab(91.6229% -0.159115 -2.26791);
      --input: lab(91.6229% -0.159115 -2.26791);
      --ring: lab(65.9269% -0.832707 -8.17473);
      --chart-1: lab(57.1026% 64.2584 89.8886);
      --chart-2: lab(55.0223% -41.0774 -3.90277);
      --chart-3: lab(30.372% -13.1853 -18.7887);
      --chart-4: lab(80.1641% 16.6016 99.2089);
      --chart-5: lab(72.7183% 31.8672 97.9407);
      --sidebar: lab(98.2596% -0.247031 -0.706708);
      --sidebar-foreground: lab(1.90334% 0.278696 -5.48866);
      --sidebar-primary: lab(8.11897% 0.811279 -12.254);
      --sidebar-primary-foreground: lab(98.2596% -0.247031 -0.706708);
      --sidebar-accent: lab(96.1596% -0.0823438 -1.13575);
      --sidebar-accent-foreground: lab(8.11897% 0.811279 -12.254);
      --sidebar-border: lab(91.6229% -0.159115 -2.26791);
      --sidebar-ring: lab(65.9269% -0.832707 -8.17473);
    }
  }
  
  /* Base styles */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    background-color: var(--background);
    color: var(--foreground);
    overflow-x: hidden;
    font-family: "Montserrat", sans-serif;
  }
  
  /* Utility classes using CSS variables */
  .bg-primary {
    background-color: var(--primary);
  }
  .bg-secondary {
    background-color: var(--secondary);
  }
  .bg-card {
    background-color: var(--card);
  }
  .bg-muted {
    background-color: var(--muted);
  }
  .bg-accent {
    background-color: var(--accent);
  }
  
  .text-primary {
    color: var(--primary);
  }
  .text-secondary {
    color: var(--secondary);
  }
  .text-foreground {
    color: var(--foreground);
  }
  .text-muted {
    color: var(--muted-foreground);
  }

  .border-primary {
    border-color: var(--primary);
  }
  
  .border-color {
    border-color: var(--border);
  }
  .rounded-default {
    border-radius: var(--radius);
  }
  
  /* Swiper Navigation Buttons */
  .swiper-button-next,
  .swiper-button-prev {
    color: var(--secondary);
    background: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition:
      opacity 0.3s ease,
      background 0.3s ease,
      transform 0.3s ease;
    border: 2px solid var(--secondary);
  }
  
  /* Position buttons outside the slider */
  .swiper-button-prev {
    left: -25px;
  }
  
  .swiper-button-next {
    right: -25px;
  }
  
  /* Show buttons on section hover */
  .group:hover .swiper-button-next,
  .group:hover .swiper-button-prev {
    opacity: 1;
  }
  
  .swiper-button-next:after,
  .swiper-button-prev:after {
    font-size: 20px;
    font-weight: bold;
  }
  
  .swiper-button-next:hover,
  .swiper-button-prev:hover {
    background: var(--secondary);
    color: white;
    transform: scale(1.1);
  }
  
  .swiper-button-disabled {
    opacity: 0.3 !important;
    cursor: not-allowed;
  }
  
  .group:hover .swiper-button-disabled {
    opacity: 0.3 !important;
  }
  
  /* Hero Slider Pagination */
  .hero-swiper .swiper-pagination {
    bottom: 20px;
  }
  
  .hero-swiper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: white;
    opacity: 0.5;
    transition: all 0.3s ease;
  }
  
  .hero-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--primary);
    width: 30px;
    border-radius: 6px;
  }

  /* Promotional banner: same pagination design as hero; sits further below slides */
  .promotional-banner-swiper .swiper-pagination {
    position: relative;
    bottom: auto;
    margin-top: 1rem;
    padding-top: 0.25rem;
    line-height: 1;
    display: none;
  }

  .promotional-banner-swiper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: var(--secondary);
    opacity: 0.5;
    transition: all 0.3s ease;
    display: none;
  }

  .promotional-banner-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--primary);
    width: 30px;
    border-radius: 6px;
    display: none;
  }
  
  /* Product Sliders - Proper Overflow Handling */
  .swiper {
    overflow: hidden;
    padding: 10px 0;
    margin: -10px 0;
  }
  
  .swiper-wrapper {
    display: flex;
  }
  
  /* Allow shadows to be visible - overflow-y visible, overflow-x hidden */
  .eid-collection-swiper,
  .top-selling-swiper,
  .sandal-swiper,
  .tarsal-swiper,
  .half-loafer-swiper,
  .formal-shoes-swiper,
  .casual-shoes-swiper {
    overflow-x: visible !important;
    overflow-y: visible !important;
    padding: 20px 0 !important;
    margin: -20px 0 !important;
  }
  
  /* Ensure containers don't overflow horizontally */
  section {
    overflow-x: hidden;
  }
  
  /* Add padding to slides for shadow visibility */
  .swiper-slide {
    box-sizing: border-box;
  }
  
  /* Product Card Hover Effects */
  .product-card:hover .product-card-sizes,
  .product-card:hover .product-card-colors,
  .product-card:hover .product-card-button {
    opacity: 1;
    transform: translateY(0);
  }

  /* Catalog card: attribute chips (match product-card.js hover) */
  .product-card .product-card-attr-btn {
    transition:
      border-color 0.15s ease,
      color 0.15s ease;
  }
  .product-card .product-card-sizes .product-card-attr-btn:hover,
  .product-card .product-card-colors .product-card-attr-btn:hover {
    border-color: var(--primary);
  }
  .product-card .product-card-sizes .product-card-attr-btn:hover {
    color: var(--primary);
  }
  
  /* Mobile: Always show arrows and product details */
  @media (max-width: 1023px) {
    .slider-prev,
    .slider-next {
      opacity: 1 !important;
    }
  
    .product-card-sizes,
    .product-card-colors,
    .product-card-button {
      opacity: 1 !important;
      transform: translateY(0) !important;
    }
  }
  
  .swiper-button-next,
  .swiper-button-prev {
    display: none !important;
  }
  
  .product-slider .slider-prev,
  .product-slider .slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
    z-index: 20;
  }
  
  .product-slider:hover .slider-prev,
  .product-slider:hover .slider-next {
    opacity: 1;
  }
  
  .slider-prev {
    left: -15px;
  }
  .slider-next {
    right: -15px;
  }
  
  /* Shop Page - Custom Checkbox Styling */
  .offer-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
  }
  
  .offer-checkbox:checked {
    background-color: var(--primary);
    border-color: var(--primary);
  }
  
  .offer-checkbox:checked::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
  }
  
  .offer-checkbox:hover {
    border-color: var(--primary);
  }
  
  /* Shop Page - Price Range Slider Styling */
  #price-range {
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(
      to right,
      var(--primary) 0%,
      var(--primary) 50%,
      #e5e7eb 50%,
      #e5e7eb 100%
    );
    outline: none;
    height: 8px;
    border-radius: 5px;
  }
  
  #price-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: white;
    border: 3px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  #price-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: white;
    border: 3px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  /* Product Details Page Styles */
  .thumbnail-swiper {
    overflow: visible !important;
  }
  
  .thumbnail-swiper .swiper-slide {
    transition: transform 0.3s ease;
  }
  
  .thumbnail-swiper .swiper-slide:hover {
    transform: scale(1.05);
  }
  
  /* Quantity input - hide spinner */
  #quantity-input::-webkit-outer-spin-button,
  #quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  
  #quantity-input[type="number"] {
    -moz-appearance: textfield;
  }
  
  /* Smooth transitions for interactive elements */
  .size-btn,
  .color-btn {
    transition: all 0.2s ease;
  }
  
  .size-btn:active,
  .color-btn:active {
    transform: scale(0.95);
  }
  
  /* Product image zoom effect */
  #main-image {
    transition: transform 0.3s ease;
  }
  
  /* Responsive adjustments */
  @media (max-width: 640px) {
    .thumbnail-swiper .swiper-slide {
      padding: 2px;
    }
  
    #image-counter {
      font-size: 0.75rem;
      padding: 0.25rem 0.5rem;
    }
  }
  
  /* Animation for description toggle */
  #description-content {
    transition: all 0.3s ease;
    overflow: hidden;
  }
  
  /* Hover effects for action buttons */
  #share-btn:hover i,
  #wishlist-btn:hover i {
    transform: scale(1.2);
    transition: transform 0.2s ease;
  }
  
  /* Related products responsive grid */
  @media (max-width: 640px) {
    #related-products {
      grid-template-columns: repeat(2, 1fr);
      gap: 0.5rem;
    }
  }
  
  @media (min-width: 641px) and (max-width: 768px) {
    #related-products {
      grid-template-columns: repeat(3, 1fr);
    }
  }
  
  @media (min-width: 769px) and (max-width: 1024px) {
    #related-products {
      grid-template-columns: repeat(4, 1fr);
    }
  }
  
  /* Image Zoom Lens Effect */
  #image-container {
    position: relative;
    cursor: crosshair;
  }
  
  #zoom-lens {
    position: absolute;
    border: 3px solid #003342;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    z-index: 100;
  }
  
  #zoom-result {
    position: absolute;
    border: 2px solid #003342;
    width: 300px;
    height: 300px;
    background-color: white;
    background-repeat: no-repeat;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 200;
    top: 0;
    left: calc(100% + 20px);
  }
  
  @media (max-width: 1024px) {
    #zoom-lens,
    #zoom-result {
      display: none !important;
    }
  }
  