:root {
  --primary: #003399;
  --primary-2: #002266;
  --accent: #397bfd;
  --dark: #1F1F25;
  --heading: #0C0A0A;
  --body: #6E777D;
  --line: #e6e8ec;
  --bg: #f6f7f9;
  --white: #fff;
  --wa: #25D366;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--heading); background: var(--bg); font-family: "Albert Sans", sans-serif; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
h1, h2, h3 { font-family: Exo, sans-serif; }
.wrap { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
.hidden { display: none !important; }

.topbar { background: var(--dark); color: #c9cdd3; font-size: 13px; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 9px 0; }
.topbar b { color: #fff; font-weight: 600; }
.topbar a:hover { color: #fff; }

header.store-head { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.head { display: grid; grid-template-columns: 220px 1fr auto; gap: 28px; align-items: center; padding: 14px 0; }
.logo img { height: 48px; width: auto; }
.search { display: flex; background: #f2f4f7; border: 1px solid #e4e7ec; border-radius: 999px; overflow: hidden; }
.search input { flex: 1; border: 0; background: transparent; padding: 13px 18px; font-size: 15px; outline: none; }
.search button { border: 0; background: var(--primary); color: #fff; padding: 0 22px; font-weight: 700; cursor: pointer; }
.search button:hover { background: var(--primary-2); }
.head-actions { display: flex; gap: 10px; align-items: center; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 10px 14px; cursor: pointer; font-weight: 600; font-size: 14px;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.cart-btn { background: var(--primary); color: #fff; border-color: var(--primary); }
.cart-btn:hover { background: var(--primary-2); color: #fff; }
.badge {
  min-width: 20px; height: 20px; border-radius: 99px; background: #ff3b30;
  color: #fff; font-size: 11px; display: inline-grid; place-items: center; padding: 0 5px;
}

.deptbar { background: var(--primary); }
.deptbar .wrap { display: flex; gap: 6px; overflow: auto; }
.deptbar a, .deptbar button {
  color: #d6e0ff; font-weight: 700; font-size: 13px; letter-spacing: .04em;
  text-transform: uppercase; padding: 13px 16px; white-space: nowrap;
  background: none; border: 0; cursor: pointer;
}
.deptbar a:hover, .deptbar a.active, .deptbar button:hover, .deptbar button.active {
  color: #fff; background: rgba(255,255,255,.08);
}

.hero {
  position: relative; min-height: 480px; color: #fff; display: grid; align-items: center;
  background: #0b1220 center/cover no-repeat;
  background-image:
    linear-gradient(100deg, rgba(8,12,24,.88) 0%, rgba(0,51,153,.55) 55%, rgba(8,12,24,.35) 100%),
    url("../assets/banner-04.webp");
}
.hero-copy { max-width: 680px; padding: 72px 0; }
.kicker {
  display: inline-block; background: var(--accent); color: #fff;
  font-weight: 800; font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; padding: 7px 12px; margin-bottom: 16px;
}
.hero h1 { margin: 0 0 14px; font-size: clamp(32px, 5vw, 54px); line-height: 1.05; }
.hero p { margin: 0 0 26px; font-size: 18px; color: #d7deea; max-width: 48ch; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--primary); color: #fff; border: 0; border-radius: 8px;
  padding: 12px 20px; font-weight: 800; cursor: pointer; font-size: 15px;
}
.btn:hover { background: var(--primary-2); }
.btn.light { background: #fff; color: var(--heading); }
.btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); }
.btn.full { width: 100%; }
.btn.ok { background: #128c4b; }
.btn.ok:hover { background: #0d6b39; }
.btn.danger { background: #9b1c1c; }
.btn.small { padding: 8px 12px; font-size: 13px; }

.trust { background: #fff; border-bottom: 1px solid var(--line); }
.trust .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust article { padding: 22px 16px; border-right: 1px solid var(--line); }
.trust article:last-child { border-right: 0; }
.trust strong { display: block; font-family: Exo, sans-serif; font-size: 18px; }
.trust span { color: var(--body); font-size: 13px; }

section { padding: 48px 0; }
.catalog-page { padding-top: 28px; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 22px; }
.sec-head h2 { margin: 0; font-size: 30px; }
.sec-head p { margin: 6px 0 0; color: var(--body); }

.cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.cat {
  position: relative; height: 220px; border-radius: 16px; overflow: hidden; color: #fff;
  box-shadow: 0 10px 30px rgba(15,23,42,.12); cursor: pointer; border: 0; padding: 0; width: 100%;
}
.cat img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.cat:hover img { transform: scale(1.08); }
.cat .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(8,12,24,.82)); }
.cat .txt { position: absolute; left: 16px; right: 16px; bottom: 16px; text-align: left; }
.cat h3 { margin: 0 0 4px; font-size: 20px; }
.cat small { opacity: .85; }

.grid { display: grid; gap: 16px; }
.prods { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(15,23,42,.12); }
.pic { height: 220px; background: #fff; position: relative; overflow: hidden; }
.pic img { width: 100%; height: 100%; object-fit: contain; padding: 14px; box-sizing: border-box; }
.tag {
  position: absolute; top: 12px; left: 12px; background: #ff3b30; color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .06em; padding: 5px 8px; border-radius: 6px;
}
.tag.blue { background: var(--primary); }
.tag.green { background: #128c4b; }
.body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cat-name { color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.body h3 { margin: 0; font-size: 17px; }
.price { margin-top: auto; font-family: Exo, sans-serif; font-size: 22px; color: var(--primary); }
.price s { color: var(--body); font-size: 14px; margin-right: 6px; }
.stock { color: var(--body); font-size: 13px; }
.stock.low { color: #9b1c1c; font-weight: 700; }

.split { display: grid; grid-template-columns: 1.3fr .7fr; gap: 16px; }
.banner { position: relative; min-height: 260px; border-radius: 18px; overflow: hidden; color: #fff; }
.banner img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.banner .shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,51,153,.88), rgba(8,12,24,.7)); }
.banner .inner { position: relative; padding: 36px; max-width: 520px; }
.banner h2 { margin: 0 0 10px; font-size: 32px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.filters a {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 8px 14px; font-weight: 700; font-size: 13px;
}
.filters a:hover, .filters a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.svc { grid-template-columns: repeat(3, 1fr); }
.svc .card .body { min-height: 220px; }
.form { display: grid; gap: 10px; }
.form input, .form select, .form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px;
}
.page { display: none; }
.page.on { display: block; }
.crumb { color: var(--body); font-size: 14px; margin-bottom: 16px; }
.crumb button { background: none; border: 0; color: var(--primary); font-weight: 700; cursor: pointer; }

.product-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.product-hero .pic { height: 420px; background: #fff; }
.product-hero .body { padding: 32px; }

.checkout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; }
.box { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.form label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--body); }
.form input[type="file"] { padding: 10px; background: #f4f6fa; }
.steps { margin: 0; padding-left: 22px; color: #334; line-height: 1.65; }
.steps li { margin: 0 0 10px; }
.steps code, .note code { background: #eef3ff; padding: 2px 6px; border-radius: 6px; font-size: 13px; }
.cert-ok { border-color: #b7e0c8; background: #f3fbf6; }
.cert-warn { border-color: #f0d48a; background: #fff8e8; }
.cert-bad { border-color: #e7b4b4; background: #fff4f4; }
.line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }

footer { background: var(--dark); color: #c5c9d1; padding: 48px 0 22px; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
footer h4 { margin: 0 0 12px; color: #fff; font-size: 16px; }
footer p, footer a { color: #b7bcc6; line-height: 1.7; }
footer a:hover { color: #fff; }
.copy { border-top: 1px solid #32343c; margin-top: 28px; padding-top: 16px; font-size: 13px; display: flex; justify-content: space-between; gap: 12px; }

.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 50;
  width: 58px; height: 58px; border-radius: 50%; background: var(--wa);
  display: grid; place-items: center; box-shadow: 0 10px 24px rgba(37,211,102,.4);
}
.drawer, .modal {
  position: fixed; inset: 0; background: rgba(8,12,24,.55); z-index: 60;
  display: none; justify-content: flex-end;
}
.drawer.open, .modal.open { display: flex; }
.panel { width: min(440px, 100%); background: #fff; height: 100%; padding: 22px; overflow: auto; }
.modal { align-items: center; justify-content: center; }
.modal .panel { height: auto; border-radius: 16px; width: min(520px, calc(100% - 32px)); }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--dark); color: #fff; padding: 12px 16px; border-radius: 10px;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 70;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.st {
  display: inline-block; padding: 4px 8px; border-radius: 99px; color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}

/* Admin */
body.admin { background: #eef1f6; }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--dark); color: #c9cdd3; padding: 22px 16px; }
.side img { height: 40px; margin-bottom: 22px; }
.side a, .side button.nav {
  display: block; width: 100%; text-align: left; color: #c9cdd3; background: none; border: 0;
  padding: 11px 12px; border-radius: 8px; cursor: pointer; font-weight: 600;
}
.side a:hover, .side a.active, .side button.nav:hover, .side button.nav.active { background: #2a2c34; color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.admin-main { padding: 28px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.kpi b { display: block; font-family: Exo, sans-serif; font-size: 26px; color: var(--primary); }
.kpi span { color: var(--body); font-size: 13px; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
th { background: #f4f6fa; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--body); }
.note { background:#eef3ff; border:1px solid #c9d6f5; border-radius:12px; padding:14px 16px; color:#334; margin:0 0 18px; line-height:1.5; }
.note b { color: var(--primary); }
.two { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.login-box { width: min(400px, calc(100% - 32px)); margin: 12vh auto; background: #fff; border-radius: 16px; padding: 32px; border: 1px solid var(--line); }
.studio-grid { display:grid; grid-template-columns: 1fr 1fr; gap:18px; align-items:start; }
.studio-lbl { display:grid; gap:6px; font-size:13px; font-weight:700; color:var(--body); margin-top:10px; }
.studio-meta { margin:10px 0; color:var(--heading); line-height:1.45; white-space:pre-line; }
.studio-modes { display:flex; flex-wrap:wrap; gap:10px 14px; margin-top:12px; font-size:14px; font-weight:700; color:var(--body); }
.studio-cmp { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.studio-cmp figure { margin:0; background:#f4f6fa; border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.studio-cmp figcaption { font-size:12px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--body); padding:8px 10px 0; }
.studio-cmp img { width:100%; aspect-ratio:1; object-fit:contain; background:#fff; min-height:140px; }
.studio-save { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
.studio-msg { color:var(--primary); font-weight:700; min-height:1.4em; }
.studio-wait { position:fixed; inset:0; background:rgba(11,18,32,.55); display:grid; place-items:center; color:#fff; z-index:80; text-align:center; }
.studio-wait[hidden] { display:none !important; }
.studio-wait div { font-size:22px; font-weight:800; }
@media (max-width: 980px) { .studio-grid, .studio-cmp { grid-template-columns:1fr; } }
@media (max-width: 980px) { .two { grid-template-columns:1fr; } }

@media (max-width: 980px) {
  .head, .trust .wrap, .cats, .prods, .svc, .split, .foot, .checkout, .product-hero, .kpis, .admin-shell { grid-template-columns: 1fr; }
  .head { grid-template-columns: 1fr; }
  .hero { min-height: 380px; }
}
@media (max-width: 640px) {
  .cats, .prods, .svc, .split, .foot, .trust .wrap { grid-template-columns: 1fr; }
}
