:root {
    color-scheme: light;
    --bg: #f7f3ec;
    --surface: #fffdf9;
    --surface-strong: #ffffff;
    --ink: #181512;
    --muted: #6b625a;
    --line: rgba(24, 21, 18, 0.12);
    --accent: #8c5a37;
    --accent-dark: #6f4327;
    --accent-soft: #eadccf;
    --shadow: 0 20px 50px rgba(24, 21, 18, 0.08);
    --radius: 8px;
    --container: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Inter', Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
}

body.lightbox-open {
    overflow: hidden;
}

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

img {
    display: block;
    width: 100%;
}

.container {
    width: min(calc(100% - 32px), var(--container));
    margin: 0 auto;
}

.topbar {
    background: #111111;
    color: #f5f1ea;
    font-size: 12px;
}

.topbar-inner {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(14px);
    background: rgba(247, 243, 236, 0.86);
    border-bottom: 1px solid var(--line);
}

.header-row {
    min-height: 82px;
    display: grid;
    grid-template-columns: 180px minmax(260px, 380px) minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
}

.brand {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0;
}

.header-search {
    position: relative;
}

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

.search-input {
    width: 100%;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    font: inherit;
    color: var(--ink);
}

.search-input::placeholder {
    color: var(--muted);
}

.search-input:focus {
    outline: 2px solid rgba(140, 90, 55, 0.18);
    border-color: rgba(140, 90, 55, 0.45);
}

.search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 20;
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-strong);
    box-shadow: var(--shadow);
}

.search-result-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: var(--radius);
}

.search-result-item:hover {
    background: #f6efe7;
}

.search-result-media,
.search-result-placeholder {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    overflow: hidden;
    background: #ece3d8;
}

.search-result-media img {
    height: 100%;
    object-fit: cover;
}

.search-result-placeholder {
    display: grid;
    place-items: center;
    padding: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.search-result-copy {
    min-width: 0;
}

.search-result-copy strong,
.search-result-copy span {
    display: block;
}

.search-result-copy strong {
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.4;
}

.search-result-copy span,
.search-empty {
    color: var(--muted);
    font-size: 13px;
}

.search-empty {
    padding: 10px;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    align-items: center;
}

.main-nav a {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.main-nav a.active,
.main-nav a:hover,
.text-link:hover {
    color: var(--ink);
}

.header-tools {
    display: flex;
    gap: 10px;
    align-items: center;
}

.tool-pill,
.tag,
.stock-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 700;
}

.tool-pill.dark {
    background: #161616;
    color: #fff;
    border-color: #161616;
}

.hero,
.section,
.page-hero {
    padding: 40px 0;
}

.hero-grid,
.page-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    gap: 28px;
    align-items: stretch;
}

.hero-copy,
.page-hero-inner,
.page-hero-grid,
.feature-band,
.product-layout,
.category-panel,
.product-card,
.empty-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-copy {
    padding: 56px;
}

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

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    font-size: clamp(38px, 5vw, 66px);
    line-height: 1.02;
    margin-bottom: 18px;
}

h2 {
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.08;
    margin-bottom: 14px;
}

h3 {
    font-size: 20px;
    line-height: 1.2;
    margin-bottom: 10px;
}

.hero-text,
.page-hero p,
.feature-band p,
.category-card p,
.category-panel p,
.product-card p,
.product-copy p,
.empty-panel p,
.site-footer p {
    color: var(--muted);
    line-height: 1.6;
}

.hero-actions,
.product-actions,
.section-heading,
.product-card-bottom,
.product-card-top,
.topbar-inner,
.feature-band,
.stats-inline,
.footer-grid,
.product-meta {
    display: flex;
}

.hero-actions,
.product-actions {
    gap: 12px;
    margin-top: 26px;
    flex-wrap: wrap;
}

.button {
    min-height: 48px;
    padding: 0 18px;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.button.primary {
    background: var(--accent);
    color: #fff;
}

.button.primary:hover {
    background: var(--accent-dark);
}

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

.hero-media,
.page-hero-media,
.category-panel-media,
.product-card-media,
.product-gallery-main {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: #e7ddd0;
}

.hero-media img,
.page-hero-media img,
.category-panel-media img,
.product-card-media img,
.product-gallery-main img {
    height: 100%;
    object-fit: cover;
}

.hero-media {
    min-height: 640px;
}

.hero-media.no-image,
.page-hero-media.no-image,
.category-panel-media.no-image,
.product-card-media.no-image,
.product-gallery-main.no-image {
    display: grid;
    place-items: center;
}

.placeholder-media {
    width: 100%;
    min-height: 100%;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #d8c7b6;
    color: #5b4531;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
}

.floating-card {
    position: absolute;
    right: 24px;
    bottom: 24px;
    width: min(320px, calc(100% - 48px));
    padding: 24px;
    border-radius: var(--radius);
    background: rgba(255, 253, 249, 0.92);
    border: 1px solid rgba(24, 21, 18, 0.08);
    backdrop-filter: blur(18px);
}

.floating-card h2 {
    font-size: 26px;
    margin-bottom: 10px;
}

.floating-label {
    display: inline-flex;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--muted);
}

