/*
  Millet Goodness - Interactive Stylesheet v3.6
  Date: 28-Oct-2025
  Developer: Gemini
  - MODIFIED: Increased header z-index to 2001 to appear above mobile drawer.
  - Verified drawer and overlay z-index values for correct stacking.
*/

/* 1. Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700&family=Playfair+Display:wght@700&family=Poppins:wght@400;500;600;700&display=swap');

/* 2. Root Variables */
:root {
  --primary: #8d6e63;
  --primary-dark: #6d4c41;
  --primary-light: #d7ccc8;
  --secondary: #a1887f;
  --accent: #5d4037;
  --brown-light: #bcaaa4;
  --brown-dark: #4e342e;
  --text-dark: #3e2723;
  --text-light: #795548;
  --background: #fff8f0;
  --white: #ffffff;
  --light-gray: #f5f5f5;
  --border: #d7ccc8;
  --border-light: #e0e0e0;
  /* Lighter border */
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-strong: 0 10px 30px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-long: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  --success: #4caf50;
  --error: #f44336;
  --info: #2196f3;
  --header-height: 80px;
}

/* 3. Global & Typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--background);
  overflow-x: hidden;
  padding-top: var(--header-height);
}

/* Fluid Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
  color: var(--brown-dark);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
}

h4 {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
}

p {
  color: var(--text-light);
  margin-bottom: 1rem;
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

a:hover {
  color: var(--primary);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: "Poppins", sans-serif;
  background: none;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* 4. Animation Keyframes */

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse-shadow {
  0% {
    box-shadow: 0 0 0 0 rgba(141, 110, 99, 0.4);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(141, 110, 99, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(141, 110, 99, 0);
  }
}

/* Add-to-Cart Animation Keyframes */
@keyframes fly-to-cart {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    opacity: 1;
  }

  30% {
    transform: translate(calc(var(--translateX) * 0.3), calc(var(--translateY) * 0.3)) scale(0.8) rotate(15deg);
    opacity: 0.9;
  }

  100% {
    transform: translate(var(--translateX), var(--translateY)) scale(0.1) rotate(360deg);
    opacity: 0;
  }
}

/* Skeleton Loader Animation */
@keyframes shimmer {
  0% {
    background-position: -468px 0;
  }

  100% {
    background-position: 468px 0;
  }
}

/* 5. Scroll-Triggered Animations (CSS-Only) */
.animate-on-scroll {
  opacity: 0;
  /* Start hidden */
}

@supports (animation-timeline: view()) {
  .animate-on-scroll {
    animation-duration: 0.8s;
    animation-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
    animation-fill-mode: both;
    animation-timeline: view();
    animation-range: entry 10% cover 30%;
    /* Start animation when 10% in view, end 30% */
  }

  .animate-fade-up {
    animation-name: fade-in-up;
  }

  .animate-slide-left {
    animation-name: slide-in-left;
  }

  .animate-slide-right {
    animation-name: slide-in-right;
  }

  .animate-scale-in {
    animation-name: scale-in;
  }
}

/* 6. Enhanced Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transform: translateZ(0);
  /* For stacking context */
}

.btn i {
  font-size: 1.1em;
  line-height: 1;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--background), 0 0 0 6px var(--primary);
}

/* Ripple effect on click */
.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  opacity: 0;
  border-radius: 50%;
  transform: scale(1, 1) translate(-50%, -50%);
  transform-origin: 50% 50%;
  z-index: -1;
}

.btn:active::after {
  transition: all 0s;
  transform: scale(50, 50) translate(-50%, -50%);
  opacity: 1;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  color: var(--white);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--white);
  border-color: var(--secondary);
}

.btn-secondary:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  color: var(--white);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline:hover,
.btn-outline.active {
  background-color: var(--primary);
  color: var(--white);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

/* Special button for hero */
.hero .btn-outline {
  border-color: var(--white);
  color: var(--white);
}

.hero .btn-outline:hover {
  background: var(--white);
  color: var(--primary-dark);
}

.whatsapp-btn {
  background-color: #25d366;
  color: white;
  border-color: #25d366;
}

.whatsapp-btn:hover {
  background-color: #128c7e;
  border-color: #128c7e;
  transform: translateY(-4px);
  box-shadow: 0 6px 15px rgba(37, 211, 102, 0.3);
  color: var(--white);
}

.whatsapp-btn i {
  font-size: 1.25rem;
}

.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  /* 60px to 90px */
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
  color: var(--brown-dark);
}

.section-title:after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary), var(--primary-light));
  border-radius: 2px;
}

