/* Public shop pages share the landing page's olive and linen palette. */
body.public-theme {
    --bg: #faf8f3;
    --text: #30251d;
    --accent: #344638;
    --accent-dark: #344638;
    --accent-soft: #eae2d4;
    --card-bg: #fffdf8;
    --card-soft: #eae2d4;
    --border-subtle: #ddd3c4;
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.public-theme :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.public-theme .page-shell > header,
.public-theme > header {
    padding: clamp(22px, 4vw, 40px) clamp(16px, 4vw, 48px) 14px;
    border-bottom: 3px solid #b48a5a;
    background: #e8e7df;
    color: #343d34;
    box-shadow: none;
    text-align: left;
}

.public-theme > header {
    padding-inline: max(16px, calc((100% - 72rem) / 2));
}

.public-theme .page-shell > header::before,
.public-theme .page-shell > header h1::before {
    content: none;
}

.public-theme header h1 {
    width: fit-content;
    height: auto;
    margin: 0;
    padding-inline-start: .9rem;
    border-inline-start: 2px solid #cba674;
    color: #343d34;
    font: 520 clamp(1.5rem, 3.8vw, 2.8rem)/1.1 system-ui, sans-serif;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.public-theme header .subtitle {
    margin: .75rem 0 0;
    color: #5b6157;
    font-size: 1rem;
    opacity: 1;
}

.public-theme header .badge {
    color: #404a40;
    background: #f3f1ea;
    border: 1px solid #d3d1c5;
}

.public-theme header nav,
.public-theme nav.main-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: .3rem .55rem;
    margin-top: 1rem;
    padding-top: .55rem;
    border: 0;
    border-top: 1px solid #d1d1c5;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.public-theme header nav a,
.public-theme nav.main-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: .4rem .75rem;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #343d34;
    font-size: .95rem;
    letter-spacing: normal;
    text-decoration: none;
    text-transform: none;
}

.public-theme header nav a:hover,
.public-theme header nav a.nav-active,
.public-theme nav.main-nav a.active {
    background: #d4d8ce;
    color: #26372c;
    box-shadow: none;
    transform: none;
}

.public-theme header a:focus-visible {
    outline-color: #546353;
}

.public-theme .container {
    max-width: 76rem;
    margin-block: clamp(1rem, 4vw, 3rem);
}

.public-theme .page-intro,
.public-theme .checkout-subtitle,
.public-theme .summary-note {
    max-width: 62ch;
    color: #67574b;
    line-height: 1.55;
}

.public-theme main h2,
.public-theme .checkout-form-card h1 {
    color: var(--accent);
    font-family: system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: -.035em;
    text-transform: none;
}

.public-theme .product-card,
.public-theme .product-detail,
.public-theme .cart,
.public-theme .public-content,
.public-theme .checkout-form-card,
.public-theme .checkout-summary-card {
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    background: var(--card-bg);
    box-shadow: 0 8px 22px rgba(62, 40, 25, .06);
}

.public-theme .product-card:hover {
    background: var(--card-bg);
    transform: none;
}

.public-theme .product-body h3 {
    font-family: system-ui, sans-serif;
    font-weight: 650;
    letter-spacing: -.02em;
}

.public-theme .product-features span,
.public-theme .cart .contact-box {
    background: var(--card-soft);
    border-color: var(--border-subtle);
}

.public-theme .search-input,
.public-theme .product-actions input[type="number"],
.public-theme .checkout-page input,
.public-theme .checkout-page textarea {
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    background: var(--card-bg);
    color: var(--text);
}

.public-theme .search-button,
.public-theme .product-actions > button,
.public-theme .cart .contact-box button,
.public-theme .checkout-page .checkout-primary-btn,
.public-theme .public-content .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    background: var(--accent);
    color: #fffdf8;
    box-shadow: none;
    letter-spacing: normal;
    text-decoration: none;
    text-transform: none;
}

.public-theme .product-actions .btn-secondary-link,
.public-theme .public-content .btn-secondary,
.public-theme .cart-jump {
    min-height: 44px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    background: transparent;
    color: var(--accent);
    letter-spacing: normal;
    text-transform: none;
}

