/* ------------------------------------------------------------------
   South Mackay Takeaway — logo-aligned theme
   Burgundy red background, gold headings, orange CTAs, teal accents.
   Mobile-first; breakpoints at 520, 760, 820, 900, 1180.
-------------------------------------------------------------------*/

:root {
    /* Palette sampled from the SMT badge logo */
    --brand-red:       #a2282d;   /* outer ring */
    --brand-red-dark:  #6b1518;
    --brand-red-deep:  #3e0b0d;   /* near-black burgundy */
    --brand-orange:    #e8891f;   /* burger bun / fish body */
    --brand-orange-dk: #b45f12;
    --brand-gold:      #f0b732;   /* stars / border trim */
    --brand-gold-lt:   #ffd770;
    --brand-teal:      #2f93a3;   /* wave / water lines */
    --brand-teal-dk:   #1d6d7a;
    --brand-cream:     #f8e9c6;   /* burger sesame */

    --panel:   #2c0a0c;           /* dark red-black card bg */
    --panel-2: #1a0406;
    --border:  #6b1518;
    --border-2:#8a2024;

    --ink:     #fbeccc;
    --ink-dim: #e3c79a;
    --muted:   #b59472;

    --radius:    14px;
    --radius-sm: 9px;
    --shadow-soft: 0 6px 18px rgba(0,0,0,.55);
    --shadow-hot:  0 0 0 2px rgba(240,183,50,.45), 0 10px 26px rgba(0,0,0,.6);

    color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
    color: var(--ink);
    line-height: 1.45;
    background-color: var(--brand-red-dark);
    /* Layered feel: fine horizontal grain + vignette in brand reds */
    background-image:
        repeating-linear-gradient(
            92deg,
            rgba(0,0,0,.00) 0 2px,
            rgba(0,0,0,.06) 2px 3px,
            rgba(255,255,255,.012) 3px 11px,
            rgba(0,0,0,.05) 11px 14px
        ),
        radial-gradient(ellipse at top, #b0312f 0%, #7a1b1e 45%, #3a0a0c 100%);
    background-attachment: fixed;
}

a { color: var(--brand-gold); text-decoration: none; }
a:hover { color: var(--brand-gold-lt); text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: "Bebas Neue", "Oswald", "Impact", "Trebuchet MS", sans-serif;
    letter-spacing: .5px;
    color: var(--brand-gold);
    text-shadow: 0 1px 0 #000, 0 0 14px rgba(240,183,50,.22);
    margin: 0 0 .5rem;
    line-height: 1.15;
}

h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); color: var(--brand-gold-lt); }
h3 { font-size: 1.05rem; color: var(--brand-cream); text-shadow: none; letter-spacing: .2px; }
h4 { font-size: .95rem; color: var(--brand-gold); }

p { margin: .3rem 0 .8rem; }

/* ---------- Layout ---------- */

.container {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 1rem clamp(.75rem, 3vw, 1.5rem);
}

.narrow { width: min(560px, 100%); }

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background:
        linear-gradient(180deg, rgba(0,0,0,.3), rgba(0,0,0,.55)),
        linear-gradient(180deg, #591013, #2a0708);
    border-bottom: 3px solid var(--brand-gold);
    box-shadow: 0 4px 14px rgba(0,0,0,.55);
}

.header-inner {
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding-top: .55rem;
    padding-bottom: .55rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    color: var(--brand-cream);
    font-family: "Bebas Neue", "Oswald", "Impact", sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
    font-size: clamp(1.05rem, 2.6vw, 1.3rem);
    line-height: 1.05;
    text-shadow: 0 1px 0 #000, 0 0 10px rgba(240,183,50,.3);
}
.logo:hover { color: var(--brand-gold-lt); text-decoration: none; }

.logo img {
    height: 52px;
    width: 52px;
    object-fit: contain;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, rgba(255,215,112,.25), transparent 70%);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.7));
}

.logo-text em {
    display: block;
    font-style: normal;
    color: var(--brand-gold);
    font-size: .72em;
    letter-spacing: 2px;
    text-shadow: 0 1px 0 #000;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.main-nav a {
    color: var(--ink);
    padding: .35rem .85rem;
    border-radius: 999px;
    border: 1px solid rgba(240,183,50, .5);
    background: rgba(0,0,0,.35);
    font-weight: 600;
    font-size: .95rem;
}
.main-nav a:hover {
    background: linear-gradient(180deg, var(--brand-orange), var(--brand-orange-dk));
    border-color: var(--brand-orange);
    color: #fff;
    text-decoration: none;
}

