/* assets/css/style.css */

:root {
    /* Color Palette */
    --navy: #0c2340;
    --blue: #3049a0;
    --amber: #ffb300;
    --teal: #05a3a8;
    --paper: #f4f6fb;
    --ink: #0c2340;
    --mut: #55657d;
    --line: #d8deeb;
    --tint: #daf2f2;
    --err: #b3261e;
    --cream: #fff3d6;
    
    /* Typography & Spacing */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-leaf: 28px 6px 28px 6px;
    --max-width: 1200px;
}

/* --- Resets & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--paper);
    color: var(--ink);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Typography --- */
h1, h2, h3, h4, h5 {
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    font-size: 0.875rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-leaf);
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--amber);
    color: var(--ink);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #fff;
    color: var(--navy);
    border: 1px solid var(--line);
}

.btn-secondary:hover {
    background-color: var(--tint);
}

/* on the dark hero, the secondary button is see-through */
.hero-copy .btn-secondary {
    background-color: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}
.hero-copy .btn-secondary:hover { background-color: rgba(255,255,255,0.1); }

/* --- Promo Banner --- */
.promo-banner {
    background-color: var(--blue);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.4rem 1rem;
    display: none;
    justify-content: space-between;
}

@media (min-width: 640px) {
    .promo-banner { display: flex; }
}

/* --- Header --- */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand-logo {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-main {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--navy);
}

.logo-sub {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.search-container {
    flex: 1;
    max-width: 400px;
    position: relative;
    display: none;
}

@media (min-width: 768px) {
    .search-container { display: block; }
}

.search-input {
    width: 100%;
    padding: 0.4rem 1rem 0.4rem 2.2rem;
    border: 1px solid var(--line);
    border-radius: 20px;
    background-color: var(--paper);
    font-size: 0.875rem;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: var(--blue);
    background-color: #fff;
}

.search-icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: var(--mut);
}

.primary-nav {
    display: none;
}

@media (min-width: 1024px) {
    .primary-nav { display: block; }
}

.nav-list {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink);
}

.nav-link:hover {
    color: var(--blue);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-account {
    background-color: var(--navy);
    color: #fff;
}

.btn-cart {
    background-color: var(--amber);
    color: var(--ink);
}

.cart-counter {
    background-color: rgba(12, 35, 64, 0.1);
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-sm);
    margin-left: 0.4rem;
    font-size: 0.7rem;
}

.btn-mobile-menu {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--mut);
    cursor: pointer;
    display: block;
}

@media (min-width: 1024px) {
    .btn-mobile-menu { display: none; }
}

/* --- Hero Section --- */
.main-content {
    max-width: var(--max-width);
    margin: 1.5rem auto;
    padding: 0 1rem;
}

.hero-section {
    background-color: var(--navy);
    border-radius: var(--radius-leaf);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (min-width: 768px) {
    .hero-section { flex-direction: row; }
}

.hero-copy {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 1024px) {
    .hero-copy { padding: 3rem; flex: 0 0 40%; }
}

.accent-line {
    width: 2rem;
    height: 4px;
    background-color: var(--teal);
    border-radius: 2px;
    margin-bottom: 1.5rem;
}

.hero-title {
    color: #fff;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.hero-subtitle {
    color: rgba(218, 242, 242, 0.8);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    max-width: 400px;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.hero-visual {
    flex: 1;
    background-color: var(--cream);
    position: relative;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-img {
    border-radius: var(--radius-leaf);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 500px;
    object-fit: cover;
    aspect-ratio: 4/3;
}

.pricing-badges {
    position: absolute;
    top: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 10;
    align-items: flex-end;
}

.badge {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-leaf);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.badge-finance { background: rgba(255,255,255,0.95); color: var(--blue); }
.badge-cash { background: var(--amber); color: var(--ink); }

/* --- Value Props --- */
.value-props-bar {
    background-color: #fff;
    border: 1px solid var(--line);
    border-top: none;
    border-radius: 0 0 var(--radius-leaf) var(--radius-leaf);
    padding: 0.75rem 1.5rem;
    margin: 0 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--mut);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    gap: 0.5rem;
    position: relative;
    top: -10px;
}

.prop-item { display: flex; align-items: center; gap: 0.4rem; }
.prop-number { color: var(--teal); }
.prop-divider { width: 4px; height: 4px; background: var(--line); border-radius: 50%; }

@media (max-width: 768px) {
    .prop-divider { display: none; }
}

/* --- Footer --- */
.site-footer {
    background-color: var(--navy);
    color: #fff;
    padding-top: 4rem;
    border-top: 6px solid var(--amber);
    margin-top: auto;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: repeat(5, 1fr); } }

.footer-heading {
    color: var(--amber);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    font-size: 0.875rem;
    color: var(--line);
}

.footer-links li { margin-bottom: 0.5rem; }
.footer-links a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid rgba(216, 222, 235, 0.2);
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--mut);
}

