:root {
  --navy-950: #07152f;
  --navy-900: #091a3a;
  --navy-800: #112855;
  --navy-700: #173061;
  --orange: #f28c18;
  --orange-dark: #d87308;
  --paper: #f3f6fb;
  --white: #ffffff;
  --ink: #172033;
  --muted: #68758b;
  --line: #dce4f0;
  --green: #15734f;
  --red: #a92a38;
  --radius: 16px;
  --shadow: 0 16px 42px rgba(7, 21, 47, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); font: 16px/1.55 Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
img { max-width: 100%; }

.site-header, .admin-header {
  min-height: 76px; padding: 0 max(20px, calc((100% - 1180px) / 2)); display: flex; align-items: center; gap: 30px;
  color: var(--white); background: radial-gradient(circle at 88% -80%, rgba(242,140,24,.26), transparent 38%), linear-gradient(112deg,var(--navy-900),var(--navy-800) 55%,#183568); box-shadow: 0 12px 36px rgba(7,21,47,.20); position: relative; z-index: 10;
}
.admin-header { background: linear-gradient(112deg,var(--navy-950),var(--navy-800)); }
.logo { display: inline-flex; align-items: baseline; gap: 9px; text-decoration: none; white-space: nowrap; margin-right: auto; }
.logo span { font-size: 23px; font-weight: 900; letter-spacing: -.8px; }
.logo i { color: var(--orange); font-style: normal; }
.logo b { color: var(--white); }
.logo small { font-size: 9px; font-weight: 850; letter-spacing: 2.3px; opacity: .82; }
.main-nav { align-self: stretch; display: flex; align-items: stretch; }
.main-nav a { display: flex; align-items: center; gap: 7px; padding: 0 17px; color: var(--white); text-decoration: none; font-size: 13px; font-weight: 750; letter-spacing: .2px; border-bottom: 3px solid transparent; }
.main-nav a:hover, .main-nav a:focus-visible { background: rgba(255,255,255,.07); border-bottom-color: var(--orange); }
.cart-link b { min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 20px; background: var(--orange); color: var(--navy-950); font-size: 12px; }
.menu-toggle { display: none; border: 1px solid rgba(255,255,255,.25); border-radius: 9px; background: rgba(255,255,255,.08); color: white; padding: 7px 11px; cursor: pointer; }

.coriolis-banner { min-height: 92px; margin: 0 0 30px; padding: 21px 24px; position: sticky; top: 12px; z-index: 9; display: flex; align-items: center; justify-content: space-between; gap: 28px; border: 1px solid #c9e7ea; border-left: 5px solid #4bbdc6; border-radius: 16px; color: var(--ink); background: rgba(255,255,255,.97); box-shadow: 0 14px 34px rgba(7,21,47,.16); backdrop-filter: blur(10px); }
.coriolis-banner div { display: grid; gap: 4px; }
.coriolis-banner strong { color: #278e98; font-size: 19px; }
.coriolis-banner span { color: var(--ink); font-size: 15px; }
.coriolis-banner form { flex: 0 0 auto; }

.page-shell { width: min(1180px, calc(100% - 40px)); flex: 1; margin: 0 auto; padding: 42px 0 76px; }
.hero-shop { margin-bottom: 30px; padding: clamp(24px,4vw,48px); border-radius: 24px; color: white; background: radial-gradient(circle at 94% 0%,rgba(242,140,24,.23),transparent 30%),linear-gradient(125deg,var(--navy-950),var(--navy-800)); box-shadow: var(--shadow); overflow: hidden; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--orange); font-size: 12px; font-weight: 900; letter-spacing: 1.7px; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 4px; background: var(--orange); }
h1,h2,h3 { margin-top: 0; line-height: 1.14; color: var(--navy-950); }
h1 { margin-bottom: 16px; }
.panel h2 { margin-bottom: 18px; }
.hero-shop h1 { max-width: 760px; margin: 13px 0 12px; color: white; font-size: clamp(31px,5vw,52px); letter-spacing: -1.5px; }
.hero-shop p { max-width: 700px; margin: 0; color: #d8e1f1; font-size: clamp(16px,2vw,19px); }
h1 { font-size: clamp(30px,4vw,44px); letter-spacing: -1px; }
h2 { font-size: clamp(23px,3vw,30px); }
.lead { color: var(--muted); font-size: 18px; }

.store-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 26px; }
.store-pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid #cdd8e8; border-radius: 999px; background: white; color: var(--navy-800); font-size: 13px; font-weight: 850; }
.store-pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(242,140,24,.15); }
.store-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; margin-top: 28px; }
.store-card { min-height: 220px; padding: 30px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; border-radius: 20px; color: white; text-decoration: none; background: radial-gradient(circle at 90% 5%,rgba(242,140,24,.28),transparent 35%),linear-gradient(135deg,var(--navy-900),var(--navy-700)); box-shadow: var(--shadow); transition: transform .2s ease,box-shadow .2s ease; }
.store-card:hover { transform: translateY(-4px); box-shadow: 0 22px 48px rgba(7,21,47,.18); }
.store-card h2 { margin: 0 0 6px; color: white; }
.store-card p { margin: 0 0 20px; color: #d8e1f1; }

.product-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 22px; align-items: stretch; }
.product-card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 8px 28px rgba(7,21,47,.07); transition: transform .2s ease,box-shadow .2s ease; cursor: pointer; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-media { width: 100%; height: auto; aspect-ratio: 4/3; position: relative; padding: 22px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg,#fff,#edf2f8); border-bottom: 1px solid var(--line); }
.product-media img { position: absolute; inset: 22px; display: block; width: calc(100% - 44px); height: calc(100% - 44px); max-width: calc(100% - 44px); max-height: calc(100% - 44px); object-fit: contain; object-position: center; }
.product-placeholder { color: #8290a6; font-size: 13px; font-weight: 750; }
.product-content { padding: 20px; display: flex; flex: 1; flex-direction: column; }
.product-content h2 { margin-bottom: 7px; font-size: 20px; }
.product-content h2 a { text-decoration: none; }
.product-content h2 a:hover { color: var(--orange-dark); }
.product-description { margin: 0 0 16px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.price-line { margin-top: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px; }
.price-line > span { max-width: 175px; color: var(--navy-700); font-size: 11px; font-weight: 800; line-height: 1.3; }
.product-price { margin: 0; color: var(--orange-dark); font-size: 25px; font-weight: 900; }
.coriolis-price { margin: 8px 0 2px; color: #263a87; font-size: 20px; line-height: 1.3; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.stock { margin: 8px 0 16px; color: var(--green); font-size: 13px; font-weight: 800; }
.stock.out { color: var(--red); }
.add-form { display: grid; grid-template-columns: 66px 1fr; gap: 11px; margin-top: auto; }
.category-tag { width: fit-content; margin-bottom: 8px; padding: 4px 8px; border-radius: 999px; color: var(--navy-700); background: #eaf0f8; font-size: 11px; font-weight: 850; }
.detail-link { margin: 0 0 12px; color: var(--navy-700); font-size: 13px; font-weight: 800; text-decoration: none; }
.detail-link:hover { color: var(--orange-dark); }
.catalog-tools { margin: 0 0 18px; padding: 20px; display: grid; grid-template-columns: minmax(220px,1fr) minmax(190px,.55fr) auto auto; gap: 14px; align-items: end; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 7px 22px rgba(7,21,47,.05); }
.catalog-tools label { margin-top: 0; }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--navy-700); font-weight: 800; text-decoration: none; }
.product-detail { display: grid; grid-template-columns: minmax(300px,1fr) minmax(320px,.9fr); gap: clamp(25px,5vw,65px); }
.detail-media { min-height: 470px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(145deg,#fff,#edf2f8); overflow: hidden; }
.detail-media img { width: 100%; height: 100%; max-height: 560px; object-fit: contain; }
.detail-content { display: flex; flex-direction: column; align-items: flex-start; }
.detail-content .category-tag { margin-top: 14px; }
.detail-content h1 { margin: 18px 0; }
.detail-description { width: 100%; margin-bottom: 28px; color: var(--muted); white-space: normal; }
.detail-price { margin-top: 0; }
.detail-add { width: min(100%,390px); margin-top: 22px; }

.panel { padding: clamp(20px,3vw,30px); border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 8px 28px rgba(7,21,47,.06); }
.content-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.content-grid + .panel, .panel + .panel { margin-top: 26px; }
.section-stack { display: grid; gap: 22px; }
.empty { padding: 55px 20px; text-align: center; color: var(--muted); }

.btn, button { min-height: 44px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; border: 0; border-radius: 10px; padding: 10px 18px; background: linear-gradient(135deg,#ff9b22,var(--orange)); color: var(--navy-950); font-weight: 850; line-height: 1.25; text-align: center; text-decoration: none; cursor: pointer; box-shadow: 0 7px 18px rgba(242,140,24,.20); transition: transform .16s ease,filter .16s ease,box-shadow .16s ease; }
.btn:hover,button:hover { filter: brightness(.97); transform: translateY(-1px); }
.btn.secondary,button.secondary { background: var(--navy-800); color: white; box-shadow: none; }
.btn.light,button.light { border: 1px solid #cbd6e6; background: white; color: var(--navy-800); box-shadow: none; margin-top: 10px; }
.store-toolbar .btn.light,.coriolis-banner .btn.light,.table-wrap .btn.light,.actions .btn.light { margin-top: 0; }
.btn.danger,button.danger { background: #b83242; color: white; box-shadow: none; }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }

label { display: block; margin: 14px 0 6px; color: var(--navy-950); font-weight: 780; }
input,select,textarea { width: 100%; min-height: 45px; border: 1px solid #bdc9da; border-radius: 10px; padding: 10px 12px; background: white; color: var(--ink); outline: none; }
textarea { resize: vertical; }
input:focus,select:focus,textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(242,140,24,.14); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px 22px; }
.full { grid-column: 1/-1; }
.form-grid > .full:last-child { margin-top: 10px; }
.form-grid > .full:last-child button { margin-top: 10px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.actions form { margin: 0; }
.panel > .actions { margin-top: 18px; }
.inline { display: flex; gap: 12px; }
.small { color: var(--muted); font-size: 13px; }

.cart-page-head { margin-bottom: 32px; display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.cart-page-head h1 { margin: 8px 0 5px; }
.cart-page-head .lead { margin: 0; }
.cart-continue { flex: 0 0 auto; color: var(--navy-700); font-size: 14px; font-weight: 850; text-decoration: none; }
.cart-continue:hover { color: var(--orange-dark); }
.cart-stack { gap: 28px; }
.cart-section { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: var(--shadow); }
.cart-store-head { padding: 22px 26px; display: flex; justify-content: space-between; align-items: center; gap: 20px; color: white; background: linear-gradient(120deg,var(--navy-950),var(--navy-800)); }
.cart-store-head > div { display: flex; align-items: center; gap: 16px; }
.cart-store-head .store-pill { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.10); color: white; }
.cart-store-head h2 { margin: 0; color: white; font-size: 20px; }
.cart-item-count { color: #d9e3f4; font-size: 13px; font-weight: 750; }
.cart-shop-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; align-items: start; }
.cart-shop-main { min-width: 0; padding: 10px 26px 26px; }
.cart-products-form { margin: 0; }
.cart-product { min-width: 0; padding: 18px 0; display: grid; grid-template-columns: 92px minmax(155px,1fr) 84px 112px auto; gap: 16px; align-items: center; border-bottom: 1px solid var(--line); }
.cart-product-media { width: 92px; aspect-ratio: 1; padding: 8px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(145deg,#fff,#edf2f8); text-decoration: none; }
.cart-product-media img { width: 100%; height: 100%; object-fit: contain; }
.cart-product-media span { color: var(--muted); font-size: 10px; font-weight: 750; text-align: center; }
.cart-product-info { min-width: 0; }
.cart-product-info .category-tag { margin-bottom: 5px; }
.cart-product-info h3 { margin: 0 0 5px; font-size: 17px; }
.cart-product-info h3 a { text-decoration: none; }
.cart-product-info h3 a:hover { color: var(--orange-dark); }
.cart-product-info p { margin: 0; color: var(--muted); font-size: 13px; }
.cart-product-info p strong { width: fit-content; margin-top: 3px; display: block; color: var(--green); font-size: 11px; }
.cart-quantity { margin: 0; }
.cart-quantity span,.cart-line-price span { margin-bottom: 5px; display: block; color: var(--muted); font-size: 11px; font-weight: 750; }
.cart-quantity input { min-height: 42px; padding: 8px 9px; }
.cart-line-price { text-align: right; }
.cart-line-price strong { color: var(--navy-950); white-space: nowrap; }
.cart-remove { min-height: 34px; padding: 6px 4px; border-radius: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--red); font-size: 12px; box-shadow: none; }
.cart-remove:hover { transform: none; filter: none; color: #731723; }
.cart-update { padding-top: 16px; display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.cart-update span { color: var(--muted); font-size: 12px; }
.cart-update .btn { min-height: 40px; margin: 0; padding: 8px 14px; }
.cart-no-product { margin-top: 16px; padding: 18px; border-radius: 12px; color: var(--muted); background: var(--paper); }
.subscription-row { margin-top: 20px; padding: 16px; display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center; border: 1px solid #b9e0e3; border-radius: 14px; background: #f0fafb; }
.subscription-row div { display: grid; }
.subscription-row span { color: var(--muted); font-size: 13px; }
.subscription-row form { margin: 0; }
.subscription-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: white !important; background: #278e98; font-size: 17px !important; font-weight: 900; }
.cart-order-summary { min-height: 100%; padding: 28px 26px; align-self: stretch; border-left: 1px solid var(--line); background: #f7f9fd; }
.cart-order-summary .eyebrow { margin-bottom: 20px; }
.summary-line { padding: 11px 0; display: flex; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.summary-line.subscription { color: #278e98; }
.summary-total { padding: 21px 0 6px; display: grid; gap: 3px; }
.summary-total span { color: var(--muted); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .7px; }
.summary-total strong { color: var(--navy-950); font-size: 27px; }
.cart-order-summary > p { margin: 8px 0 20px; color: var(--muted); font-size: 12px; }
.cart-book { width: 100%; min-height: 50px; }
.cart-order-summary form { margin: 14px 0 0; }
.coriolis-cta { width: 100%; min-height: 46px; padding: 9px 12px; border: 1px solid #4bbdc6; background: white; color: #176f77; font-size: 13px; box-shadow: none; }
.summary-offer-note { margin-top: 8px; display: block; color: var(--muted); font-size: 11px; line-height: 1.4; }
.alert { margin-bottom: 20px; padding: 14px 17px; border-radius: 11px; background: #e8eef7; color: var(--navy-800); }
.alert.success { background: #ddf3e7; color: #135b3e; }
.alert.error { background: #f8dde1; color: #821d2a; }
.cart-toast { position: fixed; right: 22px; bottom: 22px; z-index: 100; max-width: min(390px,calc(100% - 32px)); padding: 13px 17px; border-radius: 11px; color: white; background: #176b4c; box-shadow: 0 14px 38px rgba(7,21,47,.24); opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .2s ease,transform .2s ease; font-size: 14px; font-weight: 750; }
.cart-toast.visible { opacity: 1; transform: translateY(0); }
.cart-toast.error { background: #a92a38; }
.status { display: inline-flex; padding: 5px 9px; border-radius: 99px; background: #e9eef6; color: var(--navy-800); font-size: 12px; font-weight: 850; }

.filter-bar { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; margin: 24px 0; align-items: end; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: white; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th,td { padding: 13px 15px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--navy-800); background: #edf2f8; font-size: 12px; letter-spacing: .4px; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
.table-wrap .actions { flex-wrap: nowrap; gap: 8px; }
.table-wrap .btn,.table-wrap button { min-height: 38px; padding: 8px 12px; }

.site-footer { padding: 34px max(20px,calc((100% - 1180px)/2)); display: flex; justify-content: space-between; align-items: center; gap: 20px; color: #d8e1f1; background: radial-gradient(circle at 85% 0%,rgba(242,140,24,.17),transparent 30%),var(--navy-950); }
.site-footer div { display: grid; }
.site-footer strong { color: white; }
.site-footer a { color: white; }

@media (max-width: 1000px) { .product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 780px) {
  .site-header,.admin-header { min-height: 68px; padding: 0 18px; flex-wrap: wrap; }
  .menu-toggle { display: inline-flex; }
  .main-nav { display: none; width: calc(100% + 36px); margin: 0 -18px; padding: 7px 18px 14px; align-self: auto; flex-direction: column; background: rgba(7,21,47,.98); }
  .main-nav.open { display: flex; }
  .main-nav a { min-height: 46px; padding: 0 10px; border-bottom: 0; border-left: 3px solid transparent; }
  .main-nav a:hover { border-left-color: var(--orange); }
  .page-shell { width: min(100% - 28px,1180px); padding-top: 24px; }
  .hero-shop { border-radius: 18px; }
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
  .product-media { height: auto; padding: 20px; }
  .store-grid,.content-grid { grid-template-columns: 1fr; }
  .cart-shop-layout { grid-template-columns: 1fr; }
  .cart-order-summary { border-top: 1px solid var(--line); border-left: 0; }
  .cart-product { grid-template-columns: 82px minmax(140px,1fr) 78px 100px; }
  .cart-product-media { width: 82px; }
  .cart-product .cart-remove { grid-column: 2/-1; width: fit-content; justify-self: end; }
  .filter-bar { grid-template-columns: 1fr; }
  .coriolis-banner { min-height: 0; top: 8px; margin-bottom: 22px; padding: 15px 16px; align-items: stretch; flex-direction: column; gap: 10px; border-left-width: 4px; }
  .coriolis-banner strong { font-size: 17px; }
  .coriolis-banner span { font-size: 13px; line-height: 1.4; }
  .coriolis-banner .btn,.coriolis-banner button { width: 100%; }
  .catalog-tools { grid-template-columns: 1fr 1fr; }
  .product-detail { grid-template-columns: 1fr; }
  .detail-media { min-height: min(480px,80vw); }
  .subscription-row { grid-template-columns: auto 1fr auto; }
  .subscription-row form { grid-column: 2/-1; justify-self: end; }
}
@media (max-width: 520px) {
  .logo span { font-size: 20px; }
  .logo small { display: none; }
  .product-grid { grid-template-columns: 1fr; }
  .product-media { height: auto; padding: 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .store-toolbar,.site-footer { align-items: stretch; flex-direction: column; }
  .store-toolbar .btn { width: 100%; }
  .actions > *,.actions form,.actions button { width: 100%; }
  .cart-page-head { align-items: flex-start; flex-direction: column; gap: 14px; }
  .cart-store-head { padding: 18px; align-items: flex-start; flex-direction: column; }
  .cart-store-head > div { align-items: flex-start; flex-direction: column; gap: 10px; }
  .cart-shop-main,.cart-order-summary { padding: 18px; }
  .cart-product { grid-template-columns: 76px minmax(0,1fr) 76px; gap: 12px; }
  .cart-product-media { width: 76px; }
  .cart-product-info { grid-column: 2/-1; }
  .cart-quantity { grid-column: 2; }
  .cart-line-price { grid-column: 3; }
  .cart-product .cart-remove { grid-column: 2/-1; }
  .cart-update { align-items: stretch; flex-direction: column; }
  .cart-update .btn { width: 100%; }
  .catalog-tools { grid-template-columns: 1fr; }
  .catalog-tools .btn,.catalog-tools button { width: 100%; }
  .detail-media { min-height: min(360px,82vw); }
  .subscription-row { grid-template-columns: auto 1fr; }
  .subscription-row > strong { grid-column: 2; }
  .subscription-row form { grid-column: 2; justify-self: start; }
  .table-wrap .actions { flex-wrap: wrap; }
}