.card {
  background-color: var(--white);
  border-radius: 20px;
  /* Softer radius */
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

/* 7. Header & Mobile Navigation */
header {
  position: fixed;
  top: 0;
  /* MODIFIED: Increased z-index */
  z-index: 2001;
  width: 100%;
  height: var(--header-height);
  padding: 15px 0;
  transition: var(--transition);
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

header:not(.scrolled) {
  background-color: var(--white);
  border-bottom-color: var(--border-light);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

header.scrolled {
  height: 70px;
  padding: 10px 0;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2001;
  /* Ensure logo is also above drawer if needed */
  flex-shrink: 0;
}

.logo img {
  height: 45px;
  width: 45px;
  object-fit: contain;
  transition: var(--transition);
}

header.scrolled .logo img {
  height: 40px;
  width: 40px;
}

.logo h1 {
  font-family: "Cinzel Decorative", serif;
  font-size: 1.6rem;
  margin-bottom: 0;
  color: var(--primary);
  font-weight: 700;
  white-space: nowrap;
}

/* Desktop Nav */
.desktop-nav .nav-menu {
  display: flex;
  gap: 35px;
}

.desktop-nav .nav-menu a {
  font-weight: 600;
  position: relative;
  padding: 5px 0;
  font-size: 1rem;
  color: var(--text-light);
}

.desktop-nav .nav-menu a:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

.desktop-nav .nav-menu a:hover,
.desktop-nav .nav-menu a.active {
  color: var(--primary-dark);
}

.desktop-nav .nav-menu a:hover:after,
.desktop-nav .nav-menu a.active:after {
  width: 100%;
}

/* Nav Container */
.nav-container {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-icons {
  display: flex;
  align-items: center;
  gap: 25px;
  z-index: 2001;
  /* Ensure icons are also above drawer */
}

.nav-icons a {
  font-size: 1.35rem;
  /* 22px */
  color: var(--text-dark);
  position: relative;
  transition: var(--transition);
}

.nav-icons a:hover {
  color: var(--primary);
  transform: scale(1.15) rotate(5deg);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -12px;
  background-color: var(--accent);
  color: white;
  font-size: 0.75rem;
  /* 12px */
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  border: 2px solid var(--white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Mobile Nav Drawer */
.mobile-menu-btn {
  display: none;
  font-size: 1.7rem;
  /* 28px */
  cursor: pointer;
  z-index: 2001;
  /* Ensure hamburger is also above drawer */
  color: var(--text-dark);
  transition: var(--transition);
}

.mobile-menu-btn:hover {
  color: var(--primary);
}

/* Drawer is outside <header> */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  max-width: 80vw;
  height: 100%;
  background-color: #C2B2B2;
  box-shadow: var(--shadow-strong);
  /* Below header (2001), Above overlay (1999) */
  z-index: 2000;
  transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  padding: 120px 40px 40px;
  display: flex;
  flex-direction: column;
}

.mobile-nav-drawer.active {
  right: 0;
}

.mobile-nav-drawer .nav-menu {
  flex-direction: column;
  gap: 25px;
  align-items: flex-start;
  display: flex;
}

.mobile-nav-drawer .nav-menu a {
  font-size: 1.3rem;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  color: var(--primary-dark);
  transform-origin: left;
  transition: var(--transition);
}

.mobile-nav-drawer .nav-menu a:hover {
  transform: translateX(10px);
  color: var(--primary);
}

/* Overlay */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  /* Below drawer (2000) */
  z-index: 1999;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.nav-overlay.active {
  display: block;
  opacity: 1;
}

/* 8. Page Styles */
.page {
  display: none;
  animation: fadeIn 0.5s ease;
}

.page.active {
  display: block;
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),
    url("cover.jpg") no-repeat center center/cover;
  /* Removed fixed attachment for better mobile support */
  color: white;
  padding: clamp(6rem, 20vh, 12rem) 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 0 40px 40px;
  overflow: hidden;
  /* Removed margin-top, body padding handles offset */
}

.hero h1 {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  color: var(--white);
}

.hero p {
  font-size: clamp(1.1rem, 3vw, 1.3rem);
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  color: rgba(255, 255, 255, 0.9);
}

.hero-btns {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Categories Section */
.categories {
  background-color: var(--white);
  border-radius: 40px 40px 0 0;
  margin-top: -40px;
  /* Overlap the hero section */
  position: relative;
  /* For overlap */
  z-index: 10;
  padding-top: clamp(4rem, 9vw, 7rem);
}

/* Categories: single-row horizontal list with thin border */
.categories-grid {
  display: flex;
  gap: 25px;
  /* Increased gap */
  align-items: center;
  justify-content: center;
  /* center aligned */
  flex-wrap: wrap;
  /* allow wrapping on small screens */
  width: 100%;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.category-card {
  text-align: center;
  padding: 12px 14px;
  min-width: 160px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: var(--white);
  box-shadow: none;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
}

.category-icon {
  width: 90px;
  /* Increased size */
  height: 90px;
  /* Increased size */
  margin: 0;
  border-radius: 50%;
  /* Make it round */
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--background);
  transition: var(--transition);
  border: 1px solid var(--border);
  overflow: hidden;
  /* Ensure content is clipped */
}

.category-icon img {
  width: 60px;
  /* Increased size */
  height: 60px;
  /* Increased size */
  object-fit: contain;
  border-radius: 50%;
  /* Ensure image itself is rounded */
}

.category-card {
  text-align: center;
  padding: 15px 20px;
  min-width: 140px;
  border-radius: 15px;
  border: 1px solid var(--border-light);
  background: var(--white);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  /* Stack vertically */
  gap: 15px;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  /* clickable */
  transition: var(--transition);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.category-card h3 {
  margin: 0 0 0 10px;
  font-size: 0.95rem;
  color: var(--primary-dark);
}

.category-card p {
  display: none;
}

.category-card .btn-outline {
  display: none;
}

/* Products Section: smaller cards, 3 per row on mobile, 5 on desktop */
.products-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  /* Default desktop 5 */
  gap: 20px;
}

@media (min-width: 900px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

@media (min-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 22px;
  }
}

.product-card {
  padding: 0;
  /* Removed padding */
  border-radius: 12px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 0;
  /* Removed gap as padding is handled in info */
}

.product-img-wrapper {
  position: relative;
  width: 100%;
  padding-top: 65%;
  /* Reduced height to minimize whitespace */
  overflow: hidden;
  background-color: var(--white);
  /* Removed border-bottom */
  margin: 0;
}

.product-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Prevent zooming/cropping */
  object-position: top;
  /* Align to top edge */
  transition: transform 0.5s ease;
}

.product-card:hover .product-img {
  transform: scale(1.05);
  /* Slight zoom on hover */
}

/* Product card information layout */
.product-info {
  padding: 25px 15px 85px 15px;
  /* Increased top padding for desktop */
  /* Bottom padding space for fixed footer elements */
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  text-align: center;
  /* Center align text */
}

.product-info h3 {
  font-family: "Poppins", sans-serif;
  /* Match nav font */
  font-weight: 600;
  font-size: 1rem;
  /* Match nav font size */
  color: var(--text-light);
  /* Match nav color */
  margin-bottom: 5px;
  line-height: 1.4;

  /* Limit to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 4.2em;
  /* Approx 3 lines height */
}

.product-price {
  color: var(--brown-dark);
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: auto;
  /* Push to bottom of info section but above absolute elements if possible, though we use absolute */
  margin-bottom: 0;

  /* Absolute positioning for constant placement */
  position: absolute;
  bottom: 60px;
  left: 0;
  right: 0;
  text-align: center;
}

.product-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

/* Flying image for add-to-cart */
.flying-image {
  border-radius: 8px;
  z-index: 3000;
  pointer-events: none;
  position: fixed;
}

/* Home carousel */
.home-carousel {
  width: 100%;
  height: 40vh;
  /* 40% of screen height */
  background: var(--light-gray);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  gap: 0;
  align-items: stretch;
  justify-content: center;
  min-height: 0;
  padding: 0;
}

.home-carousel-marquee {
  width: 100%;
  height: 100%;
  display: flex !important;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  white-space: normal;
  line-height: 0;
}

.home-carousel-marquee a {
  display: block;
  height: 100%;
  flex: 0 0 auto;
  width: auto;
  aspect-ratio: 16 / 9;
  max-width: none;
  overflow: hidden;
  border-radius: 8px;
  margin-right: 10px;
}

.home-carousel-marquee img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Ensure track fills height */
.home-carousel-track {
  height: 100%;
  display: flex;
  gap: 0;
  align-items: stretch;
  will-change: transform;
}

.home-carousel-track:hover {
  animation-play-state: paused;
}

.home-carousel-track a {
  display: block;
  height: 100%;
  flex: 0 0 auto;
  width: auto;
  aspect-ratio: 16 / 9;
  max-width: none;
  overflow: hidden;
  border-radius: 8px;
  margin-right: 10px;
  /* Small margin for seamless loop */
}

.home-carousel-track img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Removed responsive multi-column slides to ensure 100% width */

/* Reduce carousel height on small screens to keep layout tight */
@media (max-width: 700px) {
  .home-carousel {
    height: 220px;
    max-height: 40vh;
  }
}

/* Desktop override to limit height */
@media (min-width: 1024px) {
  .home-carousel {
    height: 40vh;
    max-height: 500px;
    /* Optional cap for very large screens */
  }
}


/* Continuous scroll animation */
@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Small pan and smooth crossfade for images */
.product-img {
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.product-img.loading {
  opacity: 0;
}

/* Product card overlay for smooth crossfade */
.product-card {
  position: relative;
  overflow: hidden;
}

.product-card .product-img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}


/* Instagram / in-app browser safe-area and vh fixes */
html,
body {
  height: 100%;
}

body {
  padding-top: calc(var(--header-height) + env(safe-area-inset-top));
  -webkit-overflow-scrolling: touch;
}

.hero {
  min-height: 220px;
}


.product-info {
  padding: 0 25px;
  flex-grow: 1;
}

.product-info h3 {
  margin-bottom: 4px;
  font-size: 1rem;
  /* Limit to 2 lines to save vertical space */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Mobile-specific tweaks for compact layout */
@media (max-width: 700px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .product-card {
    padding: 0;
    min-height: 160px;
    border-radius: 12px;
  }

  .product-img-wrapper {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .product-info {
    padding: 8px;
  }

  .product-info h3 {
    font-size: 0.7rem;
    margin-bottom: 1px;
  }

  .product-price {
    font-size: 1rem;
    margin-bottom: 3px;
  }

  .product-quick {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
  }

  .product-quick .variant-select {
    flex: 1;
    padding: 6px 8px;
    font-size: 0.9rem;
  }

  /* Reduce add-to-cart text size to prevent cropping (≈20% smaller) */
  .product-quick .add-to-cart {
    flex: 0 0 auto;
    padding: 6px 10px;
    font-size: 0.66rem;
    line-height: 1.2;
    min-height: 34px;
    white-space: nowrap;
    border-radius: 8px;
    min-width: 80px;
  }

  /* Quantity control: keep compact, avoid overflow and center when needed */


  .qty-control .qty-count {
    min-width: 28px;
    text-align: center;
    font-weight: 600;
    padding: 0 6px;
  }

  .qty-control button {
    padding: 6px 8px;
    font-size: 0.85rem;
    height: 32px;
    border-radius: 6px;
    min-width: 30px;
  }

  .product-quick .variant-select,
  .product-quick .add-to-cart {
    display: inline-flex;
  }

  /* When there is no variant, center the qty-control and allow it to expand but stay within card */
  .product-card.no-variant .qty-control {
    width: 100%;
    justify-content: center;
    margin: 0 auto;
    max-width: 180px;
  }

  /* On very small screens center all qty-controls to avoid edge clipping */
  @media (max-width: 420px) {
    .product-quick {
      justify-content: center;
    }

    .qty-control {
      max-width: 140px;
    }
  }

  .product-card.no-variant .add-to-cart {
    width: 100%;
    flex: 1;
  }

  .product-card.no-variant .add-to-cart {
    width: 100%;
    flex: 1;
  }
}

/* Desktop: ensure variant select and add-to-cart remain on one line */
@media (min-width: 700px) {
  .product-quick {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: center;
  }

  .product-quick .variant-select {
    flex: 1 1 auto;
    min-width: 0;
    /* allow shrinking to avoid overflow */
  }

  /* ... inside @media (min-width: 700px) */
  .product-quick .add-to-cart {
    flex: 0 0 auto;
    white-space: nowrap;
    min-width: 90px;
    /* Decrease button size for desktop further */
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 8px;
    /* Reduced roundness requested by user */
  }

  .product-card.no-variant .add-to-cart {
    width: auto;
    flex: 0 0 auto;
  }
}

/* Detail modal: stack content, reduce paddings and carousel height */
/* Improved Product Detail Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 3000;
  /* Above header (2001) */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  /* Enable scrolling if content is tall */
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  padding: 20px;
  /* Padding for mobile view */
}

.modal-content {
  background-color: var(--white);
  margin: 50px auto;
  padding: 30px;
  border-radius: 20px;
  width: 95%;
  max-width: 1000px;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: modalFadeIn 0.3s ease;
}

/* Specific fix for product detail modal to clear navbar */
#product-detail-modal .modal-content {
  margin-top: 100px !important;
}

.modal-body-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.detail-left {
  width: 100%;
}

.detail-right {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#detail-carousel {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  /* Height is handled by generic img styles now */
}

#detail-name {
  font-size: 1.5rem;
  margin-bottom: 5px;
  color: var(--text-dark);
}

#detail-desc {
  color: var(--text-light);
  line-height: 1.6;
}

#detail-price {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.3rem;
}

/* Desktop Layout */
@media (min-width: 768px) {
  .modal-body-content {
    flex-direction: row;
    align-items: flex-start;
  }

  .detail-left {
    flex: 1.5;
    /* Image section takes more space */
  }

  .detail-right {
    flex: 1;
    padding-top: 10px;
  }
}


/* Closing brace for previous media query if it exists, otherwise ignored or fixed by context */

.product-info .product-description {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  /* Limit to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
  font-family: "Poppins", sans-serif;

  /* Fixed position details */
  position: absolute !important;
  bottom: 60px !important;
  /* Increased from 50px to 60px to add margin above button */
  left: 0 !important;
  right: 0 !important;
  text-align: center !important;
  margin: 0 !important;
  z-index: 9;
}

.product-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 25px;
}

