:root {
  --blue: #183C90;
  --blue-dark: #122E6E;
  --gold: #FCB418;
  --gold-dark: #E09E0A;
  --green: #0C9C48;
  --red: #E42430;
  --sky: #1890CC;
  --ink: #16223D;
  --muted: #5b6b86;
  --line: #e9edf3;
  --bg: #FAFBFC;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(24, 60, 144, 0.07);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ── buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 15px; padding: 12px 22px; border-radius: 999px;
  border: none; cursor: pointer; transition: transform .08s ease, box-shadow .2s, background .2s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: var(--blue-dark); }
.btn-primary:hover { background: var(--gold-dark); box-shadow: 0 6px 18px rgba(252,180,24,.35); }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-disabled { background: #e5e9f0; color: #9aa6bd; cursor: not-allowed; }
.btn-link { background: none; border: none; color: var(--blue); font-weight: 600; cursor: pointer; font-size: 13px; }

/* ── header ── */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo img { display: block; }
.main-nav { display: flex; align-items: center; gap: 24px; flex: 1; }
.main-nav > a { font-weight: 600; color: var(--blue); }
.nav-cats { position: relative; }
.nav-cats > span { font-weight: 600; color: var(--ink); cursor: default; }
.nav-dropdown { position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); padding: 8px; min-width: 220px; display: none; flex-direction: column; }
.nav-cats:hover .nav-dropdown { display: flex; }
.nav-dropdown a { padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--ink); }
.nav-dropdown a:hover { background: #f4f7fb; color: var(--blue); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.lang-switch { font-weight: 700; font-size: 13px; color: var(--blue); border: 1.5px solid var(--line);
  padding: 5px 10px; border-radius: 8px; }
