/* ============================================
   BandPro - Smart Band E-Commerce Stylesheet
   ============================================ */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #0f172a;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.1);
  --transition: .25s ease;
  --max-width: 1280px;
  --header-h: 70px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ============ HEADER ============ */
.header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--surface); box-shadow: var(--shadow);
  height: var(--header-h);
}

.header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}

.logo {
  font-size: 1.6rem; font-weight: 800; color: var(--primary);
  letter-spacing: -.5px;
}
.logo span { color: var(--secondary); }

.nav { display: flex; gap: 28px; align-items: center; }
.nav a {
  font-size: .92rem; font-weight: 500; color: var(--text-light);
  transition: var(--transition); position: relative;
}
.nav a:hover, .nav a.active { color: var(--primary); }
.nav a.active::after {
  content: ''; position: absolute; bottom: -6px; left: 50%;
  transform: translateX(-50%); width: 20px; height: 3px;
  background: var(--primary); border-radius: 2px;
}

.header-actions { display: flex; align-items: center; gap: 16px; }
.lang-switch {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 20px; padding: 6px 14px; font-size: .82rem;
  font-weight: 600; color: var(--text); transition: var(--transition);
}
.lang-switch:hover { border-color: var(--primary); color: var(--primary); }
.cart-icon {
  position: relative; font-size: 1.35rem; color: var(--text);
  transition: var(--transition);
}
.cart-icon:hover { color: var(--primary); }
.cart-badge {
  position: absolute; top: -8px; right: -10px;
  background: var(--danger); color: #fff; font-size: .68rem;
  font-weight: 700; width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.user-menu { display: flex; gap: 8px; }
.btn-sm {
  padding: 7px 16px; border-radius: 20px; font-size: .82rem;
  font-weight: 600; transition: var(--transition);
}
.btn-outline {
  border: 1.5px solid var(--primary); color: var(--primary);
  background: transparent;
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-primary {
  background: var(--primary); color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); }

.mobile-toggle {
  display: none; font-size: 1.5rem; background: none;
  color: var(--text); padding: 4px;
}

/* ============ FOOTER ============ */
.footer {
  background: var(--secondary); color: #cbd5e1;
  padding: 60px 0 30px; margin-top: auto;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr;
  gap: 40px; margin-bottom: 40px;
}
.footer h3 { color: #fff; font-size: 1.05rem; margin-bottom: 18px; }
.footer p { font-size: .88rem; line-height: 1.8; }
.footer a { font-size: .88rem; color: #94a3b8; transition: var(--transition); display: block; padding: 4px 0; }
.footer a:hover { color: #fff; }
.footer-social { display: flex; gap: 14px; margin-top: 12px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.08); display: flex;
  align-items: center; justify-content: center; font-size: 1rem;
  transition: var(--transition);
}
.footer-social a:hover { background: var(--primary); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px; display: flex;
  justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; font-size: .82rem;
}
.footer-bottom a { color: var(--primary); }
.icp { font-size: .78rem; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 28px; border-radius: 8px;
  font-weight: 600; font-size: .92rem; transition: var(--transition);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { opacity: .9; }
.btn-outline { border: 2px solid var(--border); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-lg { padding: 15px 36px; font-size: 1rem; border-radius: 12px; }
.btn-full { width: 100%; }

/* ============ SECTION TITLE ============ */
.section-title {
  text-align: center; margin-bottom: 48px;
}
.section-title h2 {
  font-size: 2rem; font-weight: 800; color: var(--secondary);
  margin-bottom: 8px;
}
.section-title p {
  color: var(--text-light); font-size: .95rem; max-width: 560px;
  margin: 0 auto;
}

/* ============ HERO / BANNER ============ */
.hero {
  background: linear-gradient(135deg, var(--secondary) 0%, #1e3a5f 100%);
  color: #fff; padding: 80px 0; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; right: -20%;
  width: 600px; height: 600px; border-radius: 50%;
  background: rgba(37,99,235,.15); filter: blur(80px);
}
.hero .container { position: relative; z-index: 1; }
.hero-content { max-width: 560px; }
.hero-content h1 { font-size: 2.8rem; font-weight: 800; line-height: 1.2; margin-bottom: 20px; }
.hero-content p { font-size: 1.1rem; color: #94a3b8; margin-bottom: 32px; line-height: 1.7; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-btns .btn-outline { border-color: rgba(255,255,255,.3); color: #fff; }
.hero-btns .btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.1); }

/* ============ FEATURES STRIP ============ */
.features-strip {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 28px 0;
}
.features-strip .container {
  display: flex; justify-content: space-around; gap: 24px;
}
.feature-item { display: flex; align-items: center; gap: 12px; }
.feature-icon { font-size: 1.6rem; }
.feature-item h4 { font-size: .88rem; font-weight: 700; }
.feature-item p { font-size: .78rem; color: var(--text-light); }

/* ============ PRODUCT CARD ============ */
.products-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: var(--transition); position: relative;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.product-card .badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: var(--accent); color: #fff; font-size: .72rem;
  font-weight: 700; padding: 4px 10px; border-radius: 20px;
}
.product-card .badge.new { background: var(--success); }
.product-card .badge.sale { background: var(--danger); }
.product-img {
  height: 240px; overflow: hidden; background: #f1f5f9;
  display: flex; align-items: center; justify-content: center;
}
.product-img .placeholder {
  font-size: 5rem; color: #cbd5e1;
}
.product-info { padding: 18px; }
.product-info h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.product-info .category { font-size: .78rem; color: var(--text-light); margin-bottom: 8px; }
.product-info .price-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.product-info .price { font-size: 1.2rem; font-weight: 800; color: var(--primary); }
.product-info .price-old { font-size: .85rem; color: #94a3b8; text-decoration: line-through; }
.product-info .rating { font-size: .82rem; color: var(--accent); }
.product-info .add-cart-btn {
  width: 100%; padding: 10px; border-radius: 8px;
  background: var(--primary); color: #fff; font-weight: 600;
  font-size: .88rem; transition: var(--transition);
}
.product-info .add-cart-btn:hover { background: var(--primary-dark); }
.stock-status { font-size: .78rem; margin-bottom: 8px; }
.stock-status.in-stock { color: var(--success); }
.stock-status.low-stock { color: var(--accent); }
.stock-status.out-stock { color: var(--danger); }

/* ============ CATEGORY TABS ============ */
.category-tabs {
  display: flex; justify-content: center; gap: 10px; margin-bottom: 36px;
  flex-wrap: wrap;
}
.cat-tab {
  padding: 8px 22px; border-radius: 24px; font-size: .88rem;
  font-weight: 600; border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text-light);
  transition: var(--transition);
}
.cat-tab:hover, .cat-tab.active {
  border-color: var(--primary); color: #fff; background: var(--primary);
}

/* ============ PRODUCT DETAIL ============ */
.product-detail { padding: 60px 0; }
.pd-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  align-items: start;
}
.pd-gallery { position: sticky; top: 90px; }
.pd-main-img {
  border-radius: var(--radius); overflow: hidden;
  background: #f1f5f9; height: 420px;
  display: flex; align-items: center; justify-content: center;
}
.pd-main-img .placeholder { font-size: 8rem; color: #cbd5e1; }
.pd-thumbs { display: flex; gap: 10px; margin-top: 14px; }
.pd-thumb {
  width: 72px; height: 72px; border-radius: 10px; overflow: hidden;
  border: 2px solid transparent; cursor: pointer; transition: var(--transition);
  background: #f1f5f9; display: flex; align-items: center; justify-content: center;
}
.pd-thumb.active { border-color: var(--primary); }
.pd-info h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 6px; }
.pd-info .pd-category { color: var(--text-light); font-size: .9rem; margin-bottom: 14px; }
.pd-info .pd-price { font-size: 2rem; font-weight: 800; color: var(--primary); margin-bottom: 16px; }
.pd-info .pd-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 20px; }
.pd-info .pd-rating span { color: var(--accent); font-size: 1rem; }
.pd-info .pd-rating small { color: var(--text-light); }
.pd-desc { color: var(--text-light); line-height: 1.8; margin-bottom: 24px; }
.pd-specs { margin-bottom: 24px; }
.pd-specs table { width: 100%; border-collapse: collapse; }
.pd-specs td { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: .9rem; }
.pd-specs td:first-child { font-weight: 600; color: var(--text); width: 160px; }
.pd-specs td:last-child { color: var(--text-light); }
.pd-quantity { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.pd-quantity label { font-weight: 600; font-size: .9rem; }
.qty-input {
  display: flex; align-items: center; border: 1.5px solid var(--border);
  border-radius: 8px; overflow: hidden;
}
.qty-btn {
  width: 38px; height: 38px; background: var(--bg); font-size: 1.1rem;
  color: var(--text); display: flex; align-items: center; justify-content: center;
}
.qty-input input {
  width: 56px; text-align: center; border: none; border-left: 1.5px solid var(--border);
  border-right: 1.5px solid var(--border); font-weight: 600;
}
.pd-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============ CART ============ */
.cart-page { padding: 60px 0; }
.cart-page h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 36px; }
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 36px; align-items: start; }
.cart-items { display: flex; flex-direction: column; gap: 16px; }
.cart-item {
  background: var(--surface); border-radius: var(--radius);
  padding: 20px; display: flex; gap: 20px; align-items: center;
  box-shadow: var(--shadow);
}
.cart-item-img {
  width: 100px; height: 100px; border-radius: 10px;
  background: #f1f5f9; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cart-item-info { flex: 1; }
.cart-item-info h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.cart-item-info .variant { font-size: .82rem; color: var(--text-light); }
.cart-item-price { font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.cart-item-qty { display: flex; align-items: center; gap: 0; }
.cart-item-qty .qty-btn { width: 32px; height: 32px; font-size: .9rem; border: 1px solid var(--border); }
.cart-item-qty span { width: 42px; text-align: center; font-weight: 600; font-size: .9rem; }
.cart-item-remove {
  background: none; color: var(--danger); font-size: 1.2rem;
  padding: 4px; transition: var(--transition);
}
.cart-item-remove:hover { transform: scale(1.2); }

.cart-summary {
  background: var(--surface); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); position: sticky; top: 90px;
}
.cart-summary h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; }
.summary-row { display: flex; justify-content: space-between; padding: 10px 0; font-size: .9rem; }
.summary-row.total { border-top: 2px solid var(--border); padding-top: 16px; margin-top: 8px; font-size: 1.1rem; font-weight: 800; }
.summary-row.total span:last-child { color: var(--primary); }
.cart-summary .btn { margin-top: 20px; }

.cart-empty {
  text-align: center; padding: 80px 20px;
}
.cart-empty .empty-icon { font-size: 5rem; margin-bottom: 20px; }
.cart-empty h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 10px; }
.cart-empty p { color: var(--text-light); margin-bottom: 24px; }

