:root{
  --primary: #003262;
  --p-04: rgba(1,11,19,0.04);
  --p-06: rgba(1,11,19,0.06);
  --p-10: rgba(1,11,19,0.1);
  --p-40: rgba(1,11,19,0.45);
  --p-65: rgba(1,11,19,0.65);
  --line: rgba(1,11,19,0.14);
  --paper: #ffffff;
  --paper-soft: #f7f7f6;
  --ink: var(--primary);
  --ink-soft: var(--p-65);
  --error: #c0392b;
  --success: #1e8449;
}
*{ box-sizing:border-box; }
body{ margin:0; background: var(--paper); color: var(--ink); font-family:'Manrope', -apple-system, sans-serif; line-height:1.4; font-size:14px; }
a{ color:inherit; text-decoration:none; }
img,svg{ display:block; }
button{ font-family:inherit; cursor:pointer; }
.wrap{ max-width: 1280px; margin:0 auto; padding: 0 24px; }

/* ---- utility bar ---- */
.utility{ background: var(--primary); color: rgba(255,255,255,0.75); font-size:12.5px; }
.utility .wrap{ display:flex; justify-content:space-between; align-items:center; padding: 7px 24px; }
.utility a{ margin-left: 18px; color: rgba(255,255,255,0.75); }
.utility a:hover{ color:#fff; }

/* ---- header ---- */
header{ background:#fff; border-bottom: 1px solid var(--line); position:sticky; top:0; z-index:30; }
.header-inner{ display:flex; align-items:center; gap: 28px; padding: 16px 0; }
.logo{ font-size:22px; font-weight:800; color: var(--primary); white-space:nowrap; }
.logo span{ opacity:0.45; }

.search-bar{ flex:1; display:flex; height:44px; border:2px solid var(--primary); border-radius:4px; overflow:hidden; }
.search-input{ flex:1; border:none; outline:none; padding: 0 14px; font-size:14.5px; font-family:inherit; }
.search-btn{ background: var(--primary); color:#fff; border:none; padding: 0 26px; font-weight:700; font-size:14.5px; }
.search-btn:hover{ background: #000; }

.header-actions{ display:flex; align-items:center; gap:20px; white-space:nowrap; }
.header-actions a{ font-size:13.5px; font-weight:600; color: #FFFFFF; }
.btn-register{ background: var(--primary); color:#fff; padding:10px 18px; border-radius:3px; font-weight:700; }
@media (max-width: 900px){ .header-actions a.hide-sm{ display:none; } }

.chiprow{ background:#fff; border-bottom:1px solid var(--line); overflow-x:auto; }
.chiprow-inner{ display:flex; gap:10px; padding: 12px 24px; max-width:1280px; margin:0 auto; }
.chip{ flex-shrink:0; font-size:13px; font-weight:700; padding:8px 16px; border-radius:20px; background: var(--paper-soft); color: var(--ink-soft); border:1px solid var(--line); }
.chip.active{ background: var(--primary); color:#fff; border-color:var(--primary); }

/* ---- layout ---- */
.layout{ display:grid; grid-template-columns: 236px 1fr; gap: 22px; padding: 22px 24px 60px; max-width:1280px; margin:0 auto; align-items:start; }
@media (max-width: 860px){ .layout{ grid-template-columns: 1fr; } .sidebar{ display:none; } }

.sidebar{ background:#fff; border:1px solid var(--line); border-radius:6px; padding: 18px 18px 22px; position:sticky; top:150px; }
.sidebar h4{ font-size:13px; font-weight:800; color: var(--primary); margin: 0 0 12px; }
.cat-list{ display:flex; flex-direction:column; gap:2px; margin-bottom: 22px; }
.cat-list a{ display:flex; justify-content:space-between; font-size:13.5px; padding:8px 6px; border-radius:4px; color: var(--ink); }
.cat-list a:hover{ background: var(--p-04); }
.cat-list a.active{ color: var(--primary); font-weight:800; background: var(--p-06); }
.cat-list a span{ color: var(--ink-soft); font-weight:500; font-size:12px; }

.filter-block{ padding-top: 16px; border-top:1px solid var(--line); margin-top: 6px; }
.price-row{ display:flex; align-items:center; gap:8px; margin-top:10px; }
.price-row input{ width:100%; border:1px solid var(--line); border-radius:4px; padding:7px 8px; font-size:13px; font-family:inherit; }
.filter-apply{ width:100%; margin-top:12px; background:var(--primary); color:#fff; border:none; padding:9px; border-radius:4px; font-weight:700; font-size:13px; }

/* ---- promo banners ---- */
.promo-row{ display:grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; margin-bottom: 22px; }
@media (max-width: 700px){ .promo-row{ grid-template-columns:1fr; } }
.promo{ border-radius:8px; padding: 22px; display:flex; flex-direction:column; justify-content:space-between; min-height:110px; }
.promo b{ font-size:18px; font-weight:800; display:block; }
.promo span{ font-size:12.5px; }
.promo-1{ background: var(--primary); color:#fff; }
.promo-1 span{ opacity:0.75; }
.promo-2{ background: var(--p-06); color: var(--primary); border:1px solid var(--line); }
.promo-2 span{ color: var(--ink-soft); }
.promo-3{ background: var(--paper-soft); color: var(--primary); border:1px dashed var(--p-40); }
.promo-3 span{ color: var(--ink-soft); }

.section-title-row{ display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.section-title-row h2{ font-size:18px; font-weight:800; color: var(--primary); margin:0; }
.sort-row{ display:flex; gap:8px; }
.sort-row a{ font-size:12.5px; font-weight:700; padding:7px 12px; border-radius:4px; border:1px solid var(--line); background:#fff; color: var(--ink-soft); }
.sort-row a.active{ border-color: var(--primary); color: var(--primary); background: var(--p-04); }

/* ---- product grid ---- */
.grid{ display:grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1080px){ .grid{ grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px){ .grid{ grid-template-columns: repeat(2, 1fr); } }

.pcard{ background:#fff; border:1px solid var(--line); border-radius:6px; overflow:hidden; position:relative; transition: box-shadow .15s; }
.pcard:hover{ box-shadow: 0 6px 18px rgba(1,11,19,0.12); }
.pcard-media{ height:150px; display:flex; align-items:center; justify-content:center; position:relative; background: var(--paper-soft); }
.pcard-media img{ width:100%; height:100%; object-fit:cover; }
.badge{ position:absolute; top:9px; left:9px; font-size:10.5px; font-weight:800; padding:3px 8px; border-radius:3px; z-index:2; }
.badge-low{ background: var(--primary); color:#fff; }
.badge-top{ background: var(--p-10); color: var(--primary); }

.pcard-body{ padding: 11px 12px 13px; }
.pcard-name{ font-size:13.5px; font-weight:600; color: var(--ink); line-height:1.3; height: 35px; overflow:hidden; }
.price-row2{ display:flex; align-items:baseline; gap:7px; margin-top:8px; }
.price-now{ font-size:18px; font-weight:800; color: var(--primary); }
.meta-row{ display:flex; justify-content:space-between; align-items:center; margin-top:6px; font-size:11.5px; color: var(--ink-soft); }
.stars{ color: var(--primary); font-weight:700; }
.shop-line{ font-size:11.5px; color: var(--ink-soft); margin-top:5px; }
.cta{ display:block; text-align:center; margin-top:10px; background: var(--primary); color:#fff; font-size:12.5px; font-weight:700; padding:8px 0; border-radius:4px; }
.cta:hover{ background:#000; }
.out-overlay{ position:absolute; inset:0; background: rgba(255,255,255,0.85); display:flex; align-items:center; justify-content:center; font-weight:800; color: var(--primary); font-size:13px; z-index:1; }

/* ---- single product page ---- */
.breadcrumb{ font-size:12.5px; color:var(--ink-soft); margin-bottom:16px; }
.breadcrumb a{ color:var(--ink-soft); }
.product-detail{ display:grid; grid-template-columns: 380px 1fr; gap:32px; }
@media (max-width: 780px){ .product-detail{ grid-template-columns:1fr; } }
.product-image{ width:100%; aspect-ratio:1; background:var(--paper-soft); border-radius:8px; overflow:hidden; display:flex; align-items:center; justify-content:center; }
.product-image img{ width:100%; height:100%; object-fit:cover; }
.product-title{ font-size:24px; font-weight:800; margin:0 0 10px; }
.product-price{ font-size:28px; font-weight:800; color:var(--primary); margin:14px 0; }
.stock-line{ font-size:13.5px; margin-bottom:16px; }
.stock-ok{ color:var(--success); }
.stock-low{ color:#b8860b; }
.stock-out{ color:var(--error); }
.shop-card{ display:flex; align-items:center; gap:12px; border:1px solid var(--line); border-radius:8px; padding:14px; margin:20px 0; }
.shop-avatar{ width:44px; height:44px; border-radius:50%; background:var(--paper-soft); display:flex; align-items:center; justify-content:center; font-weight:800; color:var(--primary); flex-shrink:0; }
.product-description{ margin-top:18px; color:var(--ink-soft); line-height:1.7; }

/* ---- shop page ---- */
.shop-hero{ background:var(--primary); color:#fff; border-radius:10px; padding:28px; display:flex; gap:20px; align-items:center; margin-bottom:24px; }
.shop-hero .shop-avatar{ width:64px; height:64px; font-size:22px; background:rgba(255,255,255,0.15); color:#fff; }
.shop-hero h1{ margin:0 0 6px; font-size:22px; }
.shop-hero .shop-meta{ opacity:0.8; font-size:13px; }
.review-item{ border-bottom:1px solid var(--line); padding:14px 0; }
.review-stars{ color:var(--primary); font-weight:700; margin-right:8px; }
.review-form textarea{ width:100%; padding:12px; border:1px solid var(--line); border-radius:8px; font-family:inherit; min-height:80px; }
.review-form select{ padding:10px; border:1px solid var(--line); border-radius:8px; font-family:inherit; }

footer{ background: var(--primary); color: rgba(255,255,255,0.7); font-size:13px; padding: 30px 0; margin-top: 20px; }
.footer-inner{ display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; }

.alert{ padding: 12px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 18px; }
.alert-error{ background: #fdecea; color: var(--error); }
.alert-success{ background: #eafaf1; color: var(--success); }
.empty-state{ color:var(--ink-soft); padding:40px 0; text-align:center; }
