/* Code Ref: DM-P5-CSS-001
   File: assets/css/menu.css
   Purpose: Mobile-first public restaurant digital menu design with cart drawer, category tabs, offers, and zoom support */

:root {
    --menu-bg: #FFF8F0;
    --menu-primary: #8B1E16;
    --menu-secondary: #F4A261;
    --menu-accent: #2A9D8F;
    --menu-button: #D35400;
    --menu-text: #2B2B2B;
    --menu-font: Arial, sans-serif;
    --menu-radius: 14px;
    --menu-card: rgba(255, 255, 255, .92);
    --menu-shadow: 0 18px 45px rgba(57, 24, 10, .14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.menu-body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(244, 162, 97, .28), transparent 34rem),
        linear-gradient(180deg, var(--menu-bg), #fff);
    color: var(--menu-text);
    font-family: var(--menu-font);
    font-size: var(--menu-zoom-size, 16px);
    padding-bottom: 6.5rem;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: .62;
}

.menu-hero {
    padding: 1rem;
    color: #fff;
    background:
        radial-gradient(circle at 20% 0%, rgba(244, 162, 97, .48), transparent 18rem),
        linear-gradient(135deg, #44100C, var(--menu-primary));
    border-radius: 0 0 2rem 2rem;
    box-shadow: var(--menu-shadow);
    background-size: cover;
    background-position: center;
}

.menu-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.restaurant-brand {
    display: flex;
    gap: .82rem;
    align-items: center;
    min-width: 0;
}

.restaurant-brand img,
.restaurant-brand > span {
    width: 4rem;
    height: 4rem;
    border-radius: 1.3rem;
    background: #fff;
    object-fit: cover;
    color: var(--menu-primary);
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
}

.restaurant-brand p,
.restaurant-brand h1,
.section-title-row p,
.section-title-row h2,
.drawer-title-row p,
.drawer-title-row h2 {
    margin: 0;
}

.restaurant-brand p {
    font-size: .77rem;
    opacity: .82;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.restaurant-brand h1 {
    font-size: clamp(1.4rem, 5vw, 2.4rem);
    line-height: 1.05;
    margin-top: .2rem;
}

.menu-tools {
    display: flex;
    gap: .32rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.tool-btn,
.strip-btn,
.category-chip,
.drawer-close {
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    transition: transform .18s ease, background .18s ease, color .18s ease;
}

.tool-btn {
    background: rgba(255, 255, 255, .16);
    color: #fff;
    padding: .48rem .58rem;
    border: 1px solid rgba(255, 255, 255, .22);
}

.tool-btn:active,
.category-chip:active,
.add-cart-btn:active,
.floating-cart-btn:active {
    transform: scale(.97);
}

.menu-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .55rem;
    margin-top: 1rem;
}

.menu-meta-grid div,
.menu-ad-slot,
.offer-strip,
.menu-summary-row article,
.product-card,
.empty-menu-box,
.menu-empty-card,
.cart-drawer-panel,
.offer-modal-card {
    background: var(--menu-card);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, .72);
    box-shadow: var(--menu-shadow);
}

.menu-meta-grid div {
    border-radius: 1rem;
    padding: .72rem;
    color: var(--menu-text);
}

.menu-meta-grid span,
.menu-summary-row span {
    display: block;
    font-size: .72rem;
    opacity: .7;
    margin-bottom: .12rem;
}

.menu-meta-grid strong,
.menu-summary-row strong {
    display: block;
    font-size: .95rem;
}

.menu-ad-slot {
    margin-top: .75rem;
    border-radius: 1.2rem;
    padding: .78rem .92rem;
    display: flex;
    align-items: center;
    gap: .7rem;
    color: var(--menu-text);
}

.menu-ad-slot strong {
    background: var(--menu-primary);
    color: #fff;
    border-radius: .8rem;
    padding: .38rem .6rem;
    white-space: nowrap;
}

.menu-ad-slot span {
    font-size: .82rem;
    opacity: .82;
}

.menu-main {
    width: min(1100px, 100%);
    margin: 0 auto;
    padding: 1rem;
}

.offer-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 1.3rem;
    padding: .85rem 1rem;
    margin-top: -.25rem;
    border-color: rgba(244, 162, 97, .55);
}

.offer-strip span {
    display: block;
    color: var(--menu-button);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.offer-strip strong {
    font-size: 1.1rem;
}

.strip-btn {
    padding: .62rem 1rem;
    background: var(--menu-button);
    color: #fff;
}

.menu-summary-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
    margin: 1rem 0;
}

.menu-summary-row article {
    border-radius: 1.2rem;
    padding: .9rem;
}

.category-tabs {
    display: flex;
    gap: .55rem;
    overflow-x: auto;
    padding: .2rem .05rem .85rem;
    position: sticky;
    top: 0;
    z-index: 15;
    background: linear-gradient(180deg, var(--menu-bg), rgba(255,248,240,.86));
    backdrop-filter: blur(16px);
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-chip {
    flex: 0 0 auto;
    padding: .68rem .92rem;
    background: #fff;
    color: var(--menu-primary);
    border: 1px solid rgba(139, 30, 22, .12);
    box-shadow: 0 8px 22px rgba(57, 24, 10, .08);
}

.category-chip small {
    background: rgba(139, 30, 22, .08);
    border-radius: 999px;
    padding: .1rem .4rem;
    margin-left: .25rem;
}

.category-chip.active {
    background: var(--menu-primary);
    color: #fff;
}

.category-chip.active small {
    background: rgba(255, 255, 255, .18);
}

.menu-category-section {
    margin-top: 1.15rem;
}

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: .78rem;
}

.section-title-row p {
    font-size: .78rem;
    color: var(--menu-button);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 900;
}

.section-title-row h2 {
    color: var(--menu-primary);
    font-size: 1.45rem;
}

.section-title-row > span {
    color: rgba(43, 43, 43, .72);
    font-size: .86rem;
    white-space: nowrap;
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.product-card {
    border-radius: 1.45rem;
    overflow: hidden;
    border-color: rgba(139, 30, 22, .1);
}

.product-image-wrap {
    position: relative;
    height: 13.5rem;
    background: linear-gradient(135deg, rgba(244, 162, 97, .35), rgba(139, 30, 22, .18));
    overflow: hidden;
}

.product-image-wrap img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--menu-primary);
    font-weight: 900;
    font-size: 1.2rem;
}

