html {
    font-size: 14px;
    height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

:root {
    --pf-cocoa-900: #241813;
    --pf-cocoa-800: #4d3429;
    --pf-cocoa-700: #6f4b3b;
    --pf-cocoa-600: #926950;
    --pf-cream-100: #fffdfb;
    --pf-cream-200: #f7f0e9;
    --pf-line: rgba(146, 105, 80, 0.18);
    --pf-line-strong: rgba(146, 105, 80, 0.34);
    --pf-shadow: 0 16px 34px rgba(53, 37, 28, 0.08);
    --pf-font-ui: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --pf-weight-regular: 400;
    --pf-weight-medium: 500;
    --pf-weight-semibold: 700;
    --pf-weight-bold: 800;
    --pf-weight-black: 900;
    --pf-header-offset: 102px;
    --sp-theme-primary: var(--pf-cocoa-700);
    --sp-theme-secondary: var(--pf-cocoa-900);
    --sp-theme-surface: #ffffff;
    --sp-theme-text: var(--pf-cocoa-900);
    --sp-theme-muted: var(--pf-cocoa-600);
    --sp-theme-on-primary: #ffffff;
    --sp-theme-font: var(--pf-font-ui);
    --sp-theme-radius: 22px;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem #ffffff, 0 0 0 0.25rem #258cfb;
}

html,
body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--sp-theme-surface);
    color: var(--sp-theme-text);
    font-family: var(--sp-theme-font);
}

main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1050;
}

.navbar {
    position: relative;
    z-index: 1050;
    padding: 1rem clamp(1rem, 2vw, 1.45rem);
    border: 2px solid var(--sp-theme-primary);
    border-top: 0;
    border-radius: 0 0 26px 26px;
    background: var(--sp-theme-surface);
    box-shadow: 0 12px 24px color-mix(in srgb, var(--sp-theme-secondary) 14%, transparent);
}

.navbar-top {
    display: flex;
    width: min(100%, 1480px);
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 0.95rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.72rem;
    min-height: 48px;
    text-decoration: none;
    transition: transform 0.18s ease;
}

.navbar-brand:hover {
    transform: translateY(-1px);
}

.navbar-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 2px solid var(--sp-theme-primary);
    border-radius: min(var(--sp-theme-radius), 14px);
    background: var(--sp-theme-surface);
    box-shadow: none;
    overflow: hidden;
}

.navbar-brand-mark img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
    transform: scale(1.04);
}

.navbar-brand-copy {
    display: inline-flex;
    align-items: center;
}

.title-nunito-expanded {
    margin: 0;
    color: var(--sp-theme-secondary);
    font-family: var(--sp-theme-font);
    font-size: clamp(1.34rem, 1.95vw, 1.68rem);
    font-style: italic;
    font-weight: var(--pf-weight-bold);
    font-stretch: 112%;
    letter-spacing: 0.16em;
    text-align: center;
    text-transform: uppercase;
}

.navbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.navbar-right .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.62rem 0.92rem;
    border: 2px solid var(--sp-theme-primary);
    border-radius: 999px;
    background: var(--sp-theme-surface);
    box-shadow: none;
    color: var(--sp-theme-text);
    font-size: 0.68rem;
    font-weight: var(--pf-weight-bold);
    letter-spacing: 0.12em;
    text-decoration: none;
    text-transform: uppercase;
    transition: transform 0.16s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.navbar-right .nav-link:hover,
.navbar-right .nav-link.active {
    background: color-mix(in srgb, var(--sp-theme-primary) 10%, var(--sp-theme-surface));
    border-color: var(--sp-theme-primary);
    box-shadow: none;
    color: var(--sp-theme-text);
    transform: translateY(-1px);
}

.navbar-right .nav-icon-link {
    width: 42px;
    height: 42px;
    padding: 0;
}

.navbar-right .login-link {
    border-color: #6f4b3b;
    background: #6f4b3b;
    box-shadow: none;
    color: #ffffff;
}

.navbar-right .login-link:hover,
.navbar-right .login-link.active {
    background: #5d3e30;
    color: #ffffff;
}

.nav-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.pf-store-cart-link {
    position: relative;
}

.pf-cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--sp-theme-secondary);
    color: var(--sp-theme-on-primary);
    font-size: 0.68rem;
    font-weight: var(--pf-weight-semibold);
    line-height: 18px;
    text-align: center;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 2px solid var(--sp-theme-primary);
    border-radius: min(var(--sp-theme-radius), 14px);
    background: var(--sp-theme-surface);
    box-shadow: none;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.nav-toggle:hover {
    transform: translateY(-1px);
    box-shadow: none;
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--pf-cocoa-600);
    outline-offset: 3px;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    position: relative;
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--pf-cocoa-900);
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
}

.nav-toggle-bars::before {
    top: -6px;
}

.nav-toggle-bars::after {
    top: 6px;
}