@media (min-width: 768px) {
    .footer-bottom { flex-direction: row; }
}

.brand-bold { font-weight: 900; color: #fff; margin-right: 2px; }
.brand-light { font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 0.1em; margin-right: 8px;}


/* =========================================
   SHOP / CATALOG PAGE
   ========================================= */

.shop-layout {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.shop-header {
    margin-bottom: 2rem;
}

.breadcrumbs {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mut);
    margin-bottom: 1rem;
}

.breadcrumbs a:hover {
    color: var(--blue);
}

.breadcrumbs .separator {
    margin: 0 0.5rem;
    color: var(--line);
}

.breadcrumbs .current {
    color: var(--ink);
}

.shop-title-bar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .shop-title-bar {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}

.text-mut { color: var(--mut); }
.text-blue { color: var(--blue); }
.text-xs { font-size: 0.75rem; }
.d-block { display: block; }
.font-bold { font-weight: 700; }
.text-right { text-align: right; }

.sort-controls {
    width: 100%;
    max-width: 250px;
}

/* --- Shop Grid & Sidebar --- */
.shop-grid-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 768px) {
    .shop-grid-container {
        flex-direction: row;
        align-items: flex-start;
    }
}

.shop-sidebar {
    width: 100%;
}

@media (min-width: 768px) {
    .shop-sidebar {
        width: 250px;
        flex-shrink: 0;
        position: sticky;
        top: 88px; /* Accounts for header height + padding */
    }
}

.filter-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-leaf);
    padding: 1.25rem;
    box-shadow: 0 4px 20px -2px rgba(12, 35, 64, 0.05);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.btn-clear {
    background: none;
    border: none;
    color: var(--blue);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-clear:hover {
    text-decoration: underline;
}

.filter-group {
    padding: 1rem 0;
    border-top: 1px solid rgba(216, 222, 235, 0.5);
}

.filter-group h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--mut);
    margin-bottom: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.6rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.checkbox-label:hover {
    color: var(--blue);
}

/* --- Product Cards --- */
.product-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}

.product-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-leaf);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    border-color: var(--blue);
    box-shadow: 0 10px 40px -10px rgba(12, 35, 64, 0.15);
}

.product-image-wrapper {
    height: 220px;
    background: var(--paper);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image-wrapper img {
    transform: scale(1.05);
}

.product-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    border-top: 1px solid rgba(216, 222, 235, 0.5);
}

.product-title {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    color: var(--ink);
    transition: color 0.2s ease;
}

.product-card:hover .product-title {
    color: var(--blue);
}

.product-desc {
    font-size: 0.7rem;
    color: var(--mut);
    margin-bottom: 1rem;
}

.product-pricing {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--mut);
    display: block;
    margin-bottom: 0.25rem;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-current {
    font-size: 1.125rem;
    font-weight: 900;
}

.price-old {
    font-size: 0.75rem;
    color: var(--mut);
    text-decoration: line-through;
}

