:root {
    color-scheme: light;
    --ink: #101820;
    --muted: #667085;
    --line: #e5e7eb;
    --canvas: #f6f7f9;
    --accent: #00a884;
    --accent-strong: #067a64;
    --rose: #d94f70;
    --shadow: 0 18px 50px rgba(16, 24, 40, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        sans-serif;
    background: var(--canvas);
    color: var(--ink);
}

body {
    min-height: 100vh;
    margin: 0;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    gap: 18px;
    align-items: center;
    padding: 14px clamp(16px, 4vw, 48px);
    border-bottom: 1px solid rgba(16, 24, 40, 0.08);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    min-width: 0;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cart-open {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 12px;
    background: #fff;
    white-space: nowrap;
}
.demo-cart {
    width: min(640px, calc(100vw - 32px));
    max-height: 80vh;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--ink);
}
.demo-cart::backdrop {
    background: rgb(0 0 0 / 40%);
}
.demo-cart header,
.demo-cart li {
    display: flex;
    align-items: center;
    gap: 16px;
}
.demo-cart header {
    justify-content: space-between;
}
.demo-cart h2 {
    margin: 0;
}
.demo-cart p {
    color: var(--muted);
}
.demo-cart ul {
    list-style: none;
    padding: 0;
}
.demo-cart li {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}
.demo-cart li span {
    flex: 1;
    min-width: 160px;
}
.demo-cart li strong {
    white-space: nowrap;
}
.demo-cart button {
    border: 0;
    background: #f1f3f5;
    border-radius: 6px;
    padding: 8px 12px;
}
.header-actions select {
    max-width: 150px;
    height: 38px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
}

.brand-mark {
    display: grid;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    font-weight: 800;
}

.brand strong,
.brand small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.shop-switcher {
    position: relative;
    justify-self: end;
}
.shop-switcher[hidden] {
    display: none;
}
.shop-switcher summary {
    cursor: pointer;
    font-size: 12px;
    padding: 8px 12px;
}
.shop-tabs {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    display: grid;
    min-width: 180px;
    padding: 8px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 12px 32px #10182014;
}
.shop-tabs[hidden] {
    display: none;
}

.shop-tab {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    white-space: nowrap;
}

.shop-tab[aria-current='true'] {
    background: var(--ink);
    color: #fff;
}

.icon-button {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 96px;
}

.primary-button,
.secondary-button,
.login-form button {
    min-height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
}

.primary-button:hover,
.secondary-button:hover,
.login-form button:hover {
    background: var(--accent-strong);
}

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

.secondary-button:hover {
    border-color: var(--accent);
    background: #f8faf9;
}

.secondary-button:disabled {
    cursor: default;
    opacity: 0.65;
}

.pagination-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
    color: var(--muted);
    font-size: 14px;
}

/* Keep the storefront layout independent of the embedded assistant's styles. */
.page-shell.product-page {
    width: min(1440px, calc(100% - 80px));
    padding-top: 0;
}
.product-breadcrumb {
    display: flex;
    gap: 12px;
    margin: 22px 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}
