/* ============================================
   Mobile Magic - Main Stylesheet v5
   Theme: Dark luxury + Light mode toggle
   ============================================ */

/* ========== DARK MODE (DEFAULT) ========== */
:root {
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #1a1a24;
  --card: #13131c;
  --border: rgba(255,255,255,0.08);
  --gold: #f5c842;
  --gold2: #e8a020;
  --accent: #7c5cbf;
  --accent2: #5e3fa3;
  --text: #f0f0f8;
  --text2: #a0a0b8;
  --text3: #606080;
  --success: #2dce7a;
  --danger: #e84040;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-gold: 0 4px 24px rgba(245,200,66,0.15);
  --navbar-bg: rgba(10,10,15,0.92);
  --slider-dot: rgba(255,255,255,0.35);
}

/* ========== LIGHT MODE ========== */
body.light-mode {
  --bg: #f5f5f7;
  --bg2: #eaeaef;
  --bg3: #dddde8;
  --card: #ffffff;
  --border: rgba(0,0,0,0.1);
  --text: #0a0a1a;
  --text2: #444458;
  --text3: #8888a0;
  --shadow: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-gold: 0 4px 24px rgba(245,200,66,0.25);
  --navbar-bg: rgba(245,245,247,0.92);
  --slider-dot: rgba(0,0,0,0.25);
}

* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.35s, color 0.35s;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ========== THEME TOGGLE ========== */
.theme-toggle {
  position: relative; width: 56px; height: 28px;
  background: var(--bg3); border: 1.5px solid var(--border);
  border-radius: 50px; cursor: pointer; flex-shrink: 0;
  transition: background 0.3s, border-color 0.3s;
  display: inline-flex; align-items: center; padding: 2px;
}
.theme-toggle::after {
  content: '';
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  transition: transform 0.35s cubic-bezier(.34,1.56,.64,1);
  transform: translateX(0);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
body.light-mode .theme-toggle::after { transform: translateX(28px); }
.toggle-icon { position: absolute; font-size: 0.65rem; pointer-events: none; transition: opacity 0.2s; }
.toggle-sun { right: 5px; opacity: 1; }
.toggle-moon { left: 5px; opacity: 0; }
body.light-mode .toggle-sun { opacity: 0; }
body.light-mode .toggle-moon { opacity: 1; }

/* ========== OFFER BANNER ========== */
.offer-banner {
  background: linear-gradient(90deg, var(--accent2), var(--accent), var(--gold2));
  background-size: 200% 100%;
  animation: bannerMove 4s linear infinite;
  color: #fff; text-align: center;
  padding: 10px 1rem; font-size: 0.88rem; font-weight: 600;
  letter-spacing: 0.3px;
}
@keyframes bannerMove {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* ========== NAVBAR ========== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--navbar-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  transition: background 0.35s;
}
.nav-inner {
  max-width: 1280px; margin: auto;
  display: flex; align-items: center; gap: 1.5rem;
  height: 64px;
}
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem; font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px; white-space: nowrap;
}
.nav-links { display: flex; gap: 1.5rem; flex: 1; }
.nav-links a {
  color: var(--text2); font-size: 0.9rem; font-weight: 500;
  transition: color 0.2s; padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--gold); border-bottom-color: var(--gold); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.cart-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--gold); color: #000;
  padding: 8px 20px; border-radius: 50px;
  font-weight: 600; font-size: 0.9rem; transition: all 0.2s; white-space: nowrap;
}
.cart-btn:hover { background: var(--gold2); transform: translateY(-1px); }
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #000;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 18px 40px rgba(245,200,66,0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
  cursor: pointer;
  white-space: nowrap;
}
.share-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 24px 52px rgba(245,200,66,0.22);
}
.share-btn:active {
  transform: translateY(0) scale(1);
  box-shadow: 0 12px 28px rgba(245,200,66,0.16);
}

.cart-badge {
  background: #000; color: var(--gold);
  width: 20px; height: 20px; border-radius: 50%;
  font-size: 0.7rem; display: flex; align-items: center; justify-content: center;
}

