/* ==========================================================================
   Growth Agro Universal E-Commerce Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,600&family=Outfit:wght@400;500;600;700;800&family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', 'Poppins', 'DM Sans', sans-serif;

  /* Color Palette - Growth Agro Universal */
  --color-primary: #EA580C;
  --color-primary-hover: #C2410C;
  --color-primary-light: #FFF7ED;
  
  --color-secondary: #0D9488;
  --color-secondary-light: #F0FDFA;

  --color-accent: #F59E0B;
  --color-accent-light: #FEF3C7;

  --color-text-main: #0F172A;
  --color-text-muted: #64748B;
  --color-text-light: #94A3B8;

  --color-bg-main: #F8FAFC;
  --color-bg-surface: #FFFFFF;
  --color-bg-warm: #FFF7ED;
  --color-bg-gray: #F1F5F9;

  --color-border: #E2E8F0;
  --color-border-hover: #CBD5E1;

  --color-sale: #EF4444;
  --color-success: #10B981;
  --color-star: #F59E0B;

  /* Spacings & Radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.1);
  --shadow-hover: 0 12px 28px rgba(234, 88, 12, 0.14);

  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --container-width: 1240px;
}

/* Reset & Global */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-main);
  color: var(--color-text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
  background: none;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* ==========================================================================
   Announcement Bar
   ========================================================================== */
.top-announcement {
  background: linear-gradient(90deg, #FF7043, #FFA726, #FF7043);
  background-size: 200% auto;
  animation: shineGradient 6s linear infinite;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  padding: 0.55rem 1rem;
  letter-spacing: 0.02rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  z-index: 101;
}

@keyframes shineGradient {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.top-announcement a {
  text-decoration: underline;
  color: #fff;
  margin-left: 0.5rem;
}

/* ==========================================================================
   Main Header
   ========================================================================== */
.main-header {
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  transition: all var(--transition-normal);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
  gap: 1.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo img,
.site-header-logo {
  height: 44px;
  max-width: 180px;
  width: auto;
  object-fit: contain;
}

.brand-logo-fallback {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  line-height: 1;
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: opacity var(--transition-fast);
}

.brand-logo:hover .brand-logo-fallback {
  opacity: 0.9;
}

.brand-logo-fallback .brand-icon {
  color: var(--color-primary);
  font-size: 1.65rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-logo-fallback .brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  color: #0f172a;
}

/* Search Bar */
.header-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 0.75rem 3rem 0.75rem 1.25rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-bg-gray);
  font-size: 0.92rem;
  transition: all var(--transition-fast);
}

.search-input:focus {
  background: #ffffff;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-light);
}

.search-btn {
  position: absolute;
  right: 6px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.search-btn:hover {
  background: var(--color-primary-hover);
}

/* Predictive Search Results Dropdown */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  z-index: 1000;
  max-height: 380px;
  overflow-y: auto;
  display: none;
}

.search-results-dropdown.active {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-fast);
}

.search-result-item:hover {
  background: var(--color-primary-light);
}

.search-result-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-xs);
}

.search-result-info h4 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 2px;
}

.search-result-info .price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-primary);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-full);
  color: var(--color-text-main);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  position: relative;
}

