/**
 * Research-driven layout (layout_variant=research_v1).
 * Overrides production index.php markup — not a standalone page.
 */
.emp-layout-research-v1 {
    --rv-header-h: 56px;
    --rv-chip-h: 44px;
    background: linear-gradient(180deg, #1a1209 0%, var(--empire-warm) 120px, var(--empire-cream) 280px);
}

/* Hero flush to top on mobile (header slides in after scroll); desktop keeps header clearance. */
body.emp-layout-research-v1 {
    padding-top: 0;
}

@media (min-width: 768px) {
    body.emp-layout-research-v1 {
        padding-top: calc(var(--rv-header-h) + 0.5rem);
    }
}

.emp-layout-research-v1 .emp-dev-banner {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(250, 246, 239, 0.85);
    background: rgba(26, 18, 9, 0.92);
    padding: 0.35rem 0.5rem;
    margin: 0;
    border-bottom: 1px solid rgba(201, 162, 39, 0.35);
}

.emp-layout-research-v1 .emp-site-header {
    height: var(--rv-header-h);
    background: rgba(26, 18, 9, 0.94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(201, 162, 39, 0.3);
}

.emp-layout-research-v1 .emp-site-header-inner {
    max-width: 1100px;
}

.emp-layout-research-v1 .emp-header-brand-text {
    font-family: 'DM Serif Display', serif;
    font-size: 1.05rem;
    color: var(--empire-cream);
    /* Hero owns the brand at the top; collapse the header wordmark to avoid duplicate title info. */
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.3s ease, opacity 0.25s ease;
}

/* Once the hero scrolls out of view, fade the wordmark back into the header (>=768px only). */
@media (min-width: 768px) {
    .emp-layout-research-v1.emp-rv-scrolled .emp-header-brand-text {
        max-width: 16rem;
        opacity: 1;
    }
}

.emp-layout-research-v1 .emp-site-nav a {
    color: rgba(250, 246, 239, 0.9);
    font-size: 0.88rem;
}

/* Featured brand hero — mythic art at a generous, readable height with a legibility scrim. */
.emp-layout-research-v1 .emp-rv-hero {
    position: relative;
    width: 100%;
    height: clamp(240px, 60vw, 400px);
    overflow: hidden;
    border-bottom: 2px solid var(--empire-gold);
}

.emp-layout-research-v1 .emp-rv-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Art composes the figures right-of-centre; bias the crop so the left stays open for text. */
    object-position: 62% 28%;
    display: block;
}

.emp-layout-research-v1 .emp-rv-hero-scrim {
    position: absolute;
    inset: 0;
    /* Bottom legibility band + left wash so left-aligned text reads over the open sky area. */
    background:
        linear-gradient(180deg,
            rgba(26, 18, 9, 0.05) 0%,
            rgba(26, 18, 9, 0.0) 32%,
            rgba(26, 18, 9, 0.5) 68%,
            rgba(26, 18, 9, 0.88) 100%),
        linear-gradient(90deg,
            rgba(26, 18, 9, 0.62) 0%,
            rgba(26, 18, 9, 0.2) 42%,
            rgba(26, 18, 9, 0.0) 68%);
    pointer-events: none;
}

.emp-layout-research-v1 .emp-rv-hero-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    max-width: var(--rv-max);
    margin: 0 auto;
    padding: 0 var(--rv-gutter) 1.1rem;
    text-align: left;
    color: var(--empire-cream);
}

.emp-layout-research-v1 .emp-rv-hero-logo {
    width: 56px;
    height: 56px;
    border-radius: 0.5rem;
    border: 2px solid var(--empire-gold-light);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    background: #fff;
    display: block;
    margin: 0 0 0.5rem;
}

.emp-layout-research-v1 .emp-rv-hero-brand {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.7rem, 7vw, 2.75rem);
    line-height: 1.05;
    margin: 0;
    color: #fff;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

.emp-layout-research-v1 .emp-rv-hero-tag {
    margin: 0.35rem 0 0;
    max-width: 22rem;
    font-size: clamp(0.9rem, 3.4vw, 1.05rem);
    color: rgba(250, 246, 239, 0.95);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}