.navbar.mobile-open .nav-toggle-bars {
    transform: rotate(45deg);
}

.navbar.mobile-open .nav-toggle-bars::before {
    transform: rotate(-90deg) translateX(-6px);
}

.navbar.mobile-open .nav-toggle-bars::after {
    opacity: 0;
}

.layout-content {
    padding: calc(var(--pf-header-offset) + 0.4rem) clamp(0.75rem, 2vw, 1.35rem) 2.5rem;
}

footer.footer {
    flex-shrink: 0;
    width: 100%;
    margin: 0;
    padding: 0.78rem clamp(1rem, 2vw, 1.45rem) 0.9rem;
    border-top: 2px solid var(--sp-theme-primary);
    background: var(--sp-theme-surface);
    color: var(--sp-theme-text);
    font-size: 0.74rem;
    font-weight: var(--pf-weight-bold);
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

.footer-inner {
    display: grid;
    justify-items: center;
    gap: 0.22rem;
}

.footer-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    flex-wrap: wrap;
}

.footer-brand {
    color: var(--sp-theme-text);
    font-weight: var(--pf-weight-bold);
}

.footer-rights {
    color: var(--sp-theme-muted);
}

.footer-links {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
}

.footer-link {
    color: var(--sp-theme-primary);
    font-weight: var(--pf-weight-bold);
    text-decoration: none;
}

.footer-link:hover {
    color: #4d3429;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-divider {
    color: var(--sp-theme-muted);
}

body.legal-theme {
    background:
        radial-gradient(circle at top, rgba(173, 123, 92, 0.12), transparent 36%),
        var(--pf-cream-100);
}

.legal-layout-content {
    width: 100%;
}

.legal-page-wrap {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 8px 20px;
}

.legal-hero {
    padding: 30px 26px;
    border: 1.5px solid rgba(146, 105, 80, 0.5);
    border-radius: 18px;
    background: linear-gradient(155deg, #2b1c16 0%, #4d3429 56%, #241813 100%);
    box-shadow:
        0 20px 42px rgba(36, 24, 19, 0.22),
        inset 0 1px 0 rgba(255, 250, 245, 0.08);
}

.legal-kicker {
    margin: 0 0 10px;
    color: rgba(255, 244, 236, 0.74);
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.legal-title {
    margin: 0;
    color: #fffaf5;
    font-size: clamp(1.9rem, 4vw, 2.45rem);
    font-weight: 900;
    letter-spacing: 0.02em;
    line-height: 1.12;
    text-transform: uppercase;
}

.legal-intro {
    margin: 12px 0 0;
    color: rgba(255, 248, 243, 0.92);
    font-size: 1.03rem;
    font-weight: 600;
    line-height: 1.6;
}

.legal-card {
    margin-top: 14px;
    padding: 24px 24px 22px;
    border: 1.2px solid rgba(146, 105, 80, 0.42);
    border-radius: 16px;
    background: linear-gradient(180deg, #3a271f 0%, #241813 100%);
    box-shadow: 0 18px 38px rgba(36, 24, 19, 0.18);
}

.legal-prose p {
    margin: 0 0 14px;
    max-width: 72ch;
    color: rgba(255, 246, 240, 0.92);
    font-size: 1rem;
    line-height: 1.75;
}

.legal-prose p:last-child {
    margin-bottom: 0;
}

.legal-contact a {
    color: #f4d6c1;
    font-weight: 700;
    text-decoration: none;
}

.legal-contact a:hover {
    color: #fff7f1;
    text-decoration: underline;
}

.legal-updated {
    margin-top: 18px;
    color: rgba(255, 242, 234, 0.66);
    font-size: 0.84rem;
    letter-spacing: 0.02em;
}

@media (max-width: 900px) {
    :root {
        --pf-header-offset: 90px;
    }

    .navbar {
        padding: 0.88rem 0.85rem;
        border-radius: 0 0 20px 20px;
    }

    .title-nunito-expanded {
        font-size: 1.4rem;
    }

    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .navbar-right {
        display: none;
        width: 100%;
        padding-top: 0.7rem;
        gap: 0.5rem;
    }

    .navbar.mobile-open .navbar-right {
        display: flex;
    }

    .navbar-right .nav-link:not(.nav-icon-link) {
        flex: 1 1 100%;
        justify-content: flex-start;
    }

    .navbar-right .nav-icon-link {
        flex: 0 0 40px;
    }
}

@media (max-width: 560px) {
    .layout-content {
        padding-inline: 0.65rem;
    }
}

@media (max-width: 768px) {
    .legal-page-wrap {
        padding: 0 2px 18px;
    }

    .legal-hero {
        padding: 20px 16px;
        border-radius: 14px;
    }

    .legal-card {
        padding: 16px 14px;
        border-radius: 12px;
    }

    .legal-prose p {
        font-size: 0.95rem;
        line-height: 1.65;
    }
}