.header-action-btn:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.header-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.cart-toggle-btn {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.cart-toggle-btn:hover {
  background: var(--color-primary);
  color: #ffffff;
}

.mobile-menu-toggle {
  display: none;
  font-size: 1.4rem;
  color: var(--color-text-main);
}

/* Navigation Bar */
.nav-bar {
  background: #ffffff;
  border-top: 1px solid var(--color-border);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0.4rem 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-text-main);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.nav-item a:hover,
.nav-item.active a {
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.nav-item.highlight a {
  background: #FFF3E0;
  color: #E65100;
  font-weight: 700;
}

/* ==========================================================================
   Hero Banner Slider
   ========================================================================== */
.hero-slider-section {
  position: relative;
  margin: 1.25rem 0 2rem;
}

.hero-slider-container {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: #FFF9F2;
}

.hero-slide {
  display: none;
  position: relative;
  aspect-ratio: 16 / 7.2;
}

.hero-slide.active {
  display: block;
  animation: fadeIn 0.4s ease-in-out;
}

.hero-slide a {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-content {
  max-width: 520px;
}

.hero-tag {
  display: inline-block;
  background: var(--color-accent);
  color: #000;
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.8rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.8rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hero-subtitle {
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.92);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--color-primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(255, 112, 67, 0.35);
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 112, 67, 0.45);
}

/* ==========================================================================
   Hero Banner Slider / Carousel
   ========================================================================== */
.hero-slider-section {
  padding: 0.75rem 0 1.25rem;
}

.hero-slider-container {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #FFF9F2 0%, #FFF1E6 100%);
  border: 1px solid #FED7AA;
  box-shadow: 0 4px 20px -2px rgba(234, 88, 12, 0.08);
  min-height: 320px;
  height: 320px;
}

.hero-slide {
  display: none;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.45s ease-in-out;
}

.hero-slide.active {
  display: block;
  opacity: 1;
}

.hero-slide-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 1.5rem 3.5rem 1.5rem 3rem;
  gap: 2rem;
}

.hero-content {
  flex: 1;
  max-width: 520px;
  z-index: 2;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  color: #EA580C;
  background: #FFEDD5;
  padding: 3px 12px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.65rem;
}

.hero-headline {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.15;
  margin: 0 0 0.5rem;
}

.hero-desc {
  color: #64748B;
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0 0 1.25rem;
  max-width: 440px;
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #EA580C;
  color: #FFFFFF !important;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.7rem 1.75rem;
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.28);
  transition: all 0.2s ease;
  text-decoration: none;
}

.hero-cta-btn:hover {
  background: #C2410C;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.35);
}

.hero-artwork-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  max-width: 540px;
  overflow: hidden;
}

.hero-artwork-wrap img {
  width: 100%;
  height: 290px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.4s ease;
}

.hero-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  color: #0F172A;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transition: all 0.2s ease;
}

.hero-slider-container:hover .hero-nav-arrow,
.hero-slider-container:focus-within .hero-nav-arrow {
  opacity: 1;
}

.hero-nav-arrow.hero-prev { left: 14px; }
.hero-nav-arrow.hero-next { right: 14px; }

.hero-nav-arrow:hover {
  background: #EA580C;
  color: #FFFFFF;
  border-color: #EA580C;
  transform: translateY(-50%) scale(1.05);
}

.slider-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.6);
  padding: 4px 10px;
  border-radius: 9999px;
  backdrop-filter: blur(4px);
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #CBD5E1;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.25s ease;
}

.slider-dot.active {
  width: 22px;
  border-radius: 9999px;
  background: #EA580C;
}

@media (max-width: 960px) {
  .hero-slider-container {
    height: auto;
    min-height: 280px;
  }
  .hero-slide-inner {
    padding: 1.5rem;
    gap: 1rem;
  }
  .hero-headline {
    font-size: 1.75rem;
  }
  .hero-artwork-wrap img {
    height: 220px;
  }
}