.finance-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--blue);
    background: var(--tint);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}


/* =========================================
   CHECKOUT PAGE
   ========================================= */

.checkout-page {
    background-color: #fff;
}

.checkout-header {
    border-bottom: 1px solid var(--line);
}

.text-uppercase { text-transform: uppercase; letter-spacing: 0.1em; }

.checkout-layout {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 64px);
}

@media (min-width: 1024px) {
    .checkout-layout { flex-direction: row; }
}

/* Left Side: Form */
.checkout-form-section {
    flex: 1;
    padding: 2rem 1rem;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 1024px) {
    .checkout-form-section {
        padding: 3rem 4rem 3rem 2rem;
        margin: 0 0 0 auto; /* Align to center break */
    }
}

.checkout-step {
    margin-bottom: 2.5rem;
}

.checkout-step h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .form-grid { grid-template-columns: 1fr 1fr; }
    .full-width { grid-column: 1 / -1; }
}

.payment-methods {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    overflow: hidden;
}

.payment-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.payment-option:not(:last-child) {
    border-bottom: 1px solid var(--line);
}

.payment-option:hover { background-color: var(--paper); }
.payment-option-content { flex: 1; }

.finance-details-box {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--tint);
    border: 1px solid rgba(48, 73, 160, 0.2);
    border-radius: var(--radius-sm);
}

.hidden { display: none !important; }

.checkout-actions {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

@media (min-width: 640px) {
    .checkout-actions {
        flex-direction: row;
        justify-content: space-between;
    }
}

.back-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--blue);
}

.back-link:hover { text-decoration: underline; }
.btn-large { padding: 0.875rem 2rem; font-size: 1rem; width: 100%; }

@media (min-width: 640px) {
    .btn-large { width: auto; }
}

/* Right Side: Summary */
.checkout-summary-section {
    background: var(--paper);
    padding: 2rem 1rem;
    border-top: 1px solid var(--line);
}

@media (min-width: 1024px) {
    .checkout-summary-section {
        width: 45%;
        max-width: 500px;
        border-top: none;
        border-left: 1px solid var(--line);
        padding: 3rem 2rem 3rem 3rem;
        margin: 0 auto 0 0;
    }
}

.sticky-summary { position: sticky; top: 88px; }

.summary-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    max-height: 40vh;
    overflow-y: auto;
}

.summary-item { display: flex; align-items: center; gap: 1rem; }

.summary-img {
    position: relative;
    width: 64px;
    height: 64px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-img img { max-width: 80%; max-height: 80%; }

.summary-qty {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--mut);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-info { flex: 1; }
.summary-info h4 { font-size: 0.875rem; margin-bottom: 0.2rem; }
.summary-info p { font-size: 0.7rem; color: var(--mut); }
.summary-price { font-size: 0.875rem; font-weight: 700; }

.promo-code {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
}

.summary-totals {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.total-final {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    color: var(--ink);
}

.finance-reminder {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(5, 163, 168, 0.1);
    border: 1px solid rgba(5, 163, 168, 0.2);
    border-radius: var(--radius-md);
}

.finance-reminder h5 {
    font-size: 0.75rem;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}

.finance-reminder p { font-size: 0.75rem; color: var(--mut); }

.mobile-summary-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1.25rem 1rem;
    background: var(--paper);
    border: none;
    border-bottom: 1px solid var(--line);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--blue);
    cursor: pointer;
}

@media (min-width: 1024px) {
    .mobile-summary-toggle { display: none; }
}
/* --- Mobile menu (native popover, no JS) --- */
.mobile-menu {
    margin: 0;
    inset: 0 0 0 auto;
    width: min(20rem, 80dvw);
    height: 100dvh;
    padding: 4rem 1.5rem 1.5rem;
    border: 0;
    background: #fff;
    color: var(--ink);
}
.mobile-menu::backdrop { background: rgb(0 0 0 / 0.4); }
.mobile-menu a {
    display: block;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
    font-weight: 600;
}
.mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: 0;
    background: none;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    color: var(--ink);
}