/* Global .qty-control style for product card */
.qty-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.qty-control .qty-count {
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

/* Quantity Controls Styling */
.quantity-controls {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-light);
  border-radius: 50px;
  overflow: hidden;
  background-color: var(--light-gray);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cart-item-quantity .quantity-controls {
  width: auto;
}

.quantity-btn {
  width: 32px;
  height: 32px;
  border-radius: 0;
  background-color: var(--light-gray);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--primary-dark);
  font-size: 1.1rem;
  line-height: 1;
  border: none;
  padding: 0;
}

.quantity-controls .quantity-btn:first-child {
  border-top-left-radius: 50px;
  border-bottom-left-radius: 50px;
}

.quantity-controls .quantity-btn:last-child {
  border-top-right-radius: 50px;
  border-bottom-right-radius: 50px;
}

.quantity-btn:hover {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

.quantity-btn:active {
  background-color: var(--border);
}

.quantity-input {
  width: 40px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  background: var(--white);
  /* White background for input */
  padding: 0;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-dark);
  -moz-appearance: textfield;
  height: 32px;
  line-height: 32px;
}

.quantity-input:focus {
  outline: none;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.product-actions .btn-primary {
  flex-grow: 1;
  max-width: 150px;
}

/* Skeleton Loaders */
.skeleton-card {
  border-radius: 20px;
  overflow: hidden;
  background-color: var(--white);
  box-shadow: var(--shadow);
}

.skeleton-img {
  height: 240px;
  background-color: var(--light-gray);
  position: relative;
  overflow: hidden;
}

.skeleton-info {
  padding: 25px;
}

.skeleton-line {
  height: 20px;
  background-color: var(--light-gray);
  border-radius: 4px;
  margin-bottom: 15px;
  position: relative;
  overflow: hidden;
}

.skeleton-line.short {
  width: 60%;
}

.skeleton-line.price {
  width: 40%;
  height: 24px;
}

.skeleton-button {
  height: 48px;
  background-color: var(--light-gray);
  border-radius: 50px;
  margin-top: 15px;
  position: relative;
  overflow: hidden;
}

.skeleton-img::after,
.skeleton-line::after,
.skeleton-button::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
  animation: shimmer 1.5s infinite linear;
  background-size: 200% 100%;
}