@media (max-width: 640px) {
  .hero-slider-section {
    padding: 0.5rem 0 1rem;
  }
  .hero-slider-container {
    height: 245px;
    min-height: 245px;
    max-height: 250px;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
  }
  .hero-slide-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: 0.75rem 30px 1.35rem 33px;
    gap: 0.4rem;
    height: 100%;
    position: relative;
  }
  .hero-content {
    flex: 1 1 47%;
    max-width: 48%;
    min-width: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }
  .hero-eyebrow {
    font-size: 0.65rem;
    padding: 2px 7px;
    margin-bottom: 0.25rem;
    line-height: 1.2;
    white-space: nowrap;
  }
  .hero-headline {
    font-size: 1.15rem;
    line-height: 1.16;
    margin: 0 0 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
  }
  .hero-desc {
    margin: 0 0 0.55rem;
    font-size: 0.73rem;
    line-height: 1.32;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
    color: var(--color-text-muted);
  }
  .hero-cta-btn {
    font-size: 0.76rem;
    padding: 0.38rem 0.85rem;
    white-space: nowrap;
    border-radius: 9999px;
  }
  .hero-artwork-wrap {
    flex: 1 1 53%;
    max-width: 53%;
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
  }
  .hero-artwork-wrap img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: right center;
    border-radius: var(--radius-sm);
  }
  .hero-nav-arrow {
    opacity: 0.85;
    width: 25px;
    height: 25px;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  }
  .hero-nav-arrow svg {
    width: 13px;
    height: 13px;
  }
  .hero-nav-arrow.hero-prev {
    left: 3px;
  }
  .hero-nav-arrow.hero-next {
    right: 3px;
  }
  /* Invisible 44px touch target extension for touch ergonomics */
  .hero-nav-arrow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
  }
  .slider-dots {
    bottom: 6px;
    padding: 2px 7px;
    gap: 4px;
  }
  .slider-dot {
    width: 6px;
    height: 6px;
  }
  .slider-dot.active {
    width: 16px;
  }
}

@media (max-width: 380px) {
  .hero-slider-container {
    height: 235px;
    min-height: 235px;
    max-height: 245px;
  }
  .hero-slide-inner {
    padding: 0.65rem 26px 1.25rem 28px;
    gap: 0.35rem;
  }
  .hero-content {
    flex: 1 1 48%;
    max-width: 49%;
  }
  .hero-artwork-wrap {
    flex: 1 1 52%;
    max-width: 52%;
  }
  .hero-headline {
    font-size: 1.02rem;
  }
  .hero-desc {
    font-size: 0.68rem;
    line-height: 1.28;
    margin: 0 0 0.45rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .hero-cta-btn {
    font-size: 0.72rem;
    padding: 0.32rem 0.75rem;
  }
  .hero-nav-arrow {
    width: 23px;
    height: 23px;
  }
  .hero-nav-arrow svg {
    width: 12px;
    height: 12px;
  }
  .hero-nav-arrow.hero-prev {
    left: 2px;
  }
  .hero-nav-arrow.hero-next {
    right: 2px;
  }
}

/* ==========================================================================
   Section Headers
   ========================================================================== */
/* ==========================================================================
   Section Headers
   ========================================================================== */
.section-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.section-header .section-subtitle {
  color: var(--color-primary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  margin-bottom: 0.2rem;
  display: block;
}

.section-header .section-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: var(--color-text-main);
  font-weight: 800;
  line-height: 1.2;
}

/* ==========================================================================
   Categories Showcase
   ========================================================================== */
.categories-section {
  padding: 1.25rem 0 2rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 0.85rem;
}

.homepage-categories-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 1150px) {
  .homepage-categories-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
  }
}

@media (max-width: 640px) {
  .categories-section {
    padding: 1rem 0 1.5rem;
  }
  .homepage-categories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.65rem !important;
  }
  .homepage-categories-grid .category-card {
    padding: 0.85rem 0.5rem !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 115px;
    border-radius: var(--radius-sm);
  }
  .homepage-categories-grid .category-img-wrap {
    width: 52px !important;
    height: 52px !important;
    margin-bottom: 0.45rem !important;
  }
  .homepage-categories-grid .category-title {
    font-size: 0.82rem !important;
    font-weight: 700;
    margin-bottom: 0.2rem !important;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .homepage-categories-grid .category-count {
    font-size: 0.72rem !important;
    color: var(--color-text-muted);
  }
}

.more-categories-card .more-categories-icon-wrap {
  background: #FFF7ED;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
}

.more-categories-card:hover .more-categories-icon-wrap {
  background: var(--color-primary);
  color: #FFFFFF;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #ffffff;
  padding: 0.85rem 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-hover);
}