/* ========== HERO IMAGE SLIDER ========== */
.hero-slider { position: relative; overflow: hidden; background: var(--bg2); border-bottom: 1px solid var(--border); }
.slider-track { display: flex; transition: transform 0.6s cubic-bezier(.77,0,.175,1); }
.slide { min-width: 100%; position: relative; overflow: hidden; }
.slide-inner {
  position: relative; min-height: 480px;
  display: flex; align-items: center; padding: 4rem 2rem;
}
.slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
body.light-mode .slide-img { opacity: 0.65; }
.slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10,10,15,0.85) 0%, rgba(10,10,15,0.4) 60%, transparent 100%);
}
body.light-mode .slide-overlay {
  background: linear-gradient(90deg, rgba(245,245,247,0.9) 0%, rgba(245,245,247,0.5) 60%, transparent 100%);
}
.slide-content { position: relative; z-index: 2; max-width: 1280px; margin: auto; width: 100%; }
.slide-tag {
  display: inline-block;
  background: rgba(245,200,66,0.2); border: 1px solid rgba(245,200,66,0.4);
  color: var(--gold); padding: 5px 14px; border-radius: 50px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.5px;
  margin-bottom: 1rem; text-transform: uppercase;
}
.slide-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900; line-height: 1.1; margin-bottom: 0.8rem; color: var(--text);
}
.slide-title em {
  font-style: italic;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.slide-desc { color: var(--text2); font-size: 1.05rem; margin-bottom: 1.8rem; max-width: 480px; }
.slide-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #000; padding: 13px 28px; border-radius: 50px;
  font-weight: 700; font-size: 0.95rem;
  transition: all 0.25s; box-shadow: var(--shadow-gold);
}
.slide-btn:hover { transform: translateY(-2px) scale(1.03); }

.slider-prev, .slider-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(245,200,66,0.15); border: 1.5px solid rgba(245,200,66,0.4);
  color: var(--gold); font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 10; backdrop-filter: blur(10px); transition: all 0.2s;
}
.slider-prev:hover, .slider-next:hover { background: var(--gold); color: #000; }
.slider-prev { left: 20px; }
.slider-next { right: 20px; }

.slider-dots {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 10;
}
.slider-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--slider-dot); cursor: pointer;
  transition: all 0.3s; border: none; padding: 0;
}
.slider-dot.active { background: var(--gold); width: 24px; border-radius: 4px; }