.product-breadcrumb a {
    flex-shrink: 0;
    color: var(--ink);
}
.product-breadcrumb > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    column-gap: clamp(28px, 5vw, 80px);
    row-gap: 24px;
    align-items: start;
}
.product-detail-media {
    min-width: 0;
}
.product-main-image {
    overflow: hidden;
    border-radius: 3px;
    background: #eeeae5;
}
.product-main-image img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
}
.product-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 14px 2px 4px;
}
.product-thumbnails button {
    flex: 0 0 64px;
    padding: 3px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
}
.product-thumbnails button[aria-pressed='true'] {
    border-color: var(--ink);
}
.product-thumbnails img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
}
.product-detail-copy {
    min-width: 0;
    padding: 22px 0 0;
}
.product-detail-copy .eyebrow {
    margin: 0 0 14px;
    font-size: 11px;
    letter-spacing: 0.14em;
}
.product-detail-copy h1 {
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 400;
    font-size: clamp(34px, 3.8vw, 58px);
    line-height: 1.06;
    letter-spacing: -0.035em;
    overflow-wrap: anywhere;
}
.product-detail-price {
    font-size: 23px;
    font-weight: 600;
    margin: 22px 0 16px;
}
.product-intro {
    color: #52605b;
    line-height: 1.65;
    font-size: 15px;
    margin: 0 0 26px;
}
.product-options {
    padding: 0;
    margin: 0 0 26px;
    border: 0;
    min-width: 0;
}
.product-options legend {
    padding: 0;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 500;
}
.product-option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}
.product-option {
    position: relative;
    cursor: pointer;
    min-width: 0;
}
.product-option input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.product-option > span {
    display: flex;
    flex-direction: column;
    gap: 7px;
    height: 100%;
    padding: 16px;
    border: 1px solid #d9d6d0;
    border-radius: 4px;
    background: transparent;
    transition:
        border-color 0.15s,
        background 0.15s;
}
.product-option strong {
    font-size: 14px;
    font-weight: 500;
    overflow-wrap: anywhere;
}
.product-option small {
    font-size: 13px;
    color: #71716d;
}
.product-option input:checked + span {
    border-color: #20283f;
    background: #fffdfa;
    box-shadow: inset 0 0 0 1px #20283f;
}
.product-option input:focus-visible + span {
    outline: 2px solid #20283f;
    outline-offset: 3px;
}
.quantity-label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
}
.product-buy-row {
    display: flex;
    gap: 12px;
}
.product-quantity {
    display: flex;
    height: 56px;
    border: 1px solid #cbd1ce;
    border-radius: 6px;
    background: #fff;
}
.product-quantity button {
    width: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 19px;
    color: var(--ink);
}
.product-quantity button:disabled {
    color: #b9bfbd;
    cursor: default;
}
.product-quantity input {
    width: 36px;
    padding: 0;
    text-align: center;
    border: 0;
    background: transparent;
    color: var(--ink);
    appearance: textfield;
    -moz-appearance: textfield;
}
.product-quantity input::-webkit-inner-spin-button,
.product-quantity input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.product-add-button {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 20px;
    border: 0;
    border-radius: 6px;
    background: #20283f;
    color: white;
    font-size: 14px;
    font-weight: 600;
}
.product-add-button:hover {
    background: #343d57;
}
.product-cart-feedback {
    color: #246148;
    font-size: 13px;
    line-height: 1.5;
    margin: 12px 0 0;
}
.product-cart-feedback:empty {
    display: none;
}
.product-assistant {
    scroll-margin-top: 24px;
    border-top: 1px solid #dce1dd;
    padding-top: 22px;
    margin: 26px 0;
}
.product-assistant h2 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 16px;
}
.product-stories {
    display: flow-root;
    min-width: 0;
}
.product-stories.has-content {
    margin-bottom: 24px;
}
.product-information {
    margin-top: 26px;
    border-top: 1px solid #dce1dd;
}
.product-information details {
    border-bottom: 1px solid #dce1dd;
}
.product-information summary {
    padding: 20px 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}
.product-information p {
    color: #52605b;
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 22px;
    white-space: pre-line;
    overflow-wrap: anywhere;
}
.product-page :is(button, a, input, select, summary):focus-visible {
    outline: 2px solid #287c60;
    outline-offset: 3px;
}

