:root {
    --ink: #17202a;
    --muted: #64717f;
    --line: #dce4e8;
    --paper: #fbf7ef;
    --surface: #ffffff;
    --teal: #0e7c75;
    --teal-dark: #075a56;
    --coral: #e76f51;
    --gold: #d9a441;
    --sky: #d7eef4;
    --shadow: 0 18px 45px rgba(23, 32, 42, .13);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 10%, rgba(215, 238, 244, .9), transparent 34rem),
        linear-gradient(135deg, #fbf7ef 0%, #eef7f4 52%, #fff8ea 100%);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.site-shell {
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem clamp(1rem, 4vw, 3rem);
    background: rgba(255, 255, 255, .82);
    border-bottom: 1px solid rgba(220, 228, 232, .9);
    backdrop-filter: blur(16px);
}

.brand,
.site-nav,
.stat-grid,
.action-row,
.user-row {
    display: flex;
    align-items: center;
}

.brand {
    gap: .75rem;
    min-width: 16rem;
}

.brand-logo {
    display: block;
    width: clamp(3.25rem, 8vw, 5.5rem);
    height: clamp(3.25rem, 8vw, 5.5rem);
    object-fit: contain;
    background: transparent;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(14, 124, 117, .16);
}

.brand strong,
.brand small {
    display: block;
}

.brand small,
.eyebrow,
.metric-label,
.form-help,
.table-meta {
    color: var(--muted);
    font-size: .82rem;
}

.lead-copy {
    color: #33414c;
    font-size: clamp(1rem, 1.4vw, 1.18rem);
}

.contact-list {
    display: grid;
    gap: .85rem;
    margin: 1rem 0 0;
}

.contact-list div {
    padding-bottom: .85rem;
    border-bottom: 1px solid var(--line);
}

.contact-list dt {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.contact-list dd {
    margin: .2rem 0 0;
    color: var(--ink);
    font-weight: 700;
}

.site-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .5rem .9rem;
}

.menu-open,
.menu-close {
    display: none;
}

.nav-panel {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.site-nav a,
.nav-button {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    padding: .6rem .85rem;
    border: 0;
    border-radius: 8px;
    color: var(--ink);
    background: transparent;
    cursor: pointer;
    font-weight: 700;
}

.site-nav a:hover,
.nav-button:hover {
    background: rgba(14, 124, 117, .09);
}

.site-nav a.nav-shop {
    color: #5f4105;
    background: rgba(217, 164, 65, .22);
    border: 1px solid rgba(217, 164, 65, .38);
}

.site-nav a.nav-shop:hover {
    background: rgba(217, 164, 65, .34);
}

.language-switch {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .2rem;
    background: rgba(14, 124, 117, .08);
    border: 1px solid rgba(14, 124, 117, .14);
    border-radius: 8px;
}

.language-switch a {
    min-height: 2rem;
    padding: .35rem .55rem;
    border-radius: 6px;
    font-size: .78rem;
}

.language-switch a.active {
    color: #fff;
    background: var(--teal);
}

.nav-button,
.button-primary {
    color: #fff;
    background: var(--teal);
}

.site-nav .nav-join {
    color: #fff;
    background: var(--coral);
    box-shadow: 0 10px 24px rgba(231, 111, 81, .22);
}

.nav-button:hover,
.button-primary:hover {
    background: var(--teal-dark);
}

.site-nav .nav-join:hover {
    background: #c95438;
}

.hero,
.page-grid,
.content-section,
.auth-wrap {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(20rem, .95fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    min-height: calc(100vh - 5.25rem);
    padding: clamp(2rem, 6vw, 4.5rem) 0;
}

.hero-copy h1,
.page-title h1,
.auth-card h1 {
    margin: .35rem 0 1rem;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2.4rem, 7vw, 5.8rem);
    line-height: .95;
    letter-spacing: 0;
}

.hero-copy p,
.page-title p {
    max-width: 42rem;
    color: #3d4a54;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
}

.hero-media {
    min-height: 29rem;
    border-radius: 8px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(23, 32, 42, .08), rgba(23, 32, 42, .48)),
        url("https://images.unsplash.com/photo-1556761175-b413da4baf72?auto=format&fit=crop&w=1200&q=80") center/cover;
    box-shadow: var(--shadow);
}

.hero-panel {
    margin: 1rem;
    padding: 1rem;
    width: min(18rem, calc(100% - 2rem));
    color: #fff;
    background: rgba(23, 32, 42, .64);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.button-row,
.auth-links {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    margin-top: 1.5rem;
}

.button-primary,
.button-secondary,
.button-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: .75rem 1rem;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 800;
}

.button-secondary {
    color: var(--teal-dark);
    background: #fff;
    border: 1px solid rgba(14, 124, 117, .22);
}

.button-soft {
    color: var(--ink);
    background: #fff6df;
}

.page-grid {
    display: grid;
    grid-template-columns: 16rem minmax(0, 1fr);
    gap: 1.25rem;
    padding: 2rem 0 3rem;
}

