:root {
  --primary: #00a86b; --primary-dark: #008f5a; --primary-light: #e6f7f0;
  --secondary: #0f172a; --text: #1e293b; --text-light: #64748b;
  --bg: #f8fafc; --white: #fff; --border: #e2e8f0;
  --shadow: 0 4px 20px rgba(0,0,0,.08); --radius: 14px; --danger: #ef4444;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: Inter, system-ui, sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--secondary); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links > a { font-weight: 500; font-size: .95rem; transition: color .2s; }
.nav-links > a:hover { color: var(--primary); }
.cart-link { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.cart-badge { position: absolute; top: -8px; right: -12px; background: var(--primary); color: #fff; font-size: .7rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.lang-switcher { display: flex; gap: 3px; background: var(--bg); padding: 3px; border-radius: 8px; }
.lang-btn { padding: 5px 10px; border-radius: 6px; font-size: .8rem; font-weight: 600; color: var(--text-light); }
.lang-btn.active { background: var(--white); color: var(--primary); box-shadow: 0 1px 3px rgba(0,0,0,.1); }

.hero { background: linear-gradient(160deg, #0f172a, #1e293b); color: #fff; padding: 72px 0; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.hero-badge { display: inline-block; background: rgba(0,168,107,.2); border: 1px solid rgba(0,168,107,.4); color: #4ade80; padding: 5px 14px; border-radius: 50px; font-size: .85rem; font-weight: 600; margin-bottom: 16px; }
.hero h1 { font-size: 2.6rem; font-weight: 800; line-height: 1.15; margin-bottom: 16px; }
.hero p { color: #94a3b8; font-size: 1.1rem; margin-bottom: 28px; max-width: 440px; }
.hero-visual { display: flex; justify-content: center; }
.hero-box { background: linear-gradient(145deg, #1e293b, #0f172a); border-radius: 20px; padding: 32px; border: 1px solid rgba(255,255,255,.08); text-align: center; max-width: 320px; width: 100%; }
.hero-icon { font-size: 4.5rem; margin-bottom: 10px; }
.hero-box h3 { color: #fff; margin-bottom: 6px; }
.hero-box p { color: #94a3b8; font-size: .9rem; margin: 0; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 10px; font-weight: 600; font-size: .95rem; border: none; cursor: pointer; transition: all .25s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-danger { background: var(--danger); color: #fff; }

.section { padding: 64px 0; }
.section-title { font-size: 1.85rem; font-weight: 800; margin-bottom: 8px; color: var(--secondary); }
.section-sub { color: var(--text-light); margin-bottom: 36px; }

.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; }
.product-card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; transition: all .3s; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary); }
.product-img { height: 200px; background: linear-gradient(145deg, #e2e8f0, #f1f5f9); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.img-fallback { font-size: 4rem; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.img-fallback.large { font-size: 6rem; }
.product-badge { position: absolute; top: 12px; left: 12px; background: var(--primary); color: #fff; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 50px; }
.product-badge.sale { background: var(--danger); }
.product-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.product-body h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.product-body h3 a:hover { color: var(--primary); }
.product-specs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.spec-tag { background: var(--bg); border: 1px solid var(--border); padding: 3px 8px; border-radius: 5px; font-size: .75rem; color: var(--text-light); }
.product-desc { color: var(--text-light); font-size: .88rem; margin-bottom: 16px; flex: 1; }
.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-size: 1.2rem; font-weight: 800; color: var(--secondary); }
.price small { font-size: .75rem; font-weight: 500; color: var(--text-light); }
.price .old { text-decoration: line-through; color: var(--text-light); font-size: .95rem; margin-right: 6px; }
.price.big { font-size: 1.7rem; margin: 12px 0; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 20px; }
.feature { text-align: center; padding: 24px 12px; background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); }
.feature-icon { font-size: 1.8rem; margin-bottom: 10px; }
.feature h4 { font-size: .95rem; font-weight: 700; }

.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.product-detail-img { position: relative; background: linear-gradient(145deg, #e2e8f0, #f1f5f9); border-radius: var(--radius); min-height: 340px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-detail-img img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-info h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: 8px; }
.muted { color: var(--text-light); }
.sku { font-size: .85rem; color: var(--text-light); margin-top: 4px; }
.stock { margin: 12px 0 20px; font-size: .95rem; }
.in-stock { color: var(--primary); font-weight: 600; }
.out-stock { color: var(--danger); font-weight: 600; }
.add-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qty-input { width: 48px; padding: 8px 4px; border: 1px solid var(--border); border-radius: 8px; text-align: center; -moz-appearance: textfield; appearance: textfield; background: #fff; color: inherit; pointer-events: none; }
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.specs-table td:first-child { font-weight: 600; width: 40%; color: var(--text-light); }
.description-body { color: var(--text-light); line-height: 1.75; }

.cart-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.cart-table th, .cart-table td { padding: 14px; text-align: left; border-bottom: 1px solid var(--border); }
.cart-table th { background: var(--bg); font-size: .85rem; font-weight: 600; color: var(--text-light); }
.cart-summary { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-top: 24px; max-width: 360px; margin-left: auto; }
.cart-summary .row { display: flex; justify-content: space-between; margin-bottom: 12px; }
.cart-summary .total { font-size: 1.25rem; font-weight: 800; border-top: 1px solid var(--border); padding-top: 12px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 14px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 9px; font-size: .95rem; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }
.checkout-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; }
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.card h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 18px; }
.radio { display: flex; align-items: center; gap: 8px; font-weight: 500; margin-bottom: 10px; }
.hint { font-size: .85rem; color: var(--text-light); margin-top: 16px; }
.checkout-line { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: .95rem; }
.checkout-line.total { font-size: 1.2rem; font-weight: 800; margin-top: 12px; }
hr { border: none; border-top: 1px solid var(--border); margin: 14px 0; }

.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; font-size: .95rem; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

.legal-content { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; max-width: 800px; }
.legal-content h1 { font-size: 1.7rem; margin-bottom: 20px; }
.legal-content h2 { font-size: 1.15rem; margin: 24px 0 10px; }
.legal-content p, .legal-content li { color: var(--text-light); margin-bottom: 10px; line-height: 1.7; }

.empty-state { text-align: center; padding: 60px 20px; }

.footer { background: var(--secondary); color: #94a3b8; padding: 56px 0 28px; margin-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 36px; }
.footer .logo { color: #fff; margin-bottom: 12px; }
.footer-brand p { font-size: .9rem; max-width: 260px; line-height: 1.7; }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; font-size: .9rem; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; flex-wrap: wrap; gap: 12px; }
.footer-legal-links { display: flex; gap: 18px; }

@media (max-width: 900px) {
  .hero-inner, .product-detail, .checkout-layout { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .nav-links { gap: 12px; font-size: .85rem; }
  .hero h1 { font-size: 1.8rem; }
  .features, .footer-grid { grid-template-columns: 1fr; }
}

.status-badge{display:inline-block;padding:3px 10px;border-radius:999px;font-size:.8rem;font-weight:600;background:#e2e8f0;color:#334155}
.status-pending{background:#fef3c7;color:#92400e}
.status-confirmed{background:#dbeafe;color:#1e40af}
.status-processing{background:#e0e7ff;color:#3730a3}
.status-shipped{background:#cffafe;color:#155e75}
.status-delivered{background:#dcfce7;color:#166534}
.status-cancelled{background:#fee2e2;color:#991b1b}
.status-log{list-style:none;padding:0;margin:0}
.status-log li{padding:6px 0;border-bottom:1px solid var(--border);font-size:.9rem}
.cart-table tbody tr{display:table-row}
.cart-table td{vertical-align:middle}

/* Order timeline */
.order-timeline { list-style: none; margin: 0; padding: 0 0 0 8px; border-left: 3px solid #e2e8f0; }
.ot-step { position: relative; padding: 0 0 22px 20px; }
.ot-step:last-child { padding-bottom: 0; }
.ot-dot { position: absolute; left: -11px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: #cbd5e1; border: 3px solid #fff; box-shadow: 0 0 0 2px #e2e8f0; }
.ot-done .ot-dot { background: #00a86b; box-shadow: 0 0 0 2px #bbf7d0; }
.ot-current .ot-dot { background: #0ea5e9; box-shadow: 0 0 0 2px #bae6fd; animation: ot-pulse 1.5s infinite; }
.ot-title { font-weight: 700; font-size: .95rem; }
.ot-current .ot-title { color: #0369a1; }
.ot-done .ot-title { color: #166534; }
.ot-desc { font-size: .88rem; color: var(--text-light); margin-top: 2px; }
.ot-time { font-size: .8rem; color: #64748b; margin-top: 4px; }
.ot-note { font-size: .85rem; margin-top: 6px; padding: 8px 10px; background: #f8fafc; border-radius: 8px; border: 1px solid var(--border); }
.ot-place { margin-top: 14px; font-size: .9rem; }
@keyframes ot-pulse { 0%,100%{ box-shadow:0 0 0 2px #bae6fd;} 50%{ box-shadow:0 0 0 6px rgba(14,165,233,.25);} }

.profile-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: #ecfdf5; color: #047857 !important; font-weight: 600;
  border: 1px solid #a7f3d0; text-decoration: none;
}
.profile-btn:hover { background: #d1fae5; }

.order-expand { margin-top: 10px; }
.order-expand summary { cursor: pointer; font-weight: 600; color: #00a86b; }
.cart-product { display: flex; align-items: center; gap: 12px; }
.cart-product img { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; background: #f8fafc; }
.btn-buy-now { background: #0f172a; color: #fff; border: none; }
.btn-buy-now:hover { background: #1e293b; color: #fff; }
.product-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.ot-loc { font-size: .85rem; color: #0f766e; margin-top: 4px; font-weight: 500; }
.ot-dest-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: #64748b; margin-bottom: 4px; }
.ot-dest-name { font-weight: 700; }
.ot-dest-addr { margin-top: 4px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  padding: 10px;
}
.nav-toggle span {
  display: block; height: 2px; background: #0f172a; border-radius: 2px; transition: .2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav { flex-wrap: wrap; }
  .nav-toggle { display: flex; margin-left: auto; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 0 8px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
  }
  .nav-links.open { display: flex; }
  .nav-links > a, .nav-links .profile-btn {
    padding: 12px 10px;
    border-radius: 10px;
  }
  .nav-links > a:hover { background: #f1f5f9; }
  .lang-switcher { padding: 8px 10px; }
  .cart-table { font-size: .9rem; }
  .cart-product { flex-direction: row; }
  .checkout-layout { grid-template-columns: 1fr !important; }
  .form-grid { grid-template-columns: 1fr !important; }
  .admin-grid-2 { grid-template-columns: 1fr !important; }
  .product-detail { grid-template-columns: 1fr !important; }
  .products-grid { grid-template-columns: 1fr 1fr !important; gap: 12px; }
}
@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr !important; }
  .logo span { font-size: 1rem; }
}

/* Auth buttons after languages */
.auth-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: .9rem;
  text-decoration: none !important; white-space: nowrap;
}
.auth-btn-login {
  background: linear-gradient(135deg, #0f172a, #1e3a5f);
  color: #fff !important; box-shadow: 0 4px 14px rgba(15,23,42,.25);
}
.auth-btn-login:hover { filter: brightness(1.08); color: #fff !important; }
.auth-btn-account {
  background: #ecfdf5; color: #047857 !important;
  border: 1px solid #a7f3d0;
}
.auth-btn-account:hover { background: #d1fae5; }
.auth-bell { position: relative; padding: 6px; }

.notif-card { border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; background: #fff; }
.notif-card.unread { border-color: #6ee7b7; background: #f0fdf4; }
.notif-card .notif-subject { font-weight: 700; font-size: 1.05rem; margin: 0 0 6px; }
.notif-card .notif-meta { font-size: .85rem; color: #64748b; margin-bottom: 8px; }
.notif-card .notif-body { white-space: pre-wrap; line-height: 1.5; margin: 0 0 12px; color: #334155; }

.catalog-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; align-items: end; }
.catalog-filters .form-group { margin: 0; min-width: 120px; }
.catalog-filters input, .catalog-filters select { width: 100%; }

.stars { color: #f59e0b; letter-spacing: 1px; }
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th, .compare-table td { border: 1px solid var(--border); padding: 10px; text-align: center; }
.price-alt { font-size: .85rem; color: #64748b; }


/* —— Mobile nav fix (solid panel, no content bleed) —— */
.nav-backdrop {
  display: none;
}
@media (max-width: 900px) {
  .header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
  }
  .nav {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
  }
  .nav-toggle {
    display: flex !important;
    margin-left: auto;
    z-index: 1002;
  }
  .nav-links {
    display: none !important;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 1px);
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 16px 20px;
    margin: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
    z-index: 1001;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .nav-links.open {
    display: flex !important;
  }
  .nav-links > a,
  .nav-links .auth-btn,
  .nav-links .cart-link,
  .nav-links .profile-btn {
    padding: 14px 12px;
    border-radius: 10px;
    font-size: 1rem;
    color: #0f172a;
  }
  .nav-links > a:hover {
    background: #f1f5f9;
  }
  .nav-links .lang-switcher {
    padding: 10px 12px;
    margin-top: 4px;
  }
  .nav-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    top: 56px;
    background: rgba(15, 23, 42, 0.35);
    z-index: 999;
  }
  body.nav-open {
    overflow: hidden;
  }
  /* prevent page content from painting over open menu */
  body.nav-open main {
    pointer-events: none;
  }
}

/* Earlier hamburger */
@media (max-width: 1100px) {
  .nav-toggle { display: flex !important; margin-left: auto; }
  .nav-links {
    display: none !important;
    position: absolute;
    left: 0; right: 0;
    top: calc(100% + 1px);
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 16px 20px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 40px rgba(15,23,42,.12);
    z-index: 1001;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .nav-links.open { display: flex !important; }
  .header { z-index: 1000; background: #fff; }
  .nav { position: relative; flex-wrap: nowrap; }
}

.account-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: start;
}
.account-nav {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.account-nav a {
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 500;
  color: #334155;
}
.account-nav a.active, .account-nav a:hover {
  background: #ecfdf5;
  color: #047857;
}
.breadcrumbs {
  font-size: .9rem;
  color: #64748b;
  margin-bottom: 12px;
}
.breadcrumbs a { color: #0f766e; }
.bc-sep { margin: 0 6px; opacity: .5; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(15,23,42,.04);
}
.filter-search input {
  min-width: 180px;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 8px 14px;
}
.filter-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .85rem;
}
.filter-chip input {
  width: 72px;
  border: none;
  background: transparent;
  padding: 4px;
}
.filter-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .9rem;
}

@media (max-width: 800px) {
  .account-layout { grid-template-columns: 1fr; }
  .account-nav { position: static; flex-direction: row; flex-wrap: wrap; }
}
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
@media (max-width: 800px) { .cart-layout { grid-template-columns: 1fr; } }
.coupon-row { display: flex; gap: 8px; margin: 12px 0; }
.coupon-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: .95rem;
  background: #f8fafc;
}
.coupon-input:focus { outline: 2px solid #a7f3d0; background: #fff; }
.coupon-applied { color: #047857; font-weight: 600; }

/* Timeline complete */
.order-timeline:has(.ot-step.ot-done:last-child) {
  border-left-color: #86efac;
}
.ot-step.ot-done:last-child .ot-dot {
  background: #00a86b;
  box-shadow: 0 0 0 3px #bbf7d0;
}
.ot-step.ot-done:last-child .ot-title {
  color: #166534;
}

.order-timeline.ot-finished {
  border-left-color: #86efac;
}
.order-timeline.ot-finished .ot-step:last-child::after {
  content: '';
  display: none;
}

/* Side tools (wishlist / compare) */
.side-tools {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.side-tool {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(15,23,42,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #0f172a;
  transition: transform .15s, box-shadow .15s;
}
.side-tool:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0,168,107,.25);
  color: #00a86b;
}
@media (max-width: 700px) {
  .side-tools { right: 8px; top: auto; bottom: 80px; transform: none; }
  .side-tool { width: 40px; height: 40px; }
}

/* Notification badge */
.auth-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f1f5f9;
}

.nav-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  margin-left: 6px;
  vertical-align: middle;
}

/* Coupon field */
.coupon-row {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  align-items: stretch;
}
.coupon-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: .95rem;
  background: #fff;
}
.coupon-row .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

/* Out of stock */
.product-card.oos {
  position: relative;
  border: 2px solid #fca5a5;
  opacity: 0.95;
}
.product-card.oos:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(239,68,68,.12);
  border-color: #ef4444;
}
.product-card .oos-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ef4444;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 2;
}
.product-img { position: relative; }

/* Reviews compact */
.reviews-box { margin-top: 28px; }
.review-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.review-item {
  padding: 14px 16px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
}
.review-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.review-stars { color: #f59e0b; letter-spacing: 2px; font-size: 1rem; }
.review-author { font-weight: 600; margin-top: 4px; }
.review-body { color: #475569; margin-top: 6px; }
.star-picker { display: flex; gap: 4px; margin: 8px 0 12px; }
.star-picker button {
  background: none; border: none; font-size: 1.6rem; cursor: pointer;
  color: #cbd5e1; padding: 0; line-height: 1;
}
.star-picker button.on { color: #f59e0b; }
.review-form-compact .form-group { margin-bottom: 10px; }
.review-form-compact textarea { min-height: 72px; }

.qty-controls { display: inline-flex; align-items: center; gap: 6px; }
.qty-form { display: inline-flex; align-items: center; margin: 0; }
.qty-display {
  min-width: 36px; text-align: center; font-weight: 600; font-size: 0.95rem;
  padding: 0 6px; line-height: 36px;
}
.qty-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; font-size: 1.1rem; cursor: pointer; line-height: 1;
}
.qty-btn:hover:not(:disabled) { background: #ecfdf5; border-color: #86efac; }
.qty-btn:disabled { opacity: .4; cursor: not-allowed; }
/* qty-ok removed */

.product-qty-input { pointer-events: auto !important; width: 56px; }
.nav-dot { display:inline-block; width:8px; height:8px; background:#dc2626; border-radius:50%; margin-left:6px; }

/* Badges */
.nav-badge, .notif-badge-inline {
  display: none; min-width: 16px; height: 16px; padding: 0 4px;
  background: #dc2626; color: #fff; font-size: 0.65rem; font-weight: 700;
  border-radius: 999px; align-items: center; justify-content: center;
}
.nav-badge.show, .notif-badge-inline.show { display: inline-flex; }
.notif-badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: #dc2626; color: #fff; font-size: 0.65rem; font-weight: 700;
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
}

/* Catalog filters */
.catalog-filters {
  display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end;
  padding: 14px 16px; margin-bottom: 20px;
  background: #f8fafc; border: 1px solid var(--border, #e2e8f0); border-radius: 12px;
}
.catalog-filters .filter-chip,
.catalog-filters .filter-search,
.catalog-filters .form-group {
  display: flex; flex-direction: column; gap: 4px; margin: 0;
}
.catalog-filters label {
  font-size: 0.7rem; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: .03em;
}
.catalog-filters input,
.catalog-filters select {
  min-width: 100px; max-width: 160px; padding: 8px 10px;
  border: 1px solid #e2e8f0; border-radius: 8px; font-size: 0.875rem; background: #fff;
}
.catalog-filters .filter-search input,
.catalog-filters input[name="q"] { min-width: 180px; max-width: 240px; }
.catalog-filters .filter-check {
  display: flex; align-items: center; gap: 6px; font-size: 0.85rem;
  margin-bottom: 2px; white-space: nowrap;
}
.catalog-filters .btn { align-self: flex-end; }

/* Address cards */
.address-card {
  padding: 16px; border: 1px solid #e2e8f0; border-radius: 12px; margin-bottom: 12px; background: #fff;
}
.address-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.address-type-badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: #f1f5f9; color: #475569; font-size: 0.75rem; font-weight: 600;
}
.address-card .btn-sm { padding: 4px 10px; font-size: 0.8rem; }
.address-lines {
  color: #334155; line-height: 1.55; font-size: 0.95rem;
  display: block; width: 100%;
}
.address-lines div { margin: 2px 0; word-break: normal; overflow-wrap: anywhere; }
.addr-name { font-weight: 700; color: #0f172a; margin-bottom: 4px !important; }
.account-main { min-width: 0; overflow: hidden; }
.address-card { max-width: 100%; box-sizing: border-box; }


/* Toast for add-to-cart */
.cart-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #0f172a; color: #fff; padding: 12px 20px; border-radius: 12px;
  font-weight: 600; font-size: 0.9rem; z-index: 200; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.cart-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Product card layout fix */
.product-card { display: flex; flex-direction: column; height: 100%; }
.product-card .product-body { display: flex; flex-direction: column; flex: 1; padding: 14px 16px 16px; }
.product-card .product-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: auto; padding-top: 12px;
}
.product-card .product-footer .price {
  font-size: 1.15rem; font-weight: 800; color: #0f172a; line-height: 1.2;
}
.product-card .product-footer .price small {
  display: block; font-size: 0.7rem; font-weight: 500; color: #94a3b8;
}
.product-card .product-footer .price .old {
  display: block; font-size: 0.85rem; font-weight: 500; color: #94a3b8; text-decoration: line-through;
}
.product-card .product-footer-actions {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.product-card .product-footer-actions .btn { white-space: nowrap; }
.product-card .product-desc {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; font-size: 0.875rem; color: #64748b; margin: 8px 0;
}

/* Wide header layout */
.container.nav-wide, .nav.nav-wide {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}
.nav-left {
  display: flex; align-items: center; gap: 14px; flex: 0 1 auto; min-width: 0;
}
.nav-search {
  position: relative; width: 180px; max-width: 22vw;
}
.nav-search input {
  width: 100%; padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 10px;
  font-size: 0.875rem; background: #f8fafc;
}
#instant-search-results {
  display: none; position: absolute; top: 100%; left: 0; min-width: 280px; z-index: 80;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); margin-top: 4px; max-height: 360px; overflow: auto;
}
.nav-center {
  display: flex; align-items: center; justify-content: center; gap: 8px 20px;
  flex: 1 1 auto;
}
.nav-center a {
  font-weight: 600; color: #334155; padding: 6px 4px; white-space: nowrap;
}
.nav-center a:hover { color: #00A86B; }
.nav-right {
  display: flex; align-items: center; gap: 6px 12px; flex: 0 0 auto; margin-left: auto;
}
.nav-icon-link {
  position: relative; display: inline-flex; align-items: center; gap: 4px;
  font-weight: 600; color: #334155; font-size: 0.875rem; padding: 6px 4px; white-space: nowrap;
}
.nav-icon-link:hover { color: #00A86B; }
.lang-switcher { display: flex; gap: 2px; margin-left: 4px; }
.lang-btn {
  padding: 4px 7px; border-radius: 6px; font-size: 0.75rem; font-weight: 700; color: #64748b;
}
.lang-btn.active { background: #ecfdf5; color: #047857; }

@media (max-width: 960px) {
  .nav-search { display: none; }
  .nav-center { display: none; }
  .nav.nav-wide.is-open .nav-center {
    display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; padding: 16px; border-bottom: 1px solid #e2e8f0; z-index: 70;
  }
  .nav-account { display: none; }
}

.btn-login, .btn-account {
  padding: 8px 14px !important; border-radius: 10px !important; font-weight: 600 !important;
  font-size: 0.85rem !important; white-space: nowrap;
}
.btn-account {
  background: #f1f5f9 !important; color: #0f172a !important; border: 1px solid #e2e8f0 !important;
}
.btn-account:hover { background: #ecfdf5 !important; color: #047857 !important; border-color: #a7f3d0 !important; }
.nav-bell { position: relative; }
.nav-bell .notif-badge, .nav-icon-link .nav-badge, .nav-icon-link .cart-badge {
  position: absolute; top: -4px; right: -8px; min-width: 16px; height: 16px; padding: 0 4px;
  background: #dc2626; color: #fff; font-size: 0.65rem; font-weight: 700;
  border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
}
.nav-icon-link svg { display: block; }
.nav-right .nav-icon-link { padding: 8px; border-radius: 10px; }
.nav-right .nav-icon-link:hover { background: #f1f5f9; }

.product-card.low-stock {
  box-shadow: 0 0 0 2px #f59e0b;
  border-radius: 16px;
}
.product-card.low-stock .oos-badge.low-stock-badge,
.low-stock-badge {
  background: #f59e0b !important;
}
/* Floating wishlist / compare */
.side-fab-stack {
  position: fixed; right: 18px; top: 50%; transform: translateY(-50%);
  z-index: 850; display: flex; flex-direction: column; gap: 12px;
}
.side-fab {
  width: 52px; height: 52px; border-radius: 50%;
  background: #fff; border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(15,23,42,.12);
  display: flex; align-items: center; justify-content: center;
  color: #334155; position: relative; text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.side-fab:hover { transform: scale(1.06); color: #00A86B; box-shadow: 0 10px 28px rgba(0,168,107,.2); }
.side-fab .nav-badge {
  position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px;
  background: #dc2626; color: #fff; font-size: 0.7rem; font-weight: 700;
  border-radius: 999px; display: none !important; align-items: center; justify-content: center;
  padding: 0 5px; line-height: 1;
}
.side-fab .nav-badge.show { display: inline-flex !important; }
@media (max-width: 640px) {
  .side-fab-stack { top: auto; bottom: 90px; transform: none; }
}


.points-card{position:relative;overflow:hidden;margin-bottom:18px;padding:20px 22px;border:1px solid #d8e9e1;border-radius:20px;background:linear-gradient(135deg,#f3fcf8 0%,#fff 62%);display:flex;align-items:center;justify-content:space-between;gap:18px;box-shadow:0 10px 28px rgba(15,23,42,.06)}
.points-card-glow{position:absolute;width:180px;height:180px;right:-75px;top:-100px;border-radius:50%;background:rgba(0,168,107,.10);filter:blur(3px)}
.points-card-copy,.points-balance{position:relative;z-index:1}.points-card-label{font-size:1.05rem;font-weight:850;color:#0f172a;display:flex;align-items:center;gap:8px}.points-mark{width:27px;height:27px;border-radius:9px;display:grid;place-items:center;background:#00a86b;color:#fff;font-size:.9rem}.points-card-hint{margin-top:5px;color:#64748b;font-size:.82rem;line-height:1.4}.points-balance{display:flex;align-items:baseline;gap:7px;white-space:nowrap}.points-balance span{font-size:2rem;font-weight:900;letter-spacing:-.04em;color:#00885a}.points-balance small{font-size:.72rem;font-weight:850;color:#64748b;letter-spacing:.08em}

/* v27 unified form controls */
.ui-select{position:relative;min-width:0}
.ui-native-select{position:absolute!important;opacity:0!important;width:1px!important;height:1px!important;pointer-events:none!important;overflow:hidden!important}
.ui-select-trigger{width:100%;min-height:44px;padding:10px 40px 10px 13px;border:1px solid #dbe4ec;border-radius:11px;background:#fff;color:#0f172a;font:inherit;text-align:left;cursor:pointer;position:relative;transition:border-color .16s,box-shadow .16s,background .16s}
.ui-select-trigger:hover{border-color:#a7d9c4;background:#fbfffd}
.ui-select-trigger:focus{outline:none;border-color:#00a86b;box-shadow:0 0 0 3px rgba(0,168,107,.12)}
.ui-select-trigger:disabled{opacity:.55;cursor:not-allowed}
.ui-select-value{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ui-select-arrow{position:absolute;right:13px;top:50%;transform:translateY(-54%);font-size:18px;color:#64748b;pointer-events:none}
.ui-select.is-open .ui-select-arrow{transform:translateY(-46%) rotate(180deg)}
.ui-select-menu{position:fixed;z-index:2147483646;max-height:min(320px,calc(100vh - 20px));overflow:auto;padding:6px;background:#fff;border:1px solid #dbe4ec;border-radius:13px;box-shadow:0 18px 45px rgba(15,23,42,.18)}
.ui-select-option{display:block;width:100%;padding:10px 11px;border:0;border-radius:9px;background:transparent;color:#0f172a;text-align:left;font:inherit;cursor:pointer}
.ui-select-option:hover,.ui-select-option:focus{background:#ecfdf5;color:#047857;outline:none}
.ui-select-option.is-selected{background:#e9f9f2;color:#047857;font-weight:700}
.catalog-filters{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px!important;align-items:end;padding:18px!important;border:1px solid #dbe4ec;border-radius:16px;background:linear-gradient(180deg,#fff,#f8fafc);box-shadow:0 6px 20px rgba(15,23,42,.035)}
.catalog-filters .filter-search{grid-column:span 2}
.catalog-filters .filter-search,.catalog-filters .filter-chip{display:flex;flex-direction:column;gap:6px;min-width:0}
.catalog-filters label{font-size:.72rem!important;font-weight:700;color:#52657c!important;letter-spacing:.025em;text-transform:uppercase}
.catalog-filters input:not([type=checkbox]),.catalog-filters .ui-select-trigger{width:100%;height:42px;box-sizing:border-box}
.catalog-filters .filter-check{align-self:center;display:flex;align-items:center;gap:8px;min-height:42px;padding:0 4px;text-transform:none!important;white-space:nowrap}
.catalog-filters .filter-check input{width:18px;height:18px;accent-color:#00a86b}
.catalog-filters .filter-actions{display:flex;gap:8px;align-items:center;justify-content:flex-end}
@media(max-width:900px){.catalog-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.catalog-filters .filter-search{grid-column:span 2}.catalog-filters .filter-actions{justify-content:flex-start}}
@media(max-width:560px){.catalog-filters{grid-template-columns:1fr}.catalog-filters .filter-search{grid-column:auto}.catalog-filters .filter-actions{grid-column:auto;flex-wrap:wrap}}


/* v31: mobile header — prevent logo/menu/login/language overlap */
@media (max-width: 960px) {
  .nav.nav-wide {
    width: 100%;
    min-height: 64px;
    height: auto;
    padding: 10px 14px;
    gap: 8px;
    flex-wrap: nowrap;
    box-sizing: border-box;
  }
  .nav-left {
    flex: 0 0 auto;
    min-width: 0;
    gap: 0;
  }
  .nav-left .logo {
    flex: 0 0 auto;
    min-width: 36px;
    white-space: nowrap;
  }
  .nav-left .logo span {
    display: inline-block;
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .nav-toggle {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    margin: 0 !important;
    padding: 10px;
    order: 0;
  }
  .nav-right {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: auto;
    gap: 5px;
    justify-content: flex-end;
  }
  .nav-right .nav-icon-link {
    padding: 7px;
  }
  .nav-right .btn-login,
  .nav-right .btn-account {
    padding: 8px 11px !important;
  }
  .lang-switcher {
    flex: 0 0 auto;
    margin-left: 2px;
    gap: 1px;
    padding: 2px;
  }
  .lang-btn {
    padding: 6px 6px;
    min-width: 27px;
    text-align: center;
  }
  .nav-center {
    display: none !important;
  }
  .nav.nav-wide.is-open .nav-center {
    display: flex !important;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    width: auto;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px 18px;
    margin: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 40px rgba(15,23,42,.12);
    z-index: 1001;
  }
  .nav.nav-wide.is-open .nav-center a {
    display: block;
    padding: 12px 10px;
    border-radius: 10px;
  }
  .nav.nav-wide.is-open .nav-center a:hover {
    background: #f1f5f9;
  }
}

@media (max-width: 560px) {
  .nav.nav-wide {
    padding-left: 12px;
    padding-right: 12px;
    gap: 6px;
  }
  .nav-left .logo span {
    display: none;
  }
  .nav-toggle {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }
  .nav-right {
    gap: 3px;
  }
  .nav-right .btn-login,
  .nav-right .btn-account {
    padding: 8px 9px !important;
  }
  .lang-btn {
    min-width: 25px;
    padding: 6px 4px;
    font-size: .7rem;
  }
}

@media (max-width: 380px) {
  .nav-right .btn-login,
  .nav-right .btn-account {
    padding: 7px 8px !important;
    font-size: .78rem !important;
  }
  .lang-btn {
    min-width: 23px;
    padding-left: 3px;
    padding-right: 3px;
  }
}