/* =========================================
   PRODUCT PAGE
   ========================================= */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* badges */
.badge-sale  { background: var(--err);  color: #fff; }
.badge-new   { background: var(--teal); color: #fff; }
.badge-stock { background: var(--navy); color: #fff; }
.product-image-wrapper .badge { position: absolute; top: 0.75rem; left: 0.75rem; z-index: 1; }

.product-detail {
    display: grid;
    gap: 2.5rem;
    margin-top: 1.5rem;
}
@media (min-width: 1024px) {
    .product-detail { grid-template-columns: 7fr 5fr; }
}

/* gallery */
.gallery-main {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-leaf);
    overflow: hidden;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.gallery-badges { position: absolute; top: 1rem; left: 1rem; z-index: 1; display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
.gallery-thumbs { display: flex; gap: 0.75rem; margin-top: 1rem; overflow-x: auto; }
.thumb {
    flex: none;
    width: 5rem;
    height: 5rem;
    padding: 0.4rem;
    background: #fff;
    border: 2px solid var(--line);
    border-radius: var(--radius-leaf);
    cursor: pointer;
}
.thumb:hover { border-color: rgba(48, 73, 160, 0.5); }
.thumb[aria-pressed="true"] { border-color: var(--blue); }
.thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }

/* summary */
.product-summary h1 { font-size: 1.875rem; font-weight: 900; margin-bottom: 0.5rem; }
.product-meta { font-size: 0.8rem; color: var(--mut); }

.price-panel {
    margin: 1.25rem 0;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-leaf);
}
.price-main { font-size: 2.25rem; font-weight: 900; letter-spacing: -0.04em; line-height: 1; }
.price-panel .price-old { font-size: 0.9rem; }
.price-finance-line { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.finance-from { font-size: 1.125rem; font-weight: 700; color: var(--blue); }

/* colours */
.color-options { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.25rem; border: 0; }
.color-options legend { width: 100%; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; inset: 0; }
.swatch span:not(.sr-only) {
    display: block;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 2px solid var(--line);
}
.swatch input:checked + span { border-color: var(--navy); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--blue); }
.swatch input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 4px; }

/* buy row */
.buy-row { display: flex; gap: 0.75rem; }
.qty {
    display: flex;
    flex: none;
    width: 8rem;
    height: 3rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-leaf);
    overflow: hidden;
}
.qty button { width: 2.5rem; border: 0; background: none; font-size: 1.1rem; font-weight: 700; cursor: pointer; color: var(--ink); }
.qty button:hover { background: var(--paper); }
.qty input { width: 100%; border: 0; background: transparent; text-align: center; font: inherit; font-weight: 700; color: var(--ink); -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.btn-add { flex: 1; height: 3rem; }
.cart-status { min-height: 1.25rem; margin: 0.5rem 0 1.5rem; font-size: 0.8rem; font-weight: 700; color: var(--blue); }

/* details (native <details>, no JS) */
.details-list { border-top: 1px solid var(--line); }
.details-list details { border-bottom: 1px solid var(--line); }
.details-list summary {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}
.details-list summary::-webkit-details-marker { display: none; }
.details-list summary::after { content: "+"; color: var(--mut); }
.details-list details[open] summary::after { content: "\2212"; }
.details-list summary:hover { color: var(--blue); }
.details-body { padding-bottom: 1rem; font-size: 0.875rem; color: var(--mut); line-height: 1.6; list-style: none; }
.details-body p + p { margin-top: 0.75rem; }
.details-body strong, .spec-label { color: var(--ink); font-weight: 700; }
.spec-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; border-bottom: 1px solid rgba(216, 222, 235, 0.5); }