.floating-card p {
    margin-bottom: 12px;
    color: var(--muted);
}

.floating-card a,
.text-link {
    font-weight: 700;
}

.section-heading {
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.category-grid,
.product-grid,
.footer-grid,
.product-layout,
.product-gallery-strip {
    display: grid;
    gap: 20px;
}

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

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

.category-card,
.category-panel-body,
.product-card-body,
.empty-panel,
.product-details {
    padding: 24px;
}

.category-card {
    min-height: 240px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.category-index {
    margin-bottom: auto;
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
}

.accent {
    background: #efe4d7;
}

.feature-band {
    padding: 28px 32px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.stats-inline {
    gap: 28px;
    flex-wrap: wrap;
}

.stats-inline div {
    min-width: 120px;
}

.stats-inline strong {
    display: block;
    font-size: 28px;
}

.stats-inline span {
    color: var(--muted);
    font-size: 13px;
}

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

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

.product-card {
    overflow: hidden;
}

.product-card-media {
    aspect-ratio: 4 / 5;
}

.product-card-top,
.product-card-bottom,
.product-meta {
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.product-card-top {
    margin-bottom: 14px;
}

.stock-chip.in-stock {
    color: #245d35;
    background: #e8f3ea;
}

.stock-chip.out-stock {
    color: #7c2d12;
    background: #fde7df;
}

.product-card h3 a {
    color: var(--ink);
}

.product-card-bottom {
    margin-top: 18px;
    align-items: end;
}

.product-card-bottom strong,
.price-block strong {
    display: block;
    font-size: 24px;
    margin-bottom: 4px;
}

.product-card-bottom span,
.price-block span,
.product-meta span {
    color: var(--muted);
    font-size: 13px;
}

.page-hero.slim .page-hero-inner,
.page-hero-grid {
    padding: 32px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 14px;
}

.page-hero-media {
    min-height: 360px;
}

.category-panel {
    overflow: hidden;
}

.category-panel-media {
    aspect-ratio: 16 / 10;
}

.product-page {
    padding-top: 28px;
}

.product-layout {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
    padding: 24px;
}

.product-gallery {
    display: grid;
    gap: 16px;
}

.product-gallery-main {
    aspect-ratio: 4 / 5;
}

.product-gallery-trigger,
.thumb,
.product-lightbox-close,
.product-lightbox-nav {
    appearance: none;
    border: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.product-gallery-trigger {
    width: 100%;
    height: 100%;
    padding: 0;
    background: transparent;
}

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

.thumb {
    padding: 0;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 1;
    border: 1px solid var(--line);
    background: #fff;
}

.thumb:hover,
.thumb.is-active {
    border-color: rgba(140, 90, 55, 0.65);
    box-shadow: 0 10px 20px rgba(24, 21, 18, 0.12);
}

.thumb.is-active {
    transform: translateY(-1px);
}

.price-block {
    margin: 22px 0;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.lead {
    font-size: 16px;
    color: var(--ink);
    line-height: 1.6;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 0;
}

.product-copy {
    margin-top: 28px;
}

.product-lightbox {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 24px;
}

.product-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.82);
    backdrop-filter: blur(8px);
}

.product-lightbox-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 1100px);
    display: grid;
    gap: 16px;
}

.product-lightbox-media {
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
}

.product-lightbox-media img {
    width: 100%;
    max-height: calc(100vh - 120px);
    object-fit: contain;
}

.product-lightbox-close,
.product-lightbox-nav {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    backdrop-filter: blur(14px);
}

.product-lightbox-close {
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    font-size: 28px;
    line-height: 1;
}

.product-lightbox-nav {
    top: 50%;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    font-size: 34px;
    transform: translateY(-50%);
}

.product-lightbox-nav.prev {
    left: 16px;
}

.product-lightbox-nav.next {
    right: 16px;
}

.product-lightbox-counter {
    justify-self: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(14px);
}

.shipping-box {
    margin-top: 28px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
}

.store-flash {
    margin: 0 auto;
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
}

.store-flash.success {
    background: #e8f3ea;
    color: #245d35;
}

.store-flash.error {
    background: #fde7df;
    color: #7c2d12;
}

.store-flash ul {
    margin: 0;
    padding-left: 18px;
}

.order-box {
    margin-top: 28px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
}

.order-box-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 18px;
}

.order-box-header h2 {
    font-size: 20px;
    margin-bottom: 0;
}

.order-box-header span {
    color: var(--muted);
    font-size: 13px;
}

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

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.form-field label {
    font-size: 13px;
    font-weight: 700;
}

.form-field input,
.form-field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    font: inherit;
    padding: 12px 14px;
}