.public-theme .cart .contact-box button,
.public-theme .checkout-page .checkout-primary-btn {
    width: 100%;
}

.public-theme .checkout-progress .step.active {
    background: var(--accent);
    color: #fffdf8;
}

.public-theme .checkout-progress .step.done {
    background: var(--card-soft);
    color: var(--accent);
}

.public-theme footer {
    border-top: 1px solid var(--border-subtle);
    background: var(--bg);
    color: #67574b;
}

@media (min-width: 821px) {
    .public-theme .public-content {
        margin-inline: auto;
        padding: clamp(24px, 4vw, 48px);
    }

    .public-theme .product-detail .product-body { padding: 20px; }

    .public-theme .products {
        gap: 14px;
        border-top: 0;
    }
}

@media (min-width: 821px) {
    .public-theme .catalog-layout .product-card {
        flex-direction: column;
        overflow: hidden;
    }

    .public-theme .catalog-layout .product-card > .product-image {
        flex: 0 0 auto;
        width: 100%;
        max-width: none;
        border: 0;
    }

    .public-theme .catalog-layout .product-image > a { display: block; }

    .public-theme .catalog-layout .product-image img {
        width: 100%;
        max-width: none;
        height: auto;
        border: 0;
    }

    .public-theme .catalog-layout .product-image::after { content: none; }
    .public-theme .catalog-layout .product-actions { margin-top: auto; }
}