.loading-state,
.empty-state {
    padding: 56px 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.eyebrow {
    margin: 0;
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.login-form input {
    min-width: 0;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.login-body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 20% 20%, rgba(0, 168, 132, 0.14), transparent 32%),
        linear-gradient(135deg, #f6f7f9, #eef4f3);
}

.login-shell {
    width: min(420px, 100%);
}

.login-panel {
    display: grid;
    gap: 22px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.login-panel h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.05;
}

.login-form {
    display: grid;
    gap: 10px;
}

.login-form label {
    color: var(--muted);
    font-size: 14px;
}

.login-error {
    margin: 0;
    color: var(--rose);
    font-size: 14px;
}

@media (max-width: 860px) {
    .topbar {
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 6px;
    }

    .page-shell.product-page {
        width: calc(100% - 40px);
    }
    .product-detail {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .product-detail-media {
        position: static;
    }
    .product-main-image {
        max-height: none;
    }
    .product-detail-copy {
        padding: 0;
    }
    .product-breadcrumb {
        margin-bottom: 18px;
    }
}

@media (max-width: 560px) {
    .page-shell {
        width: min(100% - 24px, 1180px);
        padding-top: 22px;
    }
}

@media (max-width: 560px) {
    .page-shell.product-page {
        width: calc(100% - 32px);
        padding-top: 20px;
    }
    .product-add-button {
        padding: 0 14px;
    }
    .product-thumbnails button {
        flex-basis: 62px;
    }
}

.storefront {
    background: #faf8f4;
    color: #20283f;
}
.storefront .topbar {
    position: relative;
    padding: 5px 40px;
    min-height: 42px;
    background: #f0ede7;
    border: 0;
    gap: 16px;
    backdrop-filter: none;
}
.storefront .brand {
    gap: 0;
}
.storefront .brand-mark,
.storefront .brand small {
    display: none;
}
.storefront .brand strong {
    font-size: 11px;
    letter-spacing: 0.16em;
    font-weight: 600;
    color: #767670;
}
.storefront .header-actions select {
    height: 30px;
    font-size: 11px;
    background: transparent;
    border: 0;
    max-width: 135px;
}
.storefront .icon-button {
    width: 28px;
    height: 28px;
    font-size: 15px;
    background: transparent;
    border: 0;
}
.storefront-header {
    min-height: 108px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    border-bottom: 1px solid #e2ded6;
}
.storefront-collection,
.storefront-advice {
    font-size: 12px;
}
.storefront-advice {
    justify-self: end;
}
.storefront-wordmark {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 42px;
    letter-spacing: -0.045em;
}
.storefront .product-detail-copy .eyebrow {
    color: #807766;
    font-weight: 500;
    letter-spacing: 0.16em;
}
.storefront .product-intro {
    font-size: 14px;
    line-height: 1.75;
    color: #62635f;
}
.storefront .product-quantity {
    background: transparent;
    border-color: #d9d6d0;
}
.storefront .product-add-button {
    border-radius: 3px;
    font-weight: 500;
}
.storefront .product-detail-price {
    font-size: 22px;
    font-weight: 500;
}
.storefront .product-assistant,
.storefront .product-information,
.storefront .product-information details {
    border-color: #e2ded6;
}
.storefront .product-assistant h2 {
    font-weight: 500;
}
@media (max-width: 560px) {
    .storefront .topbar {
        padding: 5px 16px;
        gap: 4px;
    }
    .storefront-header {
        min-height: 88px;
        grid-template-columns: 1fr auto;
        gap: 12px;
    }
    .storefront-wordmark {
        grid-column: 2;
        font-size: 32px;
    }
    .storefront-advice {
        display: none;
    }
    .page-shell.product-page {
        padding-top: 0;
    }
    .product-option-grid {
        grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
        gap: 8px;
    }
    .product-option > span {
        padding: 13px 10px;
    }
}

/* The catalogue shares the product pages' typography and storefront palette. */
.page-shell.home-page {
    width: min(1440px, calc(100% - 80px));
    padding-top: 0;
}
.home-intro {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    align-items: end;
    gap: 48px;
    padding: 62px 0 66px;
}
.home-intro .eyebrow {
    margin: 0 0 22px;
    color: #807766;
    font-weight: 500;
    letter-spacing: 0.16em;
}
.home-intro h1 {
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(40px, 4.7vw, 72px);
    font-weight: 400;
    line-height: 1.07;
    letter-spacing: -0.045em;
}
.home-intro-note {
    justify-self: end;
    padding-bottom: 5px;
    font-size: 14px;
    line-height: 1.8;
}
.home-intro-note p {
    margin: 0 0 22px;
    color: #62635f;
}
.home-intro-note a {
    display: inline-flex;
    align-items: center;
    gap: 32px;
    border-bottom: 1px solid #20283f;
    padding-bottom: 5px;
    font-size: 12px;
}
.home-collection {
    scroll-margin-top: 24px;
}
.home-page .toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 24px 0;
    border-top: 1px solid #e2ded6;
}
.collection-heading {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 16px;
}
.collection-heading h2 {
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 30px;
    font-weight: 400;
    letter-spacing: -0.035em;
}
.collection-heading > span {
    color: #62635f;
    font-size: 12px;
}
.catalog-search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(100%, 300px);
    padding: 0 14px;
    border: 1px solid #d9d6d0;
    border-radius: 3px;
}
.catalog-search svg {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
}
.catalog-search .search-input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 12px;
}
.catalog-search .search-input::placeholder {
    color: #62635f;
    opacity: 1;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 36px 24px;
}
.product-card {
    min-width: 0;
}
.product-card-image {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1;
    border-radius: 3px;
    background: #eeeae5;
}
.product-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 220ms ease;
}
.product-card-discover {
    position: absolute;
    right: 12px;
    bottom: 12px;
    left: 12px;
    display: flex;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 2px;
    background: #faf8f4;
    color: #20283f;
    font-size: 12px;
    opacity: 0;
    transform: translateY(5px);
    transition:
        opacity 160ms ease,
        transform 160ms ease;
}
.product-card:focus-within .product-card-discover {
    opacity: 1;
    transform: none;
}
@media (hover: hover) {
    .product-card:hover .product-card-image img {
        transform: scale(1.035);
    }
    .product-card:hover .product-card-discover {
        opacity: 1;
        transform: none;
    }
    .home-page a:hover {
        text-decoration: underline;
        text-underline-offset: 4px;
    }
}
.product-card-body {
    padding-top: 16px;
}
.product-card h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.product-meta {
    margin-top: 8px;
    color: #62635f;
    font-size: 13px;
}
.home-page .pagination-bar {
    flex-direction: column;
    gap: 18px;
    margin-top: 52px;
    padding-top: 32px;
    border-top: 1px solid #e2ded6;
    font-size: 12px;
    color: #62635f;
}
.home-page .secondary-button {
    min-height: 46px;
    padding: 0 32px;
    border: 1px solid #20283f;
    border-radius: 3px;
    background: #20283f;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
}
.home-page .secondary-button:hover {
    background: #343e59;
}
.home-page :is(.loading-state, .empty-state) {
    padding: 64px 24px;
    border: 1px solid #e2ded6;
    border-radius: 3px;
    background: transparent;
    text-align: center;
}
.home-page :is(.loading-state, .empty-state) h3 {
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 28px;
    font-weight: 400;
}
.home-page .empty-state p {
    font-size: 14px;
    color: #62635f;
}
.home-page :is(button, a, input):focus-visible {
    outline: 2px solid #20283f;
    outline-offset: 4px;
}
@media (max-width: 1100px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 860px) {
    .page-shell.home-page {
        width: calc(100% - 40px);
    }
    .home-intro {
        gap: 28px;
        padding: 44px 0;
    }
    .home-intro-note br {
        display: none;
    }
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 16px;
    }
}
@media (max-width: 560px) {
    .page-shell.home-page {
        width: calc(100% - 32px);
    }
    .home-intro {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 36px 0;
    }
    .home-intro .eyebrow {
        margin-bottom: 18px;
    }
    .home-intro-note {
        justify-self: start;
        max-width: 300px;
        font-size: 13px;
    }
    .home-intro-note p {
        margin-bottom: 16px;
    }
    .home-page .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
        padding: 22px 0;
    }
    .collection-heading {
        justify-content: space-between;
    }
    .collection-heading h2 {
        font-size: 28px;
    }
    .catalog-search {
        width: 100%;
    }
    .product-card-body {
        padding-top: 12px;
    }
    .product-card h3 {
        font-size: 13px;
    }
    .product-grid {
        gap: 28px 12px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .product-card-image img,
    .product-card-discover {
        transition: none;
    }
}
