/* Mobile-First Base Styles */
:root {
  --primary: #4a6cf7;
  --primary-dark: #3a5cd8;
  --secondary: #6c757d;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --info: #17a2b8;
  --light: #f8f9fa;
  --dark: #343a40;
  --white: #ffffff;
  --gray: #6c757d;
  --gray-light: #e9ecef;
  --border: #dee2e6;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 5px 20px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
  --transition-slow: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, .btn {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* Mobile-First Header Styles */
.site-header {
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Logo */
.logo img {
  max-height: 40px;
}

/* Improved Mobile Menu Toggle (hamburger) */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 21px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1002;
  position: relative;
}

.menu-toggle span {
  height: 3px;
  width: 100%;
  background: #1f2937;
  border-radius: 3px;
  transition: var(--transition);
  transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Improved Mobile Navigation */
.main-nav {
  position: fixed;
  top: 0;
  left: -100%;
  height: 100vh;
  width: 85%;
  max-width: 320px;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
  padding: 4rem 1.5rem 2rem;
  transition: var(--transition-slow);
  z-index: 1001;
  overflow-y: auto;
}

.main-nav.active {
  left: 0;
}

.main-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.main-nav ul li a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  color: #1f2937;
  font-size: 1.05rem;
  font-weight: 500;
  border-radius: 8px;
  transition: var(--transition);
}

.main-nav ul li a:hover {
  background-color: #f1f5f9;
  color: var(--primary);
  transform: translateX(5px);
}

.main-nav ul li a i {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
  color: #64748b;
}

/* Close button for mobile nav */
.nav-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  font-size: 1.2rem;
  color: #64748b;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.nav-close:hover {
  background: #ef4444;
  color: white;
  transform: rotate(90deg);
}

/* Overlay when menu opens */
#mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 999;
}

#mobile-overlay.active {
  display: block;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-form {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem;
        background: #f9fafb;
        border-bottom: 1px solid #e5e7eb;
        z-index: 999;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
        display: none;
    }
    
    .search-form.active {
        display: flex;
    }
    
    body.search-active .header-actions > *:not(.search-form) {
        display: none !important;
    }
    
    body.search-active .logo {
        display: none;
    }

.search-form input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px 0 0 6px;
  font-size: 1rem;
}

.search-form button {
  padding: 0.75rem 1rem;
  border: 1px solid #009999;
  background: #009999;
  color: #fff;
  border-radius: 0 6px 6px 0;
  transition: var(--transition);
}

.search-form button:hover {
  background: #007777; /* darker teal on hover */
}

.search-toggle {
  font-size: 1.2rem;
  color: #1f2937;
  padding: 0.5rem;
  border-radius: 50%;
  transition: var(--transition);
}

.search-toggle:hover {
  background: #f8f9fa;
  color: var(--primary);
}

.search-form input:focus {
  outline: none;
  box-shadow: none;
  border-color: #d1d5db; /* keeps same border color */
}
/* Cart icon */
.cart-icon {
  position: relative;
  color: #1f2937;
  text-decoration: none;
  font-size: 1.3rem;
  padding: 0.5rem;
  border-radius: 50%;
  transition: var(--transition);
}

.cart-icon:hover {
  background: #f8f9fa;
  color: var(--primary);
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ef4444;
  color: white;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 50%;
  font-weight: 600;
  min-width: 18px;
  text-align: center;
}

/* User display */
.user-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  padding: 0.5rem;
  border-radius: 6px;
  transition: var(--transition);
}

.user-display:hover {
  background: #f8f9fa;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #334155;
  font-size: 0.9rem;
}

.username {
  display: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: #334155;
}

.user-menu-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  color: #334155;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: var(--transition);
}

.user-menu-toggle:hover {
  background: #f8f9fa;
}

.toggle-text {
  font-size: 0.85rem;
  font-weight: 500;
}

.toggle-icon {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.user-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0;
  min-width: 150px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  z-index: 1001;
}

.user-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu li {
  margin: 0;
}

.user-menu a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  color: #334155;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
}

.user-menu a:hover {
  background: #f8f9fa;
  color: var(--primary);
}

.user-menu a i {
  width: 18px;
  text-align: center;
  color: #64748b;
}

/* Mobile overlay */
.mobile-overlay {
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  height: calc(100% - 70px);
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

body.no-scroll {
  overflow: hidden;
}

/* Image Slider Styles */
.slider-container {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  border-radius: 0 0 8px 8px;
}

.slider {
  display: flex;
  transition: transform 0.5s ease;
  height: 100%;
}

.slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: white;
  padding: 1.5rem;
}

.slide-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.slide-description {
  font-size: 0.9rem;
  opacity: 0.9;
}

.slider-controls {
  position: absolute;
  bottom: 1rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  z-index: 10;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.3s ease;
}

.slider-dot.active {
  background: white;
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s ease;
}

.slider-nav:hover {
  background: rgba(0, 0, 0, 0.7);
}