.sidebar {
    align-self: start;
    padding: 1rem;
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.sidebar a {
    display: block;
    padding: .7rem .8rem;
    border-radius: 8px;
    color: #33414c;
    font-weight: 700;
}

.sidebar a:hover {
    background: rgba(14, 124, 117, .09);
}

.page-title {
    margin-bottom: 1.25rem;
}

.page-title h1,
.auth-card h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.card,
.metric-card,
.auth-card,
.table-card {
    background: rgba(255, 255, 255, .9);
    border: 1px solid rgba(220, 228, 232, .95);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(23, 32, 42, .08);
}

.card,
.metric-card,
.auth-card,
.table-card {
    padding: 1.15rem;
}

.card-image {
    height: 9rem;
    margin: -1.15rem -1.15rem 1rem;
    border-radius: 8px 8px 0 0;
    background:
        linear-gradient(180deg, transparent, rgba(23, 32, 42, .5)),
        url("https://images.unsplash.com/photo-1552664730-d307ca884978?auto=format&fit=crop&w=900&q=80") center/cover;
}

.plan-price {
    margin: .4rem 0;
    font-size: 2rem;
    font-weight: 800;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.8rem;
    padding: .25rem .55rem;
    color: var(--teal-dark);
    background: rgba(14, 124, 117, .1);
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 800;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.metric-value {
    margin-top: .3rem;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
}

.auth-wrap {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(20rem, 1.05fr);
    gap: clamp(1.25rem, 4vw, 3rem);
    align-items: center;
    min-height: calc(100vh - 5.25rem);
    padding: 2rem 0;
}

.auth-art {
    min-height: 34rem;
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(23, 32, 42, .05), rgba(14, 124, 117, .55)),
        url("https://images.unsplash.com/photo-1517048676732-d65bc937f952?auto=format&fit=crop&w=1200&q=80") center/cover;
    box-shadow: var(--shadow);
}

.auth-card {
    padding: clamp(1.25rem, 4vw, 2rem);
}

.form-stack {
    display: grid;
    gap: .9rem;
}

.form-section {
    display: grid;
    gap: .9rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
}

.form-section h2 {
    margin: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
}

.field.full {
    grid-column: 1 / -1;
}

.field label {
    display: block;
    margin-bottom: .35rem;
    font-weight: 800;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 3rem;
    padding: .8rem .9rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: none;
}

.field input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(14, 124, 117, .12);
}

.field select:focus,
.field textarea:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(14, 124, 117, .12);
}

.field textarea {
    min-height: 8rem;
    resize: vertical;
}

.alert {
    margin: 1rem 0;
    padding: .8rem 1rem;
    border-radius: 8px;
    font-weight: 700;
}

.alert-success {
    color: #0c5f4d;
    background: #dff8ec;
}

.alert-error {
    color: #9c2f1b;
    background: #ffe5dc;
}

.table-card {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 34rem;
}

.data-table th,
.data-table td {
    padding: .9rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.data-table th {
    color: var(--muted);
    font-size: .78rem;
    text-transform: uppercase;
}

.status-pending {
    color: #8a5d00;
    background: #fff1c7;
}

.status-paid,
.status-active,
.status-completed,
.status-shipped {
    color: #0c5f4d;
    background: #dff8ec;
}

.status-rejected,
.status-expired,
.status-failed,
.status-cancelled,
.status-inactive {
    color: #9c2f1b;
    background: #ffe5dc;
}

.status-processing,
.status-refunded {
    color: #075a56;
    background: #d7eef4;
}

.shop-search,
.checkout-layout,
.product-detail {
    display: grid;
    gap: 1rem;
}

.shop-search {
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 1rem;
}

.shop-search input,
.qty-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 2.75rem;
    padding: .65rem .8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.qty-control {
    display: inline-grid;
    grid-template-columns: 2.4rem minmax(3.5rem, 5rem) 2.4rem;
    align-items: center;
    gap: .35rem;
}

.qty-control button {
    min-height: 2.4rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--teal-dark);
    background: #fff;
    cursor: pointer;
    font-weight: 800;
}

.qty-control .qty-input {
    text-align: center;
}

.product-card form {
    margin-top: 1rem;
}

.product-media-stack {
    display: grid;
    gap: 1rem;
}

.product-image,
.product-hero-image {
    background-position: center;
    background-size: cover;
    background-color: var(--sky);
    border-radius: 8px;
}

.product-image {
    height: 11rem;
    margin: -1.15rem -1.15rem 1rem;
    border-radius: 8px 8px 0 0;
}

.product-detail {
    grid-template-columns: minmax(18rem, .9fr) minmax(0, 1.1fr);
    align-items: start;
}

.product-hero-image {
    min-height: 26rem;
    box-shadow: var(--shadow);
}

.product-video-frame {
    position: relative;
    overflow: hidden;
    min-height: 14rem;
    aspect-ratio: 16 / 9;
    background: #102323;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.product-video-frame iframe,
.product-video-frame video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.product-video-link {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
}

.checkout-layout {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, .42fr);
    align-items: start;
}