.category-img-wrap {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 0.5rem;
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: transform var(--transition-normal);
}

.category-card:hover .category-img-wrap {
  transform: scale(1.08);
}

.category-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.category-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: 0.15rem;
  line-height: 1.2;
}

.category-count {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Product Cards & Grid
   ========================================================================== */
.products-section {
  padding: 1.75rem 0;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.catalog-layout-grid main .products-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1200px) {
  .catalog-layout-grid main .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .catalog-layout-grid main .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.product-card {
  background: #ffffff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-normal);
}

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

.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  overflow: hidden;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.product-img.hover-img {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  padding: 8px;
}

.product-card:hover .product-img.main-img {
  opacity: 0;
}

.product-card:hover .product-img.hover-img {
  opacity: 1;
  transform: scale(1.04);
}

.product-card:hover .product-img:only-child {
  opacity: 1;
  transform: scale(1.04);
}

/* Badges */
.product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 0.2rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 800;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  z-index: 2;
}

.badge-sale {
  background: var(--color-sale);
  color: #fff;
}

.badge-new {
  background: var(--color-success);
  color: #fff;
}

.quick-view-btn {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  color: var(--color-text-main);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: all var(--transition-fast);
  white-space: nowrap;
  z-index: 5;
  border: 1px solid var(--color-border);
}

.product-card:hover .quick-view-btn {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.quick-view-btn:hover {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

/* Card Body */
.product-info {
  padding: 0.85rem 0.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-category {
  font-size: 0.72rem;
  color: var(--color-text-light);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
  letter-spacing: 0.03em;
}

.product-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-text-main);
  line-height: 1.3;
  margin-bottom: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.3rem;
}

.product-title a:hover {
  color: var(--color-primary);
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  margin-bottom: 0.4rem;
}

.rating-stars {
  color: var(--color-star);
  font-size: 0.75rem;
}

.rating-count {
  color: var(--color-text-light);
  font-size: 0.72rem;
}

/* Price */
.product-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.current-price {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--color-text-main);
}

.original-price {
  font-size: 0.82rem;
  color: var(--color-text-light);
  text-decoration: line-through;
}

.discount-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-sale);
  background: #FEF2F2;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
}

/* Size Pills in Card */
.product-sizes-preview {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
  min-height: 1.2rem;
}

.size-pill {
  font-size: 0.68rem;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--color-border);
  background: var(--color-bg-gray);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.size-pill:hover,
.size-pill.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 700;
}

/* Add to Cart Card Button */
.btn-card-action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.84rem;
  border-radius: var(--radius-sm);
  margin-top: auto;
  border: 1px solid #FED7AA;
  transition: all var(--transition-fast);
}

.btn-card-action:hover {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

/* ==========================================================================
   Promotional Banners Split
   ========================================================================== */
.promo-banners-section {
  padding: 1.5rem 0 3rem;
}

.promo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.promo-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-md);
}

.promo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.promo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.65) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  color: #fff;
}

.promo-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.promo-desc {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 1rem;
}

/* ==========================================================================
   Trust Badges Section
   ========================================================================== */
.trust-badges-section {
  padding: 3rem 0;
  background: #ffffff;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin: 2rem 0;
}

.trust-badges-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.trust-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.trust-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: 2px;
}

.trust-info p {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Cart Drawer (Slide-out)
   ========================================================================== */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.cart-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  z-index: 999;
  box-shadow: -4px 0 25px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
}

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

.drawer-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.drawer-close-btn {
  font-size: 1.3rem;
  color: var(--color-text-light);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.drawer-close-btn:hover {
  background: var(--color-bg-gray);
  color: var(--color-text-main);
}

/* Free Shipping Progress Meter */
.drawer-free-shipping {
  padding: 0.9rem 1.25rem;
  background: var(--color-bg-warm);
  border-bottom: 1px solid var(--color-border);
}

.shipping-progress-text {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.4rem;
}

.shipping-progress-bar {
  width: 100%;
  height: 6px;
  background: #FFE0B2;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.shipping-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #FF7043, #26A69A);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.drawer-empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.drawer-empty-icon {
  font-size: 3rem;
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.cart-item-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--color-bg-gray);
}

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