/* About Section */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-img {
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow-hover);
}

.about-text h2 {
  margin-bottom: 20px;
}

.about-text p {
  margin-bottom: 20px;
}

.about-text ul {
  list-style-type: none;
  padding-left: 0;
}

.about-text ul li {
  margin-bottom: 15px;
  position: relative;
  padding-left: 30px;
  color: var(--text-light);
}

.about-text ul li::before {
  content: '\f1b0';
  /* Millet icon (fa-pagelines) */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary);
  font-size: 1.1rem;
}

/* 9. Footer */
footer {
  background-color: var(--brown-dark);
  color: var(--white);
  padding: 60px 0 20px;
  border-radius: 40px 40px 0 0;
  margin-top: 40px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-column h3 {
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  color: var(--white);
  font-size: 1.2rem;
}

.footer-column h3:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--primary);
  border-radius: 2px;
}

.footer-column p,
.footer-column li {
  color: var(--brown-light);
  margin-bottom: 10px;
}

.footer-column ul li a {
  position: relative;
}

.footer-column ul li a:hover {
  color: var(--white);
  padding-left: 10px;
}

.footer-column ul li a:hover::before {
  content: '\f0da';
  /* fa-chevron-right */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 2px;
}


.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-icons a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: var(--transition);
  color: var(--white);
  font-size: 1.1rem;
}