@media (min-width: 768px) {
    .emp-layout-research-v1 .emp-rv-hero-img {
        object-position: center 30%;
    }
    .emp-layout-research-v1 .emp-rv-hero-content {
        padding-bottom: 1.6rem;
    }
    .emp-layout-research-v1 .emp-rv-hero-tag {
        max-width: 30rem;
    }
}

/* Above-the-fold pickup/delivery pre-picker (UE/DD/Toast convention; editable again in cart). */
.emp-layout-research-v1 .emp-rv-fulfillment {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    max-width: 22rem;
}

.emp-layout-research-v1 .emp-rv-ful-btn {
    font: inherit;
    font-weight: 700;
    padding: 0.6rem 0.5rem;
    border-radius: 0.6rem;
    border: 2px solid rgba(92, 64, 51, 0.25);
    background: #fff;
    color: var(--empire-brown);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.emp-layout-research-v1 .emp-rv-ful-btn.active {
    border-color: var(--empire-gold);
    background: rgba(201, 162, 39, 0.14);
    color: var(--empire-warm);
}

.emp-layout-research-v1 .emp-rv-ful-note {
    margin: 0.5rem 0 0;
    font-size: 0.78rem;
    color: var(--empire-brown);
    opacity: 0.8;
}

.emp-layout-research-v1 .emp-rv-gallery-link {
    color: var(--empire-brown);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.emp-layout-research-v1 .emp-rv-faq details {
    border: 1px solid rgba(92, 64, 51, 0.2);
    border-radius: 0.45rem;
    background: rgba(255, 255, 255, 0.75);
    padding: 0.55rem 0.7rem;
}

.emp-layout-research-v1 .emp-rv-faq summary {
    cursor: pointer;
    color: var(--empire-brown);
}

.emp-layout-research-v1 .emp-rv-faq p {
    color: var(--empire-brown);
    opacity: 0.92;
}

/* Mobile: hide the sticky header over the hero; slide it in once the hero scrolls away. */
@media (max-width: 767.98px) {
    .emp-layout-research-v1 .emp-site-header {
        transform: translateY(-105%);
        transition: transform 0.28s ease;
        will-change: transform;
    }
    .emp-layout-research-v1.emp-rv-scrolled .emp-site-header {
        transform: translateY(0);
    }
}

/* ---- Single content column for every top-level block (alignment) ---- */
.emp-layout-research-v1 {
    --rv-max: 1040px;
    --rv-gutter: clamp(1rem, 4vw, 1.75rem);
}

/* Hero is full-bleed; all other blocks share one centered column + gutter. */
body.emp-layout-research-v1 {
    padding-left: 0;
    padding-right: 0;
}

.emp-layout-research-v1 .emp-research-shell,
.emp-layout-research-v1 .menu-section,
.emp-layout-research-v1 .emp-rv-trust {
    max-width: var(--rv-max);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--rv-gutter);
    padding-right: var(--rv-gutter);
    box-sizing: border-box;
}

/* page-flow no longer narrows the menu; its menu-section children own the column. */
.emp-layout-research-v1 .empanada-page-flow {
    max-width: none;
    width: 100%;
    padding: 0;
    align-items: stretch;
}

.emp-layout-research-v1 .emp-convert {
    margin-top: 0.85rem;
    background: rgba(250, 246, 239, 0.98);
    border: 1px solid var(--empire-gold-light);
    border-radius: 1rem;
    padding: 1rem 1rem 1.1rem;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
}

.emp-layout-research-v1 .emp-convert h1 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.35rem, 4.2vw, 1.85rem);
    margin: 0 0 0.35rem;
    color: var(--empire-brown);
    line-height: 1.15;
}

.emp-layout-research-v1 .emp-convert h1 em,
.emp-layout-research-v1 .emp-convert h1 span {
    font-style: normal;
    color: var(--empire-gold);
}

.emp-layout-research-v1 .emp-convert-lead {
    margin: 0 0 0.85rem;
    font-size: 0.95rem;
    color: var(--empire-brown);
    opacity: 0.92;
}

.emp-layout-research-v1 .emp-convert-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: clamp(0.35rem, 1.8vw, 0.5rem);
    align-items: center;
    margin-bottom: 0.65rem;
    width: 100%;
}

