/* =========================================
   Digital Panchayat Shop CSS
   - Clean formatting + clear section comments
   - CSS variables for theming (light/dark)
   - Responsive grid for product cards
   ========================================= */
/* References:
   - Organizing CSS with section comments [web:41]
   - prefers-color-scheme guidance [web:53]
   - CSS Grid repeat(auto-fit, minmax()) patterns [web:57]
*/

/* =========================
   1) Theme Variables
   ========================= */
:root {
  /* Brand palette */
  --primary-blue: #1A3C6B;
  --header-blue: #2F599A;

  /* Surface & text */
  --sidebar-bg: #FFFFFF;
  --content-bg: #F4F7FC;
  --font-color-dark: #333;
  --font-color-light: #FFFFFF;

  /* Accents & UI tokens */
  --active-color: #3B82F6;
  --border-color: #E5E7EB;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --whatsapp-green: #25D366;
  --gold: #f4c542;
  --grey-bg: #f8f8f8;

  /* Extended palette (shop) */
  --primary-color: #28a745;
  --secondary-color: #20c997;
  --danger-color: #ff5a5f;
  --accent-color: #007BFF;

  /* Neutral surfaces */
  --light-gray: #f4f6f8;
  --dark-text: #333;
  --light-text: #fff;

  /* Cards & footer */
  --card-bg: #fff;
  --footer-bg: #111827;
  --footer-text: #e2e8f0;
  --footer-muted-text: #94a3b8;
}

/* =========================
   2) Dark Mode Variables
   - Applied via body[data-theme="dark"]
   - Keeps same token names for easy swap
   ========================= */
body[data-theme="dark"] {
  --primary-blue: #1E293B;
  --header-blue: #334155;
  --sidebar-bg: #1A233A;
  --content-bg: #111827;
  --font-color-dark: #E5E7EB;
  --font-color-light: #F9FAFB;
  --active-color: #60A5FA;
  --border-color: #374151;
  --grey-bg: #1F2937;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* =========================
   3) Base & Layout Shell
   ========================= */
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background-color: var(--content-bg);
  color: var(--font-color-dark);
  overflow: auto; /* natural scroll */
  transition: background-color 0.3s, color 0.3s;
}

.container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* H1 is SEO-only (hidden visually) */
#main-content h1 {
  display: none;
}

/* =========================
   4) Header
   ========================= */
.header {
  background-color: var(--header-blue);
  color: var(--font-color-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 25px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
}

.icon-menu {
  cursor: pointer;
  margin-right: 10px;
  color: #fff;
  height: 40px;
  width: 40px;
}

.logo {
  width: 70px;
  height: 70px;
  background-color: #fff;
  border-radius: 50%;
  background-image: url('/men/photo/logo.jpg');
  background-size: cover;
  background-position: center;
  margin-left: 50px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 25px;
}

/* =========================
   5) User Profile
   ========================= */
.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background-color: #B0C4DE;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
}

.user-role {
  font-size: 12px;
  opacity: 0.8;
}

/* =========================
   6) Main Container
   ========================= */
.main-container {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Fade In */
.fade-in {
    animation: fade .5s ease both;
}

@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* Background Aurora */
.aurora {
    position: fixed;
    inset: -20vmax;
    z-index: -3;
    filter: blur(60px);
    opacity: .55;
    pointer-events: none;
    transform: translateZ(0);
}

.aurora span {
    position: absolute;
    width: 60vmax;
    height: 60vmax;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ff1493 0%, transparent 60%), radial-gradient(circle at 70% 70%, #8b5cf6 0%, transparent 60%);
    animation: floatA 18s ease-in-out infinite alternate;
    mix-blend-mode: screen;
}

.aurora span:nth-child(2) {
    left: 40%;
    top: 20%;
    background: radial-gradient(circle at 40% 60%, #22c55e 0%, transparent 60%), radial-gradient(circle at 70% 30%, #06b6d4 0%, transparent 60%);
    animation: floatB 22s ease-in-out infinite alternate-reverse;
}

body:not([data-theme="dark"]) .aurora span {
    background: radial-gradient(circle at 30% 30%, #22d3ee 0%, transparent 60%), radial-gradient(circle at 70% 70%, #fb7185 0%, transparent 60%);
    filter: blur(70px);
    opacity: .45;
}

@keyframes floatA {
    0% {
        transform: translate(-20%, -10%) scale(1);
    }
    100% {
        transform: translate(10%, 15%) scale(1.2);
    }
}

@keyframes floatB {
    0% {
        transform: translate(10%, -5%) scale(1);
    }
    100% {
        transform: translate(-15%, 20%) scale(1.25);
    }
}

/* Background Particles */
.particles {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
}

.particles i {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .6);
    box-shadow: 0 0 10px rgba(255, 255, 255, .5);
    animation: rise var(--dur) linear infinite;
    opacity: .7;
}

@keyframes rise {
    from {
        transform: translateY(100vh) translateX(var(--x, 0));
    }
    to {
        transform: translateY(-10vh) translateX(calc(var(--x, 0) + 40px));
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .aurora span,
    .particles i,
    .tile,
    .footer-image img,
    .kpi .ring {
        animation: none !important;
        transition: none !important;
    }
}
/* =========================
   7) Sidebar
   ========================= */
.sidebar {
  width: 260px;
  background-color: var(--sidebar-bg);
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
  transition: width 0.3s ease, left 0.3s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--font-color-dark);
}

.close-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--font-color-dark);
}