.form-field textarea {
    resize: vertical;
    min-height: 104px;
}

.product-actions button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.shipping-box-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 16px;
}

.shipping-box-header h2 {
    font-size: 20px;
    margin-bottom: 0;
}

.shipping-box-header span,
.shipping-help,
.shipping-feedback,
.shipping-option span,
.shipping-results-header {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.shipping-form label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
}

.shipping-form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.shipping-form input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    font: inherit;
}

.shipping-help {
    margin: 12px 0 0;
}

.shipping-feedback {
    margin-top: 14px;
}

.shipping-feedback.loading {
    color: var(--ink);
}

.shipping-feedback.error {
    color: #9a3412;
}

.shipping-results {
    margin-top: 16px;
    display: grid;
    gap: 12px;
}

.shipping-results-header strong,
.shipping-option strong {
    display: block;
}

.shipping-option {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
}

.shipping-option-meta {
    text-align: right;
}

.empty-panel {
    text-align: center;
    padding: 52px 24px;
}

.site-footer {
    padding: 48px 0 64px;
    border-top: 1px solid var(--line);
    background: #f1e9df;
}

.footer-grid {
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 24px;
}

.site-footer h2,
.site-footer h3 {
    font-size: 18px;
    margin-bottom: 14px;
}

.site-footer a {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
}

.cart-layout,
.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.cart-table-wrap,
.summary-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th,
.cart-table td {
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.cart-table th {
    font-size: 13px;
    color: var(--muted);
}

.cart-product {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
}

.cart-product-image {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius);
    background: #e7ddd0;
}

.cart-product-image img {
    height: 100%;
    object-fit: cover;
}

.cart-qty-input {
    width: 92px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    font: inherit;
}

.summary-card {
    padding: 24px;
    position: sticky;
    top: 110px;
}

.summary-line,
.summary-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.summary-line {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.summary-line.total {
    font-size: 18px;
}

.summary-actions {
    margin-top: 24px;
    flex-direction: column;
    align-items: stretch;
}

.checkout-items {
    display: grid;
}

.summary-subline {
    margin-top: -8px;
    padding-bottom: 14px;
    color: var(--muted);
    font-size: 13px;
    border-bottom: 1px solid var(--line);
}

.payment-box {
    margin-top: 24px;
    display: grid;
    gap: 16px;
}

@media (max-width: 1100px) {
    .hero-grid,
    .page-hero-grid,
    .product-layout,
    .category-grid,
    .category-grid.large,
    .product-grid,
    .product-grid.compact,
    .cart-layout,
    .checkout-layout,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .header-row {
        grid-template-columns: 1fr;
        padding: 18px 0;
    }

    .header-search {
        order: 3;
    }

    .main-nav,
    .header-tools {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .hero,
    .section,
    .page-hero {
        padding: 24px 0;
    }

    .hero-grid,
    .page-hero-grid,
    .category-grid,
    .category-grid.large,
    .product-grid,
    .product-grid.compact,
    .footer-grid,
    .product-layout,
    .cart-layout,
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .hero-copy,
    .page-hero-inner,
    .page-hero-grid,
    .feature-band,
    .product-layout {
        padding: 24px;
    }

    .hero-media {
        min-height: 420px;
    }

    .page-hero-media,
    .category-panel-media,
    .product-card-media,
    .product-gallery-main {
        aspect-ratio: 4 / 5;
        min-height: auto;
    }

    .floating-card {
        position: static;
        width: auto;
        margin: 16px;
    }

    .topbar-inner,
    .section-heading,
    .feature-band,
    .product-card-bottom,
    .product-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-nav {
        gap: 14px;
    }

    .shipping-box-header,
    .shipping-option,
    .order-box-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .shipping-form-row,
    .order-form-grid {
        grid-template-columns: 1fr;
    }

    .product-gallery-strip {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }

    .product-lightbox {
        padding: 12px;
    }

    .product-lightbox-dialog {
        width: 100%;
    }

    .product-lightbox-media img {
        max-height: calc(100vh - 96px);
    }

    .product-lightbox-close {
        top: 12px;
        right: 12px;
    }

    .product-lightbox-nav {
        top: auto;
        bottom: 12px;
        transform: none;
    }

    .product-lightbox-nav.prev {
        left: 12px;
    }

    .product-lightbox-nav.next {
        right: 12px;
    }

    .shipping-option-meta {
        text-align: left;
    }

    .cart-table-wrap {
        overflow-x: auto;
    }

    .summary-card {
        position: static;
    }

    h1 {
        font-size: 40px;
    }

    h2 {
        font-size: 30px;
    }
}
