/* =====================================================================
   Americore Nutrition — modern storefront theme
   Rich aesthetics, fully responsive, glassmorphism, micro-animations.
   ===================================================================== */

:root {
  --navy: #0f172a;
  --navy-2: #1e293b;
  --indigo: #e60000;
  --indigo-dark: #cc0000;
  --indigo-light: #ffe6e6;
  --amber: #f59e0b;
  --green: #10b981;
  --red: #ef4444;
  --bg: #f8fafc;
  --surface: rgba(255, 255, 255, 0.7);
  --surface-solid: #ffffff;
  --border: rgba(226, 232, 240, 0.8);
  --border-focus: #ff6666;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-faint: #94a3b8;
  --radius: 16px;
  --radius-sm: 10px;
  
  /* Modern shadows */
  --shadow-sm: 0 2px 4px rgba(15,23,42,.04);
  --shadow: 0 10px 20px -5px rgba(15,23,42,.08), 0 4px 6px -2px rgba(15,23,42,.04);
  --shadow-lg: 0 20px 25px -5px rgba(15,23,42,.1), 0 10px 10px -5px rgba(15,23,42,.04);
  --shadow-glow: 0 0 20px rgba(230,0,0,.15);
  
  --maxw: 1240px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  overflow-x: hidden;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(at 0% 0%, hsla(253,16%,7%,0.02) 0, transparent 50%), radial-gradient(at 50% 0%, hsla(225,39%,30%,0.02) 0, transparent 50%), radial-gradient(at 100% 0%, hsla(339,49%,30%,0.02) 0, transparent 50%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--indigo); text-decoration: none; transition: var(--transition-fast); }
a:hover { text-decoration: none; color: var(--indigo-dark); }
img { max-width: 100%; display: block; height: auto; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; transition: var(--transition); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.center { text-align: center; }
.hide { display: none !important; }

h1 { font-size: 2.75rem; line-height: 1.1; letter-spacing: -0.03em; font-weight: 800; color: var(--navy); }
h2 { font-size: 2rem; line-height: 1.2; letter-spacing: -0.02em; font-weight: 800; color: var(--navy); }
h3 { font-size: 1.25rem; font-weight: 700; color: var(--navy-2); }
.section-title { text-align: center; margin-bottom: 12px; position: relative; }
.section-sub { text-align: center; color: var(--text-muted); margin-bottom: 48px; max-width: 640px; margin-left: auto; margin-right: auto; font-size: 1.05rem; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 600; font-size: 0.95rem; transition: var(--transition); text-decoration: none;
  white-space: nowrap; position: relative; overflow: hidden;
}
.btn::after {
  content: ''; position: absolute; top: 50%; left: 50%; width: 5px; height: 5px; background: rgba(255, 255, 255, 0.5);
  opacity: 0; border-radius: 100%; transform: scale(1) translate(-50%, -50%); transform-origin: 50% 50%;
}
.btn:active::after {
  transform: scale(30) translate(-50%, -50%); opacity: 1; transition: transform 0.3s, opacity 0.3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-primary { background: linear-gradient(135deg, var(--indigo), var(--indigo-dark)); color: #fff; box-shadow: 0 4px 14px rgba(230,0,0,.3); }
.btn-primary:hover { color: #fff; box-shadow: 0 6px 20px rgba(230,0,0,.4); }
.btn-dark { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; box-shadow: 0 4px 14px rgba(15,23,42,.2); }
.btn-dark:hover { color: #fff; box-shadow: 0 6px 20px rgba(15,23,42,.3); }
.btn-amber { background: linear-gradient(135deg, var(--amber), #d97706); color: #fff; box-shadow: 0 4px 14px rgba(245,158,11,.3); }
.btn-amber:hover { color: #fff; box-shadow: 0 6px 20px rgba(245,158,11,.4); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--navy); }
.btn-outline:hover { border-color: var(--indigo); color: var(--indigo); background: rgba(230,0,0,.04); }
.btn-ghost { background: transparent; color: var(--navy-2); }
.btn-ghost:hover { background: rgba(15,23,42,.04); color: var(--indigo); box-shadow: none; transform: translateY(0); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 32px; font-size: 1.1rem; }
.btn:disabled, .btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }



/* ---------------- Header ---------------- */
.site-header { 
  background: var(--surface); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; transition: var(--transition);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 900; font-size: 1.5rem; color: var(--navy); letter-spacing: -0.03em; }
.brand:hover { text-decoration: none; transform: scale(1.02); }
.brand .logo-mark {
  width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, var(--indigo), var(--indigo-dark));
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.2rem; box-shadow: 0 4px 10px rgba(230,0,0,.3);
}
.main-nav { display: flex; gap: 28px; align-items: center; font-weight: 600; font-size: 0.95rem; }
.main-nav a { color: var(--text-muted); position: relative; padding: 4px 0; }
.main-nav a::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 0%; height: 2px; background: var(--indigo); transition: var(--transition);
}
.main-nav a:hover { color: var(--navy); text-decoration: none; }
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.main-nav a.active { color: var(--indigo); }
.search-box { flex: 1; max-width: 480px; position: relative; }
.search-box input {
  width: 100%; padding: 14px 20px 14px 44px; border: 1px solid var(--border); border-radius: 999px;
  font-size: 0.95rem; background: var(--surface-solid); transition: var(--transition); box-shadow: var(--shadow-sm);
}
.search-box input:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(230,0,0,.15); }
.search-box i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; }
.ajax-search-results {
  position: absolute; top: calc(100% + 8px); left: 0; width: 100%;
  background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); z-index: 100; display: none; overflow: hidden;
}
.mobile-search .ajax-search-results { top: 100%; border-radius: 0 0 var(--radius-sm) var(--radius-sm); border-top: none; }
.ajax-search-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border);
  color: var(--navy); text-decoration: none; transition: var(--transition-fast);
}
.ajax-search-item:last-child { border-bottom: none; }
.ajax-search-item:hover { background: var(--bg); color: var(--indigo); }
.ajax-search-item .thumb { width: 40px; height: 40px; border-radius: 6px; background: #f1f5f9; display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.ajax-search-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.ajax-search-item .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ajax-search-item .title { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ajax-search-item .price { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.action-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--navy-2); font-size: 0.75rem; font-weight: 600; min-width: 54px; text-decoration: none; transition: var(--transition);
}
.action-item:hover { color: var(--indigo); transform: translateY(-2px); }
.action-item .lbl { margin-top: 6px; }
.action-item i { width: 24px; height: 24px; transition: var(--transition-fast); }
.action-item:hover i { transform: scale(1.1); }
.badge-count {
  position: absolute; top: -8px; right: -10px; background: var(--amber); color: #fff;
  font-size: 0.75rem; font-weight: 800; min-width: 20px; height: 20px; border-radius: 10px;
  display: grid; place-items: center; padding: 0 5px; box-shadow: 0 2px 4px rgba(245,158,11,.4);
  border: 2px solid #fff;
}
.badge-count:empty, .badge-count[data-count="0"] { display: none; }

