/* ============================================================
   HUNZA BAZAR — Main Store CSS
   File: public_html/assets/css/store/main.css
   Mobile First | Poppins | 2026 Modern Design
   ============================================================ */

/* ── GOOGLE FONTS ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ── CSS VARIABLES ────────────────────────────────────────── */
:root {
  --primary:        #FE8100;
  --primary-dark:   #E06E00;
  --primary-light:  #FFF3E0;
  --secondary:      #E8174B;
  --secondary-light:#FFF0F3;
  --accent:         #8B2FC9;
  --accent-light:   #F3EAFD;
  --success:        #8DC63F;
  --success-light:  #F1F8E6;
  --info:           #29ABE2;
  --info-light:     #E8F7FD;

  /* Text — clear, readable, never grey */
  --text-heading:   #111111;
  --text-body:      #222222;
  --text-muted:     #555555;
  --text-light:     #888888;
  --text-white:     #FFFFFF;

  /* Backgrounds */
  --bg-white:       #FFFFFF;
  --bg-surface:     #F8F9FA;
  --bg-surface2:    #F2F3F5;
  --border:         #E8E8E8;
  --border-dark:    #D0D0D0;

  /* Shadows */
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:   0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.14);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.08);

  /* Radius */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full:9999px;

  /* Transitions */
  --transition: all 0.25s ease;
  --transition-fast: all 0.15s ease;

  /* Font */
  --font: 'Poppins', sans-serif;

  /* Container */
  --container: 1280px;
  --container-pad: 16px;
}

/* ── RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--text-body);
  background: var(--bg-white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: var(--transition-fast); }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
ul, ol { list-style: none; }
input, select, textarea {
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  width: 100%;
  transition: var(--transition-fast);
  color: var(--text-body);
  background: var(--bg-white);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(254,129,0,0.12);
}

/* ── CONTAINER ────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ── TYPOGRAPHY ───────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font);
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.25;
}
h1 { font-size: clamp(24px, 5vw, 42px); }
h2 { font-size: clamp(20px, 3.5vw, 32px); }
h3 { font-size: clamp(16px, 2.5vw, 22px); }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
p  { color: var(--text-body); font-size: 15px; line-height: 1.7; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.btn-primary {
  background: var(--primary);
  color: var(--text-white);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(254,129,0,0.35);
}
.btn-secondary {
  background: var(--secondary);
  color: var(--text-white);
  border-color: var(--secondary);
}
.btn-secondary:hover {
  background: #c91240;
  border-color: #c91240;
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--text-white);
}
.btn-outline-dark {
  background: transparent;
  color: var(--text-heading);
  border-color: var(--border-dark);
}
.btn-outline-dark:hover {
  background: var(--text-heading);
  color: var(--text-white);
}
.btn-white {
  background: var(--text-white);
  color: var(--primary);
  border-color: var(--text-white);
}
.btn-white:hover {
  background: var(--primary-light);
}
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 15px 36px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* ── BADGES ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-sale     { background: var(--secondary); color: #fff; }
.badge-new      { background: var(--success);   color: #fff; }
.badge-hot      { background: var(--primary);   color: #fff; }
.badge-out      { background: #999; color: #fff; }
.badge-free     { background: var(--info);      color: #fff; }

/* ── ANNOUNCEMENT BAR ─────────────────────────────────────── */
.announce-bar {
  background: var(--text-heading);
  color: var(--text-white);
  padding: 9px 0;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}