.emp-layout-research-v1 .emp-btn-order-rv,
.emp-layout-research-v1 .emp-btn-ghost-rv {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.65rem;
    padding: 0.55rem clamp(0.45rem, 2.4vw, 1.25rem);
    border-radius: 2rem;
    font-size: clamp(0.78rem, 3.15vw, 1rem);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    white-space: nowrap;
    flex: 1 1 0;
    min-width: 0;
    line-height: 1.15;
}

.emp-layout-research-v1 .emp-btn-order-rv {
    background: linear-gradient(135deg, var(--empire-gold), var(--empire-gold-light));
    color: var(--empire-warm);
    border: 1px solid transparent;
}

.emp-layout-research-v1 .emp-btn-ghost-rv {
    background: transparent;
    color: var(--empire-brown);
    font-weight: 600;
    border: 1px solid rgba(92, 64, 51, 0.4);
}

.emp-layout-research-v1 .emp-btn-ghost-rv:hover {
    border-color: var(--empire-gold);
    color: var(--empire-warm);
}

/* Trust band — full-width strip after the menu, aligned to the content column. */
.emp-layout-research-v1 .emp-rv-trust {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.emp-layout-research-v1 .emp-rv-trust-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem 1.1rem;
    padding: 0.85rem 1.1rem;
    font-size: 0.86rem;
    color: var(--empire-brown);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(201, 162, 39, 0.4);
    border-radius: 0.75rem;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.08);
}

.emp-layout-research-v1 .emp-rv-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

/* Plain trust statements: a gold check, no dividers (so wrapping never orphans a separator). */
.emp-layout-research-v1 .emp-rv-trust-item:not(.emp-rv-trust-reviews)::before {
    content: "\2713";
    color: var(--empire-gold);
    font-weight: 700;
}

/* Rating sources render as gold-outlined pills. */
.emp-layout-research-v1 .emp-rv-trust-reviews {
    gap: 0.4rem;
    padding: 0.3rem 0.85rem;
    color: var(--empire-warm);
    font-weight: 600;
    text-decoration: none;
    background: #fff;
    border: 1px solid rgba(201, 162, 39, 0.55);
    border-radius: 2rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.emp-layout-research-v1 .emp-rv-trust-reviews:hover {
    border-color: var(--empire-gold);
    box-shadow: 0 2px 8px rgba(201, 162, 39, 0.25);
}

.emp-layout-research-v1 .emp-rv-trust-reviews strong {
    color: var(--empire-gold);
    font-size: 1.05em;
}

@media (max-width: 420px) {
    .emp-layout-research-v1 .emp-rv-trust-item:not(.emp-rv-trust-reviews) {
        white-space: normal;
    }
}

.emp-layout-research-v1 .emp-convert-food {
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--empire-gold-light);
    min-height: 140px;
}

.emp-layout-research-v1 .emp-convert-food img {
    width: 100%;
    height: 100%;
    min-height: 140px;
    object-fit: cover;
    display: block;
}

@media (min-width: 768px) {
    .emp-layout-research-v1 .emp-convert {
        display: grid;
        grid-template-columns: 1.1fr 0.9fr;
        gap: 1rem 1.25rem;
        align-items: center;
        padding: 1.15rem 1.25rem;
    }
    .emp-layout-research-v1 .emp-convert-copy {
        grid-column: 1;
    }
    .emp-layout-research-v1 .emp-convert-food {
        grid-column: 2;
        grid-row: 1 / span 2;
        min-height: 160px;
    }
    .emp-layout-research-v1 .emp-convert-actions {
        grid-column: 1;
    }
}

.emp-layout-research-v1 .emp-chips-wrap {
    position: sticky;
    top: var(--rv-header-h);
    z-index: 90;
    background: linear-gradient(180deg, var(--empire-cream) 70%, rgba(250, 246, 239, 0));
    padding: 0.65rem 0 0.35rem;
    margin-top: 0.75rem;
}

.emp-layout-research-v1 .emp-chips {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
}

.emp-layout-research-v1 .emp-chips::-webkit-scrollbar {
    display: none;
}