/* ---------- Hero / headings ---------- */

.hero {
    text-align: center;
    padding: 1rem 0 .5rem;
}
.hero h1 {
    font-size: clamp(1.9rem, 6vw, 3rem);
    color: var(--brand-gold);
    text-shadow: 0 2px 0 #000, 0 0 24px rgba(240,183,50,.32);
}
.hero p { color: var(--ink-dim); max-width: 640px; margin-inline: auto; }

.menu-section { margin: 1.8rem 0; }
.menu-section > h2 {
    display: inline-block;
    padding: .3rem .9rem;
    background: linear-gradient(180deg, rgba(240,183,50,.1), rgba(0,0,0,.3));
    border-bottom: 3px solid var(--brand-gold);
    color: var(--brand-gold);
    margin-bottom: 1rem;
}

/* ---------- Cards / panels ---------- */

.card {
    background:
        radial-gradient(ellipse at top left, rgba(240,183,50,.05), transparent 60%),
        linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-soft);
    color: var(--ink);
}

/* ---------- Product grid / cards ---------- */

.product-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}
@media (min-width: 520px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1180px) {
    .product-grid { grid-template-columns: repeat(4, 1fr); }
}

.product-card {
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.product-card:hover {
    transform: translateY(-3px);
    border-color: var(--brand-gold);
    box-shadow: var(--shadow-hot);
    text-decoration: none;
    color: var(--ink);
}
.product-card:focus-visible {
    outline: none;
    border-color: var(--brand-gold);
    box-shadow: var(--shadow-hot);
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    border-bottom: 2px solid var(--brand-gold);
    filter: saturate(1.05);
}

.card-body {
    padding: .9rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.card-body h3 {
    font-family: "Bebas Neue", "Oswald", "Impact", sans-serif;
    color: var(--brand-cream);
    font-size: 1.15rem;
    letter-spacing: .4px;
    margin-bottom: .25rem;
}
.card-body p {
    color: var(--ink-dim);
    font-size: .88rem;
    margin: 0 0 .5rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    margin-top: auto;
    padding-top: .6rem;
    border-top: 1px dashed rgba(240,183,50,.28);
}

.card-footer strong,
.price {
    font-family: "Bebas Neue", "Oswald", "Impact", sans-serif;
    color: var(--brand-gold);
    font-size: 1.35rem;
    letter-spacing: .5px;
    text-shadow: 0 1px 0 #000;
}

.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    background: repeating-linear-gradient(45deg, #2a0a0c, #2a0a0c 10px, #3a1013 10px, #3a1013 20px);
    color: var(--muted);
    border-bottom: 2px solid var(--brand-gold);
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    border: 0;
    background: linear-gradient(180deg, var(--brand-orange) 0%, var(--brand-orange-dk) 100%);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: .55rem 1rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: .3px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 2px 0 rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.2);
    transition: transform .08s, filter .12s;
}
.btn:hover { filter: brightness(1.1); text-decoration: none; color: #fff; }
.btn:active { transform: translateY(1px); }

.btn-small { font-size: .82rem; padding: .35rem .75rem; }

.btn-alt {
    background: linear-gradient(180deg, var(--brand-teal), var(--brand-teal-dk));
    color: #fff;
    border: 0;
}
.btn-alt:hover { background: linear-gradient(180deg, #36a5b7, #226f7d); color: #fff; }

.btn-danger {
    background: linear-gradient(180deg, var(--brand-red), var(--brand-red-dark));
}

/* ---------- Category chips ---------- */

.category-filter {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin: 1rem 0 1.5rem;
    padding: .75rem;
    background: rgba(0,0,0,.4);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: sticky;
    top: 72px;
    z-index: 5;
    backdrop-filter: blur(4px);
}

.chip {
    border: 1px solid var(--border-2);
    background: linear-gradient(180deg, #3a0b0d, #220608);
    color: var(--ink-dim);
    padding: .4rem .85rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: .9rem;
    white-space: nowrap;
}
.chip:hover { color: var(--brand-gold); border-color: var(--brand-gold); text-decoration: none; }
.chip.active {
    background: linear-gradient(180deg, var(--brand-gold), #c08c1c);
    color: #2a0a05;
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 2px rgba(240,183,50,.25);
}

/* ---------- Forms ---------- */

label,
fieldset {
    display: block;
    margin-bottom: .9rem;
    color: var(--ink);
}

input,
textarea,
select {
    width: 100%;
    margin-top: .35rem;
    padding: .65rem .72rem;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    font: inherit;
    background: #220608;
    color: var(--ink);
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 3px rgba(240,183,50,.28);
}
input::placeholder, textarea::placeholder { color: var(--muted); }

fieldset {
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    padding: .8rem 1rem 1rem;
    background: rgba(0,0,0,.3);
}
legend {
    padding: 0 .4rem;
    font-weight: 700;
    color: var(--brand-gold);
    font-family: "Bebas Neue", "Oswald", "Impact", sans-serif;
    letter-spacing: .6px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .45rem;
}
.checkbox-row input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: var(--brand-gold);
}

.extras-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: .4rem;
}
.extras-table th,
.extras-table td {
    padding: .45rem .6rem;
    border-bottom: 1px dashed var(--border-2);
    text-align: left;
    vertical-align: middle;
}
.extras-table tbody tr:last-child td { border-bottom: none; }
.extras-table th {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--brand-gold);
    border-bottom: 1px solid var(--border-2);
}
.extras-table .extras-col {
    width: 5.5rem;
    text-align: center;
}
.extras-table input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: var(--brand-gold);
}
.extras-table input[type="checkbox"]:disabled {
    opacity: .35;
    cursor: not-allowed;
}
.extras-table .muted {
    color: var(--muted);
    font-size: .85rem;
}
.extras-table .extras-handle-col {
    width: 1.6rem;
    text-align: center;
    padding-left: 0;
    padding-right: 0;
}
.extras-table tbody tr {
    cursor: grab;
}
.extras-table tbody tr.dragging {
    opacity: .4;
    background: rgba(240,183,50,.08);
}
.drag-handle,
.drag-handle-inline {
    display: inline-block;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1;
    user-select: none;
}
.drag-handle-inline { font-size: .95rem; }
.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    border: 0;
}

.hint {
    font-size: .85rem;
    color: var(--muted);
    margin: 0 0 .6rem;
}

.inline-form {
    margin-bottom: 1rem;
    padding: .8rem 1rem;
}
.inline-form h2 {
    margin: 0 0 .5rem;
    font-size: 1rem;
}
.inline-fields {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    align-items: end;
}
.inline-fields label {
    display: flex;
    flex-direction: column;
    font-size: .85rem;
}
.inline-fields label.checkbox-row {
    flex-direction: row;
    align-items: center;
    margin-bottom: 0;
}
.inline-fields .row-actions {
    display: flex;
    gap: .5rem;
}

/* ---------- Notices ---------- */

.notice {
    border-radius: var(--radius-sm);
    padding: .75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    font-weight: 600;
}
.notice.success {
    background: rgba(47,147,163,.2);
    border-color: var(--brand-teal);
    color: #c9ecf1;
}
.notice.error {
    background: rgba(162,40,45,.35);
    border-color: var(--brand-red);
    color: #ffd2cc;
}
.notice.warning {
    background: rgba(220,160,40,.25);
    border-color: #d6a64a;
    color: #f6e1b3;
}

/* ---------- Tables (cart/admin) ---------- */

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    box-shadow: var(--shadow-soft);
}