@media (min-width: 1120px) {
    .public-theme .catalog-layout .products {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

@media (max-width: 820px) {
    .public-theme .product-actions > button,
    .public-theme .product-actions .btn-secondary-link,
    .public-theme .cart .contact-box button,
    .public-theme .checkout-page .checkout-primary-btn {
        min-height: 48px;
    }
}

/* Layered light and soft depth across the public shop. */
body.public-theme {
    background:
        radial-gradient(ellipse at 12% 12%, #e9e8de 0%, transparent 38rem),
        linear-gradient(145deg, #faf8f3 32%, #f1ece2 100%);
}

.public-theme .page-shell > header,
.public-theme > header {
    background:
        radial-gradient(ellipse at 15% 0%, rgba(255, 253, 245, .9), transparent 62%),
        linear-gradient(112deg, #e9e6dc, #d8ddd2 72%, #cdd5c8);
    border-bottom: 1px solid #c5c9bc;
    box-shadow: 0 12px 28px rgba(52, 70, 56, .09);
}

.public-theme header h1 { text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }

.public-theme header nav,
.public-theme nav.main-nav {
    width: fit-content;
    max-width: 100%;
    padding: .35rem;
    border: 1px solid rgba(255, 255, 255, .68);
    border-radius: 6px;
    background: rgba(250, 248, 243, .7);
    box-shadow: 0 5px 16px rgba(52, 70, 56, .1);
}

.public-theme header nav a:hover,
.public-theme header nav a.nav-active,
.public-theme nav.main-nav a.active {
    background: linear-gradient(155deg, #f5f5ed, #d7dfd2);
    box-shadow: 0 2px 6px rgba(52, 70, 56, .14);
}

.public-theme .product-card,
.public-theme .product-card:hover,
.public-theme .product-detail,
.public-theme .cart,
.public-theme .public-content,
.public-theme .checkout-form-card,
.public-theme .checkout-summary-card {
    background: linear-gradient(160deg, #fffdf8 34%, #f4eee4);
    box-shadow:
        0 1px 2px rgba(62, 40, 25, .06),
        0 12px 30px rgba(62, 40, 25, .09);
}

.public-theme .cart .contact-box {
    background: linear-gradient(150deg, #f5f0e6, #e8e4d7);
}

.public-theme .search-button,
.public-theme .product-actions > button,
.public-theme .cart .contact-box button,
.public-theme .checkout-page .checkout-primary-btn {
    background: linear-gradient(150deg, #506452, #344638 80%);
    box-shadow: 0 3px 8px rgba(52, 70, 56, .17);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .public-theme .catalog-layout .product-card {
        transition: transform 180ms ease, box-shadow 180ms ease;
    }

    .public-theme .catalog-layout .product-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 16px 34px rgba(62, 40, 25, .15);
    }
}

/* Charcoal, caramel and warm neutrals inspired by the reference. */
body.public-theme {
    --bg: #f8f5f0;
    --text: #282726;
    --accent: #594032;
    --accent-dark: #594032;
    --accent-soft: #e8d8c9;
    --card-bg: #fffcf8;
    --card-soft: #efe5da;
    --border-subtle: #ded2c6;
    background: linear-gradient(140deg, #faf8f4 35%, #eee4d9);
}

.public-theme .page-shell > header,
.public-theme > header {
    background: radial-gradient(ellipse at 75% 0%, #424548, transparent 65%),
                linear-gradient(120deg, #222527, #303234);
    border-bottom: 2px solid #ae8466;
    color: #fbf4eb;
}

.public-theme header h1 {
    color: #fbf4eb;
    border-color: #c9a68a;
    text-shadow: none;
}

.public-theme header .subtitle { color: #e3d4c7; }

.public-theme header .badge {
    color: #fbf4eb;
    background: #393839;
    border-color: #73645a;
}

.public-theme header nav,
.public-theme nav.main-nav {
    background: rgba(24, 24, 25, .35);
    border-color: #6e6055;
    box-shadow: none;
}

.public-theme header nav a,
.public-theme nav.main-nav a { color: #fbf4eb; }

.public-theme header nav a:hover,
.public-theme header nav a.nav-active,
.public-theme nav.main-nav a.active {
    color: #292422;
    background: linear-gradient(150deg, #e9d5c4, #c5a187);
}

.public-theme header a:focus-visible { outline-color: #e9d5c4; }

.public-theme .search-button,
.public-theme .product-actions > button,
.public-theme .cart .contact-box button,
.public-theme .checkout-page .checkout-primary-btn {
    background: linear-gradient(150deg, #75543f, #594032 82%);
}

@media (min-width: 821px) {
    .public-theme .catalog-layout .products {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .public-theme .catalog-layout .product-card {
        flex-direction: row;
        align-items: center;
    }

    .public-theme .catalog-layout .product-card > .product-image {
        flex: 0 0 36%;
        width: 36%;
        align-self: flex-start;
    }

    .public-theme .catalog-layout .product-body { min-width: 0; }
}

@media (hover: hover) {
    .public-theme .catalog-layout .product-card:hover { transform: none; }
}

/* Subtle surface texture, separate from the product media. */
.public-theme .page-shell > header,
.public-theme > header {
    background-image:
        url("../img/surface-grain.svg"),
        radial-gradient(ellipse at 75% 0%, #424548, transparent 65%),
        linear-gradient(120deg, #222527, #303234);
    background-blend-mode: soft-light, normal, normal;
}

.public-theme .cart .contact-box,
.public-theme .checkout-summary-card {
    background-image:
        repeating-linear-gradient(103deg, transparent 0 3px, rgba(89, 64, 50, .024) 4px, transparent 5px 8px),
        linear-gradient(150deg, #f8f3e9, #eae2d6);
}

/* Muted cool surfaces and warm clay accents. */
body.public-theme {
    --bg: #f7f5f0;
    --text: #303738;
    --accent: #644c40;
    --accent-dark: #644c40;
    --accent-soft: #eaded5;
    --card-bg: #fdfbf7;
    --card-soft: #efe8e0;
    --border-subtle: #dcd5ca;
    background: linear-gradient(145deg, #faf8f4, #eeeae4 68%, #e7e9e8);
}

.public-theme .page-shell > header,
.public-theme > header {
    background-image:
        url("../img/surface-grain.svg"),
        radial-gradient(ellipse at 78% 0%, #526066, transparent 68%),
        linear-gradient(115deg, #323c42, #465157);
    border-bottom-color: #a98572;
}

.public-theme header nav,
.public-theme nav.main-nav {
    background: rgba(29, 38, 43, .32);
    border-color: rgba(241, 227, 214, .28);
}

.public-theme header nav a:hover,
.public-theme header nav a.nav-active,
.public-theme nav.main-nav a.active {
    color: #302923;
    background: linear-gradient(150deg, #e2cfc3, #c8aa99);
}

.public-theme .product-card,
.public-theme .product-card:hover,
.public-theme .product-detail,
.public-theme .cart {
    background: linear-gradient(160deg, #fdfbf7, #f0ebe5);
}

.public-theme .search-button,
.public-theme .product-actions > button,
.public-theme .cart .contact-box button,
.public-theme .checkout-page .checkout-primary-btn {
    background: linear-gradient(145deg, #765b4d, #644c40);
}

/* Keep the public header quiet and give the content the visual depth. */
.public-theme .page-shell > header,
.public-theme > header {
    padding-block: 12px 8px;
    border-bottom: 1px solid #d9d5cc;
    background:
        url("../img/surface-grain.svg"),
        linear-gradient(100deg, rgba(250, 248, 243, .94) 0%, rgba(250, 248, 243, .90) 42%, rgba(245, 241, 235, .79) 70%, rgba(235, 237, 233, .86) 100%),
        url("../img/wohnzimmer-banner-lit.webp?v=render2-20261121");
    background-size: auto, 100% 100%, cover;
    background-position: center, center, center 51%;
    background-repeat: repeat, no-repeat, no-repeat;
    background-blend-mode: soft-light, normal, normal;
    color: #343e43;
    box-shadow: 0 4px 14px rgba(43, 53, 57, .05);
}

.public-theme header h1 {
    padding-inline-start: .65rem;
    border-color: #a98572;
    color: #343e43;
    font-size: clamp(1.1rem, 2.1vw, 1.55rem);
}

.public-theme header .subtitle {
    max-width: none;
    margin-top: .4rem;
    color: #585d5c;
    font-size: .875rem;
}

.public-theme header .badge {
    border-color: #d9d5cc;
    background: #f8f6f0;
    color: #48504f;
}

.public-theme header nav,
.public-theme nav.main-nav {
    gap: .15rem .35rem;
    margin-top: .4rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.public-theme header nav a,
.public-theme nav.main-nav a {
    color: #343e43;
}

.public-theme header nav a:hover,
.public-theme header nav a.nav-active,
.public-theme nav.main-nav a.active {
    background: #e7dcd3;
    color: #443830;
    box-shadow: inset 0 -2px #a98572;
}

.public-theme header a:focus-visible { outline-color: #644c40; }

/* Enhance only the shop navigation; the landing page keeps its own header. */
.public-theme .shop-header-sticky {
    position: sticky;
    top: calc(-1 * var(--shop-header-offset, 0px));
    z-index: 30;
    flex-shrink: 0;
    overflow: visible;
}

.public-theme [id] {
    scroll-margin-top: calc(var(--shop-sticky-inset, 0px) + 16px);
}

.public-theme .shop-menu-toggle { display: none; }

@media (min-width: 821px) {
    .public-theme .cart { top: calc(var(--shop-sticky-inset, 0px) + 16px); }
}

@media (max-width: 820px) {
    .public-theme .shop-navigation { position: relative; margin-top: .75rem; }

    .public-theme .shop-navigation.is-enhanced .shop-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: .55rem;
        min-height: 46px;
        padding: .6rem .2rem;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #343e43;
        box-shadow: none;
        font: inherit;
        font-size: .875rem;
        text-transform: none;
        letter-spacing: .02em;
        cursor: pointer;
    }

    .public-theme .shop-menu-icon {
        display: grid;
        gap: 4px;
        width: 18px;
    }

    .public-theme .shop-menu-icon span {
        height: 1px;
        background: currentColor;
    }

    .public-theme .shop-navigation.is-enhanced:not(.is-open) > nav { display: none; }

    .public-theme .shop-navigation.is-enhanced > nav {
        position: absolute;
        inset: 100% 0 auto;
        z-index: 1;
        max-height: var(--shop-menu-space, calc(100dvh - 5rem));
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .public-theme .shop-navigation > nav {
        box-sizing: border-box;
        width: 100%;
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: .15rem;
        margin-top: .6rem;
        padding: .4rem;
        border: 1px solid #ded5cb;
        border-radius: 6px;
        background: #faf8f3;
        box-shadow: 0 6px 14px rgba(52, 62, 67, .06);
    }

    .public-theme .shop-navigation > nav a {
        flex-shrink: 0;
        justify-content: flex-start;
        min-height: 46px;
        padding-inline: .85rem;
    }
}

.public-theme .container {
    margin-block: clamp(1.25rem, 3.6vw, 3rem);
}

.public-theme .catalog-layout main > h2,
.public-theme .layout main > h2 {
    margin-bottom: .5rem;
    color: #343e43;
    font-size: clamp(1.65rem, 3vw, 2.6rem);
}

.public-theme .catalog-layout .products { gap: 18px; }

.public-theme .catalog-layout .product-card,
.public-theme .catalog-layout .product-card:hover,
.public-theme .product-detail {
    background: linear-gradient(145deg, #e4e7e6 0%, #eee6de 80%);
    box-shadow: 0 8px 22px rgba(52, 62, 67, .08);
}

.public-theme .catalog-layout .product-body,
.public-theme .product-detail .product-body {
    align-self: stretch;
    min-width: 0;
    margin: 10px;
    padding: clamp(14px, 2vw, 24px);
    border: 1px solid #e7dfd5;
    border-top: 2px solid #b29280;
    background: linear-gradient(155deg, #fdfbf7 35%, #f4efe8);
    box-shadow: 0 5px 14px rgba(52, 62, 67, .08);
}

.public-theme .cart,
.public-theme .checkout-summary-card,
.public-theme .public-content {
    border-top: 2px solid #a98572;
    box-shadow:
        0 3px 0 #e3d9d0,
        0 11px 26px rgba(52, 62, 67, .09);
}

@media (min-width: 821px) {
    .public-theme .catalog-layout .product-body { margin-inline-start: 0; }
}

@media (max-width: 820px) {
    .public-theme header .header-topline { gap: .4rem .75rem; }
    .public-theme header nav a,
    .public-theme nav.main-nav a { padding-inline: .5rem; }
}

/* Small, low-saturation accents on public shop pages. */
.public-theme .product-header .price,
.public-theme .page-intro .product-price,
.public-theme .cart-total span#cart-total {
    color: #465d67;
}

.public-theme .product-features span {
    background: #f1e8e0;
    border-color: #e4d5c9;
    color: #5b4940;
}

.public-theme .cart .cart-total,
.public-theme .checkout-summary-card .summary-total {
    padding: .65rem .75rem;
    border-color: #d6ddde;
    background: #e9edec;
    color: #394f58;
}

/* The detail gallery follows each photo's proportions. */
.public-theme .product-detail .product-media { min-width: 0; }

.public-theme .product-detail .slider-main { aspect-ratio: auto; }

.public-theme .product-detail .slider-main img {
    width: 100%;
    height: auto;
    max-height: none;
}

.public-theme .product-detail .slider-main:hover img { transform: none; }

.public-theme .product-detail .slider-thumbs { align-items: flex-start; }

.public-theme .product-detail .slider-thumbs button {
    flex: 0 0 clamp(58px, 18%, 100px);
    aspect-ratio: 1;
    min-width: 0;
    padding: 3px;
    border-radius: 6px;
    background: #ece7e0;
}

.public-theme .product-detail .slider-thumbs button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.public-theme .product-detail .slider-thumbs button:is(.is-active, :hover) {
    transform: none;
    box-shadow: inset 0 0 0 2px #a98572;
}

/* Bound the active lightbox by both viewport dimensions. */
.public-theme #lightbox-overlay {
    box-sizing: border-box;
    padding: 56px clamp(46px, 7vw, 86px);
}

.public-theme #lightbox-overlay .lightbox-inner {
    width: min(100%, 1200px);
    height: 100%;
    min-width: 0;
    min-height: 0;
    max-width: none;
    max-height: none;
    padding: 0;
}

.public-theme #lightbox-overlay #lightbox-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
    box-shadow: none;
}

.public-theme #lightbox-overlay .lightbox-prev { left: -44px; }
.public-theme #lightbox-overlay .lightbox-next { right: -44px; }

.public-theme #lightbox-overlay .lightbox-close {
    top: -48px;
    right: 0;
}

.public-theme #lightbox-overlay :is(.lightbox-nav, .lightbox-close) {
    z-index: 1;
    width: 44px;
    height: 44px;
    padding: 0;
}

