/* Shared Brand / Casa support. Elementor owns editable composition and design.
 * Order preserves generated content -> refinement -> tokens -> full-size structure
 * -> intro disclosure -> shared plate / viewport rules. Hero modes are permanent. */

/* Generated Brand content */
.wwts-brand-about .elementor-widget-theme-post-content p {
    margin: 0 0 1.15em;
}

.wwts-brand-about .elementor-widget-theme-post-content p:first-child::first-letter {
    float: left;
    margin: .06em .12em 0 0;
    font-family: var(--wwts-font-primary);
    font-size: 4.3em;
    font-weight: 500;
    line-height: .72;
    color: #9b8264;
}

.wwts-brand-history .elementor-widget-text-editor p {
    margin: 0 0 1.2em;
}

.wwts-brand-gallery {
    display: grid;
    width: 100%;
    margin: 0;
    gap: 18px;
}

.wwts-brand-gallery__item {
    min-width: 0;
    margin: 0;
    overflow: hidden;
}

.wwts-brand-gallery__item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 520ms cubic-bezier(.2, .7, .2, 1);
}

.wwts-brand-gallery__item:hover img {
    transform: scale(1.018);
}

.wwts-brand-gallery__item figcaption {
    position: relative;
    z-index: 2;
    margin-top: 11px;
    font-family: var(--wwts-font-text);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.wwts-brand-gallery--history {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wwts-brand-gallery--history .wwts-brand-gallery__item--wide {
    grid-column: 1 / -1;
}

.wwts-brand-gallery--history .wwts-brand-gallery__item--wide img {
    aspect-ratio: 16 / 9;
}

.wwts-brand-gallery--history .wwts-brand-gallery__item:not(.wwts-brand-gallery__item--wide) img {
    aspect-ratio: 4 / 5;
}

.wwts-brand-history .wwts-brand-gallery__item figcaption {
    color: rgba(248, 244, 235, .62);
}

.wwts-brand-collections__lead {
    max-width: 720px;
    margin: 0 0 56px;
    font-family: var(--wwts-font-text);
    font-size: 18px;
    line-height: 1.7;
}

.wwts-brand-gallery--collections {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.wwts-brand-gallery--collections .wwts-brand-gallery__item {
    grid-column: span 4;
}

.wwts-brand-gallery--collections .wwts-brand-gallery__item--hero,
.wwts-brand-gallery--collections .wwts-brand-gallery__item--wide {
    grid-column: span 8;
}

.wwts-brand-gallery--collections .wwts-brand-gallery__item--hero img,
.wwts-brand-gallery--collections .wwts-brand-gallery__item--wide img {
    aspect-ratio: 16 / 10;
}

.wwts-brand-gallery--collections .wwts-brand-gallery__item:not(.wwts-brand-gallery__item--hero):not(.wwts-brand-gallery__item--wide) img {
    aspect-ratio: 4 / 5;
}

@media (max-width: 1024px) {
.wwts-brand-gallery,
    .wwts-brand-gallery--collections {
        gap: 14px;
    }

.wwts-brand-gallery--collections .wwts-brand-gallery__item,
    .wwts-brand-gallery--collections .wwts-brand-gallery__item--hero,
    .wwts-brand-gallery--collections .wwts-brand-gallery__item--wide {
        grid-column: span 6;
    }
}

@media (max-width: 767px) {
.wwts-brand-gallery--history,
    .wwts-brand-gallery--collections {
        grid-template-columns: 1fr;
        gap: 12px;
    }

.wwts-brand-gallery--history .wwts-brand-gallery__item,
    .wwts-brand-gallery--history .wwts-brand-gallery__item--wide,
    .wwts-brand-gallery--collections .wwts-brand-gallery__item,
    .wwts-brand-gallery--collections .wwts-brand-gallery__item--hero,
    .wwts-brand-gallery--collections .wwts-brand-gallery__item--wide {
        grid-column: 1;
    }

.wwts-brand-gallery--history .wwts-brand-gallery__item img,
    .wwts-brand-gallery--collections .wwts-brand-gallery__item img {
        aspect-ratio: 4 / 5;
    }

.wwts-brand-collections__lead {
        margin-bottom: 38px;
        font-size: 16px;
    }
}

.elementor .brand-hero-section-inner {
    padding: 0!important;
}

.brand-hero-section-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-hero-section-caption {
    
}

/* Generated Collections refinement */
.wwts-brand-gallery--collections .wwts-brand-gallery__item {
    position: relative;
    isolation: isolate;
    background: #ede7dd;
}

.wwts-brand-gallery--collections .wwts-brand-gallery__item img {
    mix-blend-mode: multiply;
}

.wwts-brand-gallery--collections .wwts-brand-gallery__item figcaption {
    position: absolute;
    z-index: 3;
    left: 16px;
    bottom: 14px;
    margin: 0;
    padding: 7px 10px;
    background: rgba(247, 243, 236, .86);
    backdrop-filter: blur(8px);
    color: var(--wwts-brand-global-muted, #736b67);
}

@media (max-width: 767px) {
.wwts-brand-gallery--collections .wwts-brand-gallery__item figcaption {
        left: 10px;
        bottom: 10px;
        font-size: 10px;
    }
}

/* Elementor global-token bridge */
/*
 * Single Brand — generated-content bridge to Elementor Global Visual
 * ------------------------------------------------------------------
 * Native Elementor widgets/containers own their own colors, backgrounds,
 * typography, spacing and responsive settings in the active template.
 *
 * This bridge is intentionally limited to Single Brand generated markup that
 * cannot directly select Elementor Global Colors from the editor. Shared Rank
 * Math breadcrumb presentation lives in assets/css/wwts.css.
 */

:root {
    --wwts-brand-global-ink: var(--e-global-color-primary, #43342a);
    --wwts-brand-global-text: var(--e-global-color-text, #5a514c);
    --wwts-brand-global-muted: var(--e-global-color-85a8185, #736b67);
    --wwts-brand-global-light: var(--e-global-color-15b13b7, #fffcf8);
    --wwts-brand-global-cta: var(--e-global-color-b948fe3, #c9b99b);
    --wwts-brand-global-border: var(--e-global-color-078d7ca, #e7ded2);
}

.wwts-brand-gallery__item figcaption,
.wwts-brand-collections__lead {
    font-family: var(--wwts-font-text);
    color: var(--wwts-brand-global-muted);
}



/* Permanent full-size structure */
body.wwts-brand-hero-full-static {
    --wwts-brand-full-hero-inset: 50px;
    --wwts-brand-hero-image-max-height: 820px;
    /* Legacy panel: 50px outer inset + 70px content padding, shared below. */
    --wwts-brand-caption-content-inset: 70px;
}

.elementor :is(.brand-hero-section-inner, .brand-hero-plate-outer) {
    position: relative;
    padding: 0 !important;
    overflow: hidden;
}

.brand-hero-section-image,
.brand-hero-section-image .elementor-widget-container {
    width: 100%;
    height: 100%;
    min-height: 0;
}

.brand-hero-section-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/*
 * Keep oversized source media from dictating an excessively tall Hero.
 * The desktop grid is still caption-driven, but both the semantic media widget
 * and any direct Elementor wrapper around it are capped as one media surface.
 */
body.wwts-brand-hero-full-static .brand-hero-section-image,
body.wwts-brand-hero-full-static
:is(.brand-hero-section-inner, .brand-hero-plate-outer) > :has(.brand-hero-section-image) {
    max-height: var(--wwts-brand-hero-image-max-height, 820px) !important;
    overflow: hidden;
}

@media (min-width: 1025px) {
    /*
     * The full-size Hero is a two-row grid:
     * - row 1 keeps a guaranteed visible image reveal above the white panel;
     * - row 2 is sized by the real caption content (title/text/anchor buttons).
     *
     * The image spans both rows, so adding content to the caption grows the Hero
     * and its background image naturally instead of forcing a fixed/vh height.
     * Elementor may add an extra direct Container around the logical blocks, so
     * both semantic children and wrapper-aware :has() selectors are supported.
     */
    body.wwts-brand-hero-full-static :is(.brand-hero-section-inner, .brand-hero-plate-outer) {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: clamp(260px, 24vw, 330px) auto;
        min-height: 0 !important;
    }

    body.wwts-brand-hero-full-static
    :is(.brand-hero-section-inner, .brand-hero-plate-outer) > .brand-hero-section-image,
    body.wwts-brand-hero-full-static
    :is(.brand-hero-section-inner, .brand-hero-plate-outer) > :has(.brand-hero-section-image) {
        grid-column: 1;
        grid-row: 1 / -1;
        min-width: 0;
        min-height: 0;
    }

    body.wwts-brand-hero-full-static
    :is(.brand-hero-section-inner, .brand-hero-plate-outer) > .brand-hero-section-caption,
    body.wwts-brand-hero-full-static
    :is(.brand-hero-section-inner, .brand-hero-plate-outer) > :has(.brand-hero-section-caption) {
        grid-column: 1;
        grid-row: 2;
        min-width: 0;
    }

    /*
     * Do not force the full-size Hero to viewport height. On desktop the grid
     * owns the image height: reveal row + natural caption row. The image simply
     * stretches across that full area and crops with object-fit: cover.
     */
    body.wwts-brand-hero-full-static .brand-hero-section-image,
    body.wwts-brand-hero-full-static
    :is(.brand-hero-section-inner, .brand-hero-plate-outer) > :has(.brand-hero-section-image) {
        align-self: stretch;
        width: 100%;
        height: 100% !important;
        max-height: var(--wwts-brand-hero-image-max-height, 820px) !important;
        min-height: 0 !important;
        overflow: hidden;
    }

    body.wwts-brand-hero-full-static
    :is(.brand-hero-section-inner, .brand-hero-plate-outer) > .brand-hero-section-caption,
    body.wwts-brand-hero-full-static
    :is(.brand-hero-section-inner, .brand-hero-plate-outer) > :has(.brand-hero-section-caption) {
        align-self: end;
        width: 100%;
        height: auto !important;
        min-height: 0 !important;
        z-index: 2;
    }

    body.wwts-brand-hero-full-static .brand-hero-section-caption {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        align-self: end;
        justify-self: stretch;
        z-index: 2;
        width: auto !important;
        max-width: none !important;
        margin-left: var(--wwts-brand-full-hero-inset, 50px);
        margin-right: var(--wwts-brand-full-hero-inset, 50px);
    }

    /*
     * With no main image there is nothing to overlap. Keep the Hero natural-height
     * and leave one design inset above the white caption.
     */
    body.wwts-brand-hero-full-static.wwts-brand-hero-no-image
    :is(.brand-hero-section-inner, .brand-hero-plate-outer) {
        grid-template-rows: auto;
        height: auto !important;
        max-height: none !important;
        padding-top: var(--wwts-brand-full-hero-inset, 50px) !important;
    }

    body.wwts-brand-hero-full-static.wwts-brand-hero-no-image
    :is(.brand-hero-section-inner, .brand-hero-plate-outer) > .brand-hero-section-image,
    body.wwts-brand-hero-full-static.wwts-brand-hero-no-image
    :is(.brand-hero-section-inner, .brand-hero-plate-outer) > :has(.brand-hero-section-image) {
        display: none !important;
    }

    body.wwts-brand-hero-full-static.wwts-brand-hero-no-image
    :is(.brand-hero-section-inner, .brand-hero-plate-outer) > .brand-hero-section-caption,
    body.wwts-brand-hero-full-static.wwts-brand-hero-no-image
    :is(.brand-hero-section-inner, .brand-hero-plate-outer) > :has(.brand-hero-section-caption) {
        grid-row: 1;
    }

    /* Legacy caption and following sections share one CSS content rail.
     * Current plate templates retain their Elementor-owned section insets. */
    body.wwts-brand-hero-full-static
    .elementor-location-single:has(.brand-hero-section-caption) .wwts-section .wwts-inner:where(
        :not(.brand-hero-section-inner, .brand-hero-plate-outer,
             .brand-hero-section-inner *, .brand-hero-plate-outer *)
    ):where(:not(:has(.brand-hero-section-inner, .brand-hero-plate-outer))) {
        width: 100%;
        max-width: var(--wwts-shell-max-width, 100%) !important;
        box-sizing: border-box;
        padding-left: calc(var(--wwts-brand-full-hero-inset) + var(--wwts-brand-caption-content-inset)) !important;
        padding-right: calc(var(--wwts-brand-full-hero-inset) + var(--wwts-brand-caption-content-inset)) !important;
    }
}

@media (max-width: 1279px) {
    body.wwts-brand-hero-full-static {
        --wwts-brand-hero-image-max-height: 760px;
    }
}

@media (max-width: 1024px) {
    body.wwts-brand-hero-full-static {
        --wwts-brand-full-hero-inset: 20px;
        --wwts-brand-hero-image-max-height: 600px;
    }

    /* Tablet/mobile keep the existing stacked Elementor composition. */
    body.wwts-brand-hero-full-static :is(.brand-hero-section-inner, .brand-hero-plate-outer) {
        height: auto !important;
        max-height: none !important;
    }
}

@media (max-width: 767px) {
    body.wwts-brand-hero-full-static {
        --wwts-brand-hero-image-max-height: 550px;
    }
}

@media (max-width: 479px) {
    body.wwts-brand-hero-full-static {
        --wwts-brand-hero-image-max-height: 500px;
    }
}



/* Shared intro disclosure */
/*
 * Single Brand — Hero intro disclosure
 * ------------------------------------
 * The complete post_content remains the canonical Brand intro. This component
 * only constrains the rendered Hero excerpt and reveals it on demand.
 */

.wwts-brand-hero-intro {
    --wwts-brand-hero-intro-lines: 5;
}

.wwts-brand-hero-intro__text {
    margin-bottom: 0;
}

.wwts-brand-hero-intro__text.is-collapsed {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--wwts-brand-hero-intro-lines);
}

.wwts-brand-hero-intro__toggle {
    all: unset;
    appearance: none !important;
    -webkit-appearance: none !important;
    display: inline !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 10px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    background-image: none !important;
    box-shadow: none !important;
    color: var(--wwts-brand-global-text, #5a514c) !important;
    font: inherit !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.25 !important;
    letter-spacing: 0.01em !important;
    text-decoration: underline !important;
    text-decoration-thickness: 1px !important;
    text-underline-offset: 3px !important;
    cursor: pointer;
    transition: opacity 160ms ease;
}

.wwts-brand-hero-intro__toggle::before,
.wwts-brand-hero-intro__toggle::after {
    content: none !important;
    display: none !important;
}

.wwts-brand-hero-intro__toggle:hover {
    opacity: 0.65;
}

.wwts-brand-hero-intro__toggle:focus-visible {
    outline: 2px solid #c9a963;
    outline-offset: 4px;
}

.wwts-brand-hero-intro__toggle[hidden] {
    display: none !important;
}

@media (max-width: 767px) {
    .wwts-brand-hero-intro__toggle {
        margin-top: 8px !important;
        font-size: 13px !important;
    }
}



/* Shared plate and viewport cap */
/* Shared Brand / Casa full-size Hero structure. */
@media screen and (min-width: 1025px) { 
.brand-hero-plate-outer {
    position: relative;
    min-height: 75vh!important;
}
.brand-hero-plate {
    position: absolute!important;
    bottom: 0;
    left: 0;
    width: 100%;
}
}

/* Without an image, the current plate participates in normal flow. */
@media (min-width: 1025px) {
    body.wwts-brand-hero-full-static.wwts-brand-hero-no-image .brand-hero-plate {
        position: relative !important;
    }
}

/* The initial server class activates the same cap on legacy and current roots. */
body.wwts-brand-hero-full-static :is(.brand-hero-section-inner, .brand-hero-plate-outer),
body.wwts-brand-hero-full-static.wwts-brand-hero-no-image :is(.brand-hero-section-inner, .brand-hero-plate-outer) {
    box-sizing: border-box;
    max-height: 100vh !important;
    overflow: hidden;
}
@media (max-width: 1024px) {
    body.wwts-brand-hero-full-static :is(.brand-hero-section-inner, .brand-hero-plate-outer) {
        overflow-y: auto;
    }
}
body.wwts-brand-hero-full-static.wwts-brand-hero-no-image :is(.brand-hero-section-inner, .brand-hero-plate-outer) {
    overflow-y: auto;
}