/* ============ CHECKOUT ============ */
.checkout-page { padding: 60px 0; }
.checkout-page h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 36px; }
.checkout-layout { display: grid; grid-template-columns: 1fr 420px; gap: 36px; align-items: start; }
.checkout-section {
  background: var(--surface); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.checkout-section h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--text); }
.form-group input, .form-group select {
  padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: .9rem; transition: var(--transition);
  outline: none;
}
.form-group input:focus, .form-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }

.payment-methods { display: flex; flex-direction: column; gap: 10px; }
.pm-option {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  border: 2px solid var(--border); border-radius: 10px;
  cursor: pointer; transition: var(--transition);
}
.pm-option:hover, .pm-option.selected { border-color: var(--primary); background: rgba(37,99,235,.03); }
.pm-option input[type="radio"] { accent-color: var(--primary); }

/* ============ AUTH PAGES ============ */
.auth-page {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - var(--header-h)); padding: 60px 20px;
}
.auth-card {
  background: var(--surface); border-radius: 16px; padding: 44px;
  box-shadow: var(--shadow-lg); width: 100%; max-width: 440px;
}
.auth-card h1 { font-size: 1.6rem; font-weight: 800; text-align: center; margin-bottom: 6px; }
.auth-card .subtitle { text-align: center; color: var(--text-light); font-size: .9rem; margin-bottom: 30px; }
.auth-card .form-group { margin-bottom: 16px; }
.auth-card .btn { width: 100%; margin-top: 10px; }
.auth-links { text-align: center; margin-top: 20px; font-size: .88rem; color: var(--text-light); }
.auth-links a { color: var(--primary); font-weight: 600; }