.related { margin-top: 4rem; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.related h2 { font-size: 1.25rem; margin-bottom: 1.5rem; }


/* =========================================
   SHARED FIXES
   ========================================= */

.promo-item { flex: 1; }
.text-center { text-align: center; }

.form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font: inherit;
    font-size: 0.875rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

/* search inside the mobile menu (the header search is hidden on small screens) */
.mobile-menu .search-container { display: block; max-width: none; margin-bottom: 1rem; }

/* keyboard focus */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

.filter-header h2 { font-size: 1rem; }


/* =========================================
   SITE PAGES (home sections, content pages, forms, cart)
   ========================================= */

[hidden] { display: none !important; }

.skip-link { position: absolute; left: -999px; top: 0; z-index: 300; padding: 0.75rem 1rem; background: var(--navy); color: #fff; }
.skip-link:focus { left: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.page-head { margin: 1.5rem 0 2rem; }
.page-head h1 { font-size: 2rem; font-weight: 900; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.lead { font-size: 1.125rem; color: var(--mut); max-width: 46rem; line-height: 1.6; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-leaf); padding: 1.5rem; }
.card h2 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.card p + p { margin-top: 0.75rem; }

.grid { display: grid; gap: 1rem; }
@media (min-width: 640px)  { .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-5 { grid-template-columns: repeat(5, 1fr); } }

.home-section { margin-top: 3.5rem; }
.section-title { font-size: 1.5rem; font-weight: 900; margin-bottom: 1.25rem; }
.section-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }

.cat-tile { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.25rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-leaf); transition: border-color 0.2s, transform 0.2s; }
.cat-tile:hover { border-color: var(--blue); transform: translateY(-2px); }
.cat-name { font-weight: 800; font-size: 1.05rem; color: var(--navy); }
.cat-blurb { font-size: 0.8rem; color: var(--mut); line-height: 1.5; flex: 1; }
.cat-link { font-size: 0.8rem; font-weight: 700; color: var(--blue); }

.steps { list-style: none; counter-reset: step; display: grid; gap: 1rem; padding: 0; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(5, 1fr); } }
.steps li { counter-increment: step; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-leaf); padding: 1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; font-size: 0.85rem; }
.steps strong { color: var(--navy); }
.steps span { font-size: 0.8rem; color: var(--mut); line-height: 1.5; }

.notice { margin-top: 1.25rem; padding: 0.9rem 1.1rem; background: var(--tint); border: 1px solid rgba(48, 73, 160, 0.2); border-radius: var(--radius-md); font-size: 0.875rem; }
.notice a, .prose a, .card a:not(.btn), .details-body a, .faq a { color: var(--blue); text-decoration: underline; }

.prose { max-width: 52rem; line-height: 1.7; }
.prose h2 { font-size: 1.2rem; margin: 1.75rem 0 0.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin-bottom: 0.9rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose ul.plain, ul.plain { list-style: none; padding-left: 0; }
.prose li { margin-bottom: 0.35rem; }
.prose address { font-style: normal; margin-bottom: 0.9rem; }
.terms dt { font-weight: 800; color: var(--navy); margin-top: 1rem; }
.terms dd { color: var(--ink); }

.glance { display: grid; gap: 0.75rem; }
@media (min-width: 640px) { .glance { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .glance { grid-template-columns: repeat(4, 1fr); } }
.glance div { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 0.9rem 1rem; }
.glance dt { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mut); }
.glance dd { font-weight: 700; color: var(--navy); margin-top: 0.2rem; }
.tick-list { list-style: none; padding: 0; }
.tick-list li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 0.9rem 1rem; font-weight: 700; font-size: 0.875rem; color: var(--navy); }

.category-bar { display: none; }
@media (min-width: 1024px) {
    .category-bar { display: flex; gap: 1.75rem; max-width: var(--max-width); margin: 0 auto; padding: 0.55rem 1rem; border-top: 1px solid var(--line); font-size: 0.8rem; font-weight: 600; }
    .category-bar a:hover { color: var(--blue); }
}
.mobile-menu a.sub { padding-left: 1rem; font-weight: 500; font-size: 0.9rem; }
.footer-address { font-style: normal; font-size: 0.875rem; line-height: 1.8; }