.offer-badge,
.stock-badge,
.featured-dot {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
}

.offer-badge,
.stock-badge {
    position: absolute;
    left: .8rem;
    top: .8rem;
    padding: .35rem .58rem;
    background: var(--menu-button);
    color: #fff;
}

.stock-badge {
    left: auto;
    right: .8rem;
    background: rgba(30, 30, 30, .82);
}

.product-card-body {
    padding: .95rem;
}

.product-title-row,
.price-row,
.product-action-row,
.drawer-title-row,
.drawer-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
}

.product-title-row h3 {
    margin: 0;
    color: var(--menu-primary);
    font-size: 1.12rem;
    line-height: 1.18;
}

.featured-dot {
    padding: .25rem .48rem;
    background: rgba(42, 157, 143, .12);
    color: var(--menu-accent);
    white-space: nowrap;
}

.product-desc,
.tiny-note,
.related-line {
    margin: .55rem 0 0;
    color: rgba(43, 43, 43, .76);
    line-height: 1.45;
}

.tiny-note,
.related-line {
    font-size: .8rem;
}

.price-row {
    justify-content: flex-start;
    margin-top: .7rem;
}

.price-row strong {
    color: var(--menu-button);
    font-size: 1.18rem;
}

.price-row del {
    color: rgba(43, 43, 43, .48);
}

.nutrition-row,
.vitamin-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .42rem;
    margin-top: .65rem;
}

.nutrition-row span,
.vitamin-tags span {
    border-radius: 999px;
    background: rgba(139, 30, 22, .07);
    color: var(--menu-primary);
    padding: .34rem .55rem;
    font-size: .76rem;
    font-weight: 800;
}

.vitamin-tags span {
    background: rgba(42, 157, 143, .1);
    color: #166B61;
}

.product-action-row {
    margin-top: .85rem;
    align-items: flex-end;
}

.size-select-wrap {
    display: grid;
    gap: .28rem;
    flex: 1;
}

.size-select-wrap span {
    font-size: .75rem;
    color: rgba(43, 43, 43, .68);
    font-weight: 800;
}