/* ============ ORDERS ============ */
.orders-page { padding: 60px 0; }
.orders-page h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 36px; }
.order-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); margin-bottom: 18px;
}
.order-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.order-header h3 { font-size: 1rem; font-weight: 700; }
.order-status {
  padding: 4px 14px; border-radius: 20px; font-size: .78rem; font-weight: 700;
}
.order-status.pending { background: #fef3c7; color: #b45309; }
.order-status.shipped { background: #dbeafe; color: #1e40af; }
.order-status.delivered { background: #d1fae5; color: #065f46; }
.order-status.cancelled { background: #fee2e2; color: #991b1b; }
.order-items { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.order-item-thumb {
  width: 64px; height: 64px; border-radius: 10px;
  background: #f1f5f9; display: flex; align-items: center; justify-content: center;
}
.order-footer { display: flex; justify-content: space-between; align-items: center; font-size: .88rem; color: var(--text-light); }

/* ============ PAGE HEADER ============ */
.page-header {
  background: linear-gradient(135deg, var(--secondary), #1e3a5f);
  color: #fff; padding: 50px 0; text-align: center;
}
.page-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.page-header p { color: #94a3b8; font-size: .95rem; }

/* ============ ABOUT / COMPLIANCE ============ */
.content-page { padding: 60px 0; }
.content-page .container { max-width: 800px; }
.content-page h2 { font-size: 1.4rem; font-weight: 700; margin: 32px 0 14px; }
.content-page h3 { font-size: 1.1rem; font-weight: 700; margin: 24px 0 10px; }
.content-page p { color: var(--text-light); line-height: 1.85; margin-bottom: 14px; }
.content-page ul { margin-bottom: 14px; }
.content-page ul li { padding: 6px 0; padding-left: 20px; position: relative; color: var(--text-light); }
.content-page ul li::before { content: '•'; position: absolute; left: 4px; color: var(--primary); }
.content-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.info-item h4 { font-size: .82rem; color: var(--text-light); font-weight: 500; margin-bottom: 2px; }
.info-item p { font-size: .95rem; font-weight: 600; }

/* ============ TOAST ============ */
.toast {
  position: fixed; bottom: 30px; right: 30px; z-index: 9999;
  background: var(--secondary); color: #fff; padding: 14px 24px;
  border-radius: 10px; font-size: .9rem; font-weight: 600;
  box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(20px);
  transition: var(--transition); pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(0,0,0,.5); display: flex;
  align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: var(--transition);
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface); border-radius: 16px; padding: 36px;
  max-width: 480px; width: 90%; max-height: 80vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 16px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .hero-content h1 { font-size: 2.2rem; }
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .pd-grid { grid-template-columns: 1fr; gap: 30px; }
  .pd-gallery { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; position: absolute;
    top: var(--header-h); left: 0; right: 0; background: var(--surface);
    padding: 20px; box-shadow: var(--shadow-lg); gap: 14px;
  }
  .mobile-toggle { display: block; }
  .header-actions .user-menu .btn-sm { display: none; }
  .hero-content h1 { font-size: 1.8rem; }
  .hero { padding: 50px 0; }
  .features-strip .container { flex-wrap: wrap; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .form-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .cart-item { flex-wrap: wrap; }
  .pd-main-img { height: 300px; }
  .order-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .hero-content h1 { font-size: 1.5rem; }
  .section-title h2 { font-size: 1.5rem; }
  .products-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .product-info { padding: 12px; }
  .product-info h3 { font-size: .88rem; }
  .product-info .price { font-size: 1rem; }
}