/* ========== HERO (fallback) ========== */
.hero {
  min-height: 92vh; display: flex; align-items: center;
  position: relative; overflow: hidden; padding: 5rem 2rem;
  background: radial-gradient(ellipse at 20% 50%, rgba(124,92,191,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(245,200,66,0.08) 0%, transparent 50%), var(--bg);
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4; animation: orbFloat 8s ease-in-out infinite; }
.orb1 { width: 500px; height: 500px; background: var(--accent); top: -100px; left: -100px; }
.orb2 { width: 400px; height: 400px; background: var(--gold2); bottom: -150px; right: -100px; animation-delay: -3s; opacity: 0.2; }
.orb3 { width: 300px; height: 300px; background: #e040a0; top: 50%; right: 30%; animation-delay: -5s; opacity: 0.15; }
body.light-mode .orb1 { opacity: 0.1; }
body.light-mode .orb2 { opacity: 0.08; }
body.light-mode .orb3 { opacity: 0.06; }

@keyframes orbFloat {
  0%,100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}
.hero > .hero-content, .hero > .hero-visual { position: relative; z-index: 2; }
.hero-content { flex: 1; max-width: 600px; animation: fadeUp 0.8s ease both; }
@keyframes fadeUp {
  from { opacity:0; transform: translateY(40px); }
  to { opacity:1; transform: translateY(0); }
}
.hero-tag {
  display: inline-block;
  background: rgba(245,200,66,0.15); border: 1px solid rgba(245,200,66,0.3);
  color: var(--gold); padding: 6px 16px; border-radius: 50px;
  font-size: 0.85rem; font-weight: 600; margin-bottom: 1.5rem; letter-spacing: 0.5px;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 900; line-height: 1.1; margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--text2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-title em {
  font-style: italic;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub { color: var(--text2); font-size: 1.1rem; margin-bottom: 2.5rem; line-height: 1.8; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #000; padding: 14px 32px; border-radius: 50px;
  font-weight: 700; font-size: 1rem; transition: all 0.25s; box-shadow: var(--shadow-gold);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(245,200,66,0.4); }
.btn-outline {
  border: 2px solid var(--border); color: var(--text);
  padding: 14px 32px; border-radius: 50px; font-weight: 600; font-size: 1rem; transition: all 0.2s;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.hero-stats { display: flex; gap: 2.5rem; }
.stat strong { display: block; font-size: 1.6rem; font-weight: 800; color: var(--gold); }
.stat span { font-size: 0.85rem; color: var(--text3); }
.hero-visual { margin-left: auto; position: relative; width: 400px; height: 400px; flex-shrink: 0; }
.hero-bigbox { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.big-emoji { font-size: 8rem; animation: orbFloat 6s ease-in-out infinite; }
.big-ring { position: absolute; width: 320px; height: 320px; border-radius: 50%; border: 1.5px solid rgba(245,200,66,0.2); animation: spinRing 12s linear infinite; }
.big-ring.r2 { width: 400px; height: 400px; border-color: rgba(124,92,191,0.15); animation-direction: reverse; animation-duration: 18s; }
@keyframes spinRing { to { transform: rotate(360deg); } }
.hero-card {
  position: absolute; z-index: 3;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow); backdrop-filter: blur(10px); min-width: 190px;
}
.hero-card.floating { top: 20%; right: -20px; animation: cardFloat 5s ease-in-out infinite; }
.hero-card.floating2 { bottom: 20%; left: -20px; animation: cardFloat 5s ease-in-out infinite; animation-delay: -2.5s; }
@keyframes cardFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.hcard-icon { font-size: 1.8rem; }
.hcard-text strong { display: block; font-size: 0.9rem; font-weight: 700; }
.hcard-text span { font-size: 0.75rem; color: var(--text3); }

/* ========== SECTIONS ========== */
.section { padding: 5rem 2rem; }
.bg-soft { background: var(--bg2); }
.container { max-width: 1280px; margin: auto; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 2.5rem; }
.section-head h2 { font-family: 'Playfair Display', serif; font-size: 2.2rem; font-weight: 700; }
.section-head p { color: var(--text2); margin-top: 6px; }
.view-all { color: var(--gold); font-size: 0.9rem; font-weight: 600; }
.view-all:hover { text-decoration: underline; }

/* ========== CATEGORY GRID ========== */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.cat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem 1rem; text-align: center; transition: all 0.3s; cursor: pointer;
}
.cat-card:hover { border-color: var(--gold); transform: translateY(-5px); box-shadow: 0 10px 30px rgba(245,200,66,0.1); }
.cat-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.cat-card h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; }
.cat-card span { font-size: 0.75rem; color: var(--text3); }

/* ========== PRODUCT GRID ========== */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; }
.product-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; position: relative; transition: all 0.3s;
}
.product-card:hover { border-color: rgba(245,200,66,0.3); transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,0.25); }
body.light-mode .product-card:hover { box-shadow: 0 16px 40px rgba(0,0,0,0.1); }
.badge-sale {
  position: absolute; top: 12px; right: 12px;
  background: var(--danger); color: #fff; font-size: 0.7rem; font-weight: 700;
  padding: 3px 10px; border-radius: 50px; z-index: 2; letter-spacing: 0.5px;
}
.prod-img { height: 200px; background: var(--bg3); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.prod-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.product-card:hover .prod-img img { transform: scale(1.05); }
.prod-placeholder { font-size: 4rem; }
.prod-info { padding: 1.2rem; }
.prod-cat { font-size: 0.7rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.prod-info h3 { font-size: 0.95rem; font-weight: 600; margin: 6px 0 10px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod-price { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.prod-price strong { font-size: 1.2rem; color: var(--gold); font-weight: 700; }
.prod-price s { font-size: 0.85rem; color: var(--text3); }
.add-cart-btn {
  width: 100%; padding: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; border: none; border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; font-family: 'DM Sans', sans-serif;
}
.add-cart-btn:hover { opacity: 0.9; transform: scale(1.02); }

/* ========== TRUST SECTION ========== */
.trust-section { padding: 3rem 2rem; background: var(--bg3); border-top: 1px solid var(--border); }
.trust-grid { max-width: 1280px; margin: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.trust-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; font-size: 2rem; }
.trust-item strong { display: block; font-size: 1rem; margin-top: 8px; }
.trust-item span { font-size: 0.8rem; color: var(--text3); }

/* ========== FOOTER ========== */
.footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 3rem 2rem 1.5rem; }
.footer-grid { max-width: 1280px; margin: auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 2rem; }
.footer-grid h3 { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--gold); margin-bottom: 1rem; }
.footer-grid h4 { font-size: 0.9rem; margin-bottom: 1rem; color: var(--text); }
.footer-grid p { color: var(--text3); font-size: 0.9rem; }
.footer-grid a { display: block; color: var(--text2); font-size: 0.9rem; margin-bottom: 8px; }
.footer-grid a:hover { color: var(--gold); }
.footer-bottom { max-width: 1280px; margin: auto; border-top: 1px solid var(--border); padding-top: 1.5rem; text-align: center; color: var(--text3); font-size: 0.85rem; }

/* ========== FORMS / PAGES ========== */
.page-wrap { max-width: 1280px; margin: auto; padding: 3rem 2rem; }
.page-title { font-family: 'Playfair Display', serif; font-size: 2rem; margin-bottom: 2rem; }
.filter-bar { display: flex; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.filter-bar select, .filter-bar input { background: var(--card); border: 1px solid var(--border); color: var(--text); padding: 10px 16px; border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 0.9rem; outline: none; }
.filter-bar select:focus, .filter-bar input:focus { border-color: var(--gold); }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.9rem; }
.cart-table th { color: var(--text3); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; }
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; }
.cart-summary { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.cart-summary h3 { font-size: 1.1rem; margin-bottom: 1.2rem; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.9rem; }
.summary-row.total { font-size: 1.1rem; font-weight: 700; color: var(--gold); border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }
.qty-form { display: flex; align-items: center; gap: 6px; }
.qty-form input[type="number"] { width: 60px; background: var(--bg3); border: 1px solid var(--border); color: var(--text); padding: 6px 8px; border-radius: var(--radius-sm); font-size: 0.85rem; text-align: center; }
.qty-form button, .remove-btn { background: var(--bg3); border: 1px solid var(--border); color: var(--text); padding: 6px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: 0.8rem; transition: all 0.2s; }
.remove-btn { color: var(--danger); border-color: var(--danger); }
.remove-btn:hover { background: var(--danger); color: #fff; }
.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 2rem; align-items: start; }
.form-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; }
.form-card h3 { font-size: 1.1rem; margin-bottom: 1.5rem; color: var(--gold); }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text2); margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group textarea, .form-group select { width: 100%; background: var(--bg3); border: 1px solid var(--border); color: var(--text); padding: 12px 14px; border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 0.9rem; outline: none; transition: border-color 0.2s; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--gold); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.btn-pay { width: 100%; padding: 16px; margin-top: 1rem; background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #000; border: none; border-radius: var(--radius-sm); font-size: 1rem; font-weight: 700; cursor: pointer; transition: all 0.2s; font-family: 'DM Sans', sans-serif; }
.btn-pay:hover { opacity: 0.9; transform: translateY(-2px); }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 1.5rem; font-size: 0.9rem; }
.alert-success { background: rgba(45,206,122,0.15); border: 1px solid rgba(45,206,122,0.3); color: var(--success); }
.alert-error { background: rgba(232,64,64,0.15); border: 1px solid rgba(232,64,64,0.3); color: var(--danger); }