.table {
    width: 100%;
    border-collapse: collapse;
    color: var(--ink);
    min-width: 520px;
}

.table th,
.table td {
    border-bottom: 1px solid rgba(240,183,50,.22);
    padding: .75rem .85rem;
    text-align: left;
    vertical-align: top;
}
.table th {
    background: rgba(0,0,0,.5);
    color: var(--brand-gold);
    font-family: "Bebas Neue", "Oswald", "Impact", sans-serif;
    letter-spacing: .6px;
    font-size: .95rem;
}
.table tfoot th { background: rgba(240,183,50,.12); color: var(--brand-gold-lt); }
.table tr:last-child td { border-bottom: 0; }

/* Stacked-row table on very narrow screens */
@media (max-width: 560px) {
    .table-wrap { overflow-x: visible; background: transparent; border: 0; box-shadow: none; }
    .table { min-width: 0; }
    .table thead { display: none; }
    .table, .table tbody, .table tr, .table td, .table tfoot, .table tfoot tr, .table tfoot th {
        display: block;
        width: 100%;
    }
    .table tr {
        background: linear-gradient(180deg, var(--panel), var(--panel-2));
        border: 1px solid var(--border-2);
        border-radius: var(--radius-sm);
        padding: .6rem .75rem;
        margin-bottom: .7rem;
    }
    .table td {
        border-bottom: 0;
        padding: .3rem 0;
    }
    .table tfoot tr { background: rgba(240,183,50,.12); }
    .table tfoot th { font-size: 1.05rem; }
}