/* Collapsed state */
.sidebar.collapsed {
  width: 80px;
}

.sidebar.collapsed .nav-menu span,
.sidebar.collapsed .sidebar-header h3,
.sidebar.collapsed .dark-mode-toggle {
  display: none;
}

.sidebar.collapsed .nav-menu li a {
  justify-content: center;
}

/* =========================
   8) Nav Menu
   ========================= */
.nav-menu {
  flex-grow: 1;
}

.nav-menu ul {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}

.nav-menu li a {
  display: flex;
  align-items: center;
  padding: 15px 25px;
  color: var(--font-color-dark);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  gap: 15px;
  white-space: nowrap;
}

.nav-menu li.active a,
.nav-menu li a:hover {
  background-color: var(--content-bg);
  color: var(--active-color);
}

body[data-theme="light"] .nav-menu li.active a {
  border-left: 4px solid var(--active-color);
  padding-left: 21px;
}

/* =========================
   9) Page Content
   ========================= */
.page-content {
  flex-grow: 1;
  padding: 25px;
  overflow-y: auto;
}

/* =========================
   10) Welcome / Search
   ========================= */
.welcome-container {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 420px);
  align-items: center;
  gap: 1rem;
  padding: 10px 15px;
}

.welcome-message {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
}

/* Unified search */
#search-box {
  flex: 1;
  max-width: 420px;
}

#search-input {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 25px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

/* =========================
   11) Product Categories
   ========================= */
#product-categories {
  padding: 2rem;
  margin: 0.1rem 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* =========================
   12) Optional Banner
   ========================= */
.scrolling-banner {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 15px;
  margin-bottom: 25px;
  scrollbar-width: none; /* Firefox */
}
.scrolling-banner::-webkit-scrollbar { display: none; }

.banner-item {
  flex-shrink: 0;
  height: 100px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.banner-item img {
  height: 100%;
  width: auto;
  display: block;
}

/* =========================
   13) Products Section
   ========================= */
#products {
  padding: 0.3rem 1rem;
  max-width: 1200px;
  margin: auto;
  text-align: center;
}

#products h2 {
  font-size: 2.2rem;
  color: var(--accent-color);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* Category buttons */
.category-btn {
  padding: 0.6rem 1.2rem;
  border: 2px solid var(--primary-color);
  background: var(--card-bg);
  color: var(--primary-color);
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.category-btn.active,
.category-btn:hover {
  background: var(--primary-color);
  color: var(--light-text);
  transform: translateY(-2px);
}

/* Fluid grid using auto-fit + minmax for responsive cards */
#products-container {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* =========================
   14) Product Card
   ========================= */
/* Note: fixed height removed earlier; keep flexible with aspect-ratio */
.product-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  background: var(--card-bg);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.product-card img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1; /* keep square thumbnails */
  object-fit: contain;
  background-color: #f8f8f8;
}

.product-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.product-info h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
}

.product-price {
  margin: 0;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-color);
  flex-shrink: 0;
}

p.description {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
  text-align: left;
  flex-grow: 1;
  min-height: 45px;
  margin-bottom: 1rem;
}

.product-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: auto;
}

.product-actions a,
.product-actions button {
  flex: 1;
  padding: 0.7rem 0.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
  user-select: none;
}

.product-actions a:hover,
.product-actions button:hover {
  transform: scale(1.05);
}

.product-actions a {
  background: var(--secondary-color);
  color: var(--light-text);
}

.product-actions button {
  background: var(--primary-color);
  color: var(--light-text);
}

/* =========================
   15) Pagination
   ========================= */
#pagination-controls {
  margin-top: 3rem;
}

#pagination-controls button {
  padding: 0.8rem 1.6rem;
  font-size: 1rem;
  border: none;
  background: var(--primary-color);
  color: var(--light-text);
  border-radius: 8px;
  margin: 0 0.5rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

#pagination-controls button:hover:not(:disabled) {
  background-color: #218838;
}

#pagination-controls button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* =========================
   16) Cart Sidebar & Overlay
   ========================= */