.size-select-wrap select {
    width: 100%;
    border: 1px solid rgba(139, 30, 22, .14);
    background: #fff;
    color: var(--menu-text);
    border-radius: .9rem;
    padding: .65rem .72rem;
    outline: none;
}

.qty-control {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(139, 30, 22, .07);
    padding: .25rem;
    border-radius: 999px;
}

.qty-control button {
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: var(--menu-primary);
    font-weight: 900;
}

.qty-control span {
    min-width: 1.4rem;
    text-align: center;
    font-weight: 900;
}

.add-cart-btn,
.checkout-next-btn {
    width: 100%;
    border: 0;
    border-radius: var(--menu-radius);
    padding: .82rem 1rem;
    margin-top: .85rem;
    background: linear-gradient(135deg, var(--menu-button), var(--menu-primary));
    color: #fff;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(211, 84, 0, .23);
}

.empty-menu-box,
.menu-empty-card {
    border-radius: 1.6rem;
    padding: 1.3rem;
    text-align: center;
}

.menu-empty-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.menu-empty-card {
    max-width: 28rem;
}

.mini-brand {
    display: inline-flex;
    padding: .38rem .68rem;
    border-radius: 999px;
    background: rgba(139, 30, 22, .08);
    color: var(--menu-primary);
    font-weight: 900;
    margin-bottom: .7rem;
}

.floating-cart-btn {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 40;
    border: 0;
    border-radius: 1.2rem;
    padding: .85rem 1rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .75rem;
    background: linear-gradient(135deg, var(--menu-primary), #3B0D09);
    color: #fff;
    box-shadow: 0 18px 40px rgba(48, 12, 8, .34);
}

.floating-cart-btn span {
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--menu-button);
    font-weight: 900;
}

.floating-cart-btn strong {
    text-align: left;
}

.floating-cart-btn em {
    font-style: normal;
    font-weight: 900;
}

.cart-drawer,
.offer-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    background: rgba(24, 10, 8, .52);
    backdrop-filter: blur(10px);
}

.cart-drawer.is-open,
.offer-modal.is-open {
    display: block;
}

.cart-drawer-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 84vh;
    overflow: auto;
    border-radius: 1.6rem 1.6rem 0 0;
    padding: 1rem;
}

.drawer-title-row p {
    color: var(--menu-button);
    font-size: .78rem;
    text-transform: uppercase;
    font-weight: 900;
}

.drawer-title-row h2 {
    color: var(--menu-primary);
}

.drawer-close {
    width: 2.4rem;
    height: 2.4rem;
    background: rgba(139, 30, 22, .08);
    color: var(--menu-primary);
    font-size: 1.35rem;
}

.cart-items {
    display: grid;
    gap: .6rem;
    margin-top: 1rem;
}

.cart-line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .6rem;
    align-items: center;
    padding: .75rem;
    border-radius: 1rem;
    background: rgba(139, 30, 22, .06);
}

.cart-line strong,
.cart-line p {
    margin: 0;
}

.cart-line p {
    font-size: .82rem;
    color: rgba(43, 43, 43, .68);
    margin-top: .18rem;
}

.cart-line button {
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: var(--menu-primary);
    font-weight: 900;
    padding: .42rem .58rem;
}

.calorie-box {
    margin-top: 1rem;
}

.calorie-bar {
    height: .75rem;
    border-radius: 999px;
    background: rgba(139, 30, 22, .1);
    overflow: hidden;
}

.calorie-bar span {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--menu-accent), var(--menu-secondary));
    transition: width .25s ease;
}

.calorie-box p {
    margin: .45rem 0 0;
    font-size: .9rem;
}

.drawer-total-row {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(139, 30, 22, .18);
    font-size: 1.08rem;
}

.offer-modal {
    display: none;
    place-items: center;
    padding: 1rem;
}

.offer-modal.is-open {
    display: grid;
}

.offer-modal-card {
    width: min(29rem, 100%);
    border-radius: 1.6rem;
    padding: 1rem;
    position: relative;
}

.offer-modal-card h2 {
    margin: .2rem 0 .8rem;
    color: var(--menu-primary);
}

.modal-close {
    position: absolute;
    right: .8rem;
    top: .8rem;
}

.offer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .65rem;
}