/* shop extras */
.side-links li a { display: block; padding: 0.45rem 0; font-size: 0.9rem; border-bottom: 1px solid var(--line); }
.side-links li a[aria-current="page"] { font-weight: 800; color: var(--blue); }
.side-note { margin-top: 1rem; }
.pagination { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; margin-top: 2rem; }
.pagination a { padding: 0.5rem 0.9rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; font-weight: 600; font-size: 0.875rem; }
.pagination a[aria-current="page"] { background: var(--blue); color: #fff; border-color: var(--blue); }
.sort-controls { min-width: 13rem; }

/* product options */
.variant-options { display: flex; flex-wrap: wrap; gap: 0.5rem; border: 0; margin: 1rem 0; padding: 0; }
.variant-options legend { width: 100%; margin-bottom: 0.5rem; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; inset: 0; }
.pill span { display: block; padding: 0.5rem 0.9rem; border: 2px solid var(--line); border-radius: var(--radius-md); background: #fff; font-size: 0.85rem; font-weight: 600; }
.pill input:checked + span { border-color: var(--blue); background: var(--tint); color: var(--navy); }
.pill input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.table-scroll { overflow-x: auto; }
.options-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.options-table th, .options-table td { text-align: left; padding: 0.55rem 0.5rem; border-bottom: 1px solid var(--line); }
.options-table th { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mut); }
.btn-block { display: block; width: 100%; text-align: center; margin: 1rem 0 0.75rem; }

/* cart + checkout */
.two-col { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 900px) { .two-col { grid-template-columns: 3fr 2fr; } }
.summary-card { position: static; }
@media (min-width: 900px) { .summary-card { position: sticky; top: 7rem; } }
.cart-line { display: grid; grid-template-columns: 72px 1fr auto; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.cart-line:first-child { padding-top: 0; }
.cart-line img { width: 72px; height: 72px; object-fit: contain; background: var(--paper); border-radius: var(--radius-sm); }
.cart-line-info { display: flex; flex-direction: column; gap: 0.2rem; }
.cart-line-name { font-weight: 700; color: var(--navy); }
.cart-line-actions { display: flex; align-items: center; gap: 1rem; margin-top: 0.5rem; }
.qty-sm { width: 6.5rem; height: 2.25rem; }
.totals { margin: 1rem 0; }
.totals-row { display: flex; justify-content: space-between; padding: 0.4rem 0; }
.totals-row dd { font-weight: 800; color: var(--navy); }
.d-block { display: block; }

/* forms */
.form-card h2 { margin: 1.5rem 0 0.75rem; }
.form-card h2:first-child { margin-top: 0; }
.form-card.narrow { max-width: 46rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; border: 0; padding: 0; }
.field label, .field legend { font-size: 0.85rem; font-weight: 700; color: var(--navy); }
.input { width: 100%; padding: 0.7rem 0.85rem; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); }
.input:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
textarea.input { resize: vertical; }
.radio-line { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 500; font-size: 0.9rem; margin: 0.3rem 0; }
.consent { margin: 1rem 0 1.5rem; }
.alert { padding: 1rem 1.25rem; border-radius: var(--radius-md); margin-bottom: 1.25rem; font-size: 0.9rem; }
.alert ul { padding-left: 1.2rem; list-style: disc; margin-top: 0.4rem; }
.alert-error { background: #fdecea; border: 1px solid #f3b8b3; color: #7a1710; }
.alert-success { background: #e8f6ee; border: 1px solid #9fd5b4; color: #14532d; }
.ref { font-family: monospace; font-size: 1.2em; letter-spacing: 0.05em; color: var(--navy); }
.form-card .payment-methods { margin-bottom: 1rem; }
.form-card .btn-large { margin-top: 1rem; }

/* four-across product row on wide screens (home page featured row) */
@media (min-width: 1100px) { .product-grid--4 { grid-template-columns: repeat(4, 1fr); } }
