/* ══════════════════════════════════════════════════════
   Zorro's Pizza — Online Order Page Styles
   order.css
══════════════════════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --red:        #c0392b;
    --red-dark:   #8B0000;
    --red-light:  #e74c3c;
    --gold:       #f6b23c;
    --cream:      #fff7e8;
    --ink:        #15110e;
    --bg:         #12100d;
    --bg2:        #1c1915;
    --bg3:        #29231d;
    --border:     rgba(255,247,232,0.12);
    --text:       #fff7e8;
    --text-muted: rgba(255,247,232,0.64);
    --success:    #27ae60;
    --radius:     8px;
    --shadow:     0 8px 32px rgba(0,0,0,0.4);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', 'Inter', sans-serif;
    background:
        linear-gradient(180deg, rgba(18,16,13,0.96), rgba(18,16,13,1) 42%),
        radial-gradient(circle at 18% 10%, rgba(246,178,60,0.08), transparent 30%),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-size: 15px;
    line-height: 1.5;
}

/* ── Header ── */
.site-header {
    background: rgba(18,16,13,0.9);
    border-bottom: 1px solid rgba(255,247,232,0.12);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}
.header-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
    font-size: 28px;
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--red-dark), var(--red));
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}
.brand-name {
    display: block;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #fff;
}
.brand-tagline {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}
.header-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.header-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
.header-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.header-nav a:hover {
    color: var(--cream);
    background: rgba(255,255,255,0.06);
}
.phone-link {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}
.phone-link:hover { color: #f1c40f; }
.hours-badge {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ── Hero ── */
.hero {
    min-height: 540px;
    padding: 74px 24px 44px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(18,16,13,0.96) 0%, rgba(18,16,13,0.82) 42%, rgba(18,16,13,0.42) 100%);
    pointer-events: none;
}
.hero-media {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(18,16,13,0.05), rgba(18,16,13,0.55)),
        url("https://images.unsplash.com/photo-1565299624946-b28f40a0ae38?auto=format&fit=crop&w=1800&q=80") center / cover;
    transform: scale(1.02);
}
.hero-content {
    width: min(1100px, 100%);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.hero-kicker {
    display: inline-flex;
    margin-bottom: 14px;
    color: var(--gold);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.hero h1 {
    max-width: 720px;
    font-size: clamp(2.6rem, 7vw, 5.9rem);
    font-weight: 900;
    color: #fff;
    margin-bottom: 12px;
    line-height: 0.95;
    text-shadow: 0 10px 30px rgba(0,0,0,0.42);
}
.hero p {
    color: rgba(255,247,232,0.86);
    font-size: clamp(1rem, 2vw, 1.22rem);
    margin-bottom: 22px;
    max-width: 620px;
}
.hero-actions,
.hero-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}
.hero-actions button {
    border: 1px solid rgba(255,247,232,0.24);
    background: rgba(18,16,13,0.42);
    color: var(--cream);
    border-radius: 999px;
    padding: 9px 14px;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}
.hero-actions button:hover {
    border-color: rgba(246,178,60,0.7);
    color: var(--gold);
    transform: translateY(-1px);
}
.order-type-toggle {
    display: inline-flex;
    background: rgba(18,16,13,0.72);
    border: 1px solid rgba(255,247,232,0.18);
    border-radius: 999px;
    padding: 4px;
    gap: 4px;
    backdrop-filter: blur(12px);
}
.type-btn {
    padding: 10px 28px;
    border-radius: 50px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.type-btn.active {
    background: linear-gradient(135deg, var(--red-dark), var(--red));
    color: #fff;
    box-shadow: 0 4px 16px rgba(192,57,43,0.35);
}
.hero-proof {
    margin-top: 16px;
    margin-bottom: 0;
    color: rgba(255,247,232,0.76);
    font-size: 13px;
}
.hero-proof span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.hero-proof i { color: var(--gold); }

/* ── Alert Banners ── */
.alert-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
}
.alert-banner button {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.7;
}
.alert-warn { background: rgba(243,156,18,0.15); color: var(--gold); border-bottom: 1px solid rgba(243,156,18,0.2); }
.alert-error { background: rgba(192,57,43,0.15); color: #e74c3c; border-bottom: 1px solid rgba(192,57,43,0.2); }

/* ── Main Layout ── */
.main-layout {
    max-width: 1300px;
    margin: 0 auto;
    padding: 28px 20px;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}
.menu-section {
    min-width: 0;
}

/* ── Category Strip ── */
.category-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 4px;
    margin-bottom: 16px;
    scrollbar-width: none;
}
.category-strip::-webkit-scrollbar { display: none; }
.cat-btn {
    white-space: nowrap;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg2);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}