.cart-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  line-height: 1.3;
}

.cart-item-variant {
  font-size: 0.78rem;
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
}

.cart-item-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: #ffffff;
}

.qty-btn {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--color-text-main);
  transition: background var(--transition-fast);
}

.qty-btn:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.qty-val {
  padding: 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}

.cart-item-remove {
  color: var(--color-sale);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.drawer-footer {
  padding: 1.25rem;
  background: #ffffff;
  border-top: 1px solid var(--color-border);
}

.drawer-subtotal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.drawer-subtotal-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.drawer-subtotal-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-primary);
}

.btn-checkout {
  width: 100%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  padding: 0.9rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.98rem;
  box-shadow: 0 4px 12px rgba(255, 112, 67, 0.35);
  transition: all var(--transition-fast);
}

.btn-checkout:hover {
  background: var(--color-primary-hover);
}

/* ==========================================================================
   Quick View Modal
   ========================================================================== */
.quick-view-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 1002;
  opacity: 0;
  visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  transition: all var(--transition-normal);
}

.quick-view-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.quick-view-modal {
  background: #ffffff;
  width: 100%;
  max-width: 820px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform var(--transition-normal);
}

.quick-view-modal-overlay.active .quick-view-modal {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-bg-gray);
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 10;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--color-sale);
  color: #fff;
}

/* Modal Content Grid */
.modal-product-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2rem;
  padding: 2rem;
}

.modal-gallery-main {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg-gray);
}

.modal-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   Product Detail Page Specifics
   ========================================================================== */
.product-detail-section {
  padding: 2.5rem 0;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.gallery-thumbs {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.gallery-thumb {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  overflow: hidden;
  background: var(--color-bg-gray);
  transition: all var(--transition-fast);
}

.gallery-thumb.active,
.gallery-thumb:hover {
  border-color: var(--color-primary);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-title {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.detail-sku {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

.detail-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--color-border);
}

.detail-current-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
}

.detail-original-price {
  font-size: 1.2rem;
  color: var(--color-text-light);
  text-decoration: line-through;
}

.option-group {
  margin-bottom: 1.5rem;
}

.option-label {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  display: flex;
  justify-content: space-between;
}

.size-selector-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.size-pill-lg {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.size-pill-lg:hover,
.size-pill-lg.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* Fast 1-Click Order Cash on Delivery Form Box */
.instant-cod-box {
  background: #FFF9F2;
  border: 2px dashed #FFCC80;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.instant-cod-box h4 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: #E65100;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.instant-cod-box p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.cod-form-group {
  margin-bottom: 0.85rem;
}

.cod-form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #FFE0B2;
  border-radius: var(--radius-sm);
  background: #ffffff;
  font-size: 0.9rem;
}

.cod-form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

/* ==========================================================================
   Checkout Page
   ========================================================================== */
.checkout-section {
  padding: 2.5rem 0 4rem;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: start;
}

.checkout-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.checkout-card h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--color-border);
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--color-text-main);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-gray);
  font-size: 0.92rem;
  transition: all var(--transition-fast);
}

