/* ══════════════════════════════════════════════
   MINIMAL TEMPLATE — Ultra-clean, fast, simple
   Full responsive: mobile / tablet / desktop
   ══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── TOPBAR ── */
.topbar-bar { background: var(--accent); color: var(--cta-text); text-align: center; padding: 7px 16px; font-size: 12px; font-weight: 500; }

/* ── NAVBAR ── */
.navbar { background: var(--bg2); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 200; }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; gap: 16px; }
.nav-brand { font-size: 17px; font-weight: 700; color: var(--text); flex-shrink: 0; display: flex; align-items: center; gap: 8px; }
.nav-search { flex: 1; max-width: 360px; }
.nav-search input { width: 100%; padding: 7px 12px 7px 32px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font-size: 13px; outline: none; font-family: inherit; transition: border-color .15s; }
.nav-search input:focus { border-color: var(--accent); }
.nav-search { position: relative; }
.nav-search .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--text2); }
.nav-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-actions a { padding: 6px 10px; border-radius: 6px; color: var(--text2); font-size: 13px; font-weight: 500; transition: all .15s; white-space: nowrap; }
.nav-actions a:hover { background: var(--bg3); color: var(--text); }
.cart-badge { background: var(--accent); color: var(--cta-text); border-radius: 8px; font-size: 10px; font-weight: 700; padding: 1px 6px; margin-left: 2px; }

/* Mobile */
.menu-toggle { display: none; background: none; border: none; color: var(--text); font-size: 20px; cursor: pointer; padding: 4px; margin-left: auto; }
.mobile-menu { display: none; background: var(--bg2); border-top: 1px solid var(--border); padding: 16px 24px; }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 10px 0; font-size: 14px; color: var(--text); border-bottom: 1px solid var(--border); }
.mobile-menu a:last-child { border: none; }
.mobile-search { margin-bottom: 10px; }
.mobile-search input { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font-size: 14px; outline: none; font-family: inherit; }

/* ── DEV ── */
.dev-banner { background: #fef3c7; border-bottom: 1px solid #fde68a; padding: 5px 24px; font-size: 11px; color: #92400e; font-family: monospace; text-align: center; }

/* ── FLASH ── */
.flash { padding: 10px 20px; font-size: 13px; text-align: center; }
.flash-success { background: #f0fdf4; color: #166534; border-bottom: 1px solid #bbf7d0; }
.flash-error   { background: #fef2f2; color: #991b1b; border-bottom: 1px solid #fecaca; }

/* ── CONTAINER ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 48px 0; }

/* ── HERO — Simple, text-focused ── */
.hero { padding: 64px 24px 52px; border-bottom: 1px solid var(--border); }
.hero-inner { max-width: 600px; }
.hero-eyebrow { font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 12px; letter-spacing: .04em; }
.hero h1 { font-size: clamp(28px, 5vw, 48px); font-weight: 700; line-height: 1.15; margin-bottom: 14px; letter-spacing: -.02em; }
.hero p { font-size: 15px; color: var(--text2); margin-bottom: 28px; font-weight: 400; }
.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 22px; border-radius: 7px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: all .15s; font-family: inherit; }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { opacity: .85; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--text); }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 12px; }

/* ── SECTION HEADING ── */
.section-head { margin-bottom: 24px; }
.section-title { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.section-link { font-size: 13px; color: var(--accent); }

/* ── CATEGORY CHIPS ── */
.cat-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }
.cat-chip { padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 500; background: var(--bg3); color: var(--text2); border: 1px solid var(--border); cursor: pointer; transition: all .15s; }
.cat-chip:hover { border-color: var(--accent); color: var(--accent); }
.cat-chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ── PRODUCT GRID — List-style on mobile, grid on desktop ── */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.product-card { background: var(--bg2); transition: background .15s; }
.product-card:hover { background: var(--bg3); }
.product-img { aspect-ratio: 3/4; background: var(--bg3); display: flex; align-items: center; justify-content: center; font-size: 40px; overflow: hidden; position: relative; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-badge { position: absolute; top: 8px; left: 8px; background: var(--sale); color: #fff; font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 3px; }
.product-info { padding: 14px 14px 16px; }
.product-cat  { font-size: 10px; color: var(--text2); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.product-name { font-size: 13px; font-weight: 500; margin-bottom: 8px; line-height: 1.4; color: var(--text); }
.price-row    { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.price-now    { font-size: 15px; font-weight: 700; color: var(--price); }
.price-old    { font-size: 12px; color: var(--text2); text-decoration: line-through; }
.btn-add { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 8px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; font-family: inherit; }
.btn-add:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-add:disabled { opacity: .4; cursor: not-allowed; }

/* ── FORMS ── */
.cart-wrap { display: grid; grid-template-columns: 1fr 280px; gap: 24px; align-items: start; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 13px; }
.cart-table th { font-size: 10px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: .06em; }
.qty-box { width: 52px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 5px; background: var(--bg); color: var(--text); text-align: center; font-family: inherit; font-size: 13px; }
.checkout-grid { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.form-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 22px; margin-bottom: 16px; }
.form-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 16px; letter-spacing: -.01em; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.form-label { font-size: 11px; font-weight: 600; color: var(--text2); }
.form-input { padding: 9px 11px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font-size: 13px; font-family: inherit; outline: none; transition: border-color .15s; }
.form-input:focus { border-color: var(--accent); }
.summary-card { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 20px; position: sticky; top: 72px; }
.summary-row { display: flex; justify-content: flex-start; gap: 12px; padding: 8px 0; font-size: 13px; border-bottom: 1px solid var(--border); color: var(--text2); }
.summary-row.total { font-size: 16px; font-weight: 700; color: var(--text); border: none; padding-top: 12px; }

/* ── ALERT ── */
.alert { padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; }
.alert-danger  { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-success { background: rgba(var(--accent-r),var(--accent-g),var(--accent-b),.06); border: 1px solid rgba(var(--accent-r),var(--accent-g),var(--accent-b),.2); color: var(--accent); }

/* ── AUTH ── */
.auth-wrap { max-width: 380px; margin: 60px auto; padding: 0 24px; }
.auth-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 32px; }
.auth-card h1 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 4px; }
.auth-card p  { font-size: 13px; color: var(--text2); margin-bottom: 24px; }

/* ── AUTH FORM FIELDS (register/login) ── */
.auth-field {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px;
  margin-bottom: 16px;
  width: 100%;
}
.auth-field label {
  display: block !important;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0;
}
.auth-field input,
.auth-field select {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.auth-field input:focus,
.auth-field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-r),var(--accent-g),var(--accent-b),.12);
}
.auth-name-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 0;
}
.auth-phone-row {
  display: flex !important;
  gap: 10px;
  align-items: flex-end;
}
.auth-cc  { flex: 0 0 160px; }
.auth-num { flex: 1; }
.auth-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 8px 0 16px;
}
.auth-divider::before,
.auth-divider::after { content:''; flex:1; height:1px; background:var(--border); }
.auth-divider span { font-size:11px; color:var(--text2); font-weight:700; letter-spacing:.06em; }
.auth-pw-wrap { position: relative; }
.auth-pw-wrap input { padding-right: 48px !important; }
.auth-pw-wrap button {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text2); font-size: 16px; padding: 4px; line-height: 1;
  z-index: 1;
}
.pw-strength { display: flex; gap: 4px; margin-top: 5px; }
.pw-strength span { flex:1; height:3px; border-radius:2px; background:var(--border); transition:background .2s; }