.lang-switch:hover { border-color: var(--blue); }
.cart-link { position: relative; color: var(--blue); display: flex; }
.cart-badge { position: absolute; top: -8px; right: -10px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* ── hero ── */
.hero { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 55%, #0d2050 100%); color: #fff; }
.hero-inner { padding: 64px 20px; }
.hero-text { max-width: 600px; }
.hero-tag { display: inline-block; text-transform: uppercase; letter-spacing: .12em; font-size: 12px;
  font-weight: 700; color: var(--gold); margin-bottom: 14px; }
.hero h1 { font-size: 44px; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 14px; }
.hero p { font-size: 18px; opacity: .9; margin-bottom: 26px; }

/* ── catalog ── */
.catalog { display: grid; grid-template-columns: 220px 1fr; gap: 36px; padding: 44px 20px; align-items: start; }
.filters h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.filters ul { list-style: none; }
.filters li a { display: block; padding: 9px 12px; border-radius: 9px; color: var(--ink); font-size: 14.5px; font-weight: 500; }
.filters li a:hover { background: #eef3fa; }
.filters li a.active { background: var(--blue); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

/* ── product card ── */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .12s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-img { position: relative; aspect-ratio: 1/1; background: #f3f6fb; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.badge-out { background: rgba(22,34,61,.82); color: #fff; }
.badge-sale { background: var(--red); color: #fff; }
.card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-cat { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--green); font-weight: 700; }
.card-name { font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.card-price { margin-top: auto; padding-top: 8px; display: flex; align-items: baseline; gap: 8px; }
.price { font-size: 20px; font-weight: 800; color: var(--blue); }
.price-was { font-size: 14px; color: var(--muted); text-decoration: line-through; }

/* ── product page ── */
.product-page { padding: 28px 20px 56px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.crumbs a { color: var(--blue); }
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.product-media { position: relative; border-radius: var(--radius); overflow: hidden; background: #f3f6fb; border: 1px solid var(--line); }
.product-media img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.product-cat { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--green); font-weight: 700; }
.product-info h1 { font-size: 32px; line-height: 1.15; margin: 8px 0 14px; letter-spacing: -0.01em; }
.product-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 18px; }
.product-price .price { font-size: 30px; }
.product-short { color: var(--muted); margin-bottom: 24px; }
.add-form { display: flex; gap: 12px; align-items: center; }
.qty-input { width: 72px; padding: 11px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 15px; text-align: center; }
.qty-input:focus { outline: none; border-color: var(--blue); }
.stock-line { display: flex; align-items: center; gap: 7px; margin-top: 14px; font-size: 13px; font-weight: 600; }
.stock-line.in { color: var(--green); }
.stock-line .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.product-section { margin-top: 44px; max-width: 820px; }
.product-section h2 { font-size: 20px; margin-bottom: 14px; color: var(--blue); }
.prose { white-space: pre-line; color: #2c3a55; line-height: 1.7; }
.facts { width: 100%; border-collapse: collapse; border: 2px solid var(--ink); margin-bottom: 18px; }
.facts caption { text-align: left; font-weight: 700; padding: 8px 0; }
.facts th { background: var(--ink); color: #fff; text-align: left; padding: 8px 12px; font-size: 13px; }
.facts td { padding: 8px 12px; border-top: 1px solid var(--line); font-size: 14px; }
.facts th:last-child, .facts td:last-child { text-align: right; }

/* ── cart ── */
.cart-page { padding: 36px 20px 60px; }
.cart-page h1 { font-size: 30px; margin-bottom: 24px; }
.cart-empty { text-align: center; padding: 60px 0; }
.cart-empty p { color: var(--muted); margin-bottom: 20px; font-size: 17px; }
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 36px; align-items: start; }
.cart-row { display: grid; grid-template-columns: 72px 1fr auto auto auto; gap: 16px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-thumb img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.cart-row-name { font-weight: 700; display: block; }
.cart-row-unit { font-size: 13px; color: var(--muted); }
.cart-qty-form { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.cart-row-total { font-weight: 800; color: var(--blue); }
.cart-remove button { background: none; border: none; color: var(--muted); font-size: 16px; cursor: pointer; }
.cart-remove button:hover { color: var(--red); }
.continue { display: inline-block; margin-top: 20px; color: var(--blue); font-weight: 600; }
.cart-summary { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.cart-summary h2 { font-size: 17px; margin-bottom: 16px; }
.sum-row { display: flex; justify-content: space-between; padding: 9px 0; font-size: 15px; }
.sum-row .free { color: var(--green); }
.sum-total { border-top: 2px solid var(--line); margin-top: 6px; padding-top: 14px; font-size: 19px; font-weight: 800; color: var(--blue); }
.ship-notice { font-size: 12.5px; color: var(--red); padding: 4px 0 8px; }
.cart-summary form { margin-top: 16px; }
.secure { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 12px; }

/* ── success ── */
.success-page { padding: 60px 20px; display: flex; justify-content: center; }
.success-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  padding: 48px 40px; max-width: 520px; width: 100%; text-align: center; }
.success-check { color: var(--green); margin-bottom: 16px; }
.success-card h1 { font-size: 27px; margin-bottom: 8px; }
.success-sub { color: var(--muted); margin-bottom: 26px; }
.order-box { text-align: left; background: #f7f9fc; border-radius: 12px; padding: 18px; margin-bottom: 26px; }
.order-num { font-size: 14px; margin-bottom: 12px; }
.order-items { width: 100%; border-collapse: collapse; font-size: 14px; }
.order-items td { padding: 5px 0; }
.order-items td.r { text-align: right; }
.order-items tr.sub td { color: var(--muted); padding-top: 8px; }
.order-items tr.tot td { font-weight: 800; color: var(--blue); border-top: 1px solid var(--line); padding-top: 10px; font-size: 16px; }

/* ── footer ── */
.site-footer { background: #fff; border-top: 1px solid var(--line); margin-top: 40px; }
.footer-inner { padding: 30px 20px; display: flex; align-items: center; gap: 16px; justify-content: center; flex-wrap: wrap; }
.footer-inner p { color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); }

/* ── responsive ── */
@media (max-width: 900px) {
  .catalog { grid-template-columns: 1fr; }
  .filters ul { display: flex; flex-wrap: wrap; gap: 8px; }
  .filters li a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: 1fr; gap: 24px; }
  .cart-layout { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
}
@media (max-width: 540px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .header-inner { gap: 14px; }
  .main-nav { gap: 14px; }
  .cart-row { grid-template-columns: 56px 1fr auto; grid-template-areas: "img info total" "img qty remove"; }
  .cart-thumb { grid-area: img; } .cart-row-info { grid-area: info; }
  .cart-qty-form { grid-area: qty; align-items: start; } .cart-row-total { grid-area: total; text-align: right; }
  .cart-remove { grid-area: remove; text-align: right; }
}

/* ════════════════════ ADMIN ════════════════════ */
body.admin { background: #f4f6fa; }
.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-side { background: var(--blue-dark); color: #fff; padding: 22px 16px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; }
.admin-brand { background:#fff; border-radius:10px; padding:8px 10px; margin-bottom: 18px; display:flex; justify-content:center; }
.admin-side nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.admin-side nav a { color: #c9d4ef; padding: 10px 13px; border-radius: 9px; font-weight: 600; font-size: 14.5px; }
.admin-side nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-side nav a.on { background: var(--gold); color: var(--blue-dark); }
.admin-logout button { width: 100%; background: rgba(255,255,255,.1); color: #fff; border: none; padding: 10px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 13px; }
.admin-logout button:hover { background: rgba(255,255,255,.18); }
.admin-main { padding: 28px 32px; max-width: 1200px; }
.admin-title { font-size: 26px; margin-bottom: 22px; color: var(--ink); }
.admin-title .st { font-size: 13px; vertical-align: middle; }
.back { color: var(--blue); font-weight: 600; font-size: 14px; display: inline-block; margin-bottom: 8px; }

.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); }
.kpi-accent { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); border: none; color: #fff; }
.kpi-accent .kpi-label, .kpi-accent .kpi-sub { color: #cdd9f3; }
.kpi-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.kpi-value { display: block; font-size: 30px; font-weight: 800; color: var(--blue); margin: 6px 0 4px; }
.kpi-accent .kpi-value { color: #fff; }
.kpi-sub { display: block; font-size: 12.5px; color: var(--muted); }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 22px; }
.panel h2 { font-size: 15px; color: var(--ink); margin-bottom: 14px; }
.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.admin-cols .panel { margin-bottom: 0; }

.chart { display: flex; align-items: flex-end; gap: 3px; height: 180px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.bar { width: 70%; min-height: 1px; background: linear-gradient(var(--sky), var(--blue)); border-radius: 3px 3px 0 0; transition: opacity .15s; }
.bar-col:hover .bar { opacity: .75; }
.bar-x { font-size: 8.5px; color: var(--muted); transform: rotate(-60deg); white-space: nowrap; height: 26px; }

.atable { width: 100%; border-collapse: collapse; font-size: 14px; }
.atable th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px 10px; border-bottom: 2px solid var(--line); }
.atable td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
.atable td.r, .atable th.r { text-align: right; }
.atable a { color: var(--blue); font-weight: 600; }
.atable tr.sub td { color: var(--muted); border: none; padding-top: 8px; }
.atable tr.tot td { font-weight: 800; color: var(--blue); border-top: 2px solid var(--line); }

.st { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: capitalize; }
.st-paid { background: #d8f3e3; color: #0a7c3a; }
.st-pending { background: #fff1cc; color: #9a6b00; }
.st-fulfilled { background: #d6e8ff; color: #1257b8; }
.st-cancelled { background: #ffe0e0; color: #c0212c; }

.filters-row { display: flex; gap: 8px; margin-bottom: 18px; }
.filters-row a { padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.filters-row a.on { background: var(--blue); color: #fff; border-color: var(--blue); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--muted); font-weight: 600; }
.addr { background: #f6f8fc; border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 12.5px; white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, monospace; }
.tiny { font-size: 11px; } .muted { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: #ffe0e0; color: #c0212c; font-size: 12.5px; font-weight: 600; padding: 5px 12px; border-radius: 999px; }

.admin-login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); }
.login-card { background: #fff; border-radius: 18px; padding: 38px 34px; width: 100%; max-width: 360px; box-shadow: 0 20px 60px rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 14px; text-align: center; }
.login-logo { align-self: center; margin-bottom: 4px; }
.login-card h1 { font-size: 19px; color: var(--ink); }
.login-card input { padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 15px; }
.login-card input:focus { outline: none; border-color: var(--blue); }
.login-error { background: #ffe0e0; color: #c0212c; font-size: 13px; padding: 8px; border-radius: 8px; }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .admin-side nav { flex-direction: row; flex-wrap: wrap; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .admin-cols { grid-template-columns: 1fr; }
}
.sync-panel { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.sync-ok { color: var(--green); font-weight: 700; margin-left: 8px; }

/* ── embedded checkout ── */
.checkout-page { padding: 24px 20px 60px; }
.checkout-h1 { font-size: 28px; margin: 6px 0 24px; }
.checkout-grid { display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: start; }
.checkout-form { display: flex; flex-direction: column; gap: 22px; }
.co-block { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: var(--shadow); }
.co-block h2 { font-size: 15px; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; color: var(--ink); }
.co-step { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 13px; font-weight: 800; }
.pay-error { color: var(--red); font-size: 14px; font-weight: 600; min-height: 0; }
.pay-error:not(:empty) { background: #ffe9ea; padding: 10px 14px; border-radius: 10px; }
#pay-btn { position: relative; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2.5px solid rgba(18,46,110,.25); border-top-color: var(--blue-dark); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

.co-summary { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: var(--shadow); position: sticky; top: 88px; }
.co-summary h2 { font-size: 16px; margin-bottom: 16px; }
.co-items { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.co-items li { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; }
.co-thumb { position: relative; }
.co-thumb img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; background: #f3f6fb; }
.co-qty { position: absolute; top: -8px; right: -8px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
.co-name { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.co-line { font-size: 13.5px; font-weight: 700; color: var(--blue); }
.co-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14.5px; border-top: 1px solid var(--line); }
.co-row .free { color: var(--green); }
.co-total { font-size: 19px; font-weight: 800; color: var(--blue); border-top: 2px solid var(--line); margin-top: 4px; padding-top: 12px; }

@media (max-width: 880px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .co-summary { position: static; order: -1; }
}
.admin-lang { color:#c9d4ef; border:1px solid rgba(255,255,255,.2); border-radius:8px; padding:7px 12px; text-align:center; font-size:12px; font-weight:700; margin-bottom:8px; }
.admin-lang:hover { background:rgba(255,255,255,.1); color:#fff; }
.login-lang { color: var(--muted); font-size:13px; font-weight:600; margin-top:4px; }
.login-lang:hover { color: var(--blue); }

/* ── fulfillment ── */
.timeline { list-style: none; display: flex; gap: 0; margin: 4px 0 20px; }
.timeline li { flex: 1; position: relative; padding-left: 22px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.timeline li em { display: block; font-weight: 500; font-size: 12px; color: var(--muted); font-style: normal; margin-top: 2px; }
.tl-dot { position: absolute; left: 0; top: 2px; width: 13px; height: 13px; border-radius: 50%; background: #d3dae7; border: 2px solid #fff; box-shadow: 0 0 0 1px #d3dae7; }
.timeline li.done { color: var(--green); } .timeline li.done .tl-dot { background: var(--green); box-shadow: 0 0 0 1px var(--green); }
.timeline li.cancel { color: var(--red); } .timeline li.cancel .tl-dot { background: var(--red); box-shadow: 0 0 0 1px var(--red); }
.fulfill-form .ff-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.fulfill-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
.fulfill-form input { padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 14px; }
.fulfill-form input:focus { outline: none; border-color: var(--blue); }
.ff-actions { display: flex; gap: 12px; align-items: center; }
.btn-danger { background: none; border: 1.5px solid #f1c6c9; color: var(--red); padding: 11px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; cursor: pointer; }
.btn-danger:hover { background: #ffe9ea; }
.ship-info code { background: #f3f6fb; padding: 2px 8px; border-radius: 6px; font-size: 13px; }
.ship-info form { margin-top: 10px; }