/* ---------- Inline/small forms ---------- */

.inline-form {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
}
.inline-form input[type="number"] {
    width: 76px;
    margin: 0;
}

/* ---------- Checkout grid ---------- */

.checkout-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}
@media (min-width: 820px) {
    .checkout-grid { grid-template-columns: 1.2fr .8fr; }
}

.summary-card { align-self: start; }

/* ---------- Admin stats ---------- */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}
.stat p {
    font-family: "Bebas Neue", "Oswald", "Impact", sans-serif;
    font-size: 2rem;
    color: var(--brand-gold);
    margin: .15rem 0 0;
    font-weight: 700;
}

/* ---------- Misc flex helpers ---------- */

.row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.row-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-wrap: wrap;
}
.row-actions form { margin: 0; }

/* ---------- Thumbs / product detail ---------- */

.thumb {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-2);
}
.thumb.large { width: 140px; height: 140px; }

.product-detail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    overflow: hidden;
    padding: 0;
}
.product-detail img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: 0;
    border-bottom: 3px solid var(--brand-gold);
}
.product-detail .card-body { padding: 1.1rem 1.2rem 1.2rem; }

@media (min-width: 760px) {
    .product-detail {
        grid-template-columns: minmax(280px, 1fr) 1.1fr;
    }
    .product-detail img {
        height: 100%;
        max-height: none;
        border-bottom: 0;
        border-right: 3px solid var(--brand-gold);
    }
}

.price {
    font-size: 1.7rem;
    color: var(--brand-gold);
}

.muted { color: var(--muted); }

.plain-list {
    margin: .4rem 0 .2rem;
    padding-left: 1.1rem;
    color: var(--ink-dim);
}
.plain-list li { margin-bottom: .15rem; }

/* ---------- Footer ---------- */

.site-footer {
    border-top: 3px solid var(--brand-gold);
    margin-top: 2.5rem;
    padding: 1rem 0;
    color: var(--ink-dim);
    background: linear-gradient(180deg, #2a0708, #140304);
    text-align: center;
    font-size: .9rem;
}

/* ---------- Mobile nav tweaks ---------- */

@media (max-width: 520px) {
    .header-inner { justify-content: center; }
    .main-nav { width: 100%; justify-content: center; }
    .logo { width: 100%; justify-content: center; }
    .logo img { height: 44px; width: 44px; }
    .category-filter { top: 116px; }
    .hero { padding: .5rem 0 .25rem; }
}

/* ---------- Admin filter bar + pager ---------- */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: end;
    padding: .75rem 1rem;
    margin: 0 0 1rem;
    background: rgba(0, 0, 0, .25);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
}
.filter-bar label {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    font-size: .85rem;
    color: var(--ink-dim);
    margin: 0;
}
.filter-bar input[type="text"],
.filter-bar select {
    margin: 0;
    min-width: 140px;
    height: 2.4rem;
    box-sizing: border-box;
}
.filter-bar .btn {
    margin: 0;
    height: 2.4rem;
    padding: 0 1rem;
    box-sizing: border-box;
    line-height: 1;
}

.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin: 1rem 0 0;
    padding: .65rem 1rem;
    background: rgba(0, 0, 0, .2);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
}
.pager-summary {
    color: var(--ink-dim);
    font-size: .9rem;
}
.pager-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
}
.pager-link,
.pager-current,
.pager-gap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: .25rem .55rem;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    line-height: 1;
}
.pager-link {
    border: 1px solid var(--border-2);
    color: var(--ink);
}
.pager-link:hover {
    border-color: var(--brand-gold);
    text-decoration: none;
}
.pager-current {
    background: var(--brand-gold);
    color: #2a0708;
    font-weight: 700;
}
.pager-gap {
    color: var(--muted);
}
