/* A single cellar photograph continues from the inner title band into white paper. */
body.ml-cellar-page {
    --ml-cellar-hero-height: 190px;
    --ml-cellar-header-height: 76px;
    --ml-cellar-image-height: clamp(780px, 63vw, 1120px);
    --ml-cellar-ink: #211b17;
    --ml-cellar-gold: #71531e;
    --ml-cellar-product-paper: rgba(255,255,255,.88);
    --ml-cellar-product-photo: rgba(235,232,226,.90);
    background: #fff !important;
}

.ml-cellar-page #content {
    position: relative;
    isolation: isolate;
    background: #fff;
}

.ml-cellar-scene {
    position: absolute;
    inset: calc(-1 * var(--ml-cellar-header-height)) 0 auto;
    height: min(calc(100% + var(--ml-cellar-header-height)), calc(var(--ml-cellar-image-height) + var(--ml-cellar-header-height)));
    overflow: clip;
    pointer-events: none;
    z-index: -1;
}

.ml-cellar-page .ml-cellar-scene .ml-cellar-image {
    position: absolute;
    top: -24px;
    left: -12px;
    width: calc(100% + 24px) !important;
    height: calc(var(--ml-cellar-image-height) + var(--ml-cellar-header-height) + 48px) !important;
    max-width: none !important;
    object-fit: cover;
    object-position: 50% 0;
}

.ml-cellar-scene::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 55%, #fff 100%);
}

.ml-cellar-scene.is-moving .ml-cellar-image { will-change: transform; }

/* Shared dimensions and type across Products, About and Contact. */
body.ml-cellar-page #content > :is(.ml-inner-hero, .ml-editorial-intro) {
    box-sizing: border-box;
    display: flex !important;
    align-items: flex-end !important;
    height: var(--ml-cellar-hero-height) !important;
    min-height: var(--ml-cellar-hero-height) !important;
    padding: 26px 0 !important;
    margin: 0 !important;
    border: 0;
    background: linear-gradient(90deg, rgba(0,0,0,.62), rgba(0,0,0,.25)) !important;
    color: #fff;
}

.ml-cellar-page #content > :is(.ml-inner-hero, .ml-editorial-intro) > .ml-wrap {
    width: 100% !important;
}

body.ml-cellar-page #content > :is(.ml-inner-hero, .ml-editorial-intro) :is(h1, .ml-inner-title) {
    color: #fff !important;
    font: 400 clamp(32px, 3.5vw, 46px)/1.12 var(--ml-font-display, Georgia, serif) !important;
    letter-spacing: -.025em;
    margin: 0 !important;
    max-width: 20ch !important;
}

.ml-inner-hero a.ml-inner-title {
    display: inline-block;
    text-decoration: none;
}

.ml-inner-hero a.ml-inner-title:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: .12em;
}

.ml-inner-hero a.ml-inner-title:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 6px;
}

.ml-cellar-page #content > :is(.ml-inner-hero, .ml-editorial-intro) p { display: none; }

/* Keep the catalogue introduction with its title, including when text wraps. */
body.ml-cellar-page #content > .ml-inner-hero.ml-shop-hero {
    height: auto !important;
}

body.ml-cellar-page #content > .ml-shop-hero .ml-shop-hero-lead {
    display: block !important;
    max-width: 68ch !important;
    margin: 10px 0 0 !important;
    color: #f4f1e9 !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
}

/* Change surface transparency, never the opacity of text or product images. */
body.ml-cellar-page #content > :is(.ml-page, .ml-editorial, .ml-not-found) {
    background: linear-gradient(to bottom, rgba(255,255,255,.84), rgba(255,255,255,.90) 240px, rgba(255,255,255,.98) 580px, #fff 880px) !important;
}

.ml-cellar-page .ml-product-path { background: rgba(255,255,255,.94); }

body.ml-cellar-page :is(.ml-editorial-label, .ml-shop-filter-group h3) {
    color: var(--ml-cellar-gold) !important;
}

body.ml-cellar-page.woocommerce ul.products li.product {
    background: var(--ml-cellar-product-paper) !important;
}

body.ml-cellar-page.woocommerce ul.products li.product::before {
    background: var(--ml-cellar-product-photo) !important;
}

/* The detail gallery uses the same two flat surfaces as a catalog photograph. */
body.ml-cellar-page.single-product.woocommerce #content div.product div.images {
    background: linear-gradient(var(--ml-cellar-product-photo), var(--ml-cellar-product-photo)), var(--ml-cellar-product-paper) !important;
    border-color: rgba(143,98,29,.15) !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}

body.ml-cellar-page.single-product.woocommerce #content div.product div.images img {
    filter: drop-shadow(0 28px 26px rgba(23,18,17,.26)) drop-shadow(0 0 14px rgba(255,238,200,.05)) !important;
}

@media (max-width: 980px) {
    body.ml-cellar-page { --ml-cellar-image-height: 860px; }
    .ml-cellar-page .ml-cellar-scene .ml-cellar-image { object-position: 38% 0; }
}

@media (max-width: 720px) {
    body.ml-cellar-page { --ml-cellar-hero-height: 164px; --ml-cellar-header-height: 60px; --ml-cellar-image-height: 730px; }
    .ml-cellar-page .ml-cellar-scene .ml-cellar-image { object-position: 28% 0; }
    body.ml-cellar-page #content > :is(.ml-inner-hero, .ml-editorial-intro) { padding: 22px 0 !important; }
    body.ml-cellar-page #content > :is(.ml-inner-hero, .ml-editorial-intro) :is(h1, .ml-inner-title) { font-size: clamp(28px, 7.5vw, 34px) !important; }
    body.ml-cellar-page #content > :is(.ml-page, .ml-editorial, .ml-not-found) {
        background: linear-gradient(to bottom, rgba(255,255,255,.90), rgba(255,255,255,.96) 280px, #fff 560px) !important;
    }
}

@media (prefers-reduced-motion: reduce), (hover: none), (pointer: coarse), (max-width: 980px) {
    .ml-cellar-image { transform: none !important; }
}