#open-cart {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: var(--accent-color);
  color: var(--light-text);
  border: none;
  padding: 0.8rem 1.3rem;
  border-radius: 50px;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 998;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}

#open-cart:hover {
  transform: scale(1.1);
}

#cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
}

#cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

#cart-sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: 380px;
  max-width: 90vw;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
  transition: right 0.4s ease-in-out;
  z-index: 1002;
  display: flex;
  flex-direction: column;
}

#cart-sidebar.open {
  right: 0;
}

#cart-sidebar h3 {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--primary-color);
  border-bottom: 1px solid #ddd;
  flex-shrink: 0;
}

#close-cart {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #555;
  padding: 5px;
}

#cart-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 0.5rem 1rem;
  max-height: calc(100vh - 200px);
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0.5rem;
  border-bottom: 1px solid #e5e5e5;
}

.cart-item-img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-name {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-item-actions button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  user-select: none;
}

.cart-item-actions .remove {
  background: #fee;
  color: var(--danger-color);
  border-color: #fdd;
}

.empty-cart-message {
  text-align: center;
  padding: 4rem 1rem;
  color: #777;
}

#cart-summary {
  padding: 1.5rem;
  border-top: 2px solid #ddd;
  background: rgba(248, 249, 250, 0.9);
  flex-shrink: 0;
}

#cart-total {
  font-size: 1.3rem;
  font-weight: 700;
  text-align: right;
  margin-bottom: 1rem;
}

#checkout-btn {
  width: 100%;
  padding: 0.9rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  border: none;
  background: var(--primary-color);
  color: var(--light-text);
}

/* =========================
   17) Footer
   ========================= */
footer {
  color: var(--font-color-dark);
  padding: 60px 20px 30px;
  position: relative;
  background: linear-gradient(135deg, var(--grey-bg) 40%, var(--primary-blue) 100%);
  margin-top: 40px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.footer-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: center;
  max-width: 1200px;
  margin: auto;
  border-radius: 20px;
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  padding: 40px;
  gap: 25px;
}

.footer-left {
  flex: 1;
  min-width: 280px;
  text-align: left;
}

.footer-left h2 {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  color: #16a34a;
}

.footer-left h4 {
  margin: 8px 0;
  font-weight: 400;
  font-size: 18px;
}

body[data-theme="light"] .footer-left h4 {
  color: #111;
}

.footer-left h3 {
  margin-top: 10px;
  color: #c0392b;
  font-weight: 600;
  font-size: 20px;
}

.footer-image {
  flex-shrink: 0;
  text-align: center;
}

.footer-image img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 6px solid var(--gold);
  box-shadow: 0 0 30px rgba(244, 197, 66, 0.8);
  transition: transform 0.5s ease, box-shadow 0.5s ease, filter 0.5s ease;
}

.footer-image img:hover {
  transform: rotate(5deg) scale(1.1);
  box-shadow: 0 0 40px rgba(244, 197, 66, 1);
  filter: brightness(1.2);
}

.footer-right {
  flex: 1;
  min-width: 280px;
  color: var(--font-color-light);
}

.footer-right p {
  margin: 12px 0;
  font-size: 16px;
}

.footer-right i {
  margin-right: 10px;
  color: var(--gold);
}

.footer-right a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.footer-right a:hover {
  color: var(--gold);
}

.footer-right a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  left: 0;
  bottom: -3px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.footer-right a:hover::after {
  width: 100%;
}

.social-icons {
  margin: 35px 0 15px;
  text-align: center;
}

.social-icons a {
  margin: 0 15px;
  font-size: 26px;
  padding: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
  color: var(--font-color-light);
  transition: transform 0.3s, color 0.3s, background 0.3s;
}

.social-icons a:hover {
  transform: scale(1.2);
  color: var(--gold);
  background: rgba(0, 0, 0, 0.3);
}

footer p.copy {
  font-size: 14px;
  margin-top: 10px;
  color: #eee;
  text-align: center;
}

footer p.copy a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.3s ease;
}

footer p.copy a:hover {
  color: #fff;
}

/* =========================
   18) Dark Mode Toggle
   ========================= */
.switch {
  position: relative;
  display: inline-block;
  width: 65px;
  height: 34px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: #000000;
  transition: 0.5s;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  font-size: 16px;
  overflow: hidden;
}

.slider:before {
  content: "";
  position: absolute;
  height: 28px;
  width: 28px;
  left: 3px;
  bottom: 3px;
  background: #000000;
  transition: 0.5s;
  border-radius: 50%;
  z-index: 1;
}

.toggle-label {
  position: relative;
  top: 5px;
  font-size: 25px;
  font-weight: bold;
}

