/* Final, admin-controlled layout layer. Keep this file loaded last. */
body {
    font-size: var(--base-font-size);
    background-size: auto, var(--pattern-size) var(--pattern-size);
    --brand-red: var(--primary);
}

body.pattern-off {
    background-image: none;
    background-color: var(--bg);
}

body.no-mobile-call {
    padding-bottom: 0;
}

[hidden] {
    display: none !important;
}

.topbar,
.hero,
.menu-shell,
.site-footer {
    max-width: var(--content-width);
}

.topbar {
    min-height: var(--header-height);
    height: auto;
    color: var(--header-text);
    background: color-mix(in srgb, var(--header-bg) var(--header-opacity), transparent);
    border-radius: var(--header-radius);
}

.header-style-solid .topbar {
    background: var(--header-bg);
    backdrop-filter: none;
}

.topbar.is-static {
    position: relative;
    top: auto;
}

.category-tabs {
    top: calc(max(var(--header-height), var(--header-logo-size) + 24px) + 20px);
}

.topbar.is-static ~ main .category-tabs {
    top: 0;
}

.identity {
    min-width: 0;
}

.identity img,
.logo-letter {
    flex: 0 0 var(--header-logo-size);
    width: var(--header-logo-size);
    height: var(--header-logo-size);
}

.identity-copy {
    min-width: 0;
}

.identity-copy b,
.identity-copy small {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.identity-copy b {
    color: var(--header-text);
}

.identity-copy small {
    color: color-mix(in srgb, var(--header-text) 68%, transparent);
}

.header-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.header-menu,
.call-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 9px 17px;
    border-radius: 14px;
    font-weight: 800;
}

.header-menu {
    color: var(--primary);
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary) 14%, transparent);
}