.social-icons a:hover {
  background-color: var(--primary);
  transform: translateY(-5px) scale(1.1);
  color: var(--white);
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--brown-light);
  font-size: 0.9rem;
}

.copyright p {
  margin-bottom: 5px;
  color: var(--brown-light);
}

.copyright a {
  color: var(--primary-light);
  font-weight: 500;
}

.copyright a:hover {
  color: var(--white);
}

/* 10. Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1100;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.flex {
  /* JS will add/remove this class */
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: var(--white);
  border-radius: 24px;
  width: 90%;
  max-width: 500px;
  padding: 30px 35px;
  position: relative;
  animation: modalFadeIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  margin: auto;
  box-shadow: var(--shadow-strong);
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.close-modal:hover {
  color: var(--text-dark);
  background-color: var(--light-gray);
  transform: rotate(90deg);
}

/* Auth Modal */
.auth-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 25px;
  background: var(--light-gray);
  padding: 6px;
  border-radius: 50px;
}

.auth-tab {
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-light);
  border: 2px solid transparent;
  transition: var(--transition);
  flex: 1;
  text-align: center;
}

.auth-tab.active {
  background: var(--white);
  color: var(--primary-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-form-section {
  display: none;
}

.auth-form-section.active {
  display: block;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.form-control {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: "Poppins", sans-serif;
  transition: var(--transition);
  background: var(--white);
  font-size: 1rem;
}

.form-control::placeholder {
  color: var(--text-light);
  opacity: 0.8;
}

.form-control:focus,
.form-control:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(141, 110, 99, 0.2);
  outline: none;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* 11. Page Specifics (Cart, Checkout, etc.) */

/* Cart Page */
.cart-container {
  max-width: 1000px;
  margin: 0 auto;
}

.cart-items {
  background-color: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 15px;
  margin-bottom: 30px;
}

.cart-item {
  display: grid;
  grid-template-columns: 100px 1fr auto auto auto;
  align-items: center;
  gap: 20px;
  padding: 15px;
  border-bottom: 1px solid var(--border-light);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
}

.cart-item-details {
  flex: 1;
}

.cart-item-title {
  font-weight: 600;
  margin-bottom: 5px;
  font-size: 1.1rem;
}

.cart-item-price {
  color: var(--primary);
  font-weight: 600;
  font-size: 1rem;
}

.cart-item-quantity {
  justify-self: center;
}

.cart-item-total {
  font-weight: 700;
  font-size: 1.1rem;
  text-align: right;
}

.cart-item-remove {
  color: var(--error);
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.2rem;
  justify-self: center;
  padding: 10px;
  border-radius: 50%;
}

.cart-item-remove:hover {
  color: #d32f2f;
  transform: scale(1.1);
  background-color: #ffebee;
}

.cart-summary {
  background-color: var(--white);
  padding: 30px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  margin-top: 30px;
  position: sticky;
  top: calc(var(--header-height) + 30px);
}

#free-shipping-banner {
  background-color: var(--primary-light);
  color: var(--primary-dark);
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 500;
  font-size: 0.95rem;
}

#free-shipping-banner i {
  margin-right: 8px;
}

.cart-totals {
  margin-bottom: 25px;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
  font-weight: 500;
  font-size: 1rem;
}

.cart-total-row:last-child {
  border-bottom: none;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--primary-dark);
  margin-top: 5px;
}

.empty-cart-message {
  text-align: center;
  padding: 40px;
  background-color: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.empty-cart-message i {
  font-size: 60px;
  color: var(--border);
  margin-bottom: 20px;
}

.empty-cart-message h3 {
  font-size: 1.5rem;
  color: var(--text-dark);
}

.empty-cart-message p {
  color: var(--text-light);
}

.empty-cart-message .btn {
  margin-top: 20px;
}

/* Checkout Page */
.checkout-container {
  max-width: 1000px;
  margin: 0 auto;
}

.checkout-steps {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.checkout-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
}

.checkout-step:not(:last-child):after {
  content: "";
  position: absolute;
  top: 24px;
  /* Center of step-number */
  right: -50%;
  width: 100%;
  height: 4px;
  background-color: var(--border-light);
  z-index: 1;
  transition: var(--transition);
}

.step-number {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--light-gray);
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  margin-bottom: 10px;
  z-index: 2;
  transition: var(--transition);
  color: var(--text-light);
}