/* ── THEME BAR ── */
.theme-bar { position: fixed; bottom: 16px; right: 16px; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 7px 12px; display: flex; align-items: center; gap: 7px; box-shadow: 0 2px 12px rgba(0,0,0,.08); font-size: 11px; color: var(--text2); z-index: 300; }
.theme-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; transition: transform .15s, border-color .15s; }
.theme-dot:hover, .theme-dot.active { transform: scale(1.25); border-color: var(--text); }

/* ── FOOTER ── */
.site-footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 40px 24px 24px; width:100%;box-sizing:border-box; margin-top: 48px; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand { font-size: 16px; font-weight: 700; margin-bottom: 8px; letter-spacing: -.01em; }
.footer-desc  { font-size: 13px; color: var(--text2); line-height: 1.6; }
.footer-col h4 { font-size: 11px; font-weight: 600; color: var(--text2); margin-bottom: 12px; }
.footer-col a  { display: block; font-size: 13px; color: var(--text2); padding: 3px 0; transition: color .15s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { max-width: 1200px; margin: 24px auto 0; padding-top: 16px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; font-size: 12px; color: var(--text2); flex-wrap: wrap; gap: 8px; }

/* ══════════════════════════════════════════════ RESPONSIVE ══ */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid  { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 768px) {
  .nav-search, .nav-actions { display: none; }
  .menu-toggle { display: block; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .cart-wrap, .checkout-grid, .form-row { grid-template-columns: 1fr; }
  .auth-name-grid { grid-template-columns: 1fr !important; }
  .auth-phone-row { flex-direction: column !important; }
  .auth-cc, .auth-num { flex: none !important; width: 100%; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-col:not(:first-child) { display: none; }
  .hero { padding: 44px 24px; }
  .section { padding: 36px 0; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .hero-btns { flex-direction: column; }
  .cat-chips { gap: 5px; }
}
/* ── Additional mobile fixes (768px) ── */
@media (max-width: 768px) {
  /* Product detail: stack image above info */
  .product-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  /* Cart: stack table above summary */
  .cart-layout {
    grid-template-columns: 1fr !important;
  }
  /* Checkout: already handled by .checkout-grid above */

  /* Fix inline register grid */
  #reg-form [style*="grid-template-columns:1fr 1fr"],
  #reg-form [style*="grid-template-columns:180px"] {
    grid-template-columns: 1fr !important;
  }

  /* Order confirm */
  .order-confirm-grid {
    grid-template-columns: 1fr !important;
  }

  /* Navbar search visible in mobile menu, hidden in nav */
  .nav-search { display: none; }

  /* Product page zoom overlay */
  #zoom-overlay img { max-width: 98vw !important; }

  /* YouTube thumbnail */
  .yt-thumb-wrap { width: 120px !important; height: 68px !important; }

  /* Summary card full width */
  .summary-card { width: 100%; }

  /* Cart table minimum width for scroll */
  .cart-table { min-width: 460px; }

  /* Coupon row */
  .coupon-row { flex-direction: column !important; }
  .coupon-row input { width: 100% !important; }

  /* Auth pages */
  .auth-wrap { margin: 24px auto !important; }
  div[style*="padding:40px 44px"] { padding: 28px 20px !important; }
}

@media (max-width: 480px) {
  /* Product detail */
  .product-detail-grid { gap: 20px !important; }
  div[style*="height:400px"] { height: 280px !important; }

  /* Smaller section title */
  .section-title { font-size: 20px !important; }

  /* Cart qty stepper */
  .cart-layout table th,
  .cart-layout table td { padding: 10px 8px !important; font-size: 12px !important; }

  /* Checkout form */
  div[style*="padding:36px"] { padding: 24px 16px !important; }
}