.call-button {
    gap: 6px;
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.call-button::before {
    content: none;
}

.hero {
    background: radial-gradient(circle at 18% 18%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 24%), linear-gradient(135deg, color-mix(in srgb, var(--primary) 22%, #211817) 0%, color-mix(in srgb, var(--primary) 65%, #2b1919) 58%, var(--primary) 125%);
}

.hero-action,
.category-tabs button.active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.site-footer {
    background-color: var(--primary);
    background-image: linear-gradient(110deg, color-mix(in srgb, var(--primary) 64%, #180b0b), color-mix(in srgb, var(--primary) 82%, #2a1111)), url('brand/pattern-red-official-v2.png');
    margin-top: var(--section-gap);
    border-radius: var(--footer-radius);
}

.hero {
    min-height: var(--hero-height);
    border-radius: var(--hero-radius);
}

.menu-shell {
    padding-bottom: var(--section-gap);
}

.orders-paused {
    width: min(var(--content-width), calc(100% - 28px));
    margin: 18px auto 28px;
    padding: 18px 22px;
    border: 1px solid rgba(168, 20, 36, .18);
    border-radius: 20px;
    color: #6d3032;
    background: linear-gradient(135deg, #fff7e5, #fff0f1);
    box-shadow: 0 13px 34px rgba(83, 34, 23, .09);
}

.orders-paused span {
    display: block;
    color: var(--primary);
    font-weight: 900;
}

.orders-paused p {
    margin: 3px 0 0;
    font-size: 12px;
}

.orders-disabled-button {
    cursor: not-allowed;
    opacity: .72;
    box-shadow: none;
}

.product-grid {
    grid-template-columns: repeat(var(--product-cols-desktop), minmax(0, 1fr));
    gap: var(--product-card-gap);
}

.product-card {
    position: relative;
    border-radius: var(--product-card-radius);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    border: var(--product-card-border-width) solid var(--product-card-border);
}

.product-image {
    height: var(--product-image-height);
    min-height: 0;
    aspect-ratio: auto;
}

.product-image > img {
    object-fit: var(--product-image-fit);
}

.product-info {
    min-height: 0;
}

.density-compact .product-info {
    padding: 18px;
}

.density-comfortable .product-info {
    padding: 23px;
}

.product-info h4 {
    font-size: var(--product-title-size);
}

.product-info p {
    color: var(--muted-text);
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
}

.product-description-toggle {
    width: 100%;
    margin: 3px 0 9px;
    padding: 0;
    border: 0;
    color: var(--muted-text);
    background: transparent;
    text-align: right;
    cursor: pointer;
}

.product-description-toggle > span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-height: 1.7;
}

.product-description-toggle > small {
    display: inline-flex;
    margin-top: 4px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
}

.description-modal {
    width: min(520px, calc(100% - 28px));
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 26px;
    color: var(--ink);
    background: transparent;
}

.description-modal::backdrop {
    background: rgba(40, 18, 15, .7);
    backdrop-filter: blur(9px);
}

.description-modal article {
    position: relative;
    padding: 30px 27px 27px;
    border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
    border-radius: 26px;
    background: radial-gradient(circle at 10% 5%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 35%), color-mix(in srgb, var(--surface) 96%, white);
    box-shadow: 0 30px 90px rgba(45, 17, 13, .35);
}

.description-modal small { color: var(--primary); font-weight: 800; }
.description-modal h3 { margin: 5px 0 12px; font-size: 22px; }
.description-modal p { margin: 0; padding: 15px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 12%, white); line-height: 2; }
.description-close { position: absolute; top: 14px; left: 14px; width: 38px; height: 38px; border: 0; border-radius: 12px; color: #fff; background: var(--primary); font-size: 24px; cursor: pointer; }

.section-heading h2 {
    font-size: calc(34px * var(--heading-scale));
}

.category h3 {
    font-size: calc(24px * var(--heading-scale));
}

:where(a, button, input, textarea, select):focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

@media (max-width: 1050px) {
    .product-grid {
        grid-template-columns: repeat(var(--product-cols-tablet), minmax(0, 1fr));
    }
}

@media (max-width: 780px) {
    .hero {
        min-height: var(--hero-height-mobile);
        border-radius: var(--hero-radius-mobile);
    }

    .site-footer {
        border-radius: var(--footer-radius-mobile);
    }
}

@media (max-width: 720px) {
    body {
        background-size: auto, var(--pattern-size-mobile) var(--pattern-size-mobile);
    }

    .topbar {
        top: max(6px, env(safe-area-inset-top));
        width: calc(100% - 16px);
        min-height: 62px;
        margin: 6px auto 12px;
        padding: 8px 10px;
        gap: 8px;
        border-radius: var(--header-mobile-radius);
    }

    .topbar.is-static {
        top: auto;
    }

    .identity {
        flex: 1 1 auto;
        min-width: 0;
        gap: 9px;
    }

    .identity img,
    .logo-letter {
        flex-basis: var(--header-mobile-logo-size);
        width: var(--header-mobile-logo-size);
        height: var(--header-mobile-logo-size);
    }

    .identity b {
        font-size: 15px;
    }

    .identity small {
        font-size: 10px;
    }

    .header-actions {
        gap: 5px;
    }

    .header-menu,
    .call-button {
        min-width: 44px;
        min-height: 44px;
        max-width: clamp(44px, 24vw, 92px);
        padding: 7px 11px;
        border-radius: 13px;
        font-size: 12px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .call-label {
        min-width: 0;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .category-tabs {
        top: calc(max(62px, var(--header-mobile-logo-size) + 16px) + 10px);
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .mobile-cart-summary:not([hidden]) {
        display: grid;
    }

    .mobile-cards-horizontal .product-card {
        display: grid;
        grid-template-columns: clamp(132px, 42vw, 158px) minmax(0, 1fr);
        align-items: center;
        aspect-ratio: auto;
        border-radius: min(var(--product-card-radius), 22px);
        background-color: color-mix(in srgb, var(--surface) 94%, #fff4dc);
        background-image: radial-gradient(circle at 8% 8%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 34%), url('brand/pattern-cream-official-v2.png');
        background-size: auto, 300px;
        box-shadow: 0 16px 42px rgba(92, 45, 20, .12), inset 0 0 0 1px rgba(255, 255, 255, .66);
    }

    .mobile-cards-horizontal .signature-badge {
        top: 10px;
        right: 10px;
        z-index: 4;
        box-shadow: 0 7px 18px rgba(114, 54, 18, .2);
    }

    .mobile-cards-horizontal .product-image {
        width: calc(100% - 14px);
        height: auto;
        min-height: 0;
        aspect-ratio: 1 / 1;
        align-self: center;
        justify-self: center;
        border-radius: 20px;
        box-shadow: 0 11px 25px rgba(77, 36, 17, .2);
    }

    .mobile-cards-horizontal .product-info {
        min-width: 0;
        height: auto;
        min-height: 0;
        padding: 13px 15px;
    }

    .mobile-cards-stacked .product-card {
        display: flex;
        flex-direction: column;
    }

    .mobile-cards-stacked .product-image {
        height: clamp(170px, 52vw, 240px);
    }

    .product-info h4 {
        font-size: min(var(--product-title-size), 17px);
        line-height: 1.55;
    }

    .product-info p {
        margin: 2px 0 8px;
        font-size: 13px;
        line-height: 1.65;
        display: block;
        overflow: visible;
        -webkit-line-clamp: unset;
    }

    .product-description-toggle > span {
        font-size: 12px;
        line-height: 1.7;
        -webkit-line-clamp: 3;
    }

    .mobile-cards-horizontal .product-description-toggle {
        margin: 2px 0 3px;
    }

    .mobile-cards-horizontal .product-description-toggle > small {
        margin-top: 1px;
    }

    .mobile-cards-horizontal .price {
        margin-top: 3px;
        padding-top: 5px;
    }

    .mobile-cards-horizontal .product-cart-control {
        margin-top: 6px;
    }

    .mobile-cards-horizontal .add-cart {
        margin-top: 0;
    }

    .price b {
        font-size: 17px;
    }

    .food-placeholder img {
        width: 48px;
        height: 48px;
    }

    .mobile-cards-horizontal .food-placeholder small {
        display: none;
    }

    .gallery-count {
        left: 6px;
        bottom: 6px;
        padding: 3px 6px;
    }

    .signature-badge {
        top: 6px;
        right: 6px;
    }
}

@media (max-width: 380px) {
    .mobile-cards-horizontal .product-card {
        grid-template-columns: min(40%, 136px) minmax(0, 1fr);
    }

    .mobile-cards-horizontal .product-image {
        min-height: 0;
        aspect-ratio: 1 / 1;
    }

    .mobile-cards-horizontal .product-info {
        min-height: 0;
    }

    .identity small,
    .call-label {
        display: none;
    }

    .call-button {
        width: 44px;
        padding: 0;
    }
}