.checkout-step.active .step-number {
  background-color: var(--primary);
  border-color: var(--primary-dark);
  color: white;
  transform: scale(1.1);
  animation: pulse-shadow 1.5s infinite;
}

.checkout-step.completed .step-number {
  background-color: var(--success);
  border-color: #45a049;
  color: white;
}

.checkout-step.completed:not(:last-child):after {
  background-color: var(--success);
}

.step-title {
  font-size: 0.9rem;
  text-align: center;
  font-weight: 500;
  color: var(--text-light);
}

.checkout-step.active .step-title {
  font-weight: 700;
  color: var(--primary-dark);
}

.checkout-step.completed .step-title {
  color: var(--success);
}

.checkout-section {
  background-color: var(--white);
  border-radius: 20px;
  padding: 35px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  display: none;
  animation: fadeIn 0.4s ease;
}

.checkout-section.active {
  display: block;
}

.checkout-section h3 {
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 20px;
}

.payment-qr-container {
  text-align: center;
  padding: 20px;
  background-color: var(--light-gray);
  border-radius: 12px;
  margin: 20px 0;
}

.payment-qr-container img {
  display: block;
  /* Make the image a block element */
  max-width: 100%;
  /* Ensure it doesn't overflow container */
  height: auto;
  border-radius: 8px;
  margin-bottom: 15px;
  /* Keep bottom margin */
  max-width: 250px;
  /* Keep max size limit */
  margin-left: auto;
  /* Add auto left margin */
  margin-right: auto;
  /* Add auto right margin */
}

.payment-qr-container p strong {
  font-size: 1.3rem;
  color: var(--primary-dark);
}

.upi-id-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--background);
  border: 2px dashed var(--border);
  padding: 14px 20px;
  border-radius: 12px;
  margin: 20px 0;
}

#upi-id {
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-dark);
  word-break: break-all;
  margin-right: 15px;
}

#copy-upi-btn {
  padding: 10px 18px;
  font-size: 0.8rem;
  white-space: nowrap;
}

#copy-upi-btn i {
  font-size: 1em;
}

.payment-instructions {
  background-color: var(--background);
  padding: 20px;
  border-radius: 12px;
  margin: 20px 0;
  border: 1px solid var(--border);
}

.payment-instructions ol {
  padding-left: 20px;
}

.payment-instructions li {
  margin-bottom: 10px;
  color: var(--text-light);
}

.order-summary-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.order-summary-item:last-child {
  border: none;
}

.coupon-section {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

.coupon-input {
  flex: 1;
}

.discount-row {
  color: var(--success);
  font-weight: 600;
}

#coupon-message {
  margin-top: -10px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

/* Profile Page */
.profile-container {
  max-width: 800px;
  margin: 0 auto;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-bottom: 30px;
  padding: 25px;
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--white);
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(141, 110, 99, 0.4);
}

.profile-info h2 {
  margin-bottom: 5px;
}

.profile-info p {
  margin-bottom: 3px;
  color: var(--text-light);
}

.profile-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.profile-tab {
  padding: 14px 28px;
  border-radius: 12px 12px 0 0;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
  border-bottom: 4px solid transparent;
  color: var(--text-light);
}

.profile-tab:hover {
  background: var(--light-gray);
  color: var(--text-dark);
}

.profile-tab.active {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
}

.profile-section {
  display: none;
}

.profile-section.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

.order-card {
  background: var(--white);
  border-radius: 16px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.order-card:hover {
  box-shadow: var(--shadow-hover);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-light);
}

.order-header h4 {
  margin-bottom: 0;
}

.order-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  color: var(--text-light);
}

.order-item span:first-child {
  font-weight: 500;
}

.order-total {
  text-align: right;
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border-light);
  color: var(--primary-dark);
}

#account-section .card {
  padding: 30px;
}

