/* =========================================================
   ROOSTERS PERI PERI
   MENU CSS (FULL DARK & LIGHT THEME DYNAMIC COMPATIBLE)
========================================================= */

:root {
    --red: #D90429;
    --red-dark: #b0021e;

    --yellow: #FFB703;
    --yellow-light: #ffd45a;

    --max-width: 1250px;
    --header-height: 64px;
}

/* =========================================================
   RESET & BASE STYLES
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', "Poppins", sans-serif;
    background-color: var(--site-bg, #080808);
    color: var(--site-text, #ffffff);
    min-height: 100vh;
    line-height: 1.5;
    transition: background-color 0.25s ease, color 0.25s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
select {
    font-family: inherit;
}

/* =========================================================
   MAIN LAYOUT
========================================================= */

main {
    min-height: 100vh;
}

.menu-section {
    width: min(calc(100% - 40px), var(--max-width));
    margin: auto;
    padding: 45px 0 90px;
}

/* =========================================================
   MENU HEADER
========================================================= */

.menu-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 35px;
}

.eyebrow {
    display: inline-block;
    color: var(--yellow);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 3px;
    margin-bottom: 8px;
}

.menu-header h1 {
    font-family: 'Cabinet Grotesk', "Montserrat", sans-serif;
    font-size: clamp(2.1rem, 5vw, 3.5rem);
    line-height: 1.05;
    text-transform: uppercase;
    font-weight: 900;
    color: var(--site-text);
}

.menu-header p {
    color: var(--site-muted, #94a3b8);
    max-width: 650px;
    margin: 14px auto 0;
    font-size: 15px;
}

.header-line {
    width: 75px;
    height: 4px;
    background: var(--red);
    margin: 18px auto 0;
    border-radius: 10px;
}

/* =========================================================
   CATEGORY NAV (Sticky beneath Header)
========================================================= */

.category-wrapper {
    position: sticky;
    top: var(--header-height);
    z-index: 100;
    padding: 12px 0;
    background: var(--nav-bg, rgba(18, 20, 24, 0.95));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--site-border, rgba(255, 255, 255, 0.08));
    margin-bottom: 45px;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.category-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.cat-btn {
    border: 1px solid var(--site-border, rgba(255, 255, 255, 0.08));
    background: var(--site-card, #181818);
    color: var(--site-text, #ffffff);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    transition: .25s ease;
    white-space: nowrap;
}

.cat-btn:hover {
    border-color: var(--red);
    color: var(--yellow);
}

.cat-btn.active {
    background: var(--red);
    border-color: var(--red);
    color: #ffffff !important;
}

/* =========================================================
   CATEGORY SECTION
========================================================= */

.menu-category {
    margin-bottom: 70px;
    scroll-margin-top: calc(var(--header-height) + 65px);
}

.category-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--site-border, rgba(255, 255, 255, 0.08));
}

.category-heading span {
    font-size: 26px;
}

.category-heading h2 {
    font-family: 'Cabinet Grotesk', "Montserrat", sans-serif;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    text-transform: uppercase;
    color: var(--yellow);
    font-weight: 900;
}

/* =========================================================
   SUB CATEGORY
========================================================= */

.sub-category {
    font-family: 'Cabinet Grotesk', "Montserrat", sans-serif;
    font-size: 1.25rem;
    color: var(--red);
    margin: 35px 0 18px;
    padding-left: 5px;
}

/* =========================================================
   GRID & CARDS
========================================================= */

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.menu-card {
    position: relative;
    background: var(--site-card, #181818);
    border: 1px solid var(--site-border, rgba(255, 255, 255, 0.08));
    border-radius: 14px;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, background-color 0.25s ease;
}

.menu-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--red);
    transition: .3s ease;
    z-index: 5;
}

.menu-card:hover {
    transform: translateY(-5px);
    border-color: rgba(217, 4, 41, 0.65);
    box-shadow: 0 12px 35px rgba(0,0,0,.15);
}

.menu-card:hover::before {
    width: 100%;
}