.slider-nav.prev {
  left: 1rem;
}

.slider-nav.next {
  right: 1rem;
}

/* Product Cards */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.product-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-image {
  height: 150px;
  width: 100%;
  object-fit: contain;
  background: #f8f9fa;
  padding: 0.5rem;
}

.product-info {
  padding: 1rem;
}

.product-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.current-price {
  font-weight: 700;
  color: var(--primary);
}

.original-price {
  font-size: 0.8rem;
  color: var(--gray);
  text-decoration: line-through;
}

.discount-badge {
  background: var(--danger);
  color: white;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-left: auto;
}

.add-to-cart-btn {
        padding: 8px 14px;        /* smaller button */
        font-size: 10px;          /* compact text */
        gap: 6px;                 /* tighter spacing */
        border-radius: 6px;       /* slightly smaller corners */
        letter-spacing: 0.3px;
}

.add-to-cart-btn i {
        font-size: 14px;          /* smaller icon */
}

.add-to-cart-btn:hover {
        transform: none;          /* remove lift effect for mobile */
        box-shadow: none;         /* reduce shadows for lighter UI */
}

/* CATEGORY NAV - Mobile First Approach */
.category-nav {
  background-color: #0f172a;
  color: white;
  position: relative;
  top: 0;
  z-index: 900;
}

.category-menu-toggle {
  display: flex;
  padding: 14px 20px;
  cursor: pointer;
  font-weight: 600;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  background-color: #1e293b;
}

.category-menu-toggle i {
  transition: transform 0.3s ease;
}

.category-nav-list {
  display: none;
  flex-direction: column;
  width: 100%;
  background: #0f172a;
}

.category-nav-list.active {
  display: flex;
}

.category-nav-list li a {
  padding: 14px 18px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
}

.category-nav-list li a i {
  margin-right: 10px;
  font-size: 14px;
}

/* Dropdowns in mobile open below item */
.dropdown-menu {
  position: static;
  background: #1e293b;
  border-radius: 0;
  box-shadow: none;
  min-width: 100%;
  transform: none;
  opacity: 1;
  visibility: visible;
  display: none;
}

.dropdown-menu li a {
  padding: 12px 25px !important;
  font-size: 13px;
}

.category-nav-list li.active > .dropdown-menu {
  display: block;
}

/* Arrows */
.dropdown-arrow {
  margin-left: auto;
  transition: transform 0.3s ease;
  font-size: 12px;
}

.has-dropdown.active > a > .dropdown-arrow {
  transform: rotate(180deg);
}

/* Section Headers */
.section-header {
  padding: 1.5rem 1rem 1rem;
  text-align: center;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #333;
}

.section-subtitle {
  color: var(--gray);
  font-size: 0.9rem;
}

/* Cart Notification */
.cart-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 1100;
  transform: translateX(100%);
  opacity: 0;
  transition: var(--transition);
}

.cart-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification-icon {
  color: var(--success);
  font-size: 1.2rem;
}

.notification-text {
  font-weight: 500;
}

.notification-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: var(--success);
  border-radius: 0 0 8px 8px;
  animation: progress 3s linear forwards;
}

@keyframes progress {
  from { width: 100%; }
  to { width: 0%; }
}


/* === Base Flyer Gallery === */
.flyer-gallery {
    display: grid;
    grid-template-columns: 1fr; /* Mobile: 1 per row */
    gap: 1.5rem;
    margin: 2rem auto;
    max-width: 1200px;
    padding: 0 1rem;
}

/* === Flyer Card === */
.flyer-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease;
    text-align: center;
}

.flyer-card:hover {
    transform: translateY(-6px);
}

.flyer-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.flyer-info {
    padding: 1rem;
}

.flyer-info i {
    font-size: 1.8rem;
    color: #009999;
    margin-bottom: 0.5rem;
}

.flyer-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    color: #1a2b50;
}

.flyer-info p {
    font-size: 0.9rem;
    color: #555;
}


.spotlight-controls {
    display: none;
}