/* Admin Panel */
.admin-container {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.admin-sidebar {
  width: 250px;
  background-color: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 20px;
  align-self: sticky;
  top: calc(var(--header-height) + 30px);
}

.admin-menu a {
  display: flex;
  /* Use flex for icon alignment */
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 12px;
  transition: var(--transition);
  color: var(--text-dark);
  font-weight: 500;
  margin-bottom: 5px;
}

.admin-menu a:hover {
  background-color: var(--light-gray);
  color: var(--primary-dark);
}

.admin-menu a.active {
  background-color: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 10px rgba(141, 110, 99, 0.3);
}

.admin-content {
  flex: 1;
  min-height: 500px;
}

.admin-section {
  display: none;
  background-color: var(--white);
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.admin-section.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

.admin-section h3 {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  color: var(--brown-dark);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  table-layout: fixed;
}

.admin-table th,
.admin-table td {
  padding: 14px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  word-wrap: break-word;
  vertical-align: middle;
}

.admin-table th {
  background-color: var(--light-gray);
  font-weight: 600;
  color: var(--brown-dark);
}

.admin-table tr:hover {
  background-color: var(--background);
}

.admin-table .action-col {
  width: 150px;
}

.action-btn {
  padding: 6px 12px;
  border-radius: 8px;
  margin-right: 5px;
  font-size: 0.8rem;
  transition: var(--transition);
}

.edit-btn {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

.edit-btn:hover {
  background-color: var(--primary);
  color: var(--white);
}

.delete-btn {
  background-color: #ffebee;
  color: #d32f2f;
}

.delete-btn:hover {
  background-color: #d32f2f;
  color: var(--white);
}

.status-pending {
  color: #ff9800;
  font-weight: 600;
}

.status-confirmed,
.status-accepted {
  color: #2196f3;
  font-weight: 600;
}

.status-shipped {
  color: #673ab7;
  font-weight: 600;
}

.status-delivered {
  color: #4caf50;
  font-weight: 600;
}

.status-cancelled {
  color: #f44336;
  font-weight: 600;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  padding: 25px;
  text-align: center;
  border-radius: 16px;
}

.stat-card h4 {
  color: var(--text-light);
  font-size: 1rem;
  margin-bottom: 10px;
}

.stat-card p {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0;
}


/* 12. Notifications, Filters & Animation */
.toast {
  position: fixed;
  top: calc(var(--header-height) + 20px);
  right: 20px;
  padding: 16px 24px;
  background: var(--primary);
  color: white;
  border-radius: 12px;
  box-shadow: var(--shadow-strong);
  z-index: 10000;
  transform: translateX(150%);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  font-weight: 600;
}

.toast.show {
  transform: translateX(0);
}

.toast.error {
  background: var(--error);
}

.toast.success {
  background: var(--success);
}

.toast.info {
  background: var(--info);
}

/* Filter Section */
.filter-section {
  margin-bottom: 30px;
}

.filter-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 30px;
}

/* WhatsApp Message Modal */
#whatsapp-message-modal .modal-content {
  max-width: 600px;
}

#whatsapp-message-modal .modal-content h2 {
  color: var(--primary);
}

#whatsapp-message-modal .modal-content h2 i {
  color: #25d366;
}

.whatsapp-modal-header {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.whatsapp-modal-header h3 {
  margin-bottom: 15px;
  color: var(--primary);
}

.whatsapp-modal-header .success-message {
  color: var(--success);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.whatsapp-modal-header .success-message i {
  margin-right: 8px;
}

.whatsapp-modal-header p {
  margin-bottom: 0;
  color: var(--text-dark);
}

.whatsapp-modal-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.whatsapp-modal-buttons .btn {
  width: 100%;
}

.whatsapp-modal-buttons .btn.btn-outline {
  grid-column: 1 / -1;
  /* Back to home spans full width */
}

.whatsapp-modal-footer {
  margin-top: 15px;
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
}

.whatsapp-modal-footer i {
  margin-right: 5px;
}


#whatsapp-message-text {
  width: 100%;
  height: 250px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: "Courier New", monospace;
  font-size: 14px;
  resize: none;
  background: var(--light-gray);
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin-bottom: 20px;
}

/* Flying Add-to-Cart Image */
.flying-image {
  position: fixed;
  z-index: 10001;
  pointer-events: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--white);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  /* Animation properties set by JS */
}

/* 13. Responsive Styles */

/* Tablet */
@media (max-width: 992px) {
  .about-content {
    grid-template-columns: 1fr;
  }

  .about-img {
    order: -1;
    margin-bottom: 30px;
  }

  /* --- ADMIN PANEL (Tablet) --- */
  .admin-container {
    flex-direction: column;
    gap: 20px;
  }

  .admin-sidebar {
    width: 100%;
    position: static;
    display: flex;
    overflow-x: auto;
    padding: 10px;
  }

  .admin-menu {
    display: flex;
    gap: 10px;
    width: 100%;
  }

  .admin-menu li {
    flex-shrink: 0;
  }

  .admin-menu a {
    margin-bottom: 0;
    padding: 10px 15px;
  }

  .admin-content {
    width: 100%;
  }

  .admin-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    border-radius: 8px;
    border: 1px solid var(--border-light);
  }

  .admin-table th,
  .admin-table td {
    white-space: normal;
    min-width: 150px;
  }

  .admin-table .action-col {
    min-width: 160px;
    white-space: nowrap;
  }

  .cart-item {
    grid-template-columns: 80px 1fr auto;
    grid-template-rows: auto auto auto;
    gap: 5px 15px;
    padding: 10px;
  }

  .cart-item-img {
    grid-row: 1 / 4;
    width: 70px;
    height: 70px;
  }

  .cart-item-details {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
  }

  .cart-item-quantity {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    justify-self: start;
  }

  .cart-item-total {
    grid-column: 2 / 3;
    grid-row: 3 / 4;
    justify-self: start;
    text-align: left;
  }

  .cart-item-remove {
    grid-column: 3 / 4;
    grid-row: 1 / 4;
    align-self: center;
  }

  .cart-summary {
    position: static;
    /* Remove sticky on tablet */
  }
}