.offer-list li {
    padding: .75rem;
    border-radius: 1rem;
    background: rgba(244, 162, 97, .14);
}

.offer-list strong,
.offer-list span {
    display: block;
}

.offer-list span {
    margin-top: .2rem;
    font-size: .86rem;
    color: rgba(43, 43, 43, .72);
    line-height: 1.42;
}

.powered-footer {
    text-align: center;
    padding: 1rem .8rem 1.5rem;
    color: rgba(43, 43, 43, .62);
    font-size: .86rem;
}

.powered-footer a {
    color: var(--menu-primary);
    font-weight: 900;
    text-decoration: none;
}

.is-hidden-by-filter {
    display: none !important;
}

@media (min-width: 720px) {
    .menu-hero {
        margin: 1rem auto 0;
        width: min(1100px, calc(100% - 2rem));
        border-radius: 2rem;
        padding: 1.25rem;
    }

    .menu-main {
        padding: 1.15rem 1rem 2rem;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .floating-cart-btn {
        width: 25rem;
        left: auto;
        right: 1.2rem;
    }

    .cart-drawer-panel {
        left: auto;
        width: 28rem;
        right: 1rem;
        bottom: 1rem;
        border-radius: 1.6rem;
    }
}

@media (min-width: 1040px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 410px) {
    .menu-meta-grid {
        grid-template-columns: 1fr;
    }

    .product-action-row {
        display: grid;
    }

    .qty-control {
        justify-self: start;
    }
}

/* Code Ref: DM-P6-CSS-002
   File: assets/css/menu.css
   Purpose: Shake deal strip and modal styles for Phase 6.1 */

.shake-strip {
    margin: .85rem 0 1rem;
    padding: .9rem;
    border-radius: 1.35rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: .78rem;
    align-items: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(255, 243, 232, .95));
    border: 1px solid rgba(211, 84, 0, .22);
    box-shadow: var(--menu-shadow);
}

.shake-icon {
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--menu-button), var(--menu-primary));
    color: #fff;
    font-size: 1.55rem;
    font-weight: 900;
}

.shake-strip span,
.shake-phone-box span {
    display: block;
    color: var(--menu-button);
    font-size: .75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.shake-strip strong {
    display: block;
    color: var(--menu-primary);
    font-size: 1.02rem;
    line-height: 1.2;
}

.shake-strip small {
    display: block;
    margin-top: .15rem;
    color: rgba(43, 43, 43, .68);
    line-height: 1.35;
}

.shake-action-btn {
    border: 0;
    border-radius: 999px;
    padding: .72rem .95rem;
    background: var(--menu-primary);
    color: #fff;
    font-weight: 900;
    white-space: nowrap;
}

.shake-modal-card .product-desc {
    margin-bottom: .9rem;
}

.shake-phone-box {
    display: grid;
    gap: .75rem;
}

.shake-phone-box label {
    display: grid;
    gap: .35rem;
    color: var(--menu-primary);
    font-weight: 900;
}

.shake-phone-box input {
    width: 100%;
    border: 1px solid rgba(139, 30, 22, .15);
    background: #fff;
    color: var(--menu-text);
    border-radius: var(--menu-radius);
    padding: .82rem .9rem;
    outline: none;
}

.shake-phone-box input:focus {
    border-color: var(--menu-button);
    box-shadow: 0 0 0 4px rgba(211, 84, 0, .1);
}

.shake-result-box {
    margin-top: .9rem;
    border-radius: 1rem;
    padding: .9rem;
    background: rgba(42, 157, 143, .1);
    border: 1px solid rgba(42, 157, 143, .18);
}

.shake-result-box strong,
.shake-result-box span,
.shake-result-box small {
    display: block;
}

.shake-result-box strong {
    color: #166B61;
    font-size: 1.18rem;
}

.shake-result-box span {
    color: var(--menu-primary);
    font-weight: 900;
    margin-top: .2rem;
}

.shake-result-box p {
    margin: .4rem 0;
    color: rgba(43, 43, 43, .74);
    line-height: 1.42;
}

@media (max-width: 520px) {
    .shake-strip {
        grid-template-columns: auto 1fr;
    }

    .shake-action-btn {
        grid-column: 1 / -1;
        width: 100%;
    }
}