.icon {
  z-index: 2;
  font-size: 16px;
  transition: transform 0.4s ease, opacity 0.4s ease;
  pointer-events: none;
  line-height: 1;
}

.sun { color: #fdd835; opacity: 1; transform: scale(1); }
.moon { color: #ffffff; opacity: 0.5; transform: scale(0.75); }

input:checked + .slider { background: #e8eaec; }
input:checked + .slider:before { transform: translateX(31px); }
input:checked + .slider .sun { opacity: 0.35; transform: scale(0.75); }
input:checked + .slider .moon { opacity: 1; transform: scale(1.1); }

/* =========================
   19) Floating WhatsApp
   ========================= */
.whatsapp-float {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background-color: #25d366;
  color: #fff;
  font-size: 28px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  z-index: 998;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.3s ease, background-color 0.3s;
  display: grid;
  place-items: center;
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background-color: #1ebe5d;
}

/* =========================
   20) Responsive Ladder
   - Breakpoints: 1400 / 1200 / 1024 / 992 / 768 / 576 / 480 / 320
   ========================= */

/* <= 1400px */
@media (max-width: 1400px) {
  .welcome-container {
    grid-template-columns: 1fr minmax(220px, 360px);
  }
}

/* <= 1200px */
@media (max-width: 1200px) {
  .welcome-container {
    grid-template-columns: 1fr minmax(220px, 320px);
  }
  #search-input { padding: 0.6rem 1rem; }
}

/* <= 1024px */
@media (max-width: 1024px) {
  #products-container { gap: 1rem; }
}

/* <= 992px */
@media (max-width: 992px) {
  .footer-main {
    flex-direction: column;
    text-align: center;
    padding: 30px;
  }
  .footer-left, .footer-right { text-align: center; }

  .footer-right {
    margin-top: 20px;
    color: var(--font-color-light);
  }
  body[data-theme="light"] .footer-right { color: var(--font-color-dark); }
  body[data-theme="light"] .footer-right a { color: var(--primary-blue); }

  .footer-main { background: rgba(255, 255, 255, 0.8); }
  body[data-theme="dark"] .footer-main { background: rgba(17, 24, 39, 0.8); }
}

/* <= 768px (Tablets) */
@media (max-width: 768px) {
  /* Sidebar as overlay */
  .sidebar {
    position: fixed;
    left: -260px;
    z-index: 200;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
  }
  body[data-theme="dark"] .sidebar { background: rgba(26, 35, 58, 0.9); }
  .sidebar.open { left: 0; }
  .close-btn { display: block; }

  /* Compact header info */
  .header-right .user-info { display: none; }

  .logo {
    width: 50px;
    height: 50px;
    margin-left: 18px;
  }

  /* Welcome row layout */
  .welcome-container {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .welcome-message {
    margin-left: -30px;
    flex: 0 0 auto;
  }

  #search-box {
    margin-left: auto;
    flex: 0 1 420px;
  }

  #search-input {
    width: 100%;
    min-width: 0;
    height: 20px;
    padding: 8px 14px;
    border-radius: 20px;
  }

  /* Categories tighter on tablets */
  #product-categories {
    padding: 0.01rem;
    margin: 0.01rem 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  .nav-links-desktop { display: none; }
  .menu-toggle { display: block; }

  body[data-theme="dark"] .page-content {
    background: rgba(17, 24, 39, 0.95);
  }

  .banner-item { height: 80px; }
}

/* <= 576px (Large mobiles) */
@media (max-width: 576px) {
  .welcome-message { font-size: 16px; }
  .toggle-label { display: none; }
}

/* <= 480px (Mobiles) */
@media (max-width: 480px) {
  .header { padding: 5px 16px; }
  .logo { width: 45px; height: 45px; margin-left: 14px; }
  .icon-menu { margin: 0; height: 30px; width: 30px; }

  .toggle-label { display: none; }

  .product-info h3,
  .product-price { font-size: 0.95rem; }

  .product-actions { flex-direction: column; }
  .product-actions a,
  .product-actions button { font-size: 0.85rem; }

  .scrolling-banner { gap: 15px; }
  .banner-item { height: 70px; }

  .footer-image img { width: 150px; height: 150px; }
  .footer-left h2 { font-size: 24px; text-align: center; }
  .footer-left h3 { font-size: 16px; text-align: center; }
  .footer-right p { font-size: 14px; text-align: center; }
  .social-icons a { font-size: 20px; margin: 0 10px; }

  .user-avatar { width: 40px; height: 40px; }

  body[data-theme="dark"] { --font-color-dark: #E5E7EB; }
}

/* <= 320px (Very small) */
@media (max-width: 320px) {
  .welcome-container {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 0.5rem;
  }
  #search-box { max-width: 100%; }
  #search-input { padding: 0.5rem 0.8rem; }
}