.form-control:focus {
  background: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.delivery-area-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.area-option-card {
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.area-option-card.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.area-option-card .area-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.area-option-card .area-charge {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 800;
}

/* Order Summary Box */
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

.summary-row.total-row {
  border-top: 2px dashed var(--color-border);
  margin-top: 0.8rem;
  padding-top: 1rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-text-main);
}

.summary-row.total-row .val {
  color: var(--color-primary);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.main-footer {
  background: #1E272E;
  color: #D2D7D9;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}

.footer-about p {
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 1.2rem;
  color: #A4B0BE;
}

.footer-contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.88rem;
}

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.88rem;
}

.footer-links-list a:hover {
  color: var(--color-primary);
  padding-left: 4px;
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all var(--transition-fast);
}

.social-btn:hover {
  background: var(--color-primary);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #747D8C;
}

/* ==========================================================================
   Floating Widgets (WhatsApp & Sticky Bottom Bar)
   ========================================================================== */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  background: #25D366;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-full);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  font-weight: 700;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.floating-whatsapp:hover {
  transform: scale(1.06) translateY(-2px);
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.5);
  color: #fff;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast-msg {
  background: #2D3436;
  color: #fff;
  padding: 0.9rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: slideInRight 0.3s ease;
}

.toast-msg.toast-success {
  background: #00B894;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1150px) {
  .products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .trust-badges-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   Mobile-First Storefront Responsive Architecture
   ========================================================================== */

/* Off-Canvas Mobile Navigation Drawer Styles */
.mobile-nav-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(4px);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.mobile-nav-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 84%;
  max-width: 320px;
  background: #ffffff;
  z-index: 1050;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.16);
  transform: translateX(-100%);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mobile-nav-drawer.active {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  background: #f8fafc;
}

.mobile-drawer-brand {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.mobile-drawer-close {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--color-bg-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--color-text-main);
  border: 1px solid var(--color-border);
  transition: all var(--transition-fast);
}

.mobile-drawer-close:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}

.mobile-drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-drawer-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-drawer-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
  margin-bottom: 0.25rem;
}

.mobile-drawer-menu,
.mobile-drawer-categories {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mobile-drawer-menu a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-main);
  transition: all var(--transition-fast);
}

.mobile-drawer-menu a:hover,
.mobile-drawer-menu a.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.mobile-cat-item {
  border-radius: var(--radius-sm);
  background: #f8fafc;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.mobile-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.8rem;
}

.mobile-cat-header a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-main);
  flex: 1;
}

.mobile-sub-toggle {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.mobile-cat-item.expanded .mobile-sub-toggle {
  transform: rotate(180deg);
}

.mobile-subcat-list {
  display: none;
  list-style: none;
  padding: 0.35rem 0.8rem 0.65rem 1.4rem;
  margin: 0;
  border-top: 1px solid var(--color-border);
  background: #ffffff;
  flex-direction: column;
  gap: 0.4rem;
}

.mobile-cat-item.expanded .mobile-subcat-list {
  display: flex;
}

.mobile-subcat-list a {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  padding: 0.25rem 0;
  display: block;
}

.mobile-subcat-list a:hover {
  color: var(--color-primary);
}

/* Catalog Sidebar Drawer Styles (Mobile <= 860px) */
.mobile-filter-trigger-btn {
  display: none;
}

.filter-drawer-close {
  display: none;
}

.filter-drawer-overlay {
  display: none;
}

.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.catalog-sort-form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.sort-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #475569;
}

.sort-select {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  background: #fff;
  color: #1e293b;
}

@media (max-width: 860px) {
  .catalog-layout-grid {
    display: block !important;
  }

  .catalog-toolbar {
    padding: 0.75rem 0.85rem;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
  }

  .mobile-filter-trigger-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 0.4rem;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border: 1px solid #fed7aa;
    padding: 0.48rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
  }

  .mobile-filter-trigger-btn:hover {
    background: var(--color-primary);
    color: #ffffff;
  }

  .active-filter-badge {
    background: var(--color-primary);
    color: #fff;
    font-size: 0.68rem;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .catalog-product-count {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    font-weight: 600;
  }

  .catalog-sort-form {
    gap: 0.35rem;
  }

  .sort-label {
    font-size: 0.82rem;
  }

  .sort-select {
    padding: 0.4rem 0.6rem;
    font-size: 0.82rem;
  }

  /* Catalog Sidebar as Drawer */
  .filter-drawer-overlay {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(3px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
  }

  .filter-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .catalog-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 85%;
    max-width: 320px;
    background: #ffffff;
    z-index: 1050;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.16);
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    overflow: hidden;
  }

  .catalog-sidebar.active {
    transform: translateX(0);
  }

  .sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    background: #f8fafc;
  }

  .filter-drawer-close {
    display: flex !important;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--color-bg-gray);
    font-size: 1rem;
    cursor: pointer;
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
  }

  .sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
  }
}