.cat-btn:hover { border-color: var(--red); color: var(--text); }
.cat-btn.active {
    background: linear-gradient(135deg, var(--red-dark), var(--red));
    border-color: transparent;
    color: #fff;
}

/* ── Search ── */
.search-wrap {
    position: relative;
    margin-bottom: 20px;
}
.search-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}
.search-wrap input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
}
.search-wrap input:focus {
    outline: none;
    border-color: rgba(192,57,43,0.5);
}
.search-wrap input::placeholder { color: var(--text-muted); }

/* ── Menu Grid ── */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.menu-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: all 0.2s;
    cursor: default;
}
.menu-card:hover {
    border-color: rgba(246,178,60,0.36);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.menu-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.3;
}
.menu-card-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--gold);
}
.mod-badge {
    margin-top: 5px;
    font-size: 10px;
    color: rgba(192,57,43,0.8);
    display: flex;
    align-items: center;
    gap: 4px;
}
.add-btn {
    flex-shrink: 0;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--red-dark), var(--red));
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(192,57,43,0.3);
}
.add-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(192,57,43,0.5);
}
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.no-results i { font-size: 2rem; margin-bottom: 12px; display: block; }

/* ── Cart Section ── */
.cart-section {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.cart-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.delivery-card {
    border-color: rgba(246,178,60,0.34);
    background: rgba(246,178,60,0.06);
}
.delivery-card h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--red-light);
    display: flex;
    align-items: center;
    gap: 8px;
}
.delivery-card small { display: block; margin-top: 6px; font-size: 11px; color: var(--text-muted); }

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.cart-header h3 {
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cart-count {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg3);
    padding: 3px 10px;
    border-radius: 999px;
}
.cart-empty {
    text-align: center;
    padding: 30px 10px;
    color: var(--text-muted);
}
.cart-empty i { font-size: 2rem; margin-bottom: 10px; display: block; opacity: 0.3; }
.cart-empty p { font-weight: 600; margin-bottom: 4px; }
.cart-empty span { font-size: 12px; }

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-name { font-size: 13px; font-weight: 600; }
.cart-item-mods { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.qty-btn {
    width: 24px; height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.15s;
}
.qty-btn:hover { border-color: var(--red); color: var(--red); }
.qty-num { font-size: 14px; font-weight: 700; min-width: 18px; text-align: center; }
.cart-item-price { font-size: 13px; font-weight: 700; color: var(--gold); min-width: 50px; text-align: right; }

.cart-totals { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 14px; }
.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
    padding: 4px 0;
}
.total-grand {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    padding-top: 10px;
    margin-top: 6px;
    border-top: 1px solid var(--border);
}

/* ── Customer Fields ── */
.cart-card h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.field-group { margin-bottom: 12px; }
.field-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.req { color: var(--red-light); }
.field-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
    resize: none;
}
.field-input:focus {
    outline: none;
    border-color: rgba(246,178,60,0.62);
    box-shadow: 0 0 0 3px rgba(246,178,60,0.08);
}
.field-input::placeholder { color: var(--text-muted); }
.field-group small { display: block; font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ── Pay Button ── */
.pay-card { text-align: center; }
.pay-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 20px rgba(39,174,96,0.35);
}
.pay-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(39,174,96,0.5);
}
.pay-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}
.stripe-trust {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}
.stripe-trust i { color: #6772e5; font-size: 20px; }
.pay-note {
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ── Modifier Modal ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 200;
    backdrop-filter: blur(4px);
}
.mod-modal {
    position: fixed;
    bottom: -100%;
    left: 0; right: 0;
    background: var(--bg2);
    border-top: 2px solid var(--red);
    border-radius: 20px 20px 0 0;
    z-index: 201;
    max-height: 85vh;
    overflow-y: auto;
    transition: bottom 0.35s cubic-bezier(.4,0,.2,1);
    padding-bottom: env(safe-area-inset-bottom, 20px);
}
.mod-modal.open { bottom: 0; }
.mod-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 14px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg2);
    z-index: 1;
}
.mod-modal-header h3 { font-size: 16px; font-weight: 800; }
.mod-close {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.mod-modal-body { padding: 20px 24px; }
.mod-section-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 14px;
}
.toppings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    margin-bottom: 20px;
}
.topping-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s;
    user-select: none;
}
.topping-chip input { display: none; }
.topping-chip:hover { border-color: var(--red); }
.topping-chip.selected {
    background: rgba(192,57,43,0.15);
    border-color: var(--red);
    color: #fff;
}
.topping-price { margin-left: auto; color: var(--gold); font-size: 11px; font-weight: 700; }