.emp-layout-research-v1 .emp-chip {
    flex: 0 0 auto;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: 2rem;
    border: 1px solid rgba(92, 64, 51, 0.25);
    background: #fff;
    color: var(--empire-brown);
    cursor: pointer;
}

.emp-layout-research-v1 .emp-chip.active {
    background: var(--empire-warm);
    color: var(--empire-cream);
    border-color: var(--empire-warm);
}

.emp-layout-research-v1 #hero .emp-first-screen,
.emp-layout-research-v1 #hero .emp-hero-stage {
    display: none;
}

.emp-layout-research-v1 .menu-section {
    margin-top: 0.5rem;
}

.emp-layout-research-v1 .menu-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.emp-layout-research-v1 .menu-card-title-row {
    display: none;
}

.emp-layout-research-v1 .menu-category {
    scroll-margin-top: calc(var(--rv-header-h) + var(--rv-chip-h) + 1rem);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.emp-layout-research-v1 .menu-category-title.menu-category-title-row {
    grid-column: 1 / -1;
    font-family: 'DM Serif Display', serif;
    font-size: 1.25rem;
    color: var(--empire-brown);
    margin: 1rem 0 0.35rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--empire-gold-light);
}

.emp-layout-research-v1 .menu-category-title .emp-hashlink {
    display: none;
}

.emp-layout-research-v1 .menu-item.menu-item--has-thumb {
    flex-direction: column;
    align-items: stretch;
    height: 100%;
    background: #fff;
    border: 1px solid rgba(201, 162, 39, 0.35);
    border-radius: 0.75rem;
    overflow: hidden;
    padding: 0;
    border-bottom: none;
}

.emp-layout-research-v1 .menu-item.menu-item--has-thumb .menu-item-thumb {
    width: 100%;
    height: auto;
    max-width: none;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 0;
    margin: 0;
}

.emp-layout-research-v1 .menu-item.menu-item--has-thumb .menu-item-body {
    padding: 0.55rem 0.6rem 0.65rem;
    width: 100%;
}

.emp-layout-research-v1 .menu-item.menu-item--has-thumb .menu-item-name {
    font-weight: 700;
    font-size: 0.9rem;
}

.emp-layout-research-v1 .menu-item.menu-item--has-thumb .menu-item-desc {
    font-size: 0.75rem;
    line-height: 1.3;
}

.emp-layout-research-v1 .menu-item.menu-item--has-thumb .menu-item-name-row .emp-hashlink {
    display: none;
}

@media (min-width: 768px) {
    .emp-layout-research-v1 .menu-category {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.85rem;
    }
}

@media (min-width: 992px) {
    .emp-layout-research-v1 .menu-category {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Items without thumbs stay list-style within the category grid */
.emp-layout-research-v1 .menu-item:not(.menu-item--has-thumb) {
    grid-column: 1 / -1;
    border-bottom: 1px solid rgba(201, 162, 39, 0.25);
    padding: 0.65rem 0;
}

/* Sold-out cards: dim the photo and badge it so a missing Add button reads as intentional. */
.emp-layout-research-v1 .menu-item--has-thumb.out-of-stock {
    position: relative;
    opacity: 1;
}

.emp-layout-research-v1 .menu-item--has-thumb.out-of-stock .menu-item-thumb {
    filter: grayscale(0.7) brightness(0.92);
    opacity: 0.6;
}

.emp-layout-research-v1 .menu-item--has-thumb.out-of-stock::after {
    content: "Sold out";
    position: absolute;
    top: 0.55rem;
    left: 0.55rem;
    z-index: 2;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--empire-cream);
    background: rgba(92, 64, 51, 0.92);
    padding: 0.2rem 0.5rem;
    border-radius: 0.35rem;
}

.emp-layout-research-v1 .menu-item--has-thumb.out-of-stock .menu-item-name-row,
.emp-layout-research-v1 .menu-item--has-thumb.out-of-stock .menu-item-price,
.emp-layout-research-v1 .menu-item--has-thumb.out-of-stock .menu-item-desc {
    text-decoration: none;
    opacity: 0.7;
}

/* Anchor hashlinks add visible "#" clutter on section headers in this layout — hide them. */
.emp-layout-research-v1 .emp-hashlink {
    display: none;
}