.announce-scroll {
  display: flex;
  gap: 80px;
  animation: scrollText 25s linear infinite;
  white-space: nowrap;
}
.announce-scroll span { display: inline-flex; align-items: center; gap: 8px; }
.announce-scroll span::before { content: '✦'; color: var(--primary); font-size: 10px; }
@keyframes scrollText {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── HEADER ───────────────────────────────────────────────── */
.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}
.header-main {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
}
.header-logo img {
  height: 52px;
  width: auto;
  object-fit: contain;
}
.header-logo .logo-text {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.header-search {
  flex: 1;
  max-width: 560px;
  position: relative;
}
.header-search input {
  padding: 11px 50px 11px 18px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  font-size: 14px;
  background: var(--bg-surface);
  width: 100%;
}
.header-search input:focus {
  border-color: var(--primary);
  background: var(--bg-white);
}
.header-search input::placeholder { color: var(--text-light); }
.search-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  border: none;
  border-radius: var(--radius-full);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.search-btn:hover { background: var(--primary-dark); }
.search-btn svg { width: 16px; height: 16px; fill: #fff; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.header-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: var(--text-heading);
  font-size: 11px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
}
.header-btn:hover { background: var(--bg-surface); color: var(--primary); }
.header-btn svg { width: 22px; height: 22px; }
.header-btn .count-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--secondary);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* ── NAV ──────────────────────────────────────────────────── */
.site-nav {
  background: var(--bg-white);
  border-top: 1px solid var(--border);
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-item { position: relative; flex-shrink: 0; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-heading);
  white-space: nowrap;
  transition: var(--transition-fast);
  border-bottom: 2px solid transparent;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.nav-link svg { width: 14px; height: 14px; transition: var(--transition-fast); }
.nav-item:hover .nav-link svg { transform: rotate(180deg); }

/* Dropdown */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: var(--transition);
  z-index: 999;
}
.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown a {
  display: block;
  padding: 9px 14px;
  font-size: 14px;
  color: var(--text-body);
  border-radius: var(--radius-sm);
  font-weight: 400;
}
.nav-dropdown a:hover { background: var(--primary-light); color: var(--primary); }

/* ── MOBILE HEADER ────────────────────────────────────────── */
.mobile-header {
  display: none;
  padding: 12px 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hamburger {
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--text-heading);
  border-radius: 2px;
  transition: var(--transition);
}
.mobile-search-bar {
  display: none;
  padding: 0 0 12px;
}
.mobile-search-bar .header-search { max-width: 100%; }

/* Mobile Nav Drawer */
.mobile-nav {
  position: fixed;
  top: 0;
  left: -100%;
  width: 85%;
  max-width: 320px;
  height: 100vh;
  background: var(--bg-white);
  z-index: 9999;
  overflow-y: auto;
  transition: left 0.3s ease;
  box-shadow: var(--shadow-lg);
  padding: 20px;
}
.mobile-nav.open { left: 0; }
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  display: none;
}
.mobile-nav-overlay.open { display: block; }
.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.close-nav {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  cursor: pointer;
  font-size: 18px;
  color: var(--text-heading);
}
.mobile-nav-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-heading);
  border-bottom: 1px solid var(--border);
}
.mobile-nav-links a:hover { color: var(--primary); }

/* ── SECTION HEADERS ──────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}
.section-title {
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 700;
  color: var(--text-heading);
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  margin-top: 6px;
}
.section-title.center { text-align: center; }
.section-title.center::after { margin: 6px auto 0; }
.view-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}
.view-all:hover { gap: 8px; }

/* ── HERO BANNER ──────────────────────────────────────────── */
.hero-section { position: relative; overflow: hidden; }
.hero-slider { position: relative; }
.hero-slide {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  min-height: 420px;
  display: flex;
  align-items: center;
}
.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 48px;
  max-width: 520px;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(254,129,0,0.2);
  border: 1px solid rgba(254,129,0,0.4);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
}
.hero-content h1 {
  color: var(--text-white);
  font-size: clamp(26px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.hero-content p {
  color: rgba(255,255,255,0.85);
  font-size: 15px;
  margin-bottom: 28px;
  line-height: 1.6;
}
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* Slider dots */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--border-dark);
  cursor: pointer;
  transition: var(--transition);
  border: none;
}
.dot.active { background: var(--primary); width: 24px; }

/* ── CATEGORY GRID ────────────────────────────────────────── */
.category-section { padding: 48px 0; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 12px;
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.category-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.category-card:hover .cat-icon { background: var(--primary); }
.category-card:hover .cat-icon svg { fill: #fff; }
.cat-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  overflow: hidden;
}
.cat-icon img { width: 44px; height: 44px; object-fit: contain; }
.cat-icon svg { width: 28px; height: 28px; fill: var(--text-muted); transition: var(--transition); }
.cat-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.3;
}
.cat-count { font-size: 11px; color: var(--text-muted); }