/* Desktop styles */
@media (min-width: 992px) {
  
  .menu-toggle {
    display: none;
  }
  
  .main-nav {
    position: static;
    height: auto;
    width: auto;
    background: none;
    box-shadow: none;
    padding: 0;
    display: flex;
    overflow: visible;
  }
  
  .main-nav ul {
    flex-direction: row;
    gap: 2rem;
  }
  
  .main-nav ul li a {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight:500;
  }
  
  .main-nav ul li a:hover {
    background: #f1f5f9;
    transform: none;
  }
  
  .nav-close {
    display: none;
  }
  
  .search-form {
    position: static;
    border: none;
    background: transparent;
    padding: 0;
    width: auto;
    box-shadow: none;
  }
  
  .search-form input {
    width: 200px;
  }

  .search-toggle {
    display: none;
  }
  
  .username {
    display: inline;
  }
  
  .category-nav {
    position: sticky;
    top: 70px;
    z-index: 900;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }
  
  .category-menu-toggle {
    display: none;
  }
  
  .category-nav-list {
    display: flex !important;
    flex-direction: row;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
    height: auto !important;
  }
  
  .category-nav-list li {
    position: relative;
  }
  
  .category-nav-list li a {
    display: block;
    color: white;
    padding: 15px 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    border-bottom: none !important;
  }
  
  .category-nav-list li a i {
    margin-right: 8px;
    font-size: 14px;
  }
  
  .category-nav-list li a:hover {
    background-color: #1e293b;
    color: #f8fafc;
  }
  
  .category-nav-list .has-dropdown {
    position: relative;
  }
  
  /* Enhanced Dropdown Menu Styles for Desktop */
  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #1e293b;
    min-width: 220px;
    display: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    border-radius: 0 0 6px 6px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease, visibility 0s linear 0.3s;
    visibility: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
  }
  
  .dropdown-menu.nested {
    left: 100%;
    top: -1px;
    border-radius: 0 6px 6px 6px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);
  }
  
  .category-nav-list li:hover > .dropdown-menu,
  .category-nav-list li.active > .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    transition-delay: 0s;
  }
  
  .dropdown-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background-color 0.2s;
  }
  
  .dropdown-menu li:last-child {
    border-bottom: none;
  }
  
  .dropdown-menu li:hover {
    background-color: #334155;
  }
  
  .dropdown-menu li a {
    padding: 12px 20px !important;
    white-space: nowrap;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #e2e8f0;
    font-size: 14px;
    transition: all 0.2s ease;
  }
  
  .dropdown-menu li a:hover {
    color: white;
    padding-left: 25px !important;
    background-color: transparent;
  }
  
  .dropdown-arrow {
    font-size: 12px;
    margin-left: 8px;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  }
  
  .has-dropdown:hover > a > .dropdown-arrow,
  .has-dropdown.active > a > .dropdown-arrow {
    transform: rotate(180deg);
  }
  
  /* Nested dropdown arrows */
  .dropdown-menu .has-dropdown > a > .dropdown-arrow {
    transform: rotate(-90deg);
  }
  
  .dropdown-menu .has-dropdown:hover > a > .dropdown-arrow,
  .dropdown-menu .has-dropdown.active > a > .dropdown-arrow {
    transform: rotate(0deg);
  }
  
  /* Icons in dropdowns */
  .dropdown-menu [class^="fa-"] {
    width: 20px;
    text-align: center;
    margin-right: 10px;
    color: #94a3b8;
    transition: color 0.2s;
  }
  
  .dropdown-menu li:hover [class^="fa-"] {
    color: white;
  }
  
  /* Slider adjustments for desktop */
  .slider-container {
    height: 580px;
  }
  
  .slide-content {
    bottom: 15%;
    left: 10%;
    right: auto;
    max-width: 600px;
    background: rgba(0, 0, 0, 0.5); /* softer overlay for desktop */
    border-radius: 8px;
    padding: 2rem;
  }

  .slide-title {
    font-size: 2rem; /* bigger title */
    margin-bottom: 1rem;
  }

  .slide-description {
    font-size: 1.1rem; /* more readable */
    line-height: 1.5;
  }
  
  /* Products grid for desktop */
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    padding: 1rem 2rem;
  }


.spotlight-controls {
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        display: flex; /* override display:none */
        justify-content: space-between;
        pointer-events: none;
        transform: translateY(-50%);
        z-index: 10;
    }

    .spotlight-prev,
    .spotlight-next {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.4);
        color: #fff;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        pointer-events: auto;
        backdrop-filter: blur(4px);
    }

    .spotlight-prev i,
    .spotlight-next i {
        font-size: 1.2rem;
    }

    .spotlight-prev:hover,
    .spotlight-next:hover {
        background: rgba(0, 0, 0, 0.7);
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }

    .spotlight-prev:disabled,
    .spotlight-next:disabled {
        opacity: 0.3;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }


 .flyer-gallery {
        grid-template-columns: repeat(4, 1fr); /* Large desktop: 4 per row */
    }
}


/* === Flyer Card === */
.flyer-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease;
    text-align: center;
}

.flyer-card:hover {
    transform: translateY(-6px);
}

.flyer-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.flyer-info {
    padding: 1rem;
}

.flyer-info i {
    font-size: 1.8rem;
    color: #009999;
    margin-bottom: 0.5rem;
}

.flyer-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    color: #1a2b50;
}

.flyer-info p {
    font-size: 0.9rem;
    color: #555;
}

/* Medium devices (tablets) */
@media (min-width: 768px) and (max-width: 991px) {
  .user-display {
    padding: 6px 10px;
    gap: 8px;
  }
  
  .username {
    display: block;
    max-width: 80px;
    font-size: 0.85rem;
  }
  
  .toggle-text {
    display: none;
  }
  
  .user-menu-toggle {
    padding: 6px;
    min-width: 32px;
    justify-content: center;
  }
  
  .slider-container {
    height: 350px;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

   .flyer-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}