.card-img-wrap {
    width: 100%;
    height: 185px;
    overflow: hidden;
    position: relative;
    background-color: var(--site-surface, #111111);
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.menu-card:hover .card-img-wrap img {
    transform: scale(1.06);
}

/* Stock-out Card State */
.menu-card.is-stock-out,
.menu-card.stock-out {
    opacity: 0.65;
    filter: grayscale(40%);
}

.side-item.side-stock-out {
    opacity: 0.45;
    pointer-events: none;
}

/* =========================================================
   CARD CONTENT
========================================================= */

.menu-card .card-content {
    padding: 16px 18px 0;
}

.card-content h3 {
    font-family: 'Cabinet Grotesk', "Montserrat", sans-serif;
    font-size: 1.1rem;
    line-height: 1.3;
    margin-bottom: 8px;
    font-weight: 800;
    color: var(--site-text, #ffffff);
}

.card-content h3 small {
    display: inline;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: .75rem;
    font-weight: 500;
    color: var(--site-muted, #94a3b8);
}

.card-content p {
    color: var(--site-muted, #94a3b8);
    font-size: .84rem;
    line-height: 1.55;
}

/* =========================================================
   BADGE
========================================================= */

.badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
    background: var(--site-card, #181818);
    border: 1px solid var(--red);
    color: var(--red);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.menu-card.new .badge {
    color: var(--yellow);
    border-color: var(--yellow);
    background: var(--site-card, #181818);
}

/* =========================================================
   OPTIONS & FLAVOURS
========================================================= */

.menu-card .option-box {
    margin-top: 14px;
}

.menu-card .flavour-selector {
    margin-top: 14px;
    padding: 0 18px;
}

.option-box label,
.flavour-selector .selector-label {
    display: block;
    color: var(--site-muted, #94a3b8);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.menu-select {
    width: 100%;
    border: 1px solid var(--site-border, rgba(255, 255, 255, 0.08));
    border-radius: 8px;
    padding: 9px 11px;
    background: var(--site-surface, #111111);
    color: var(--site-text, #ffffff);
    outline: none;
    cursor: pointer;
    font-size: 12px;
    transition: .2s ease;
}

.menu-select:hover,
.menu-select:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.15);
}

/* =========================================================
   SLIM SIDES TRIGGER BUTTON
========================================================= */

.sides-trigger-wrap {
    margin-top: 12px;
}

.open-sides-btn {
    width: 100%;
    background: var(--site-surface, #111111);
    border: 1px dashed var(--site-border, rgba(255, 255, 255, 0.08));
    border-radius: 8px;
    padding: 9px 12px;
    color: var(--site-text, #ffffff);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: 0.2s ease;
    touch-action: manipulation;
}

.open-sides-btn:hover {
    border-color: var(--yellow);
    background: var(--site-card, #181818);
}

.sides-badge {
    background: var(--site-surface, #111111);
    border: 1px solid var(--site-border, rgba(255, 255, 255, 0.08));
    color: var(--yellow);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
}

/* =========================================================
   POPUP MODAL
========================================================= */

.sides-modal {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 9999999 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.sides-modal.show {
    display: flex !important;
}

.sides-modal-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.sides-modal-content {
    position: relative;
    background: var(--site-card, #181818);
    border: 1px solid var(--site-border, rgba(255, 255, 255, 0.08));
    border-radius: 16px;
    width: min(100%, 420px);
    max-height: 85vh;
    max-height: 85dvh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0,0,0,0.35);
    z-index: 10;
    overflow: hidden;
    animation: modalPop 0.25s ease-out forwards;
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.sides-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--site-border, rgba(255, 255, 255, 0.08));
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--site-surface, #111111);
    flex-shrink: 0;
}

.sides-modal-header h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--yellow);
}

.modal-subtitle {
    font-size: 12px;
    color: var(--site-muted, #94a3b8);
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--site-muted, #94a3b8);
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    touch-action: manipulation;
}

.close-modal-btn:hover {
    color: var(--site-text, #ffffff);
}

.sides-modal-body {
    padding: 10px 20px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--red) var(--site-surface);
}

.sides-modal-body::-webkit-scrollbar {
    width: 4px;
}

.sides-modal-body::-webkit-scrollbar-thumb {
    background: var(--red);
    border-radius: 4px;
}

.side-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 0;
    border-bottom: 1px solid var(--site-border, rgba(255, 255, 255, 0.08));
}

.side-item:last-child {
    border-bottom: none;
}

.side-item .side-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--site-text, #ffffff);
}

.pill-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.side-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid var(--site-border, rgba(255, 255, 255, 0.08));
    background: var(--site-surface, #111111);
    color: var(--site-text, #ffffff);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    transition: 0.15s ease;
    touch-action: manipulation;
}

.side-btn:hover:not(:disabled) {
    background: var(--red);
    border-color: var(--red);
    color: #ffffff;
}

.side-btn:active {
    background: var(--red);
}

.side-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.side-qty {
    font-size: 13px;
    font-weight: 800;
    min-width: 20px;
    text-align: center;
    color: var(--yellow);
}

.sides-modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--site-border, rgba(255, 255, 255, 0.08));
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--site-surface, #111111);
    flex-shrink: 0;
}

.modal-status {
    font-size: 13px;
    color: var(--site-muted, #94a3b8);
}

.modal-status strong {
    color: var(--yellow);
    font-size: 14px;
}

.confirm-sides-btn {
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 9px 24px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s ease;
    touch-action: manipulation;
}

.confirm-sides-btn:hover {
    background: var(--red-dark);
}

/* =========================================================
   CARD FOOTER
========================================================= */

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 16px 18px 18px;
    padding-top: 14px;
    border-top: 1px solid var(--site-border, rgba(255, 255, 255, 0.08));
}

.price {
    color: var(--yellow);
    font-family: 'Cabinet Grotesk', "Montserrat", sans-serif;
    font-size: 1.05rem;
    font-weight: 900;
    white-space: nowrap;
}

.add-btn {
    border: 1px solid var(--red);
    background: transparent;
    color: var(--red);
    padding: 7px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    transition: .2s ease;
    touch-action: manipulation;
}

.add-btn:hover {
    background: var(--red);
    color: white;
}

.add-btn.added {
    background: var(--yellow);
    border-color: var(--yellow);
    color: #000000;
    cursor: default;
    transform: scale(0.96);
}

/* =========================================================
   SITE FOOTER
========================================================= */

.site-footer {
    background: var(--site-surface, #111111);
    border-top: 1px solid var(--site-border, rgba(255, 255, 255, 0.08));
    text-align: center;
    padding: 50px 20px;
}

.footer-content {
    max-width: 600px;
    margin: auto;
}

.footer-logo {
    height: 55px;
    width: auto;
    margin-bottom: 10px;
}

.footer-content > p {
    color: var(--site-muted, #94a3b8);
    font-size: 13px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

.footer-links a {
    color: var(--site-text, #ffffff);
    font-size: 13px;
}

.footer-links a:hover {
    color: var(--yellow);
}

.copyright {
    border-top: 1px solid var(--site-border, rgba(255, 255, 255, 0.08));
    padding-top: 20px;
    margin-top: 20px;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {
    .category-wrapper {
        top: var(--header-height);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }

    .category-nav {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 4px 10px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .category-nav::-webkit-scrollbar {
        display: none;
    }

    .cat-btn {
        flex-shrink: 0;
    }

    .menu-category {
        scroll-margin-top: calc(var(--header-height) + 55px);
    }
}

@media (max-width: 480px) {
    .menu-section {
        width: calc(100% - 24px);
        padding-top: 25px;
    }

    .menu-header h1 {
        font-size: 2rem;
    }

    .menu-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .card-img-wrap {
        height: 195px;
    }

    .sides-modal {
        align-items: flex-end;
        padding: 0;
    }

    .sides-modal-content {
        width: 100%;
        max-height: 82dvh;
        border-radius: 20px 20px 0 0;
        border-bottom: none;
        animation: sheetSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    @keyframes sheetSlideUp {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}