/* Breakpoint: <= 768px (Mobile & Small Tablets) */
@media (max-width: 768px) {
  /* Header Row 1 & Row 2 Mobile Layout */
  .main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  }

  .header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0;
    gap: 0.5rem;
  }

  .mobile-menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--color-bg-gray);
    color: var(--color-text-main);
    cursor: pointer;
    border: 1px solid var(--color-border);
    flex-shrink: 0;
    transition: all var(--transition-fast);
  }

  .mobile-menu-toggle:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
  }

  .brand-logo {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
  }

  .brand-logo img,
  .site-header-logo {
    height: 38px !important;
    max-width: 145px !important;
    width: auto;
    object-fit: contain;
  }

  .brand-logo-fallback {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    line-height: 1;
  }

  .brand-logo-fallback .brand-icon {
    color: var(--color-primary);
    font-size: 1.3rem;
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
  }

  .header-action-btn {
    padding: 0.45rem 0.65rem;
    font-size: 0.82rem;
    gap: 0.35rem;
    min-height: 38px;
  }

  .phone-action-btn {
    padding: 0.48rem;
    background: var(--color-bg-gray);
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
  }

  .phone-action-btn .action-text {
    display: none;
  }

  .cart-toggle-btn {
    padding: 0.45rem 0.75rem;
  }

  /* Row 2: Search Bar spans full width */
  .header-search {
    order: 3;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 0.2rem;
  }

  .search-input {
    width: 100%;
    padding: 0.65rem 2.8rem 0.65rem 1rem;
    font-size: 0.88rem;
    min-height: 42px;
    border-radius: var(--radius-full);
  }

  .search-btn {
    width: 32px;
    height: 32px;
    right: 5px;
  }

  .search-results-dropdown {
    width: 100%;
    max-height: 300px;
  }

  /* Horizontal Category Navigation Bar */
  .nav-bar {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    border-top: 1px solid var(--color-border);
    scrollbar-width: none;
  }

  .nav-bar::-webkit-scrollbar {
    display: none;
  }

  .nav-container {
    padding: 0 0.5rem;
  }

  .nav-links {
    display: flex;
    flex-wrap: nowrap !important;
    gap: 0.35rem;
    padding: 0.4rem 0.2rem;
    justify-content: flex-start;
  }

  .nav-item {
    flex-shrink: 0;
  }

  .nav-item a {
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  /* Product Grids: Balanced 2-Column Mobile Grid */
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.65rem !important;
  }

  .catalog-layout-grid main .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .product-card {
    border-radius: var(--radius-sm);
  }

  .product-media {
    aspect-ratio: 1 / 1;
    padding: 6px;
  }

  .product-badge {
    top: 6px;
    left: 6px;
    padding: 0.15rem 0.4rem;
    font-size: 0.62rem;
  }

  .quick-view-btn {
    display: none;
  }

  .product-info {
    padding: 0.65rem 0.55rem;
    display: flex;
    flex-direction: column;
    flex: 1;
  }

  .product-category {
    font-size: 0.68rem;
    margin-bottom: 0.15rem;
  }

  .product-title {
    font-size: 0.82rem;
    line-height: 1.3;
    height: 2.2rem;
    margin-bottom: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .product-rating {
    font-size: 0.72rem;
    gap: 0.2rem;
    margin-bottom: 0.35rem;
  }

  .rating-stars {
    font-size: 0.7rem;
  }

  .product-price-wrap {
    gap: 0.35rem;
    margin-bottom: 0.45rem;
    flex-wrap: wrap;
    align-items: baseline;
  }

  .current-price {
    font-size: 0.98rem;
    font-weight: 800;
  }

  .original-price {
    font-size: 0.75rem;
  }

  .discount-tag {
    font-size: 0.65rem;
    padding: 1px 4px;
  }

  .product-sizes-preview {
    gap: 0.2rem;
    margin-bottom: 0.5rem;
    min-height: 1rem;
    overflow: hidden;
    max-height: 1.4rem;
  }

  .size-pill {
    font-size: 0.62rem;
    padding: 0.1rem 0.35rem;
  }

  .btn-card-action {
    width: 100%;
    padding: 0.55rem 0.3rem;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: var(--radius-xs);
    min-height: 38px;
    margin-top: auto;
  }

  /* Promo and Badges */
  .promo-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .trust-badges-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }

  /* Product Detail Page Mobile */
  .product-detail-section {
    padding: 1.25rem 0 2.5rem;
  }

  .product-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .gallery-thumbs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .gallery-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
  }

  .product-detail-title {
    font-size: 1.35rem !important;
    line-height: 1.25;
  }

  .detail-current-price {
    font-size: 1.5rem !important;
  }

  .detail-original-price {
    font-size: 1rem !important;
  }

  .size-pill-lg {
    padding: 0.45rem 0.8rem;
    font-size: 0.82rem;
    min-height: 38px;
  }

  #productTabs {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  #productTabs::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    padding: 0.75rem 1rem !important;
    font-size: 0.85rem !important;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .instant-cod-box {
    padding: 1rem !important;
  }

  .cod-form-input {
    font-size: 0.95rem !important;
    min-height: 44px !important;
    padding: 0.65rem 0.8rem !important;
  }

  /* Cart & Checkout Mobile */
  .checkout-section {
    padding: 1.25rem 0 2.5rem;
  }

  .checkout-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .checkout-card {
    padding: 1.25rem !important;
  }

  .checkout-card h3 {
    font-size: 1.15rem !important;
    margin-bottom: 1rem !important;
  }

  .form-control {
    font-size: 0.95rem !important;
    min-height: 44px !important;
    padding: 0.65rem 0.85rem !important;
  }

  .cart-item {
    gap: 0.75rem;
  }

  .cart-item-img {
    width: 68px;
    height: 68px;
  }

  .cart-drawer {
    max-width: 100%;
  }

  /* Footer Mobile */
  .main-footer {
    padding: 2.5rem 0 1.5rem;
    margin-top: 2.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 1.75rem !important;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  /* Floating WhatsApp Widget */
  .whatsapp-floating-container {
    bottom: 16px;
    right: 16px;
  }

  .whatsapp-floating-btn {
    width: 52px;
    height: 52px;
  }

  .whatsapp-floating-btn svg {
    width: 28px;
    height: 28px;
  }

  .whatsapp-popup {
    width: calc(100vw - 32px) !important;
    max-width: 320px !important;
    right: 0 !important;
    bottom: 66px !important;
  }
}

/* Breakpoint: <= 480px (Smartphones 360px–480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  .trust-badges-grid {
    grid-template-columns: 1fr;
  }

  .brand-logo img,
  .site-header-logo {
    height: 34px !important;
    max-width: 125px !important;
  }

  .brand-logo-fallback {
    font-size: 1.15rem;
  }

  .cart-toggle-btn .action-text {
    display: none;
  }

  .cart-toggle-btn {
    padding: 0.45rem;
  }

  .delivery-area-options {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  .area-option-card {
    padding: 0.75rem !important;
  }

  .quick-view-modal {
    max-height: 94vh;
  }

  .modal-product-grid {
    grid-template-columns: 1fr !important;
    padding: 1.25rem !important;
    gap: 1.25rem !important;
  }
}

/* Global Mobile Resilience & Zero Horizontal Overflow Safeguard */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100%;
}

*, *::before, *::after {
  max-width: 100%;
}