/* Mobile */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    /* Show 2 products per row on mobile */
    gap: 12px;
  }

  .product-info {
    padding-top: 15px !important;
    /* Maintain compact spacing on mobile */
  }

  .product-info h3 {
    font-size: 1.15rem !important;
    /* Increased font size for mobile */
  }

  :root {
    --header-height: 70px;
    /* Smaller header on mobile */
  }

  header {
    height: var(--header-height);
  }

  header.scrolled {
    height: 65px;
  }

  body {
    padding-top: var(--header-height);
  }

  .desktop-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .nav-icons .nav-profile-icon {
    display: none;
    /* Hide profile icon, access via menu */
  }

  .nav-icons {
    gap: 20px;
  }

  .nav-icons a {
    font-size: 1.25rem;
  }

  .hero-btns {
    flex-direction: column;
    align-items: center;
  }

  .hero-btns .btn {
    width: 220px;
  }

  .product-actions {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }

  .product-actions .quantity-controls {
    width: auto;
    flex-shrink: 0;
  }

  .product-actions .btn-primary {
    flex-grow: 1;
    max-width: none;
    padding: 12px 15px;
    /* Taller button */
    font-size: 0.8rem;
  }

  .filter-options {
    gap: 8px;
  }

  .filter-options .btn {
    padding: 10px 16px;
    font-size: 14px;
  }

  .cart-item {
    grid-template-columns: 60px 1fr auto;
    grid-template-rows: auto auto;
    gap: 5px 10px;
    padding: 10px;
    align-items: center;
  }

  .cart-item-img {
    grid-row: 1 / 3;
    width: 60px;
    height: 60px;
  }

  .cart-item-details {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    text-align: left;
  }

  .cart-item-title {
    font-size: 0.95rem;
  }

  .cart-item-quantity {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    justify-self: start;
  }

  .cart-item-total {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
    justify-self: end;
    font-size: 1rem;
  }

  .cart-item-remove {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
    align-self: start;
    justify-self: end;
    padding: 5px;
  }

  .coupon-section {
    flex-direction: column;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .profile-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .profile-tab {
    flex-shrink: 0;
  }

  .admin-table .action-col {
    min-width: 110px;
    white-space: normal;
  }

  .admin-table .action-btn {
    display: block;
    width: 100%;
    margin: 5px 0;
    text-align: center;
  }

  .footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
  }

  .footer-column {
    width: 100%;
    text-align: center;
  }

  .footer-column h3:after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-column:nth-child(2),
  .footer-column:nth-child(3) {
    width: 45%;
    text-align: left;
  }

  .footer-column:nth-child(2) h3:after,
  .footer-column:nth-child(3) h3:after {
    left: 0;
    transform: none;
  }

  .footer-column .social-icons {
    justify-content: center;
  }

  .whatsapp-modal-buttons {
    grid-template-columns: 1fr;
  }
}

/* Small Mobile */
@media (max-width: 576px) {
  body {
    line-height: 1.6;
  }

  .section {
    padding: 50px 0;
  }

  .container {
    width: 92%;
  }

  .modal-content {
    padding: 25px 20px;
    width: 95%;
  }

  .checkout-section {
    padding: 20px;
  }

  .checkout-step:not(:last-child):after {
    display: none;
    /* Hide connector lines */
  }

  .checkout-steps {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
    max-width: 100%;
  }

  .checkout-step {
    flex-direction: row;
    gap: 15px;
  }

  .step-number {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    margin-bottom: 0;
  }

  .step-title {
    font-size: 1rem;
  }

  .admin-section {
    padding: 15px;
  }

  .admin-table {
    font-size: 14px;
    table-layout: auto;
  }

  .admin-table th,
  .admin-table td {
    padding: 8px 10px;
    min-width: 100px;
  }

  .admin-table .action-col {
    min-width: 100px;
  }

  .filter-options {
    gap: 6px;
  }

  .filter-options .btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  .cart-summary {
    padding: 20px;
  }

  .footer-column:nth-child(2),
  .footer-column:nth-child(3) {
    width: 100%;
    text-align: center;
  }

  .footer-column:nth-child(2) h3:after,
  .footer-column:nth-child(3) h3:after {
    left: 50%;
    transform: translateX(-50%);
  }

  .upi-id-container {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  #copy-upi-btn {
    width: 100%;
  }

  #upi-id {
    margin-right: 0;
    text-align: center;
  }
}

/* --- FIXED LAYOUT FOR PRODUCT CARD BUTTONS --- */
.product-card {
  position: relative !important;
  /* Increased padding bottom to accommodate fixed Price + Button */
  padding-bottom: 85px !important;
  display: flex !important;
  flex-direction: column !important;
  /* Allow height to be determined by content + padding, but minimum for structure */
  min-height: 250px !important;
  height: auto !important;
}

/* Determine button container positioning */
.product-quick {
  position: absolute !important;
  bottom: 10px !important;
  left: 10px !important;
  right: 10px !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 10;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

/* Adjust for mobile specific padding */
@media (max-width: 700px) {
  .product-card {
    padding-bottom: 80px !important;
    min-height: 200px !important;
  }

  .product-quick {
    bottom: 8px !important;
    left: 8px !important;
    right: 8px !important;
  }

  .product-price {
    bottom: 56px !important;
    /* Adjusted from 46px to 56px for margin on mobile */
    font-size: 1rem !important;
  }
}

/* 14. Floating Help Button */
.need-help-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: #25d366;
  /* WhatsApp color */
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 2005;
  /* High z-index to stay on top */
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  font-family: "Poppins", sans-serif;
  text-decoration: none;
  font-size: 1rem;
  border: 2px solid white;
}

.need-help-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
  background-color: #128c7e;
  color: white;
}

.need-help-btn i {
  font-size: 1.4rem;
}

/* Mobile adjustment */
@media (max-width: 768px) {
  .need-help-btn {
    bottom: 20px;
    right: 20px;
    padding: 10px 20px;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.5);
  }

  .need-help-btn i {
    font-size: 1.2rem;
  }
}