:root {
  --brand: #2D79EB; --brand-deep: #1A56BF; --brand-night: #123F8C; --aqua: #6CE5E8;
  --ink: #0F2744; --slate: #4F5F73; --mist: #F3F7FE; --line: #DCE5F2; --danger: #D92D20; --ok: #17663A;
  --font-display: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); color: var(--ink); font-size: 1.05rem; line-height: 1.65; background: #fff; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 0.6rem; color: var(--brand-night); }
a { color: var(--brand-deep); }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.wrap { width: min(1140px, 100% - 2rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2rem); margin-inline: auto; }
.muted { color: var(--slate); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header and footer */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--brand-deep); color: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; flex-wrap: wrap; padding-block: 0.4rem; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: #fff; text-decoration: none; letter-spacing: -0.02em; }
.brand span { color: var(--aqua); }
.site-nav { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.site-nav a { color: #D6E4FB; text-decoration: none; font-weight: 500; font-size: 0.97rem; }
.site-nav a:hover { color: #fff; }
.site-footer { background: var(--brand-night); color: #BFD4F7; padding: 2.5rem 0 1.5rem; margin-top: 4rem; font-size: 0.95rem; }
.site-footer a { color: #E4EEFF; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
.site-footer strong { display: block; color: #fff; font-family: var(--font-display); margin-bottom: 0.4rem; }
.footer-bottom { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.18); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; font-size: 0.9rem; }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; border: 0; border-radius: 6px; padding: 0.65rem 1.2rem; font: 700 1rem var(--font-body); background: var(--brand-deep); color: #fff; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--brand-night); color: #fff; }
.btn-aqua { background: var(--aqua); color: var(--ink); }
.btn-aqua:hover { background: #8CEEF0; color: var(--ink); }
.btn-outline { background: #fff; color: var(--brand-deep); border: 1.5px solid var(--brand-deep); }
.btn-outline:hover { background: var(--brand-deep); color: #fff; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b42318; }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.9rem; }
.btn[disabled], .btn.disabled { opacity: 0.5; cursor: not-allowed; }
label { display: block; font-weight: 700; font-size: 0.95rem; margin-bottom: 0.3rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=tel], input[type=datetime-local], select, textarea {
  width: 100%; border: 1px solid #B9C9E0; border-radius: 6px; padding: 0.6rem 0.8rem; font: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(45,121,235,.2); }
textarea { min-height: 7rem; resize: vertical; }
.field { margin-bottom: 1rem; }
.field small { color: var(--slate); display: block; margin-top: 0.25rem; }
.row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.check { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; }
.check input { width: auto; }
.hp { position: absolute; left: -9999px; }
.flash { padding: 0.8rem 1rem; border-radius: 6px; margin: 1rem 0; font-weight: 500; }
.flash-success { background: #DFF5E6; color: #0F4D2B; }
.flash-error { background: #FDE7E4; color: #8A1C12; }
.flash-info { background: #E4EEFF; color: var(--brand-night); }

/* Pagination and chips */
.pager { display: flex; justify-content: center; gap: 0.4rem; margin: 2.5rem 0 0; flex-wrap: wrap; }
.pager a, .pager span { padding: 0.45rem 0.85rem; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; font-weight: 700; }
.pager .on { background: var(--brand-deep); color: #fff; border-color: var(--brand-deep); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.5rem; }
.chip { padding: 0.35rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 0.9rem; color: var(--brand-deep); background: #fff; }
.chip:hover, .chip.on { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }

/* Admin */
.admin-bar { background: var(--ink); color: #fff; }
.admin-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 54px; flex-wrap: wrap; }
.admin-bar a, .admin-bar button { color: #D6E4FB; text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
.admin-bar a:hover, .admin-bar button:hover { color: #fff; }
.admin-nav { display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: center; }
.admin-main { padding: 2rem 0 3rem; }
.admin-main h1 { font-size: 1.7rem; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem; margin-bottom: 1.25rem; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.data th, table.data td { text-align: left; padding: 0.65rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--slate); }
.pill { display: inline-block; padding: 0.1rem 0.65rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: var(--mist); color: var(--slate); }
.pill-published, .pill-active, .pill-delivered, .pill-paid { background: #DFF5E6; color: var(--ok); }
.pill-draft, .pill-hidden { background: #EEF0F3; color: #55606D; }
.pill-new { background: #FFE9D6; color: #9A4300; }
.pill-confirmed, .pill-shipped { background: #E4EEFF; color: var(--brand-deep); }
.pill-cancelled { background: #FDE7E4; color: #8A1C12; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: var(--mist); }
.login-card { background: #fff; padding: 2rem; border-radius: 12px; width: 100%; max-width: 400px; box-shadow: 0 16px 40px rgba(18,63,140,.15); }
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 1.5rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.2rem; }
.stat b { display: block; font: 700 1.8rem var(--font-display); color: var(--brand-deep); }
.notfound { text-align: center; padding: 5rem 0; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* Shop */
.section { padding: 2.5rem 0; }
.hero-sm { background: var(--brand-deep); color: #fff; padding: 3.5rem 0 3rem; }
.hero-sm h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.2rem); max-width: 20ch; }
.hero-sm p { color: #E4EEFF; max-width: 40rem; font-size: 1.15rem; margin: 0; }
.head-search { flex: 1; max-width: 26rem; min-width: 12rem; }
.head-search input { border: 0; border-radius: 999px; padding: 0.5rem 1rem; }
.cart-link b { background: var(--aqua); color: var(--ink); border-radius: 999px; padding: 0 0.5rem; font-size: 0.85rem; }
.grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 14px 34px rgba(18,63,140,.13); transform: translateY(-2px); }
.card-img { aspect-ratio: 1 / 1; background: var(--mist); display: block; position: relative; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.ph { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-deep), var(--brand)); }
.ph span { font: 700 3rem var(--font-display); color: rgba(255,255,255,.85); }
.badge { position: absolute; top: 0.7rem; left: 0.7rem; background: var(--danger); color: #fff; font-weight: 700; font-size: 0.8rem; padding: 0.15rem 0.6rem; border-radius: 999px; }
.badge-out { background: #55606D; }
.card-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.card-body h3 { font-size: 1.05rem; margin: 0; }
.card-body h3 a { color: var(--brand-night); text-decoration: none; }
.card-body h3 a:hover { color: var(--brand); }
.card-body form { margin-top: auto; padding-top: 0.5rem; }
.meta { font-size: 0.82rem; color: var(--slate); }
.price { font: 700 1.1rem var(--font-display); color: var(--brand-deep); }
.price s { color: var(--slate); font: 400 0.9rem var(--font-body); margin-left: 0.3rem; }
.price.big { font-size: 1.8rem; margin: 0.4rem 0; }
.tag { display: inline-block; background: #E4EEFF; color: var(--brand-deep); font: 700 0.8rem var(--font-body); padding: 0.1rem 0.6rem; border-radius: 999px; }
.toolbar-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 0 0 1rem; }
.sort select { width: auto; padding: 0.4rem 0.7rem; }
.empty { text-align: center; padding: 3rem 0; }
.crumbs { font-size: 0.9rem; color: var(--slate); margin-bottom: 1rem; }
.product { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.gallery-main { aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--mist); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.thumbs { display: flex; gap: 0.6rem; margin-top: 0.7rem; flex-wrap: wrap; }
.thumb { width: 70px; height: 70px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; padding: 0; background: #fff; cursor: pointer; }
.thumb:hover { border-color: var(--brand); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.info h1 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
.stock.ok { color: var(--ok); font-weight: 700; } .stock.out { color: var(--danger); font-weight: 700; }
.buy { display: flex; gap: 0.8rem; align-items: stretch; margin: 1rem 0; flex-wrap: wrap; }
.btn-lg { padding: 0.8rem 1.6rem; font-size: 1.05rem; }
.qty { display: flex; border: 1px solid #B9C9E0; border-radius: 6px; overflow: hidden; }
.qty button { width: 2.6rem; border: 0; background: var(--mist); font-size: 1.2rem; cursor: pointer; }
.qty input { width: 3.5rem; border: 0; border-radius: 0; text-align: center; padding: 0; }
.assure { list-style: none; padding: 1rem 0; margin: 0 0 1rem; border-block: 1px solid var(--line); color: var(--slate); font-size: 0.95rem; }
.assure li { margin: 0.25rem 0; }
.prose p, .prose li { color: #26374D; } .prose h2 { font-size: 1.3rem; margin-top: 1.5rem; } .prose h3 { font-size: 1.1rem; }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; align-items: start; }
.line { display: flex; align-items: center; gap: 0.8rem; }
.line img, .thumb-ph { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: none; }
.thumb-ph { display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; }
.qty-input { width: 5rem; }
.link-btn { background: none; border: 0; color: var(--danger); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }
.warn { color: #9A4300; }
.small { font-size: 0.88rem; }
.summary h2 { font-size: 1.2rem; }
.summary dl, .thanks + .panel dl, .panel dl { display: grid; grid-template-columns: 1fr auto; gap: 0.4rem 1rem; margin: 1rem 0; }
.summary dd, .panel dd { margin: 0; text-align: right; } .panel dt { color: var(--slate); }
.panel .total { font: 700 1.15rem var(--font-display); color: var(--ink); }
.mini { list-style: none; margin: 0; padding: 0; } .mini li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.pay { margin: 0.5rem 0; padding: 0.7rem 0.9rem; border: 1px solid var(--line); border-radius: 8px; }
.thanks { text-align: center; margin-bottom: 1rem; }
.prose { line-height: 1.75; }
/* admin extras */
.bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tiny { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
.pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.pic img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; margin-bottom: 0.4rem; }
.two { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
@media (max-width: 860px) { .product, .cart-layout { grid-template-columns: 1fr; } .head-search { order: 3; max-width: none; flex-basis: 100%; } }

.card-img, .card-img:hover { text-decoration: none; }