/* mobile menu toggle */
.menu-toggle { display: none; background: rgba(15,23,42,.05); border-radius: 8px; border: 0; color: var(--navy); padding: 10px; transition: var(--transition); }
.menu-toggle:active { background: rgba(15,23,42,.1); }

/* ---------------- Header Bottom ---------------- */
.header-bottom { background: var(--surface-solid); border-bottom: 1px solid var(--border); }
.btn-browse {
  display: flex; align-items: center; gap: 12px; background: var(--indigo); color: #fff; 
  padding: 16px 24px; font-weight: 700; border-radius: var(--radius-sm) var(--radius-sm) 0 0; 
  min-width: 260px; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.02em;
}
.header-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }

/* Category Dropdown Desktop */
.cat-dropdown {
  position: absolute; top: 100%; left: 0; width: 100%; background: var(--surface-solid);
  border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.browse-categories:hover .cat-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.cat-dropdown a {
  display: flex; align-items: center; gap: 12px; padding: 14px 20px; color: var(--navy-2); font-weight: 600; font-size: 0.95rem;
  border-bottom: 1px solid var(--border); transition: var(--transition-fast); text-decoration: none;
}
.cat-dropdown a:last-child { border-bottom: none; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.cat-dropdown a:hover { background: var(--bg); color: var(--indigo); padding-left: 24px; }
.cat-dropdown a span { font-size: 1.25rem; opacity: 0.8; }

/* ---------------- Main Image Slider ---------------- */
.main-slider { position: relative; width: 100%; height: 700px; overflow: hidden; background: #000; margin-bottom: 40px; }
.main-slider .slider-container { width: 100%; height: 100%; position: relative; }
.main-slider .slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease-in-out; display: flex; align-items: center; justify-content: center; }
.main-slider .slide.active { opacity: 1; z-index: 1; }
.main-slider .slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.main-slider .slide-content { position: relative; z-index: 2; text-align: center; color: #fff; max-width: 800px; padding: 0 24px; transform: translateY(20px); transition: all 0.8s; }
.main-slider .slide.active .slide-content { transform: translateY(0); }
.main-slider .slide-content h2 { font-size: 3.5rem; color: #fff; margin-bottom: 16px; font-weight: 900; text-shadow: 0 2px 10px rgba(0,0,0,0.5); line-height: 1.1; }
.main-slider .slide-content p { font-size: 1.25rem; margin-bottom: 32px; text-shadow: 0 2px 4px rgba(0,0,0,0.5); color: #f8fafc; }
.main-slider .slider-prev, .main-slider .slider-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.2); color: #fff; border: none; width: 50px; height: 50px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; z-index: 10; transition: var(--transition); backdrop-filter: blur(4px); }
.main-slider .slider-prev:hover, .main-slider .slider-next:hover { background: rgba(255,255,255,0.4); }
.main-slider .slider-prev { left: 24px; }
.main-slider .slider-next { right: 24px; }
.main-slider .slider-dots { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; z-index: 10; }
.main-slider .slider-dots .dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; transition: var(--transition); }
.main-slider .slider-dots .dot.active { background: #fff; transform: scale(1.2); }

@media (max-width: 860px) {
  .main-slider { height: 500px; }
  .main-slider .slide-content h2 { font-size: 2.2rem; margin-bottom: 12px; }
  .main-slider .slide-content p { font-size: 1.1rem; margin-bottom: 24px; }
}
@media (max-width: 560px) {
  .main-slider { height: 450px; }
  .main-slider .slide-content { padding: 0 16px; width: 100%; }
  .main-slider .slide-content h2 { font-size: 1.7rem; margin-bottom: 8px; }
  .main-slider .slide-content p { font-size: 0.95rem; margin-bottom: 16px; }
  .main-slider .slider-prev, .main-slider .slider-next { display: none; } /* Hide arrows on small screens */
  .main-slider .slider-dots { bottom: 16px; }
  .main-slider .slide-content .btn { padding: 10px 20px; font-size: 0.95rem; }
}


/* ---------------- Category strip ---------------- */
.cat-strip { background: var(--surface-solid); border-bottom: 1px solid var(--border); }
.cat-strip .container { display: flex; gap: 16px; padding-top: 20px; padding-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.cat-strip .container::-webkit-scrollbar { display: none; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 999px;
  background: var(--bg); color: var(--navy-2); font-weight: 600; font-size: 0.9rem; white-space: nowrap; 
  border: 1px solid var(--border); transition: var(--transition); box-shadow: var(--shadow-sm);
}
.cat-chip:hover { background: var(--indigo); color: #fff; border-color: var(--indigo); box-shadow: 0 4px 12px rgba(230,0,0,.2); transform: translateY(-2px); }
.cat-chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------------- Product grid ---------------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 32px; }
.product-card {
  background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); display: flex; flex-direction: column; position: relative;
}
.product-card:hover { 
  box-shadow: 0 12px 30px -10px rgba(230,0,0,0.25), 0 4px 10px rgba(15,23,42,0.05); 
  transform: translateY(-8px); border-color: rgba(230,0,0,0.3); 
}
.product-card a { color: inherit; }
.product-card a:hover { text-decoration: none; }
.product-thumb {
  aspect-ratio: 1; background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  display: grid; place-items: center; color: var(--text-faint); font-size: 3rem; position: relative; overflow: hidden;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-thumb img { transform: scale(1.05); }
.badge-sale {
  position: absolute; top: 12px; left: 12px; background: var(--red); color: #fff;
  font-size: 0.75rem; font-weight: 800; padding: 4px 10px; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.05em; box-shadow: 0 2px 8px rgba(239,68,68,.4);
}
.badge-feat {
  position: absolute; top: 12px; right: 12px; background: var(--amber); color: #fff;
  font-size: 0.75rem; font-weight: 800; padding: 4px 10px; border-radius: 6px; box-shadow: 0 2px 8px rgba(245,158,11,.4);
}
.product-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-cat { font-size: 0.75rem; color: var(--indigo); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.product-title { font-size: 1.05rem; font-weight: 700; color: var(--navy); line-height: 1.4; min-height: 2.8em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: var(--transition-fast); }
.product-card:hover .product-title { color: var(--indigo); }
.product-price { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; }
.product-price .now { font-size: 1.25rem; font-weight: 800; color: var(--navy); }
.product-price .was { font-size: 0.95rem; color: var(--text-faint); text-decoration: line-through; }
.product-rating-legacy { font-size: 0.85rem; color: var(--amber); display: flex; align-items: center; gap: 6px; margin-top: auto; padding-bottom: 8px; }
.product-rating-legacy .count { color: var(--text-muted); font-weight: 500; }
.product-foot { padding: 0 20px 20px; margin-top: auto; }
.btn-add { width: 100%; border-radius: 8px; }
@media (max-width: 560px) {
  .btn-add { font-size: 0.85rem; padding: 8px 12px; }
}
.product-stock-out { color: var(--red); font-weight: 700; font-size: 0.9rem; text-align: center; padding: 10px 0; background: rgba(239,68,68,.05); border-radius: 8px; }
.btn-wishlist {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; background: rgba(255,255,255,0.95);
  border-radius: 50%; display: grid; place-items: center; color: var(--text-muted); font-size: 1.2rem;
  box-shadow: var(--shadow-sm); transition: var(--transition-fast); z-index: 10; cursor: pointer; border: none;
}
.btn-wishlist:hover { color: var(--red); transform: scale(1.1); }
.badge-feat { right: 56px; } /* Adjust if wishlist icon is there */

/* ---------------- Shop Layout ---------------- */
.shop-hero {
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  padding: 64px 32px; text-align: center; color: #fff;
  border-radius: var(--radius); margin-bottom: 40px;
  box-shadow: 0 15px 35px rgba(15,23,42,0.2);
  position: relative; overflow: hidden;
}
.shop-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(230,0,0,0.2) 0%, transparent 50%); pointer-events: none;
}
.shop-hero h1 { color: #fff; font-size: 2.75rem; margin-bottom: 16px; font-weight: 900; letter-spacing: -0.02em; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.shop-hero p { color: var(--text-faint); font-size: 1.15rem; max-width: 600px; margin: 0 auto; line-height: 1.6; }
@media (max-width: 860px) {
  .shop-hero { padding: 40px 20px; }
  .shop-hero h1 { font-size: 2rem; }
  .shop-hero p { font-size: 1rem; }
}

.btn-mobile-filter { display: none; }
.shop-sidebar-overlay { display: none; }
.sidebar-header.mobile-only { display: none; }
.shop-layout { display: flex; gap: 32px; align-items: flex-start; padding-top: 20px; }
.shop-sidebar { width: 280px; flex-shrink: 0; background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.shop-main { flex: 1; min-width: 0; }

/* ---------------- Home Grids ---------------- */
.trust-badges-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.trust-badge { display: flex; align-items: center; gap: 16px; text-align: left; padding: 0 20px; border-left: 1px solid var(--border); }
.trust-badge:first-child { border-left: none; }
.category-showcase-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ---------------- Product detail ---------------- */
.breadcrumbs { font-size: 0.9rem; color: var(--text-muted); margin: 24px 0; font-weight: 500; }
.breadcrumbs a { color: var(--text-muted); transition: var(--transition-fast); }
.breadcrumbs a:hover { color: var(--indigo); }
.breadcrumbs span { margin: 0 10px; color: var(--text-faint); }
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; margin-bottom: 64px; }
.gallery-main {
  aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  display: grid; place-items: center; color: var(--text-faint); font-size: 6rem; border: 1px solid var(--border); box-shadow: var(--shadow);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-main:hover img { transform: scale(1.03); }
.gallery-thumbs { display: flex; gap: 12px; margin-top: 16px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumbs img, .gallery-thumbs .thumb-ph {
  width: 80px; height: 80px; border-radius: var(--radius-sm); object-fit: cover; border: 2px solid transparent; cursor: pointer; transition: var(--transition-fast); box-shadow: var(--shadow-sm);
}
.gallery-thumbs img:hover { transform: translateY(-2px); border-color: var(--indigo-light); }
.gallery-thumbs .active { border-color: var(--indigo); box-shadow: 0 4px 12px rgba(230,0,0,.2); }
.detail-title { font-size: 2.25rem; font-weight: 900; margin-bottom: 12px; line-height: 1.2; color: var(--navy); }
.detail-meta { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 24px; font-weight: 500; }
.price-block { display: flex; align-items: center; gap: 16px; margin: 24px 0; padding: 16px 20px; background: rgba(230,0,0,.04); border-radius: var(--radius-sm); border: 1px solid rgba(230,0,0,.1); }
.price-block .now { font-size: 2.5rem; font-weight: 900; color: var(--indigo); line-height: 1; }
.price-block .was { font-size: 1.25rem; color: var(--text-faint); text-decoration: line-through; font-weight: 600; }
.save-tag { background: var(--green); color: #fff; font-weight: 800; font-size: 0.85rem; padding: 6px 12px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.05em; box-shadow: 0 2px 8px rgba(16,185,129,.3); }
.qty-row { display: flex; align-items: center; gap: 20px; margin: 32px 0; }
.qty-control { display: inline-flex; align-items: center; border: 2px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--surface-solid); }
.qty-control button { width: 44px; height: 44px; background: transparent; border: 0; font-size: 1.2rem; color: var(--navy); transition: var(--transition-fast); }
.qty-control button:hover { background: rgba(15,23,42,.05); color: var(--indigo); }
.qty-control input { width: 54px; height: 44px; border: 0; text-align: center; font-weight: 700; font-size: 1.1rem; color: var(--navy); background: transparent; }
.qty-control input:focus { outline: none; }
.detail-actions { display: flex; gap: 16px; margin: 32px 0; }
.detail-features { border-top: 1px solid var(--border); margin-top: 32px; padding-top: 24px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.detail-features .feat { display: flex; gap: 12px; align-items: center; font-size: 0.95rem; font-weight: 500; color: var(--navy-2); }
.detail-features .feat .ico { color: var(--indigo); background: var(--indigo-light); padding: 8px; border-radius: 50%; display: grid; place-items: center; }
.detail-desc { margin-top: 40px; font-size: 1.05rem; line-height: 1.7; color: var(--navy-2); }
.detail-desc h3 { margin-bottom: 16px; font-size: 1.5rem; }
.tabs { border-top: 1px solid var(--border); margin-top: 48px; }
.tab-headers { display: flex; gap: 8px; border-bottom: 2px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tab-headers::-webkit-scrollbar { display: none; }
.tab-headers button { padding: 16px 24px; background: none; border: 0; border-bottom: 3px solid transparent; font-weight: 700; color: var(--text-muted); font-size: 1.05rem; transition: var(--transition); white-space: nowrap; margin-bottom: -2px; }
.tab-headers button:hover { color: var(--navy); }
.tab-headers button.active { color: var(--indigo); border-bottom-color: var(--indigo); }
.tab-panel { padding: 32px 0; display: none; animation: fadeIn 0.4s ease; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.mobile-sticky-cart { display: none; }

/* ---------------- Reviews ---------------- */
.review { border-bottom: 1px solid var(--border); padding: 24px 0; }
.review-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.review .stars { color: var(--amber); font-size: 1.1rem; }
.review .author { font-weight: 700; color: var(--navy); font-size: 1.05rem; }
.review .date { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
.review p { font-size: 1rem; color: var(--navy-2); line-height: 1.6; }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 700; font-size: 0.95rem; margin-bottom: 8px; color: var(--navy); }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 16px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; font-size: 1rem; background: var(--surface-solid); transition: var(--transition);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(230,0,0,.15); }
.field textarea { min-height: 120px; resize: vertical; }
.star-input { display: inline-flex; gap: 6px; font-size: 2rem; cursor: pointer; transition: var(--transition-fast); }
.star-input span { color: var(--border); }
.star-input span:hover, .star-input span.on { color: var(--amber); text-shadow: 0 0 10px rgba(245,158,11,.4); }

/* ---------------- Cart ---------------- */
.cart-layout { display: grid; grid-template-columns: 1fr 400px; gap: 40px; align-items: start; }
.cart-item { display: grid; grid-template-columns: 110px 1fr auto; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--border); align-items: center; }
.cart-item .thumb { width: 110px; height: 110px; border-radius: var(--radius-sm); background: linear-gradient(135deg,#f1f5f9,#e2e8f0); display: grid; place-items: center; color: var(--text-faint); font-size: 2rem; overflow: hidden; box-shadow: var(--shadow-sm); }
.cart-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .title { font-weight: 700; font-size: 1.1rem; color: var(--navy); margin-bottom: 6px; display: block; }
.cart-item .meta { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }
.cart-item .price { font-weight: 800; font-size: 1.2rem; color: var(--navy); }
.cart-item .remove { color: var(--red); font-size: 0.9rem; font-weight: 600; background: rgba(239,68,68,.1); padding: 6px 12px; border-radius: 6px; border: 0; margin-top: 12px; transition: var(--transition-fast); }
.cart-item .remove:hover { background: var(--red); color: #fff; }
.summary-card { background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; position: sticky; top: 100px; box-shadow: var(--shadow-lg); }
.summary-card h3 { margin-bottom: 24px; font-size: 1.5rem; }
.summary-row { display: flex; justify-content: space-between; padding: 12px 0; font-size: 1.05rem; color: var(--navy-2); font-weight: 500; }
.summary-row.total { border-top: 2px solid var(--border); margin-top: 12px; padding-top: 20px; font-size: 1.5rem; font-weight: 900; color: var(--navy); }
.coupon-row { display: flex; gap: 12px; margin: 20px 0 24px; }
.coupon-row input { flex: 1; border-radius: 8px; border: 2px solid var(--border); padding: 12px 16px; font-weight: 600; text-transform: uppercase; }
.coupon-row input:focus { border-color: var(--indigo); outline: none; }

/* ---------------- Forms / cards ---------------- */
.card { background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); transition: var(--transition); }
.card:hover { box-shadow: var(--shadow-lg); }
.card + .card { margin-top: 24px; }
.empty-state { text-align: center; padding: 80px 24px; color: var(--text-muted); background: var(--surface-solid); border-radius: var(--radius); border: 1px dashed var(--border); }
.empty-state .ico { font-size: 4rem; margin-bottom: 20px; color: var(--indigo-light); }
.empty-state h3 { font-size: 1.5rem; margin-bottom: 12px; }

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
table.data { width: 100%; border-collapse: collapse; background: var(--surface-solid); overflow: hidden; }
table.data th, table.data td { padding: 16px 20px; text-align: left; font-size: 0.95rem; border-bottom: 1px solid var(--border); }
table.data th { background: rgba(248,250,252,0.8); font-weight: 700; color: var(--navy); font-size: 0.85rem; text-transform: uppercase; letter-spacing: .05em; backdrop-filter: blur(8px); }
table.data tr:last-child td { border-bottom: 0; }
table.data tr { transition: var(--transition-fast); }
table.data tr:hover { background: rgba(248,250,252,0.8); }

/* ---------------- Status pills ---------------- */
.pill { display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.pill-paid, .pill-delivered, .pill-approved, .pill-active { background: rgba(16,185,129,.15); color: var(--green); }
.pill-pending { background: rgba(245,158,11,.15); color: #b87306; }
.pill-shipped, .pill-packed { background: rgba(230,0,0,.15); color: var(--indigo); }
.pill-cancelled, .pill-refunded, .pill-rejected, .pill-blocked { background: rgba(239,68,68,.15); color: var(--red); }
.pill-draft, .pill-inactive { background: var(--bg); color: var(--text-muted); }
.pill-published { background: rgba(16,185,129,.15); color: var(--green); }

/* ---------------- Flash messages ---------------- */
.flash { padding: 16px 24px; border-radius: var(--radius-sm); margin-bottom: 24px; font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; gap: 12px; animation: slideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: var(--shadow); }
@keyframes slideDown { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.flash-success { background: #dcfce7; color: #166534; border-left: 4px solid #22c55e; }
.flash-error { background: #fee2e2; color: #991b1b; border-left: 4px solid #ef4444; }
.flash-info { background: #ffe6e6; color: #3730a3; border-left: 4px solid #6366f1; }
.flash-warning { background: #fef3c7; color: #92400e; border-left: 4px solid #f59e0b; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--navy); color: #cbd5e1; padding: 80px 0 32px; margin-top: 80px; position: relative; overflow: hidden; }
.site-footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--indigo), var(--amber), var(--red)); }
.footer-grid { display: grid; grid-template-columns: 2.5fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand { font-size: 1.75rem; font-weight: 900; color: #fff; margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.footer-brand .logo-mark { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, var(--indigo), var(--indigo-dark)); display: grid; place-items: center; box-shadow: 0 4px 15px rgba(230,0,0,.4); }
.footer-col h4 { color: #fff; font-size: 1.1rem; margin-bottom: 20px; font-weight: 800; letter-spacing: 0.03em; }
.footer-col a { color: #94a3b8; display: block; padding: 6px 0; font-size: 0.95rem; font-weight: 500; }
.footer-col a:hover { color: #fff; padding-left: 4px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 32px; display: flex; justify-content: space-between; font-size: 0.9rem; color: #94a3b8; font-weight: 500; }
.social-row { display: flex; gap: 12px; margin-top: 24px; }
.social-row a { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,0.05); display: grid; place-items: center; color: #cbd5e1; transition: var(--transition); border: 1px solid rgba(255,255,255,0.1); }
.social-row a:hover { background: var(--indigo); color: #fff; transform: translateY(-3px); border-color: var(--indigo); box-shadow: 0 10px 20px rgba(230,0,0,.3); }

/* ---------------- Pagination ---------------- */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 48px; }
.pagination a, .pagination span {
  min-width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-solid); color: var(--navy); font-weight: 700; padding: 0 16px; transition: var(--transition); box-shadow: var(--shadow-sm);
}
.pagination a:hover { border-color: var(--indigo); color: var(--indigo); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.pagination .current { background: var(--indigo); color: #fff; border-color: var(--indigo); box-shadow: 0 4px 12px rgba(230,0,0,.3); }

/* ---------------- Account layout ---------------- */
.account-layout { display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: start; margin: 48px 0; }
.account-nav { background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; position: sticky; top: 100px; box-shadow: var(--shadow); }
.account-nav a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 10px; color: var(--navy-2); font-weight: 600; font-size: 1rem; transition: var(--transition-fast); margin-bottom: 4px; }
.account-nav a:hover { background: var(--bg); text-decoration: none; color: var(--navy); padding-left: 20px; }
.account-nav a.active { background: linear-gradient(135deg, var(--indigo), var(--indigo-dark)); color: #fff; box-shadow: 0 4px 12px rgba(230,0,0,.3); }
.account-nav a.active:hover { padding-left: 16px; }
.account-content { min-width: 0; }
.account-nav .nav-badge {
  margin-left: auto; background: var(--indigo); color: #fff; font-size: 0.72rem; font-weight: 800;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
}
.account-nav a.active .nav-badge { background: #fff; color: var(--indigo); }

/* ---------------- KPI cards ---------------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; margin-bottom: 32px; }
.kpi { background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; position: relative; overflow: hidden; transition: var(--transition); }
.kpi:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.kpi::after { content: ''; position: absolute; right: -20px; top: -20px; width: 100px; height: 100px; background: rgba(230,0,0,.05); border-radius: 50%; pointer-events: none; }
.kpi .lbl { font-size: 0.85rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.kpi .val { font-size: 2.25rem; font-weight: 900; margin-top: 8px; color: var(--navy); }
.kpi .ico { font-size: 1.8rem; position: absolute; right: 24px; top: 24px; color: var(--indigo); opacity: 0.8; }

/* ---------------- Breadcrumbs ---------------- */
.breadcrumb, .breadcrumbs { font-size: 0.95rem; color: var(--text-muted); margin: 24px 0; font-weight: 500; }
.breadcrumb a, .breadcrumbs a { color: var(--text-muted); transition: var(--transition-fast); }
.breadcrumb a:hover, .breadcrumbs a:hover { color: var(--indigo); }
.breadcrumb span, .breadcrumbs span { margin: 0 10px; color: var(--text-faint); }

/* ---------------- Static content ---------------- */
.static-content { color: var(--navy-2); line-height: 1.8; font-size: 1.05rem; }
.static-content h2 { font-size: 1.75rem; margin-top: 40px; margin-bottom: 16px; color: var(--navy); font-weight: 800; }
.static-content h2:first-child { margin-top: 0; }
.static-content h3 { font-size: 1.35rem; margin-top: 32px; margin-bottom: 12px; color: var(--navy); font-weight: 700; }
.static-content p { margin-bottom: 20px; }
.static-content a { color: var(--indigo); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.static-content a:hover { color: var(--indigo-dark); text-decoration: none; }
.static-content ul, .static-content ol { margin: 0 0 24px; padding-left: 24px; }
.static-content ul { list-style: disc; }
.static-content ol { list-style: decimal; }
.static-content li { margin-bottom: 10px; padding-left: 8px; }
.static-content li::marker { color: var(--indigo); font-weight: 800; }
.static-content strong { color: var(--navy); font-weight: 700; }

/* ---------------- FAQ accordion ---------------- */
.faq-list { display: flex; flex-direction: column; gap: 16px; }
.faq-item {
  background: var(--surface-solid); border: 2px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: var(--transition); box-shadow: var(--shadow-sm);
}
.faq-item:hover { border-color: var(--border-focus); }
.faq-item[open] { border-color: var(--indigo); box-shadow: var(--shadow); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 20px 24px; font-weight: 700; color: var(--navy); font-size: 1.1rem;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; color: var(--indigo); font-size: 1.8rem; font-weight: 400; line-height: 1; transition: transform .3s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 24px 24px; color: var(--text-muted); line-height: 1.8; font-size: 1.05rem; }

/* ---------------- Contact layout ---------------- */
.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: start; }
.contact-grid .card { margin-top: 0; }

/* Card header */
.card-head { margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.card-head h2, .card-head h3 { font-size: 1.35rem; }

/* Form grid */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 16px; margin-top: 24px; }

/* ---------------- Responsive Magic (Industry Level) ---------------- */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-badges-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-badge:nth-child(2n+1) { border-left: none; }
  .trust-badge { padding: 16px 0; }
  .category-showcase-grid { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 2.25rem; }
}

/* ---------------- Mobile Bottom Nav & Menu ---------------- */
.mobile-bottom-nav { display: none; }
.mobile-menu-overlay, .mobile-menu { display: none; }

@media (max-width: 860px) {
  .menu-toggle, .search-toggle { display: block; }
  .main-nav, .search-box { display: none; }
  .mobile-search-bar { display: block; }   /* element exists; toggled open via JS */
  .mobile-search-bar:not(.open) { display: none; } /* hidden until opened */
  .action-item .lbl { display: none; }      /* icon-only actions on mobile */
  
  /* Premium Mobile Menu */
  .mobile-menu-overlay {
    display: block;
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15,23,42,0.4); 
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.3s ease;
  }
  .mobile-menu-overlay.show { opacity: 1; visibility: visible; }
  .mobile-menu {
    position: fixed; top: 0; left: -320px; width: 300px; height: 100%; max-width: 85vw;
    background: var(--surface-solid); z-index: 1001; box-shadow: var(--shadow-lg);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column;
  }
  .mobile-menu.open { transform: translateX(320px); }
  .mobile-menu-header {
    padding: 20px 24px; display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--border);
  }
  .mobile-menu-header .brand { font-size: 1.25rem; font-weight: 900; color: var(--navy); display: flex; align-items: center; gap: 12px; }
  .menu-close {
    background: rgba(15,23,42,.05); border: none; border-radius: 50%; width: 36px; height: 36px;
    display: grid; place-items: center; color: var(--navy); cursor: pointer; transition: var(--transition);
  }
  .mobile-menu-body { flex: 1; overflow-y: auto; padding: 24px; scrollbar-width: none; }
  .mobile-menu-body::-webkit-scrollbar { display: none; }
  .mobile-search { position: relative; margin-bottom: 32px; }
  .mobile-search input {
    width: 100%; padding: 12px 16px 12px 40px; border: 1px solid var(--border); border-radius: 999px;
    background: var(--bg); font-size: 0.95rem; font-family: inherit; transition: var(--transition);
  }
  .mobile-search input:focus { outline: none; border-color: var(--indigo); background: #fff; box-shadow: 0 0 0 4px rgba(230,0,0,.1); }
  .mobile-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-faint); }
  .mobile-nav { display: flex; flex-direction: column; }
  .mobile-nav a {
    display: flex; align-items: center; gap: 12px; padding: 12px 0; font-size: 1.05rem; font-weight: 600; color: var(--navy-2);
    border-bottom: 1px solid var(--border); text-decoration: none; transition: var(--transition-fast);
  }
  .mobile-nav a:last-child { border-bottom: none; }
  .mobile-nav a:hover, .mobile-nav a.active { color: var(--indigo); padding-left: 8px; }
  .mobile-nav i { width: 20px; height: 20px; color: var(--text-faint); transition: var(--transition-fast); }
  .mobile-nav a:hover i, .mobile-nav a.active i { color: var(--indigo); }
  .mobile-nav-title {
    font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted);
    margin-top: 32px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 2px solid var(--border);
  }
  

  .header-bottom { display: none; }
  .product-detail { grid-template-columns: 1fr; gap: 32px; margin-bottom: 40px; }
  .cart-layout { grid-template-columns: 1fr; gap: 32px; }
  .summary-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .account-layout { grid-template-columns: 1fr; gap: 24px; }
  .account-nav { position: static; display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; }
  .account-nav a { flex: 1; min-width: 140px; justify-content: center; }
  .hero-slider-wrap { display: none; } /* Hide heavy slider on small screens */
  .detail-features { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .form-grid { grid-template-columns: 1fr; }
  .shop-layout { flex-direction: column; }
  
  /* Shop Mobile Filter Drawer — button styling moved to Mobile UI Modernization block */
  .shop-sidebar {
    position: fixed; top: 0; right: 0; width: 300px; max-width: 85vw; height: 100%;
    background: var(--surface-solid); z-index: 1001; transition: transform 0.3s ease;
    transform: translateX(100%);
    overflow-y: auto; padding: 24px; box-shadow: var(--shadow-lg); border: none; padding-bottom: 80px;
  }
  .shop-sidebar.open { transform: translateX(0); }
  .shop-sidebar-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15,23,42,0.4);
    backdrop-filter: blur(4px); z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.3s ease;
  }
  .shop-sidebar-overlay.show { display: block; opacity: 1; visibility: visible; }
  .sidebar-header.mobile-only {
    display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border);
    padding-bottom: 16px; margin-bottom: 20px;
  }
  .sidebar-header.mobile-only button { background: none; border: none; color: var(--navy); padding: 8px; display: grid; place-items: center; border-radius: 50%; }
  
  /* Mobile Bottom Nav */
  .mobile-bottom-nav {
    display: flex; justify-content: space-around; align-items: center; position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--surface-solid); border-top: 1px solid var(--border); padding: 8px 0; z-index: 1000;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05); padding-bottom: env(safe-area-inset-bottom, 8px);
  }
  .mobile-bottom-nav .nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-faint);
    font-size: 0.75rem; font-weight: 600; text-decoration: none;
  }
  .mobile-bottom-nav .nav-item i { width: 22px; height: 22px; transition: var(--transition-fast); }
  .mobile-bottom-nav .nav-item.active, .mobile-bottom-nav .nav-item:hover { color: var(--indigo); }
  .mobile-bottom-nav .badge-count { top: -6px; right: -8px; font-size: 0.65rem; min-width: 18px; height: 18px; line-height: 14px; }
  body { padding-bottom: 70px; } /* Make space for bottom nav */
  
  /* Mobile Sticky Add to Cart */
  .mobile-sticky-cart {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    position: fixed; bottom: 65px; left: 0; right: 0; background: var(--surface-solid);
    padding: 12px 20px; border-top: 1px solid var(--border); z-index: 900; box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
  }
  .mobile-sticky-cart .price { font-size: 1.25rem; font-weight: 800; color: var(--navy); }
  .mobile-sticky-cart .btn { flex: 1; }
  
  /* Responsive Tables */
  .table-wrap { border: none; box-shadow: none; background: transparent; }
  table.data { display: block; width: 100%; }
  table.data thead { display: none; }
  table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data tr { margin-bottom: 16px; background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
  table.data td { border: none; padding: 8px 0; display: flex; justify-content: space-between; align-items: center; text-align: right; }
  table.data td::before { content: attr(data-label); font-weight: 700; color: var(--text-muted); text-transform: uppercase; font-size: 0.75rem; text-align: left; margin-right: 16px; }
  table.data td:last-child { border-bottom: 0; }
}

@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .trust-badges-grid { grid-template-columns: 1fr; gap: 16px; }
  .trust-badge { border-left: none; border-bottom: 1px solid var(--border); padding: 16px 0; }
  .trust-badge:last-child { border-bottom: none; }
  .category-showcase-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .container { padding: 0 16px; }
  .product-body { padding: 12px; }
  .product-title { font-size: 0.9rem; }
  .product-price .now { font-size: 1.1rem; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  .cart-item { grid-template-columns: 80px 1fr; gap: 16px; position: relative; }
  .cart-item .thumb { width: 80px; height: 80px; }
  .cart-item .remove { position: absolute; top: 24px; right: 0; margin: 0; padding: 4px 8px; }
  .price-block { flex-direction: column; align-items: flex-start; gap: 8px; }
  .qty-row { flex-direction: column; align-items: flex-start; }
  .form-grid { display: flex; flex-direction: column; gap: 16px; }
  .form-grid .field { grid-column: auto; width: 100%; }
}

/* =====================================================================
   ===== Mobile UI Modernization =====
   ===================================================================== */

/* --- Mobile expandable search bar (navbar) --- */
.mobile-search-bar {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--surface-solid); border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow); z-index: 49; padding: 12px 16px;
  transform: translateY(-12px); opacity: 0; visibility: hidden;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.mobile-search-bar.open { transform: translateY(0); opacity: 1; visibility: visible; }
.mobile-search-bar .msb-inner {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 999px; padding: 8px 8px 8px 16px; background: var(--bg);
}
.mobile-search-bar .msb-inner i { width: 18px; height: 18px; color: var(--text-faint); flex-shrink: 0; }
.mobile-search-bar input {
  flex: 1; border: 0; background: transparent; font-size: 0.95rem; outline: none; font-family: inherit;
}
.mobile-search-bar .msb-inner button {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--indigo); color: #fff; flex-shrink: 0;
}
.mobile-search-bar .ajax-search-results { position: static; box-shadow: none; border: none; margin-top: 8px; }

/* Search toggle icon (mobile only) */
.search-toggle {
  display: none; background: rgba(15,23,42,.05); border-radius: 8px; border: 0;
  color: var(--navy); padding: 10px; transition: var(--transition);
}
.search-toggle:active { background: rgba(15,23,42,.1); }

/* --- Shop page: chips + toolbar --- */
.shop-cat-chips { display: none; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 4px 0 14px; }
.shop-cat-chips::-webkit-scrollbar { display: none; }
.shop-cat-chips a {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 999px; background: var(--bg); color: var(--navy-2);
  font-weight: 600; font-size: 0.88rem; white-space: nowrap; border: 1px solid var(--border);
  transition: var(--transition-fast);
}
.shop-cat-chips a.active { background: var(--indigo); color: #fff; border-color: var(--indigo); }
.shop-cat-chips a:hover { text-decoration: none; color: var(--indigo); border-color: var(--indigo); }
.shop-cat-chips a.active:hover { color: #fff; }

.shop-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 20px;
}
@media (max-width: 560px) {
  .shop-toolbar { flex-direction: column; align-items: flex-start; gap: 16px; }
  .shop-toolbar .sort-group { width: 100%; justify-content: space-between; }
  .shop-toolbar .sort-group .sort-select { flex: 1; min-width: 0; }
}
.shop-toolbar .result-count { font-weight: 600; color: var(--text-muted); font-size: 0.92rem; }
.shop-toolbar .sort-group { display: flex; align-items: center; gap: 10px; }
.shop-toolbar label { font-size: 0.88rem; font-weight: 600; color: var(--text-muted); }
.sort-select {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; font-family: inherit; font-size: 0.9rem; cursor: pointer;
}
.sort-select:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(230,0,0,.12); }
.shop-filter-input { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.9rem; }
.shop-filter-input:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(230,0,0,.12); }
.shop-price-row { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.sidebar-block { margin-bottom: 24px; }
.sidebar-block h3 { font-size: 1rem; margin-bottom: 12px; font-weight: 700; }
.sidebar-cat-list { list-style: none; padding: 0; margin: 0; }
.sidebar-cat-list li { margin-bottom: 8px; }
.sidebar-cat-list a {
  text-decoration: none; color: var(--text-muted); font-weight: 500;
  display: flex; justify-content: space-between; transition: var(--transition-fast);
}
.sidebar-cat-list a.active { color: var(--indigo); font-weight: 700; }
.sidebar-cat-list a:hover { color: var(--indigo); }

@media (max-width: 860px) {
  .shop-cat-chips { display: flex; }
  /* Filter button becomes a compact toolbar icon — not sticky (no header overlap) */
  .btn-mobile-filter {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 14px; background: var(--surface-solid); border: 1px solid var(--border);
    border-radius: 8px; font-weight: 700; color: var(--navy); box-shadow: var(--shadow-sm);
    position: static;
  }
  .btn-mobile-filter:hover { border-color: var(--indigo); color: var(--indigo); }
}

/* --- Product card ratings + AJAX wishlist --- */
.product-rating { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 0.85rem; }
.product-rating .stars { color: var(--amber); letter-spacing: 1px; }
.product-rating .count { color: var(--text-muted); font-weight: 500; }
.btn-wishlist.is-active { color: var(--red); background: #fff; }
.btn-wishlist.is-active i { color: var(--red); fill: var(--red); }

/* Desktop hover Quick Add overlay (hidden on touch / ≤860px) */
.quick-add {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px; background: linear-gradient(135deg, var(--indigo), var(--indigo-dark));
  color: #fff; font-weight: 700; font-size: 0.85rem; border: 0; width: 100%;
  transform: translateY(100%); opacity: 0; transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 5; cursor: pointer;
}
.quick-add:hover { color: #fff; }
.product-card:hover .quick-add { transform: translateY(0); opacity: 1; }
@media (hover: none), (max-width: 860px) { .quick-add { display: none !important; } }

/* --- PDP swipeable gallery (mobile) + desktop gallery toggle --- */
.pdp-gallery-mobile { display: none; }
.pdp-gallery-desktop { display: block; }
.pdp-track { display: flex; transition: transform 0.3s ease; will-change: transform; }
.pdp-slide { flex: 0 0 100%; aspect-ratio: 1; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pdp-slide img { width: 100%; height: 100%; object-fit: contain; }
.pdp-slide-emoji { font-size: 5rem; color: var(--text-faint); background: linear-gradient(135deg,#f1f5f9,#e2e8f0); }
.pdp-dots { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.pdp-dots .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); cursor: pointer; transition: var(--transition-fast); }
.pdp-dots .dot.active { background: var(--indigo); transform: scale(1.3); }

/* --- PDP mobile sticky buy bar --- */
.mobile-sticky-cart .msc-price { font-size: 1.25rem; font-weight: 800; color: var(--navy); white-space: nowrap; }
.mobile-sticky-cart .msc-actions { display: flex; gap: 8px; flex: 1; }
.mobile-sticky-cart .msc-actions .btn { flex: 1; padding: 10px 12px; font-size: 0.9rem; }

@media (max-width: 860px) {
  .pdp-gallery-mobile { display: block; }
  .pdp-gallery-desktop { display: none; }
  /* On mobile hide the inline buy-box CTAs; the sticky bar carries both */
  .detail-actions { display: none !important; }
  .pdp-desktop-buynow { display: none !important; }
  .mobile-sticky-cart { align-items: center; }
}

/* --- Cart: mobile sticky checkout bar --- */
.mobile-checkout-bar {
  display: none; position: fixed; bottom: 65px; left: 0; right: 0;
  background: var(--surface-solid); border-top: 1px solid var(--border);
  padding: 12px 16px; z-index: 900; box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
  align-items: center; justify-content: space-between; gap: 16px;
}
.mobile-checkout-bar .mcb-amount { font-size: 1.3rem; font-weight: 800; color: var(--navy); }
@media (max-width: 860px) {
  .mobile-checkout-bar { display: flex; }
  /* When a second sticky bar (PDP buy bar / cart checkout bar) sits above the
     bottom nav, reserve extra space so the last content isn't hidden behind it. */
  body:has(.mobile-sticky-cart),
  body:has(.mobile-checkout-bar) { padding-bottom: 140px; }
}

/* --- Toast notifications --- */
.toast-container { position: fixed; bottom: 80px; right: 16px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff;
  padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 0.9rem;
  box-shadow: var(--shadow-lg); opacity: 0; transform: translateX(40px);
  transition: opacity 0.3s ease, transform 0.3s ease; pointer-events: auto; max-width: 320px;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast i { width: 18px; height: 18px; flex-shrink: 0; }
.toast-success { background: var(--green); }
.toast-error { background: var(--red); }
.toast-info { background: var(--indigo); }

/* --- Cart badge pulse --- */
@keyframes badgePulse { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.badge-count.pulse { animation: badgePulse 0.5s ease; }

/* --- Skeleton shimmer (AJAX search loading) --- */
.skel { background: linear-gradient(90deg, #eef2f7 25%, #e2e8f0 37%, #eef2f7 63%); background-size: 400% 100%; animation: shimmer 1.3s ease-in-out infinite; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.skel-row { pointer-events: none; }
.skel-thumb { width: 40px; height: 40px; border-radius: 6px; flex-shrink: 0; }
.skel-line { height: 10px; width: 100%; margin-bottom: 6px; }
.skel-short { width: 50%; }

