:root {
    --brand: #183f3a;
    --brand2: #2b6259;
    --brand-2: #2b6259;
    --text: #171b1a;
    --muted: #6b7471;
    --line: #e5e8e6;
    --pale: #eef6f3;
    --brand-pale: #eef7f4;
    --cream: #f7f5ef;
    --sand: #f6f3ed;
    --white: #fff;
    --danger: #b83b2f;
    --radius: 22px;
    --shadow: 0 16px 42px rgba(20, 37, 33, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: #fff; }
a { color: inherit; }
button, input, select { font: inherit; }

.store-nav { position: sticky; top: 0; z-index: 100; width: 100%; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.store-nav .nav-inner { max-width: 1240px; height: 76px; margin: 0 auto; padding: 0 28px; display: flex; align-items: center; gap: 38px; }
.store-nav .logo { display: flex; align-items: center; flex: 0 0 auto; }
.store-nav .logo img { display: block; width: 132px; height: auto; }
.store-links { display: flex; align-items: center; gap: 25px; flex: 1; min-width: 0; }
.store-links a { color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.store-links a:hover, .store-links a.active { color: var(--brand); }
.store-links a.active { font-weight: 750; }
.nav-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.join-movement-btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: 999px; background: var(--brand); color: #fff !important; font-size: 14px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.join-movement-btn:hover { background: #12332f; }
.cart-icon-btn { position: relative; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.cart-icon-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--brand); stroke-width: 1.8; }
.cart-badge { position: absolute; right: -3px; top: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 10px; font-weight: 800; display: none; align-items: center; justify-content: center; }
.cart-badge.show { display: flex; }
.hamburger { display: none; width: 42px; height: 42px; border: 0; background: transparent; padding: 9px; cursor: pointer; }
.hamburger span { display: block; height: 2px; margin: 5px 0; border-radius: 2px; background: var(--brand); }
.mobile-menu { display: none; padding: 10px 22px 18px; border-top: 1px solid var(--line); background: #fff; }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 11px 0; color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; }
.mobile-menu .mobile-join { margin-top: 8px; padding: 12px 16px; border-radius: 999px; background: var(--brand); color: #fff; text-align: center; }

.site-footer { margin-top: 90px; background: #102e2b; color: #fff; }
.footer-wrap { max-width: 1240px; margin: auto; padding: 40px 28px 28px; }
.footer-grid { display: flex; justify-content: space-between; gap: 50px; }
.footer-brand img { width: 160px; height: auto; }
.footer-brand p { max-width: 450px; color: #b8c8c3; font-size: 13px; line-height: 1.6; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h4 { margin: 0 0 6px; }
.footer-col a { color: #d9e4e0; font-size: 13px; text-decoration: none; }
.footer-bottom { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); color: #8fa8a1; font-size: 11px; }

.cart-flyout-overlay { position: fixed; inset: 0; z-index: 999; visibility: hidden; opacity: 0; background: rgba(17,31,28,.42); transition: .2s ease; }
.cart-flyout-overlay.show { visibility: visible; opacity: 1; }
.cart-flyout { position: fixed; top: 0; right: 0; z-index: 1000; width: min(430px,100%); height: 100vh; display: flex; flex-direction: column; transform: translateX(100%); background: #fff; box-shadow: -18px 0 50px rgba(0,0,0,.16); transition: .25s ease; }
.cart-flyout.open { transform: translateX(0); }
.cart-flyout-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px 24px 20px; border-bottom: 1px solid var(--line); }
.cart-flyout-head span { display: block; color: var(--brand2); font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .1em; }
.cart-flyout-head h2 { margin: 3px 0 0; font-size: 26px; letter-spacing: -.03em; }
.cart-flyout-close { border: 0; background: transparent; color: var(--brand); font-size: 30px; cursor: pointer; }
.cart-flyout-body { flex: 1; overflow: auto; padding: 20px 24px; }
.flyout-empty { padding: 48px 8px; text-align: center; }
.flyout-empty strong { display: block; margin-bottom: 8px; font-size: 18px; }
.flyout-empty span { color: var(--muted); font-size: 14px; line-height: 1.55; }
.flyout-item { display: grid; grid-template-columns: 70px 1fr auto; gap: 14px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.flyout-item img { width: 70px; height: 70px; object-fit: contain; }
.flyout-device-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.flyout-device-thumb { overflow: hidden; width: 70px; height: 82px; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: var(--pale); color: var(--brand); font-size: 30px; font-weight: 900; }
.flyout-item strong { display: block; font-size: 15px; }
.flyout-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.flyout-item-price { color: var(--brand); font-size: 14px; font-weight: 800; white-space: nowrap; }
.flyout-discount { color: var(--brand2) !important; font-weight: 750; }
.cart-flyout-foot { padding: 20px 24px 24px; border-top: 1px solid var(--line); background: #fff; }
.flyout-total { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; font-size: 16px; }
.flyout-total strong { color: var(--brand); font-size: 20px; }
.flyout-cart-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; border-radius: 14px; background: var(--brand); color: #fff; font-size: 15px; font-weight: 800; text-decoration: none; }

@media (max-width: 900px) {
    .store-links { display: none; }
    .store-nav .nav-inner { height: 68px; padding: 0 18px; gap: 18px; }
    .join-movement-btn { min-height: 40px; padding: 0 16px; font-size: 13px; }
    .hamburger { display: block; }
    .footer-grid { flex-direction: column; }
}

@media (max-width: 520px) {
    .join-movement-btn { display: none; }
    .store-nav .logo img { width: 118px; }
}

/* Cart flyout loading skeleton and request failure. */
.flyout-skeleton-line, .flyout-skeleton-item { background: linear-gradient(90deg,#eef3f1 25%,#e1ebe7 50%,#eef3f1 75%); background-size: 200% 100%; animation: flyout-loading 1.2s ease-in-out infinite; border-radius: 9px; }
.flyout-skeleton-line--title { height: 18px; width: 48%; margin: 12px 0 28px; }
.flyout-skeleton-item { height: 83px; margin-bottom: 18px; }
.flyout-error { padding: 38px 4px; text-align: center; color: var(--muted); }
.flyout-error button { margin-top: 14px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
@keyframes flyout-loading { to { background-position-x: -200%; } }
@media (prefers-reduced-motion: reduce) { .flyout-skeleton-line, .flyout-skeleton-item { animation: none; } }

/* Cart flyout: refreshed EMPTY state only. Populated cart and skeleton remain unchanged. */
.cart-flyout-body:has(> .flyout-empty) {
    display: flex;
    flex-direction: column;
}
.flyout-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 28px 12px 44px;
}
.flyout-empty-artwork {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(245px, 100%);
    height: 202px;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 20px;
    background: var(--pale);
}
.flyout-empty-artwork img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.flyout-empty-artwork--fallback {
    color: var(--brand);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.04em;
}
.flyout-empty h3 {
    margin: 0 0 12px;
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: -.035em;
    color: var(--text);
}
.flyout-empty p {
    margin: 0 0 30px;
    max-width: 320px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}
.flyout-empty-primary {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 325px;
    min-height: 52px;
    padding: 12px 20px;
    border-radius: 14px;
    color: #fff;
    background: var(--brand);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}
.flyout-empty-primary:hover { background: #12332f; color: #fff; }
.flyout-empty-secondary {
    margin-top: 20px;
    font-size: 13px;
    font-weight: 700;
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 4px;
}
.flyout-empty-primary:focus-visible,
.flyout-empty-secondary:focus-visible {
    outline: 3px solid var(--brand2);
    outline-offset: 3px;
}
@media (max-height: 650px) {
    .flyout-empty { justify-content: flex-start; padding-top: 20px; }
    .flyout-empty-artwork { height: 135px; margin-bottom: 14px; }
    .flyout-empty p { margin-bottom: 20px; }
}

/* Cart flyout: populated cart presentation only. */
.cart-flyout-body:has(> .flyout-cart-heading) { padding: 0 24px 20px; }
.flyout-cart-heading {
    padding: 20px 0 13px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    line-height: 1.4;
    font-weight: 750;
    color: var(--brand);
}
.cart-flyout-body .flyout-item {
    display: grid;
    grid-template-columns: 82px minmax(0,1fr) auto;
    gap: 14px;
    align-items: start;
    padding: 21px 0;
    border-bottom: 1px solid var(--line);
}
.cart-flyout-body .flyout-device-thumb {
    width: 82px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
    border: 1px solid #edf0ee;
    border-radius: 10px;
    color: var(--brand);
}
.cart-flyout-body .flyout-device-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 3px;
    background: #fff;
    object-fit: contain;
}
.flyout-item-details { display: flex; flex-direction: column; min-width: 0; gap: 5px; }
.flyout-item-details .flyout-item-brand {
    display: block;
    margin: 0;
    color: var(--brand2);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.25;
}
.flyout-item-details .flyout-item-name {
    display: block;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 750;
    overflow-wrap: anywhere;
}
.flyout-item-details .flyout-item-quantity,
.flyout-item-details .flyout-item-rx {
    display: block;
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: var(--muted);
}
.flyout-item-details .flyout-item-rx { color: var(--brand2); }
.cart-flyout-body .flyout-item-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    padding-top: 1px;
    color: var(--brand);
    font-size: 14px;
    line-height: 1.3;
    font-weight: 800;
    white-space: nowrap;
}
.flyout-item-price .flyout-item-unit-price {
    display: block;
    margin: 0;
    font-size: 11px;
    line-height: 1.4;
    font-weight: 450;
    color: var(--muted);
}
.cart-flyout-foot .flyout-total { margin-bottom: 18px; }
@media (max-width: 420px) {
    .cart-flyout-body:has(> .flyout-cart-heading) { padding-left: 18px; padding-right: 18px; }
    .cart-flyout-body .flyout-item { grid-template-columns: 70px minmax(0,1fr) auto; gap: 10px; }
    .cart-flyout-body .flyout-device-thumb { width: 70px; height: 76px; }
    .cart-flyout-body .flyout-item-price { font-size: 12px; }
}

/* Cart flyout: KITS-inspired fixed header/footer, scrolling item list. */
.cart-flyout { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.cart-flyout-head { flex: 0 0 auto; background: #fff; }
.cart-flyout-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #9aa4a0 transparent; }
.cart-flyout-foot { flex: 0 0 auto; background: #fff; box-shadow: 0 -3px 12px rgba(20,37,33,.025); }
.cart-flyout-body:has(> .flyout-cart-heading) { padding: 0 20px 16px; }
.flyout-cart-heading { padding: 19px 3px 17px; background: #fff; color: #3a4844; border-bottom: 0; font-size: 14px; font-weight: 650; }
.flyout-shipping-banner { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-radius: 8px; background: #e9f3ee; color: #1d473b; font-size: 12px; line-height: 1.4; }
.flyout-shipping-icon { font-size: 18px; }
.cart-flyout-body .flyout-item { grid-template-columns: 82px minmax(0,1fr) auto; column-gap: 12px; padding: 19px 3px; align-items: start; }
.cart-flyout-body .flyout-device-thumb { width: 82px; height: 92px; background: #fff; border: 1px solid #e8ecea; border-radius: 7px; }
.cart-flyout-body .flyout-device-thumb img { background: #fff; padding: 2px; }
.flyout-item-details { gap: 5px; }
.flyout-item-details .flyout-item-brand { font-size: 12px; color: #1e2f2a; font-weight: 800; }
.flyout-item-details .flyout-item-name { font-size: 13px; font-weight: 500; line-height: 1.45; }
.flyout-item-details .flyout-item-eye { font-size: 12px; color: #66716d; }
.flyout-item-details .flyout-item-unit-line { font-size: 13px; color: #131c18; font-weight: 750; }
.flyout-item-actions { min-width: 70px; display: flex; align-items: flex-end; flex-direction: column; }
.cart-flyout-body .flyout-item-price { white-space: nowrap; font-size: 13px; font-weight: 800; color: #18463b; }
.cart-flyout-foot .flyout-total { margin-bottom: 13px; }
@media (max-width: 420px) { .cart-flyout-body .flyout-item { grid-template-columns: 70px minmax(0,1fr) auto; gap: 10px; } .cart-flyout-body .flyout-device-thumb { width: 70px; height: 78px; } .flyout-item-actions { min-width: 60px; } }

/* Free-delivery offer: data and eligibility come from Shop.API. */
.flyout-shipping-banner { display:flex; align-items:center; gap:12px; margin: 12px 0 8px; padding: 12px 14px; border-radius: 10px; background:#f4f6f5; color:#29413b; font-size:13px; line-height:1.45; }
.flyout-shipping-banner--qualified { background:#eaf4ee; }
.flyout-shipping-icon { flex:none; font-size:18px; }

/* Accessible remove controls for each displayed flyout row (OD and OS independent). */
.cart-flyout-body .flyout-remove-item {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; margin-top: 8px;
    border: 0; border-radius: 6px; background: transparent;
    color: #66716d; cursor: pointer; font-size: 16px;
}
.cart-flyout-body .flyout-remove-item:hover { background: #f3f5f4; color: #9b312b; }
.cart-flyout-body .flyout-remove-item:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.cart-flyout-body .flyout-remove-item:disabled { opacity: .4; cursor: wait; }