/* ── PROMO BANNER GRID ────────────────────────────────────── */
.promo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0 0 48px;
}
.promo-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  min-height: 200px;
  display: flex;
  align-items: flex-end;
  cursor: pointer;
}
.promo-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.promo-card:hover img { transform: scale(1.04); }
.promo-overlay {
  position: relative;
  z-index: 2;
  padding: 24px;
  background: linear-gradient(0deg, rgba(0,0,0,0.65) 0%, transparent 100%);
  width: 100%;
}
.promo-overlay h3 { color: #fff; font-size: 18px; margin-bottom: 4px; }
.promo-overlay p  { color: rgba(255,255,255,0.85); font-size: 13px; margin-bottom: 12px; }

/* ── PRODUCT CARDS ────────────────────────────────────────── */
.products-section { padding: 0 0 48px; }
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
/* ═══════════════════════════════════════════════════════════
   PRODUCT CARD — Modern 2026 — Mobile First
═══════════════════════════════════════════════════════════ */
.product-card{
  background:#fff;border-radius:16px;overflow:hidden;
  transition:transform 0.25s ease,box-shadow 0.25s ease;
  position:relative;display:flex;flex-direction:column;
  box-shadow:0 2px 10px rgba(0,0,0,0.07);
}
.product-card:hover{transform:translateY(-5px);box-shadow:0 16px 36px rgba(0,0,0,0.13)}

/* Image */
.product-img-wrap{
  position:relative;aspect-ratio:1;overflow:hidden;
  background:var(--bg-surface);display:block;text-decoration:none;
}
.product-img-wrap img{
  width:100%;height:100%;object-fit:cover;
  transition:transform 0.5s ease;display:block;
}
.product-card:hover .product-img-wrap img{transform:scale(1.07)}

/* Badges */
.product-badges{position:absolute;top:10px;left:10px;display:flex;flex-direction:column;gap:4px;z-index:2}

/* Wishlist */
.product-actions{position:absolute;top:10px;right:10px;z-index:2}
.action-btn{
  width:34px;height:34px;border-radius:10px;
  background:rgba(255,255,255,0.95);border:none;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  transition:all 0.2s;box-shadow:0 2px 8px rgba(0,0,0,0.15);
}
.action-btn:hover{background:var(--secondary)}
.action-btn:hover svg{stroke:#fff}
.action-btn svg{width:16px;height:16px;stroke:var(--text-heading);fill:none;stroke-width:1.8;transition:stroke 0.2s}

/* Info */
.product-info{padding:12px 14px 8px;flex:1;display:flex;flex-direction:column;gap:4px}
.product-category{font-size:10px;font-weight:700;color:var(--primary);text-transform:uppercase;letter-spacing:0.07em}
.product-name{
  font-size:14px;font-weight:600;color:var(--text-heading);line-height:1.45;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;text-decoration:none;transition:color 0.15s;
}
.product-name:hover{color:var(--primary)}
.product-rating{display:flex;align-items:center;gap:4px}
.stars{color:#F5A623;font-size:11px;letter-spacing:1px}
.rating-count{font-size:11px;color:var(--text-muted)}
.product-price{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:auto;padding-top:4px}
.price-current{font-size:16px;font-weight:800;color:var(--primary);letter-spacing:-0.02em}
.price-original{font-size:12px;color:var(--text-muted);text-decoration:line-through}
.price-discount{font-size:10px;font-weight:700;color:#fff;background:var(--secondary);padding:2px 7px;border-radius:100px}

/* Footer — 2 buttons */
/* ─── PRODUCT CARD BUTTONS — ALL PAGES ─────────────────────
   .btn-atc / .btn-buy  →  products.php
   .patc    / .pbuy     →  index.php (homepage cards)
   .add-to-cart-btn     →  search.php, product-detail.php, wishlist.php
──────────────────────────────────────────────────────────── */

/* Desktop base */
.product-footer{padding:10px 12px 12px;display:flex;gap:8px}

.btn-atc,.patc,.add-to-cart-btn{
  flex:1;padding:10px 8px;min-height:40px;
  background:var(--primary-light);color:var(--primary);
  border:1.5px solid var(--primary);border-radius:10px;
  font-size:12px;font-weight:700;cursor:pointer;transition:all 0.2s;
  display:flex;align-items:center;justify-content:center;gap:5px;
  font-family:var(--font);white-space:nowrap;
}
.btn-atc:hover,.patc:hover,.add-to-cart-btn:hover{background:var(--primary);color:#fff}
.btn-atc:disabled,.patc:disabled,.add-to-cart-btn:disabled{opacity:0.5;cursor:not-allowed}
.btn-atc svg,.patc svg,.add-to-cart-btn svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2;flex-shrink:0}

.btn-buy,.pbuy{
  flex:1;padding:10px 8px;min-height:40px;
  background:var(--secondary);color:#fff;
  border:none;border-radius:10px;
  font-size:12px;font-weight:700;cursor:pointer;transition:all 0.2s;
  display:flex;align-items:center;justify-content:center;gap:5px;
  font-family:var(--font);white-space:nowrap;text-decoration:none;
}
.btn-buy:hover,.pbuy:hover{background:#c01040;color:#fff}
.btn-buy svg,.pbuy svg{width:13px;height:13px;stroke:#fff;fill:none;stroke-width:2;flex-shrink:0}

/* Tablet 768px */
@media(max-width:768px){
  .product-card{border-radius:12px}
  .product-info{padding:10px 10px 6px}
  .product-name{font-size:13px}
  .price-current{font-size:14px}
  .price-original{font-size:11px}
  .price-discount{font-size:10px;padding:1px 5px}
  .product-footer{padding:8px 8px 10px;gap:5px}

  /* Add to Cart = flex:1 full width */
  .btn-atc,.patc,.add-to-cart-btn{
    flex:1;font-size:11px;padding:9px 6px;gap:3px;min-height:38px;
  }
  .btn-atc svg,.patc svg,.add-to-cart-btn svg{width:12px;height:12px}

  /* Buy Now = small icon button */
  .btn-buy,.pbuy{
    flex:0 0 38px;min-width:38px;max-width:38px;
    padding:9px 0;min-height:38px;
  }
  /* Hide Buy Now text — keep icon */
  .btn-buy span,.pbuy span,.pbuy-text,.btn-buy-text{display:none}
  .btn-buy svg,.pbuy svg{width:15px;height:15px}
  .product-quick-add{display:none !important}
}

/* Small mobile 480px */
@media(max-width:480px){
  .product-footer{padding:6px 6px 8px;gap:4px}
  .btn-atc,.patc,.add-to-cart-btn{
    font-size:10px;padding:8px 4px;gap:2px;min-height:36px;
  }
  .btn-atc svg,.patc svg,.add-to-cart-btn svg{width:11px;height:11px}
  .btn-buy,.pbuy{
    flex:0 0 34px;min-width:34px;max-width:34px;
    padding:8px 0;min-height:36px;
  }
  .btn-buy svg,.pbuy svg{width:14px;height:14px}
}

/* Very small 360px */
@media(max-width:360px){
  .btn-atc,.patc,.add-to-cart-btn{font-size:10px;padding:7px 4px}
  .btn-buy,.pbuy{flex:0 0 32px;min-width:32px;max-width:32px}
}

/* ── FLASH SALE SECTION ───────────────────────────────────── */
.flash-section {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: var(--radius-xl);
  padding: 40px;
  margin-bottom: 48px;
}
.flash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}
.flash-title {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}
.flash-fire { font-size: 28px; animation: fireFlicker 1s ease-in-out infinite alternate; }
@keyframes fireFlicker { from { transform: scale(1) rotate(-5deg); } to { transform: scale(1.1) rotate(5deg); } }
.flash-timer {
  display: flex;
  align-items: center;
  gap: 8px;
}
.timer-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  min-width: 52px;
}
.timer-num { font-size: 22px; font-weight: 700; color: var(--primary); line-height: 1; }
.timer-label { font-size: 9px; color: rgba(255,255,255,0.6); text-transform: uppercase; margin-top: 2px; }
.timer-sep { color: var(--primary); font-size: 20px; font-weight: 700; }

/* Flash product card variation */
.flash-section .product-card {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
}
.flash-section .product-card:hover {
  border-color: var(--primary);
  background: rgba(255,255,255,0.1);
}
.flash-section .product-name { color: #fff; }
.flash-section .product-category { color: rgba(255,255,255,0.6); }

/* ── TRUST BADGES ─────────────────────────────────────────── */
.trust-section {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
  margin-bottom: 48px;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
}
.trust-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.trust-icon svg { width: 24px; height: 24px; fill: var(--primary); }
.trust-text h4 { font-size: 14px; font-weight: 600; color: var(--text-heading); }
.trust-text p  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── NEWSLETTER SECTION ───────────────────────────────────── */
.newsletter-section {
  background: var(--primary);
  border-radius: var(--radius-xl);
  padding: 56px 40px;
  margin-bottom: 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.newsletter-section::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}
.newsletter-section::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -40px;
  width: 240px;
  height: 240px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.newsletter-section h2 { color: #fff; font-size: clamp(22px, 3vw, 32px); margin-bottom: 8px; }
.newsletter-section p  { color: rgba(255,255,255,0.85); font-size: 15px; margin-bottom: 28px; }
.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.newsletter-form input {
  flex: 1;
  padding: 13px 20px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 14px;
  backdrop-filter: blur(10px);
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.7); }
.newsletter-form input:focus { border-color: rgba(255,255,255,0.7); }

/* ── FOOTER ───────────────────────────────────────────────── */
.site-footer {
  background: #111111;
  color: #ccc;
  padding: 56px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr 1.3fr;
  gap: 32px;
  padding-bottom: 48px;
}
.footer-brand img { height: 52px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer-brand .brand-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
}
.footer-brand p { color: #999; font-size: 14px; line-height: 1.7; margin-bottom: 20px; }
.social-links { display: flex; gap: 10px; }
.social-link {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: var(--transition);
  overflow: hidden;
  box-sizing: border-box;
  padding: 0;
  flex-shrink: 0;
}
.social-link svg { width: 18px; height: 18px; flex-shrink: 0; display: block; }
.social-link:hover { background: var(--primary); }
.footer-col h4 { color: #fff; font-size: 15px; font-weight: 600; margin-bottom: 18px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #999; font-size: 14px; transition: var(--transition-fast); }
.footer-col ul li a:hover { color: var(--primary); padding-left: 4px; }
.footer-contact p {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #999;
  font-size: 14px;
  margin-bottom: 12px;
}
.footer-contact svg { width: 16px; height: 16px; fill: var(--primary); flex-shrink: 0; margin-top: 2px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 13px; color: #666; }
.payment-methods { display: flex; gap: 8px; align-items: center; }
.payment-badge {
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 11px;
  color: #ccc;
  font-weight: 600;
}

/* ── CART DRAWER ──────────────────────────────────────────── */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  background: var(--bg-white);
  z-index: 9999;
  transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.cart-drawer.open { right: 0; }
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  display: none;
  backdrop-filter: blur(2px);
}
.cart-overlay.open { display: block; }
.cart-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-header h3 { font-size: 18px; font-weight: 700; color: var(--text-heading); }
.cart-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: var(--transition);
}
.cart-close:hover { background: var(--secondary); color: #fff; }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 14px; font-weight: 500; color: var(--text-heading); margin-bottom: 4px; }
.cart-item-price { font-size: 14px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  width: fit-content;
}
.qty-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
  color: var(--text-heading);
}
.qty-btn:hover { background: var(--primary); color: #fff; }
.qty-num {
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-heading);
  min-width: 36px;
  text-align: center;
}
.cart-item-remove {
  color: var(--text-light);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
  background: none;
  border: none;
}
.cart-item-remove:hover { color: var(--secondary); }
.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
}
.cart-subtotal {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}
.cart-subtotal strong { color: var(--text-heading); font-size: 18px; font-weight: 700; }
.free-shipping-bar { margin-bottom: 16px; }
.free-bar-label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.free-bar-track { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.free-bar-fill { height: 100%; background: var(--success); border-radius: 2px; transition: width 0.3s ease; }

/* ── BREADCRUMB ───────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  padding: 14px 0;
  margin-top: 8px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.breadcrumb > * {
  display: inline-flex !important;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}
.breadcrumb a {
  color: var(--text-muted);
  padding: 0 4px;
}
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep {
  color: var(--border-dark);
  padding: 0 2px;
}
.breadcrumb .current {
  color: var(--text-heading);
  font-weight: 500;
  padding: 0 4px;
}

/* ── PAGINATION ───────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.page-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg-white);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-heading);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-btn:hover, .page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ── TOAST NOTIFICATION ───────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
}
.toast {
  background: var(--text-heading);
  color: #fff;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
  border-left: 4px solid var(--primary);
}
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--secondary); }
@keyframes slideUp { from { opacity:0; transform: translateY(20px); } to { opacity:1; transform: translateY(0); } }

/* ── LOADING SKELETON ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-surface2) 25%, var(--border) 50%, var(--bg-surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}
@keyframes shimmer { 0%{background-position:200%} 100%{background-position:-200%} }

/* ── UTILITIES ────────────────────────────────────────────── */
.text-primary   { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-heading   { color: var(--text-heading) !important; }
.text-muted     { color: var(--text-muted) !important; }
.text-center    { text-align: center; }
.text-right     { text-align: right; }
.d-flex         { display: flex; }
.align-center   { align-items: center; }
.justify-between{ justify-content: space-between; }
.gap-8          { gap: 8px; }
.gap-12         { gap: 12px; }
.gap-16         { gap: 16px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.section-pad { padding: 48px 0; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fs-12  { font-size: 12px; }
.fs-13  { font-size: 13px; }
.fs-14  { font-size: 14px; }
.rounded-full { border-radius: var(--radius-full); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE FIRST
═══════════════════════════════════════════════════════════ */

/* ── Tablet 1024px ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr !important; gap: 24px !important; }
  .footer-brand { grid-column: 1/-1 !important; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  /* Account layout */
  .account-layout { grid-template-columns: 220px 1fr !important; gap: 20px !important; }
  /* Product detail */
  .product-detail-layout { grid-template-columns: 1fr 1fr !important; gap: 24px !important; }
  /* Cart/Checkout */
  .cart-layout { grid-template-columns: 1fr 320px !important; }
  .checkout-layout { grid-template-columns: 1fr 320px !important; }
}

/* ── Mobile 768px ──────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --container-pad: 16px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 20px !important; }
  .footer-brand { grid-column: 1/-1 !important; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 14px; }
  .footer-bottom-right { justify-content: center; flex-direction: column; align-items: center; gap: 10px; }
  .payment-methods { justify-content: center; flex-wrap: wrap; }

  /* Products grid */
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .category-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }

  /* Trust/Features */
  .trust-grid { grid-template-columns: 1fr 1fr; gap: 12px; }

  /* Homepage sections */
  .promo-grid { grid-template-columns: 1fr; }
  .flash-section { padding: 24px 0; }
  .flash-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .newsletter-section { padding: 32px 0; }
  .newsletter-form { flex-direction: column; }

  /* Cart drawer full width */
  .cart-drawer { max-width: 100% !important; width: 100% !important; }

  /* Account layout — stack vertically */
  .account-layout { grid-template-columns: 1fr !important; gap: 16px !important; }

  /* Product detail — stack vertically */
  .product-detail-layout { grid-template-columns: 1fr !important; gap: 20px !important; }

  /* Cart layout — stack */
  .cart-layout { grid-template-columns: 1fr !important; }
  .checkout-layout { grid-template-columns: 1fr !important; }

  /* Breadcrumb */
  .breadcrumb { font-size: 12px; padding: 12px 0; margin-bottom: 16px; }
  .breadcrumb .current { 
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap;
    max-width: 150px;
    display: inline-block;
  }

  /* Section padding */
  .section-pad { padding: 28px 0; }
  .section-title { font-size: clamp(18px, 4vw, 24px) !important; }
}

/* ── Small Mobile 480px ────────────────────────────────── */
@media (max-width: 480px) {
  :root { --container-pad: 14px; }

  /* Products */
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .category-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cat-icon { width: 48px; height: 48px; }
  .cat-name { font-size: 11px; }

  /* Hero btns */
  .hero-btns { flex-direction: column; gap: 10px; }

  /* Flash sale timer */
  .timer-num { font-size: 17px; }
  .timer-unit { padding: 5px 8px; min-width: 40px; }

  /* Trust grid single column */
  .trust-grid { grid-template-columns: 1fr; }

  /* Footer single column */
  .footer-grid { grid-template-columns: 1fr !important; }

  /* Account stats grid */
  .account-stats { grid-template-columns: 1fr !important; }

  /* Product card */
  .product-card { border-radius: 10px; }
  .pcard-name { font-size: 13px; }
  .pcard-price { font-size: 15px; }
}

/* ── SCROLL TO TOP ────────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  border: none;
  z-index: 999;
}
.scroll-top.visible { opacity: 1; transform: translateY(0); }
.scroll-top:hover { background: var(--primary-dark); transform: translateY(-2px); }
.scroll-top svg { width: 20px; height: 20px; fill: #fff; }

/* ── PERFORMANCE OPTIMIZATIONS ──────────────────────────── */

/* Lazy loading images */
img {
  content-visibility: auto;
}

/* Product card image - prevent layout shift */
.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

/* Skeleton loading animation - GPU accelerated */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Font display swap - prevent FOIT */
@font-face {
  font-display: swap;
}

/* Touch targets minimum size */
button, a, input[type="submit"] {
  min-height: 44px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}