/* ========== ADMIN ========== */
.admin-body { background: var(--bg); min-height: 100vh; }
.admin-sidebar { width: 240px; background: var(--bg2); border-right: 1px solid var(--border); position: fixed; top: 0; left: 0; bottom: 0; padding: 1.5rem 0; overflow-y: auto; transition: background 0.35s; }
.admin-sidebar .logo { padding: 0 1.5rem 1.5rem; border-bottom: 1px solid var(--border); display: block; }
.admin-nav { padding: 1rem 0; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 1.5rem; color: var(--text2); font-size: 0.9rem; font-weight: 500; transition: all 0.2s; }
.admin-nav a:hover, .admin-nav a.active { background: rgba(245,200,66,0.08); color: var(--gold); border-right: 3px solid var(--gold); }
.admin-main { margin-left: 240px; padding: 2rem; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.admin-topbar h1 { font-size: 1.5rem; font-weight: 600; }
.admin-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 1.2rem; margin-bottom: 2rem; }
.admin-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; transition: background 0.35s; }
.admin-card .card-num { font-size: 2rem; font-weight: 700; color: var(--gold); }
.admin-card .card-label { font-size: 0.85rem; color: var(--text3); margin-top: 4px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin-table th { text-align: left; padding: 12px 14px; background: var(--bg3); color: var(--text3); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; }
.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 50px; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; }
.badge-active { background: rgba(45,206,122,0.15); color: var(--success); }
.badge-inactive { background: rgba(232,64,64,0.15); color: var(--danger); }
.badge-pending { background: rgba(245,200,66,0.15); color: var(--gold); }
.table-actions { display: flex; gap: 6px; }
.btn-sm { padding: 5px 12px; border-radius: var(--radius-sm); font-size: 0.78rem; font-weight: 600; cursor: pointer; border: 1px solid; transition: all 0.2s; text-decoration: none; display: inline-block; font-family: 'DM Sans', sans-serif; }
.btn-edit { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-edit:hover { background: var(--accent); color: #fff; }
.btn-delete { border-color: var(--danger); color: var(--danger); background: transparent; }
.btn-delete:hover { background: var(--danger); color: #fff; }
.btn-add { background: var(--gold); color: #000; padding: 10px 20px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.9rem; border: none; cursor: pointer; text-decoration: none; display: inline-block; }
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); background-image: radial-gradient(ellipse at 50% 50%, rgba(124,92,191,0.15) 0%, transparent 70%); }
.login-box { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 2.5rem; width: 380px; box-shadow: var(--shadow); }
.login-box .logo { text-align: center; font-size: 2rem; margin-bottom: 2rem; display: block; }
.login-box h2 { font-size: 1.3rem; margin-bottom: 1.5rem; text-align: center; }

/* ========== SLIDER ADMIN ========== */
.slider-preview-thumb { width: 120px; height: 60px; border-radius: 8px; object-fit: cover; border: 1.5px solid var(--border); background: var(--bg3); }
.slider-empty-thumb { width: 120px; height: 60px; border-radius: 8px; background: var(--bg3); border: 1.5px dashed var(--border); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--text3); }
.slide-order-badge { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: #000; font-weight: 700; font-size: 0.8rem; }

@media(max-width:768px){
  .hero { flex-direction: column; padding: 3rem 1.5rem; text-align: center; min-height: auto; }
  .hero-visual { display: none; }
  .hero-stats { justify-content: center; }
  .hero-btns { justify-content: center; }
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .admin-sidebar { left: -270px !important; }
  .admin-main { margin-left: 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .slide-inner { padding: 3rem 1.5rem; min-height: 340px; }
  .slider-prev, .slider-next { width: 36px; height: 36px; font-size: 1rem; }
}

/* ============================================
   ADVANCED SEARCH BAR - Homepage & Products
   ============================================ */

/* ---- Hero Search Bar ---- */
.hero-search-wrap {
  margin-top: 2rem;
  width: 100%;
  max-width: 740px;
}
.hero-search-box {
  display: flex;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 50px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transition: border-color 0.3s;
}
body.light-mode .hero-search-box {
  background: rgba(255,255,255,0.9);
  border-color: var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}
.hero-search-box:focus-within {
  border-color: var(--gold);
  box-shadow: 0 8px 32px rgba(245,200,66,0.2);
}
.hero-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1rem;
  font-family: 'DM Sans', sans-serif;
  padding: 16px 20px;
}
.hero-search-input::placeholder { color: var(--text3); }
.hero-search-btn {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  border: none;
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0 28px;
  cursor: pointer;
  border-radius: 0 50px 50px 0;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.hero-search-btn:hover { opacity: 0.88; }
.hero-mic-btn,.hero-img-btn{background:rgba(255,255,255,.12);border:none;cursor:pointer;padding:10px 13px;font-size:1.1rem;transition:.2s;color:#fff;flex-shrink:0;}
.hero-mic-btn:hover,.hero-img-btn:hover{background:rgba(255,255,255,.22);}
.hero-mic-btn.mic-active{color:#ef4444;animation:micPulse 1s ease-in-out infinite;}

.hero-quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.quick-tag {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text2);
  font-size: 0.78rem;
  padding: 5px 14px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.quick-tag:hover {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}
body.light-mode .quick-tag {
  background: rgba(0,0,0,0.05);
  border-color: var(--border);
}

/* ---- Advanced Filter Panel (products.php) ---- */
.adv-search-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}
.adv-search-top {
  display: flex;
  gap: 12px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.adv-search-top .search-main-input {
  flex: 1;
  min-width: 220px;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s;
}
.adv-search-top .search-main-input:focus { border-color: var(--gold); }
.adv-search-top .search-submit-btn {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  border: none; color: #000; font-weight: 700;
  padding: 12px 24px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 0.95rem;
  transition: opacity 0.2s;
}
.adv-search-top .search-submit-btn:hover { opacity: 0.85; }
.adv-toggle-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}
.adv-toggle-btn:hover { border-color: var(--gold); color: var(--gold); }

.adv-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  display: none; /* toggled by JS */
}
.adv-filters-grid.open { display: grid; }

.adv-filter-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text3);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.adv-filter-group select,
.adv-filter-group input[type="number"],
.adv-filter-group input[type="text"] {
  width: 100%;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.adv-filter-group select:focus,
.adv-filter-group input:focus { border-color: var(--gold); }

.price-range-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.price-range-row span { color: var(--text3); font-size: 0.85rem; }
.price-range-row input { width: 50%; }

.color-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.color-chip {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
  position: relative;
}
.color-chip:hover { transform: scale(1.15); }
.color-chip.selected { border-color: var(--gold); transform: scale(1.15); }
.color-chip-label {
  display: none; /* hidden input tracking */
}

.sort-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sort-pill {
  background: var(--bg3);
  border: 1.5px solid var(--border);
  color: var(--text2);
  padding: 7px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.sort-pill:hover, .sort-pill.active {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
  font-weight: 600;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.2rem;
}
.filter-tag {
  background: rgba(245,200,66,0.12);
  border: 1px solid rgba(245,200,66,0.3);
  color: var(--gold);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-tag .rm { cursor: pointer; opacity: 0.7; }
.filter-tag .rm:hover { opacity: 1; }

.results-info {
  color: var(--text3);
  font-size: 0.88rem;
  margin-bottom: 1.2rem;
}
.results-info strong { color: var(--gold); }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .hero-search-wrap { max-width: 100%; }
  .hero-search-btn { padding: 0 18px; font-size: 0.85rem; }
  .adv-search-top { flex-direction: column; }
  .adv-search-top .search-submit-btn,
  .adv-toggle-btn { width: 100%; justify-content: center; }
}

/* ============================================
   MOBILE MAGIC v8 – Responsive + Auth Styles
   ============================================ */

/* ── AUTH NAV BUTTONS ──────────────────────────────────────────── */
.nav-auth-btn {
  padding: 8px 16px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-login-btn {
  border: 1.5px solid var(--border);
  color: var(--text2);
  background: transparent;
}
.nav-login-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.nav-signup-btn {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #000;
}
.nav-signup-btn:hover { opacity: 0.85; }

/* User avatar in navbar */
.nav-user-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg3); border: 1.5px solid var(--border);
  border-radius: 50px; padding: 5px 14px 5px 5px;
  font-size: 0.85rem; font-weight: 600; color: var(--text);
  transition: border-color 0.2s; white-space: nowrap;
}
.nav-user-btn:hover { border-color: var(--gold); color: var(--gold); }
.nav-avatar-img {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--gold); flex-shrink: 0;
}
.nav-avatar-ico {
  width: 30px; height: 30px; border-radius: 50%; background: var(--bg2);
  display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0;
}
.nav-username { max-width: 90px; overflow: hidden; text-overflow: ellipsis; }

/* ── HAMBURGER ─────────────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  width: 40px; height: 40px; background: var(--bg3);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; gap: 5px; flex-shrink: 0;
  transition: border-color 0.2s;
}
.nav-hamburger:hover { border-color: var(--gold); }
.nav-hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: all 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE MENU ───────────────────────────────────────────────── */
.nav-mobile-menu {
  display: none;
  flex-direction: column;
  padding: 0.8rem 1rem 1.2rem;
  border-top: 1px solid var(--border);
  gap: 2px;
  background: var(--navbar-bg);
  animation: slideDown 0.2s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a {
  padding: 11px 14px; border-radius: var(--radius-sm);
  color: var(--text2); font-size: 0.9rem; font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav-mobile-menu a:hover { background: var(--bg3); color: var(--text); }
.nav-mobile-divider {
  height: 1px; background: var(--border); margin: 6px 0;
}

/* ── CART BTN – compact on mobile ─────────────────────────────── */
@media (max-width: 480px) {
  .cart-btn { padding: 8px 12px; }
}

/* ── FULL RESPONSIVE BREAKPOINTS ──────────────────────────────── */

/* Tablet and below: show hamburger, hide desktop nav-links */
@media (max-width: 860px) {
  .nav-hamburger { display: flex; }
  .nav-links { display: none; }
  .nav-auth-btn, .nav-user-btn { display: none; }

  /* Collapse extra navbar controls to reduce overflow on small screens */
  .nav-right { gap: 8px; align-items: center; }
  .nav-right .nav-location-btn,
  .nav-right .theme-toggle,
  .nav-right .nav-user-btn,
  .nav-right .nav-auth-btn { display: none; }

  /* Keep cart and search toggle visible */
  .nav-right .cart-btn { display: flex; padding: 8px 12px; }
  .nav-search-toggle { display: inline-flex; }

  /* Allow logo to shrink and avoid pushing items out */
  .logo { flex: 0 1 auto; max-width: 48%; overflow: hidden; text-overflow: ellipsis; }
  .nav-inner { gap: 0.6rem; align-items: center; }

  /* Make mobile menu full width and layer above content */
  .nav-mobile-menu { width: 100%; left: 0; right: 0; border-radius: 0; box-shadow: none; }
}

/* Mobile: tighter padding */
@media (max-width: 600px) {
  .navbar { padding: 0 1rem; }
  .nav-inner { height: 58px; gap: 10px; }
  .logo { font-size: 1.3rem; }

  /* Hero */
  .hero { padding: 2.5rem 1rem; text-align: center; min-height: auto; }
  .hero-title { font-size: 2rem; }
  .hero-visual { display: none; }
  .hero-stats { justify-content: center; flex-wrap: wrap; gap: 1rem; }
  .hero-btns { justify-content: center; flex-wrap: wrap; }
  .hero-search-wrap { max-width: 100%; }

  /* Slider */
  .slide-inner { min-height: 260px; padding: 2rem 1rem; }
  .slide-title { font-size: 1.4rem; }
  .slider-prev, .slider-next { width: 34px; height: 34px; font-size: 0.9rem; }

  /* Grids */
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }

  /* Cart & Checkout */
  .cart-layout { grid-template-columns: 1fr; }
  .checkout-layout { grid-template-columns: 1fr; }

  /* Sections */
  .section { padding: 2.5rem 0; }
  .container { padding: 0 1rem; }
  .section-head h2 { font-size: 1.4rem; }

  /* Product card */
  .product-card .prod-info { padding: 0.8rem; }
  .product-card h3 { font-size: 0.85rem; }
  .add-cart-btn { padding: 8px 12px; font-size: 0.8rem; }

  /* Page titles */
  .page-title { font-size: 1.4rem; }
  .page-wrap { padding: 1.2rem 1rem; }

  /* Admin */
  .admin-sidebar { left: -270px !important; }
  .admin-main { margin-left: 0 !important; }
}

/* Very small (320px) */
@media (max-width: 360px) {
  .product-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .logo { font-size: 1.1rem; }
}

/* ======= Small responsive guard ======= */
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

img, iframe, video, svg {
  max-width: 100%;
  height: auto;
}

.container { padding-left: 1rem; padding-right: 1rem; }

/* Ensure navbar padding collapses on very small screens to avoid horizontal overflow */
@media (max-width: 520px) {
  .navbar { padding-left: 0.6rem; padding-right: 0.6rem; }
  .nav-inner { padding-left: 0; padding-right: 0; }
}

/* Minor fix for any elements that accidentally exceed viewport width */
* { -ms-overflow-style: none; }

/* Tablet (601px – 860px): 3-column grids */
@media (min-width: 601px) and (max-width: 860px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .hero { padding: 3.5rem 2rem; }
  .slide-inner { min-height: 360px; }
}

/* Large desktop: widen product grid */
@media (min-width: 1200px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── CHECKOUT – autofill notice ────────────────────────────────── */
.autofill-notice {
  background: rgba(45,206,122,0.09);
  border: 1px solid rgba(45,206,122,0.25);
  border-radius: var(--radius-sm);
  color: var(--success);
  padding: 9px 14px;
  font-size: 0.83rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── RESPONSIVE TABLE (cart) ───────────────────────────────────── */
@media (max-width: 600px) {
  .cart-table thead { display: none; }
  .cart-table, .cart-table tbody, .cart-table tr, .cart-table td {
    display: block; width: 100%;
  }
  .cart-table tr {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.8rem;
    margin-bottom: 0.8rem;
    background: var(--card);
  }
  .cart-table td { padding: 4px 0; font-size: 0.88rem; }
  .qty-form { display: flex; align-items: center; gap: 6px; }
  .qty-form input { width: 55px !important; }
}



/* ── Mobile topbar ── */
.admin-mobile-topbar {
  display: none;
  position: fixed; top: 0; left: 0; right: 0;
  height: 56px; z-index: 400;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  align-items: center; padding: 0 1rem; gap: 0.75rem;
}
.admin-mobile-topbar .amtb-title {
  font-family: 'Playfair Display', serif;
  font-weight: 900; font-size: 1.1rem;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  flex: 1;
}
.amtb-hamburger {
  background: none; border: none; color: var(--text);
  font-size: 1.5rem; cursor: pointer; padding: 4px 8px;
  border-radius: 6px; line-height: 1;
}
.amtb-hamburger:hover { background: var(--bg3); }

/* ── Overlay ── */
.admin-sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.65); z-index: 490;
  backdrop-filter: blur(2px);
}
.admin-sidebar-overlay.asov-open { display: block; }

/* ── Bulk products — card view for mobile ── */
.bulk-card-view { display: none; }

@media (max-width: 768px) {
  /* Show mobile topbar */
  .admin-mobile-topbar { display: flex; }

  /* Push content below topbar */
  body.admin-body { padding-top: 56px !important; }

  /* Override the display:none from existing media query */
  .admin-sidebar {
    display: flex !important;
    flex-direction: column !important;
    position: fixed !important;
    top: 0 !important; left: -280px !important;
    width: 260px !important; height: 100vh !important;
    z-index: 500 !important;
    overflow-y: auto !important;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: none;
  }
  .admin-sidebar.asb-open {
    left: 0 !important;
    box-shadow: 4px 0 40px rgba(0,0,0,0.6) !important;
  }

  /* Main content full width */
  .admin-main {
    margin-left: 0 !important;
    padding: 1rem !important;
    width: 100% !important;
  }

  /* Topbar */
  .admin-topbar h1 { font-size: 1.2rem; }

  /* Stat cards — 2 columns */
  .admin-cards {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
  .admin-card { padding: 1rem !important; }
  .admin-card .card-num { font-size: 1.5rem !important; }

  /* Tables — horizontal scroll */
  .admin-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
  }
  .admin-table { min-width: 480px; }

  /* Stock grid override */
  .stock-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  /* Bottom grid stack */
  .bottom-grid {
    grid-template-columns: 1fr !important;
  }

  /* Pending alert wrap */
  .pending-alert {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  /* ── Bulk products: hide desktop table, show cards ── */
  .bulk-table-wrap { display: none !important; }
  .bulk-card-view { display: block !important; }
  .bulk-desktop-toolbar { display: none !important; }
  .bulk-mobile-toolbar { display: flex !important; }

  /* Info cards 2 col */
  .info-cards {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
}

@media (max-width: 400px) {
  .admin-cards { grid-template-columns: 1fr !important; }
  .stock-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── Bulk product card (mobile) ── */
.bp-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
  position: relative;
}
.bp-card-header {
  display: flex; align-items: center;
  gap: 0.75rem; margin-bottom: 0.75rem;
}
.bp-card-num {
  background: var(--bg3); color: var(--text3);
  font-size: 0.72rem; font-weight: 700;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bp-img-box {
  width: 52px; height: 52px; border-radius: 8px;
  background: var(--bg3); border: 1.5px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; cursor: pointer; flex-shrink: 0;
  overflow: hidden;
}
.bp-img-box img { width: 100%; height: 100%; object-fit: cover; }
.bp-card-title { flex: 1; min-width: 0; }
.bp-card-del {
  background: none; border: none; color: var(--danger);
  cursor: pointer; font-size: 1.2rem; padding: 4px;
  border-radius: 6px; flex-shrink: 0;
}
.bp-card-del:hover { background: rgba(232,64,64,0.1); }

/* Card form grid */
.bp-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.bp-field {
  display: flex; flex-direction: column; gap: 3px;
}
.bp-field.full { grid-column: 1 / -1; }
.bp-field label {
  font-size: 0.68rem; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.bp-field input, .bp-field select, .bp-field textarea {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); border-radius: 6px;
  padding: 7px 9px; font-size: 0.82rem; font-family: inherit;
  width: 100%; transition: border-color 0.2s;
}
.bp-field input:focus, .bp-field select:focus, .bp-field textarea:focus {
  border-color: var(--gold); outline: none;
}
/* Stock field highlight */
.bp-field.stock-field input {
  border-color: var(--success) !important;
  background: rgba(45,206,122,0.06) !important;
  color: var(--success) !important;
  font-weight: 800; text-align: center; font-size: 1rem;
}
.bp-field.stock-field input:focus {
  box-shadow: 0 0 0 2px rgba(45,206,122,0.2);
}
.bp-field.stock-field label { color: var(--success); }

.bp-toggles {
  display: flex; gap: 1rem; margin-top: 0.5rem;
  font-size: 0.82rem; color: var(--text2);
}
.bp-toggles label {
  display: flex; align-items: center; gap: 0.35rem; cursor: pointer;
}
.bp-toggles input[type=checkbox] { accent-color: var(--gold); }

/* Mobile toolbar */
.bulk-mobile-toolbar {
  display: none;
  flex-wrap: wrap; gap: 8px;
  margin-bottom: 1rem;
}

/* ============================================================
   ADMIN MOBILE — Authoritative Override (do not duplicate)
   ============================================================ */

/* Page wrapper — all admin pages use this */
.page-wrap { margin-left: 240px; min-height: 100vh; background: var(--bg); }
.page-body  { padding: 26px 26px 60px; }

/* Mobile topbar */
.m-topbar {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; height: 52px;
  background: var(--bg2); border-bottom: 1px solid var(--border);
  z-index: 400; align-items: center; padding: 0 14px; gap: 10px;
}
.m-topbar .mt-title {
  font-family: 'Playfair Display', serif; font-weight: 900; font-size: 1.05rem;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; flex: 1;
}
.m-ham {
  background: none; border: none; color: var(--text);
  font-size: 1.4rem; cursor: pointer; padding: 4px 8px; border-radius: 6px;
}
.m-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 490; }
.m-overlay.on { display: block; }

/* Sidebar — default: visible fixed 240px */
.admin-sidebar {
  display: flex !important;
  flex-direction: column !important;
  width: 240px;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 300;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.35s !important;
  overflow-y: auto;
}

@media (max-width: 768px) {
  /* Show mobile topbar */
  .m-topbar { display: flex; }

  /* Push content below topbar */
  .page-wrap { margin-left: 0 !important; padding-top: 52px !important; }
  .page-body  { padding: 14px 12px 60px !important; }
  .admin-main { margin-left: 0 !important; }

  /* Sidebar: slide off-screen by default */
  .admin-sidebar {
    left: -270px !important;
    width: 250px !important;
    z-index: 500 !important;
    box-shadow: none;
  }
  /* Sidebar open state */
  .admin-sidebar.asb-open {
    left: 0 !important;
    box-shadow: 6px 0 40px rgba(0,0,0,.6) !important;
  }

  /* Table scroll */
  .tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-table { min-width: 500px; }

  /* Form rows single column */
  .form-row { grid-template-columns: 1fr !important; }

  /* Admin cards 2 col */
  .admin-cards { grid-template-columns: repeat(2, 1fr) !important; gap: .75rem !important; }
}

@media (max-width: 400px) {
  .admin-cards { grid-template-columns: 1fr !important; }
}