.summary-row,
.summary-total,
.checkout-summary {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.summary-row,
.summary-total {
    padding: .8rem 0;
    border-bottom: 1px solid var(--line);
}

.summary-total {
    border-bottom: 0;
    font-size: 1.2rem;
}

.checkout-summary {
    align-items: center;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.code-block {
    overflow-x: auto;
    margin: 1rem 0 0;
    padding: .9rem 1rem;
    color: #fff;
    background: #17202a;
    border-radius: 8px;
}

.gallery-category-grid,
.gallery-grid {
    display: grid;
    gap: 1rem;
}

.gallery-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gallery-category-card,
.gallery-item {
    overflow: hidden;
    background: rgba(255, 255, 255, .9);
    border: 1px solid rgba(220, 228, 232, .95);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(23, 32, 42, .08);
}

.gallery-category-card {
    display: grid;
    gap: .8rem;
    padding: 1rem;
}

.gallery-cover {
    min-height: 12rem;
    margin: -1rem -1rem 0;
    background-position: center;
    background-size: cover;
    background-color: var(--sky);
}

.gallery-item {
    margin: 0;
}

.gallery-item img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.gallery-item figcaption {
    display: grid;
    gap: .5rem;
    padding: .85rem;
}

.user-row {
    justify-content: space-between;
    gap: 1rem;
}

.mt-1 {
    margin-top: 1rem;
}

.section-pad {
    padding: 2rem 0 3rem;
}

@media (max-width: 860px) {
    html.nav-lock,
    body.nav-lock {
        overflow: hidden;
    }

    .site-header,
    .hero,
    .page-grid,
    .auth-wrap {
        grid-template-columns: 1fr;
    }

    .site-header {
        position: sticky;
        flex-direction: row;
        align-items: center;
        padding: .75rem 1rem;
    }

    .brand {
        min-width: 0;
    }

    .brand-logo {
        width: 3.25rem;
        height: 3.25rem;
    }

    .menu-open {
        display: inline-grid;
        place-items: center;
        gap: .28rem;
        flex: 0 0 auto;
        width: 2.75rem;
        height: 2.75rem;
        border: 1px solid rgba(14, 124, 117, .22);
        border-radius: 8px;
        padding: 0;
        background: #fff;
        box-shadow: 0 10px 24px rgba(14, 124, 117, .12);
        cursor: pointer;
    }

    .menu-open span {
        display: block;
        width: 1.25rem;
        height: 2px;
        background: var(--teal-dark);
        border-radius: 999px;
    }

    .nav-panel {
        position: fixed;
        inset: 0;
        z-index: 30;
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        padding: 1rem;
        background:
            linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(238, 247, 244, .98));
        opacity: 0;
        pointer-events: none;
        transform: translateY(-.75rem);
        transition: opacity .18s ease, transform .18s ease;
        overflow: hidden;
    }

    .site-header.nav-open .nav-panel {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .menu-close {
        display: inline-grid;
        place-items: center;
        align-self: flex-end;
        flex: 0 0 auto;
        width: 2.75rem;
        height: 2.75rem;
        border: 1px solid rgba(14, 124, 117, .22);
        border-radius: 8px;
        padding: 0 0 .2rem;
        color: var(--teal-dark);
        background: #fff;
        font-size: 2rem;
        line-height: 1;
        cursor: pointer;
    }

    .site-nav {
        display: grid;
        align-items: stretch;
        justify-content: stretch;
        align-content: start;
        gap: .75rem;
        width: min(100%, 30rem);
        margin: 0 auto;
        flex: 1 1 auto;
        max-height: calc(100dvh - 6rem);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: none;
    }

    .site-nav::-webkit-scrollbar {
        display: none;
    }

    .site-nav a,
    .nav-button,
    .site-nav form {
        width: 100%;
    }

    .site-nav a,
    .nav-button {
        justify-content: center;
        min-height: 3.25rem;
        font-size: 1.05rem;
    }

    .language-switch {
        justify-content: center;
        width: 100%;
        margin-top: .5rem;
    }

    .language-switch a {
        justify-content: center;
        flex: 1;
    }

    .hero {
        min-height: auto;
    }

    .hero-media,
    .auth-art {
        min-height: 18rem;
    }

    .card-grid,
    .stat-grid,
    .form-grid,
    .gallery-category-grid,
    .gallery-grid,
    .product-detail,
    .checkout-layout,
    .shop-search {
        grid-template-columns: 1fr;
    }

    .checkout-summary {
        align-items: stretch;
        flex-direction: column;
    }

}

@media (max-width: 520px) {
    .hero,
    .page-grid,
    .content-section,
    .auth-wrap {
        width: min(100% - 1rem, 1120px);
    }

    .site-nav a,
    .nav-button,
    .button-primary,
    .button-secondary,
    .button-soft {
        width: 100%;
    }
}