.flavor-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.flavor-chip {
    padding: 10px 18px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.15s;
    user-select: none;
}
.flavor-chip input { display: none; }
.flavor-chip:hover { border-color: var(--red); }
.flavor-chip.selected {
    background: linear-gradient(135deg, var(--red-dark), var(--red));
    border-color: transparent;
    color: #fff;
}

.mod-price-preview {
    font-size: 16px;
    font-weight: 800;
    color: var(--gold);
    text-align: center;
    padding: 12px;
    background: var(--bg3);
    border-radius: 10px;
}
.mod-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    position: sticky;
    bottom: 0;
    background: var(--bg2);
}
.mod-add-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--red-dark), var(--red));
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(192,57,43,0.3);
}
.mod-add-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(192,57,43,0.4); }

/* ── Footer ── */
.site-footer {
    margin-top: 60px;
    background: #0a0a0a;
    border-top: 1px solid var(--border);
    padding: 32px 24px;
}
.footer-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.8;
}
.footer-inner strong { color: var(--text); }
.footer-inner a { color: var(--gold); text-decoration: none; }
.footer-note { font-size: 11px; opacity: 0.7; }

.mobile-checkout-bar {
    display: none;
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    z-index: 150;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(255,247,232,0.18);
    border-radius: 8px;
    background: linear-gradient(135deg, #1f1811, #7c160e);
    color: var(--cream);
    box-shadow: 0 16px 40px rgba(0,0,0,0.45);
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}
.mobile-checkout-bar span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.mobile-checkout-bar strong { color: var(--gold); }

/* ── Responsive ── */
@media (max-width: 900px) {
    .main-layout {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    .cart-section { position: static; }
    .menu-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .header-nav,
    .header-info { display: none; }
    .hero {
        min-height: 520px;
        padding: 54px 18px 34px;
    }
    .hero::after {
        background: linear-gradient(180deg, rgba(18,16,13,0.58), rgba(18,16,13,0.94) 72%);
    }
    .mobile-checkout-bar.show { display: flex; }
    body { padding-bottom: 74px; }
}
@media (max-width: 480px) {
    .header-inner { padding: 12px 16px; }
    .brand-logo { width: 42px; height: 42px; }
    .brand-name { font-size: 17px; }
    .brand-tagline { font-size: 10px; }
    .hero { min-height: 500px; }
    .hero h1 { font-size: 2.55rem; }
    .type-btn { padding: 9px 18px; font-size: 13px; }
    .menu-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .menu-card { padding: 12px 10px; }
    .menu-card-name { font-size: 12px; }
    .hero-actions button { padding: 8px 11px; }
    .hero-proof { display: none; }
}

/* ─── Menu Loading Spinner ─── */
.menu-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 64px 20px;
    grid-column: 1 / -1;
}
.menu-loading p {
    font-size: 15px;
    color: rgba(255,255,255,.55);
    font-weight: 500;
}
.loading-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(255,255,255,.1);
    border-top-color: var(--accent, #e74c3c);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── Menu Error State ─── */
.menu-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 64px 20px;
    grid-column: 1 / -1;
    text-align: center;
}
.menu-error i {
    font-size: 36px;
    color: #e67e22;
}
.menu-error p {
    font-size: 15px;
    color: rgba(255,255,255,.6);
    max-width: 340px;
    line-height: 1.5;
}
.retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    border: none;
    border-radius: 10px;
    background: var(--accent, #e74c3c);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s, transform .15s;
}
.retry-btn:hover {
    background: #c0392b;
    transform: scale(1.04);
}
