/* ============================================================
   ORDERING SYSTEM STYLES  — Modern Redesign
   ============================================================ */
@keyframes spin { to { transform: rotate(360deg); } }
:root {
    --primary: #E8622A;
    --primary-dark: #cf5220;
    --primary-light: rgba(232,98,42,.09);
    --secondary: #1C1917;
    --accent: #2D9E6B;
    --bg: #FBF5EC;
    --card-bg: #FFFFFF;
    --white: #FFFFFF;
    --gray-100: #F5EFE6;
    --gray-200: #EDE5D9;
    --gray-300: #D9CEBC;
    --gray-400: #B8AB96;
    --gray-500: #8C7E6A;
    --gray-600: #6B5E4D;
    --gray-700: #4A3F32;
    --gray-800: #2C2318;
    --gray-900: #1A1208;
    --shadow-xs: 0 1px 4px rgba(80,40,10,.07);
    --shadow-sm: 0 3px 10px rgba(80,40,10,.09);
    --shadow-md: 0 6px 24px rgba(80,40,10,.13);
    --shadow-lg: 0 16px 48px rgba(80,40,10,.18);
    --shadow-card: 0 2px 16px rgba(80,40,10,.08), 0 1px 4px rgba(80,40,10,.06);
    --shadow-hover: 0 8px 32px rgba(80,40,10,.16), 0 2px 8px rgba(80,40,10,.10);
    --radius: 18px;
    --radius-sm: 12px;
    --transition: .18s ease;
    --cart-width: 360px;
    --header-h: calc(66px + env(safe-area-inset-top));
    --sidebar-w: 230px;
    --mobile-bar-h: 0px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--gray-800);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip; /* clip instead of hidden — doesn't break position:fixed on iOS Safari */
    background-image: radial-gradient(circle at 20% 50%, rgba(232,98,42,.04) 0%, transparent 60%),
                      radial-gradient(circle at 80% 20%, rgba(232,98,42,.03) 0%, transparent 50%);
}
img { max-width: 100%; display: block; }

/* ============================================================
   ORDER HEADER
   ============================================================ */
.order-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: var(--secondary);
    background-image: linear-gradient(135deg, #1C1917 0%, #2C1F14 100%);
    z-index: 200;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 30px rgba(0,0,0,.38), 0 1px 0 rgba(255,255,255,.04);
    /* Force GPU compositing — prevents iOS Safari position:fixed jitter */
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    will-change: transform;
    /* Safe area padding for iPhone notch / Dynamic Island */
    padding-top: env(safe-area-inset-top);
}

.order-header-inner {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.order-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    flex-shrink: 0;
    letter-spacing: -.2px;
}

.order-logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(255,107,53,.4);
}

/* Service Type Switcher */
.service-switcher {
    display: flex;
    background: rgba(255,255,255,.1);
    border-radius: 50px;
    padding: 4px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,.08);
}

.service-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-size: .82rem;
    font-weight: 600;
    transition: all var(--transition);
    background: transparent;
    color: rgba(255,255,255,.65);
    letter-spacing: -.1px;
}

.service-btn.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 2px 12px rgba(255,107,53,.45);
}

.header-spacer { flex: 1; }

/* Controls wrapper: inline flex row on desktop, full-width row on mobile */
.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-search {
    position: relative;
    max-width: 230px;
    width: 100%;
}

.header-search input {
    width: 100%;
    padding: 9px 14px 9px 36px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 50px;
    color: var(--white);
    font-size: .85rem;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}

.header-search input::placeholder { color: rgba(255,255,255,.42); }
.header-search input:focus {
    background: rgba(255,255,255,.15);
    border-color: var(--primary);
}

.header-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,.45);
    font-size: .82rem;
    pointer-events: none;
}

.header-customer {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.82);
    font-size: .85rem;
    flex-shrink: 0;
}

.btn-login-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,.25);
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.85);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-login-header:hover {
    background: rgba(255,255,255,.16);
    border-color: rgba(255,255,255,.4);
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.order-layout {
    display: flex;
    margin-top: var(--header-h);
    min-height: calc(var(--vh, 1vh) * 100 - var(--header-h));
}

/* ============================================================
   CATEGORY SIDEBAR
   ============================================================ */
.category-sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: #FEFAF4;
    border-right: 1px solid var(--gray-200);
    position: sticky;
    top: var(--header-h);
    height: calc(var(--vh, 1vh) * 100 - var(--header-h));
    overflow-y: auto;
    padding: 22px 14px;
    box-shadow: 2px 0 12px rgba(80,40,10,.05);
}

.category-sidebar::-webkit-scrollbar { width: 3px; }
.category-sidebar::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 2px; }

.sidebar-title {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-weight: 700;
    color: var(--gray-400);
    padding: 0 10px 16px;
}

.cat-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    font-size: .855rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all .16s ease;
    border-radius: 12px;
    margin-bottom: 3px;
    border: 1px solid transparent;
    letter-spacing: -.1px;
}

.cat-nav-item:hover {
    background: rgba(232,98,42,.07);
    color: var(--primary);
    border-color: rgba(232,98,42,.12);
}

.cat-nav-item.active {
    background: var(--primary);
    color: var(--white);
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(232,98,42,.35);
    border-color: transparent;
}

.cat-nav-count {
    margin-left: auto;
    font-size: .7rem;
    background: rgba(0,0,0,.08);
    color: inherit;
    padding: 1px 7px;
    border-radius: 50px;
    font-weight: 700;
}

.cat-nav-item.active .cat-nav-count {
    background: rgba(255,255,255,.22);
}

/* ============================================================
   MENU CONTENT
   ============================================================ */
.menu-content {
    flex: 1;
    padding: 28px 28px 40px;
    overflow-y: auto;
    min-width: 0;
    max-width: calc(100% - var(--sidebar-w) - var(--cart-width));
    background: var(--bg);
}

/* ============================================================
   MENU SECTION HEADERS
   ============================================================ */
.menu-section { margin-bottom: 48px; scroll-margin-top: calc(var(--header-h) + 24px); }

.menu-section-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
    letter-spacing: -.2px;
    text-transform: uppercase;
}

.menu-section-desc {
    font-size: .82rem;
    color: var(--gray-500);
    margin-bottom: 16px;
    line-height: 1.5;
}

/* Divider line under section title */
.menu-section::before {
    content: none;
}

/* ============================================================
   MENU ITEM CARDS — GRID
   ============================================================ */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 18px;
}

.item-card {
    background: var(--card-bg);
    border: 1px solid rgba(210,180,140,.2);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all .22s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-card);
}

.item-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: rgba(232,98,42,.16);
    transform: translateY(-5px);
}

.item-card:active { transform: translateY(-1px); }
.item-card.unavailable { opacity: .5; pointer-events: none; }

.item-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: linear-gradient(135deg, #FDDFA0 0%, #F5A660 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.2rem;
    position: relative;
    flex-shrink: 0;
}

.item-img img { width: 100%; height: 100%; object-fit: cover; }

.item-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: var(--white);
    font-size: .68rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(255,107,53,.4);
}

.item-body { padding: 14px 14px 12px; flex: 1; display: flex; flex-direction: column; }

.item-name {
    font-size: .95rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 5px;
    line-height: 1.35;
    letter-spacing: -.15px;
}

.item-desc {
    font-size: .79rem;
    color: var(--gray-500);
    line-height: 1.55;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.item-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -.2px;
}

.btn-add-item {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all var(--transition);
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(255,107,53,.35);
    line-height: 1;
}

.btn-add-item:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
    box-shadow: 0 4px 14px rgba(255,107,53,.45);
}

/* ============================================================
   MENU ITEM CARDS — LIST VIEW
   ============================================================ */
.items-list { display: flex; flex-direction: column; gap: 10px; }

.item-card.list-view {
    flex-direction: row;
    align-items: flex-start;
    border-radius: var(--radius);
    border: 1px solid rgba(210,180,140,.22);
    box-shadow: var(--shadow-card);
    background: var(--card-bg);
    padding: 16px 18px;
    gap: 16px;
    transition: all .18s ease;
}

.item-card.list-view:hover {
    background: #FFFDF9;
    box-shadow: var(--shadow-hover);
    border-color: rgba(232,98,42,.18);
    transform: translateY(-2px);
}

.item-card.list-view .item-img {
    width: 96px;
    height: 96px;
    flex-shrink: 0;
    border-radius: 14px;
    overflow: hidden;
    font-size: 2.4rem;
    box-shadow: 0 4px 12px rgba(80,40,10,.14);
}

.item-card.list-view .item-img img { width: 100%; height: 100%; object-fit: cover; }

.item-card.list-view .item-body {
    flex: 1;
    padding: 0;
    min-width: 0;
}

/* Row 1: name + price */
.item-row-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.item-card.list-view .item-name {
    font-size: 1rem;
    font-weight: 700;
    flex: 1;
    min-width: 0;
}

.item-card.list-view .item-price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.item-card.list-view .item-desc {
    font-size: .81rem;
    color: var(--gray-500);
    -webkit-line-clamp: 2;
    margin-bottom: 10px;
}

/* Row 3: tags + add button */
.item-row-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.item-tags { display: flex; flex-wrap: wrap; gap: 5px; }

.item-tag {
    display: inline-block;
    background: rgba(232,98,42,.09);
    color: var(--primary);
    border: 1px solid rgba(232,98,42,.18);
    font-size: .67rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
}

.item-tag.unavail { background: var(--gray-200); color: var(--gray-500); border-color: transparent; }

.item-card.list-view .btn-add-item {
    width: auto;
    height: 34px;
    padding: 0 18px;
    border-radius: 20px;
    font-size: .82rem;
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(232,98,42,.32);
}

/* Badge inline (grid no-image) */
.item-badge-inline {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(255,107,53,.18);
    font-size: .68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 50px;
    margin-bottom: 5px;
}

.item-card.no-image { flex-direction: column; }

/* Loading skeletons */
.loading-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 18px;
}

.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card { height: 230px; }
.skeleton-title { height: 22px; width: 60%; border-radius: 4px; margin-bottom: 8px; }
.skeleton-text { height: 15px; width: 90%; border-radius: 4px; margin-bottom: 6px; }

/* ============================================================
   CART PANEL
   ============================================================ */
/* Cart overlay backdrop (mobile only) */
.cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 349;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.cart-overlay.open { display: block; }

.cart-panel {
    width: var(--cart-width);
    flex-shrink: 0;
    background: #FEFAF4;
    border-left: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: var(--header-h);
    height: calc(var(--vh, 1vh) * 100 - var(--header-h));
    box-shadow: -3px 0 14px rgba(80,40,10,.05);
}

.cart-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #FEFAF4;
}

.cart-panel-close {
    display: none;
    width: 32px;
    height: 32px;
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: .9rem;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: var(--transition);
    flex-shrink: 0;
}

.cart-panel-close:hover { background: var(--gray-200); }

.cart-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -.2px;
}

.cart-count {
    background: var(--primary);
    color: var(--white);
    font-size: .72rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 50px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 14px 14px 8px;
    background: #FEFAF4;
}

.cart-items::-webkit-scrollbar { width: 3px; }
.cart-items::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 2px; }

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    color: var(--gray-500);
}

.cart-empty-icon {
    width: 88px;
    height: 88px;
    background: linear-gradient(135deg, #FDDFA0 0%, #F5A660 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    margin-bottom: 20px;
    box-shadow: 0 6px 20px rgba(232,98,42,.22);
}

.cart-empty-title {
    font-weight: 800;
    color: var(--gray-700);
    margin-bottom: 6px;
    font-size: 1rem;
    letter-spacing: -.1px;
}

.cart-empty-sub { font-size: .83rem; line-height: 1.5; color: var(--gray-500); }

.cart-item {
    display: flex;
    gap: 12px;
    padding: 13px 15px;
    border-radius: 14px;
    background: var(--white);
    margin-bottom: 9px;
    position: relative;
    border: 1px solid rgba(210,180,140,.25);
    box-shadow: 0 2px 10px rgba(80,40,10,.07);
    transition: all var(--transition);
}

.cart-item:hover {
    border-color: rgba(232,98,42,.2);
    box-shadow: 0 4px 16px rgba(80,40,10,.10);
}

.cart-item-img {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    background: linear-gradient(135deg, #fde68a, #fdba74);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    overflow: hidden;
}

.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item.no-img { padding-left: 14px; }

.cart-item-details { flex: 1; min-width: 0; }

.cart-item-name {
    font-size: .875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 2px;
    padding-right: 20px;
    line-height: 1.3;
    letter-spacing: -.1px;
}

.cart-item-opts {
    font-size: .73rem;
    color: var(--gray-500);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-footer { display: flex; align-items: center; justify-content: space-between; }

.cart-item-price {
    font-size: .95rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -.1px;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--gray-100);
    border-radius: 50px;
    padding: 3px 4px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .82rem;
    transition: all var(--transition);
    line-height: 1;
    color: var(--gray-700);
    box-shadow: var(--shadow-xs);
}

.qty-btn:hover { background: var(--primary); color: var(--white); }
.qty-val { font-size: .85rem; font-weight: 700; min-width: 18px; text-align: center; }

.cart-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: .8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition);
    border-radius: 50%;
}

.cart-remove:hover { color: #e53e3e; background: #fff0f0; }

.cart-footer {
    padding: 16px 18px 20px;
    border-top: 1px solid var(--gray-200);
    background: #FEFAF4;
}

.cart-totals { margin-bottom: 14px; }

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: .875rem;
    margin-bottom: 7px;
    color: var(--gray-600);
}

.cart-total-row.total {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--gray-900);
    padding-top: 12px;
    border-top: 2px solid var(--gray-200);
    margin-top: 6px;
    letter-spacing: -.2px;
}

.min-order-notice {
    display: none;
    background: #fffbeb;
    color: #744210;
    border: 1px solid #f6e05e;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: .79rem;
    margin-bottom: 12px;
    text-align: center;
    font-weight: 500;
}

.btn-checkout {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary) 0%, #ff8c5a 100%);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: .97rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(255,107,53,.4);
    font-family: inherit;
    letter-spacing: -.1px;
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,53,.5);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.btn-checkout:disabled {
    background: var(--gray-300);
    color: var(--gray-500);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ============================================================
   ITEM MODAL (bottom sheet)
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.55);
    z-index: 500;
    display: none;
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-overlay.open { display: flex; }

.modal-sheet {
    background: var(--white);
    border-radius: 28px 28px 0 0;
    width: 100%;
    max-width: 580px;
    max-height: 92%;
    overflow-y: auto;
    animation: slide-up .28s cubic-bezier(.4,0,.2,1);
}

@keyframes slide-up {
    from { transform: translateY(100%); opacity: .8; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-handle {
    width: 40px;
    height: 4px;
    background: var(--gray-300);
    border-radius: 2px;
    margin: 14px auto 0;
}

.cart-drag-handle {
    display: none; /* shown only on mobile via media query */
    width: 40px;
    height: 4px;
    background: var(--gray-300);
    border-radius: 2px;
    margin: 12px auto 0;
    flex-shrink: 0;
}

.modal-item-img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    background: linear-gradient(135deg, #FDDFA0 0%, #F5A660 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5.5rem;
    overflow: visible; /* must not be hidden — close button sits at the corner */
    position: relative;
}


/* No-image state: collapse the image area, button floats over content */
.modal-item-img--no-image {
    height: 0;
    background: transparent;
}

.modal-item-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-img-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.45);
    color: #fff;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background .15s;
}

.modal-body { padding: 24px 26px 30px; }

.modal-item-name {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 8px;
    letter-spacing: -.35px;
    line-height: 1.25;
}

.modal-item-desc {
    color: var(--gray-600);
    margin-bottom: 16px;
    line-height: 1.65;
    font-size: .9rem;
}

.modal-item-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 26px;
    display: block;
    letter-spacing: -.3px;
}

/* Option Sets */
.option-set { margin-bottom: 26px; }

.option-set-header {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 10px 14px;
    transition: background .15s;
}
.option-set-header:hover { background: var(--gray-200); }

.option-set-header-text { flex: 1; min-width: 0; }

.option-set-summary {
    font-size: .75rem;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 110px;
    flex-shrink: 0;
}

.option-set-chevron {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--gray-400);
    transition: transform .22s ease;
}

/* Collapsed state */
.option-set.collapsed .option-list { display: none; }
.option-set.collapsed .option-set-error { display: none !important; }
.option-set.collapsed .option-set-chevron { transform: rotate(-90deg); }
.option-set.collapsed .option-set-summary { color: var(--primary); font-weight: 600; }

.option-set-invalid {
    border: 2px solid #e53e3e;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 20px;
}

.option-set-error {
    display: none;
    color: #e53e3e;
    font-size: .8rem;
    font-weight: 600;
    margin: 4px 0 10px;
}

.option-set-invalid .option-set-error { display: block; }

.option-set-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 3px;
    letter-spacing: -.15px;
}

.option-set-meta { font-size: .78rem; color: var(--gray-500); }

.option-set-meta .required-badge {
    background: #fee2e2;
    color: #c53030;
    padding: 2px 7px;
    border-radius: 5px;
    font-weight: 700;
    margin-left: 5px;
    font-size: rem;
}

.option-list { display: flex; flex-direction: column; gap: 8px; }

/* Quantity-mode option rows */
.option-qty-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.option-qty-row:last-child { border-bottom: none; }
.option-qty-row .option-label { flex: 1; font-size: .95rem; }
.option-qty-row .option-price { color: var(--gray-600); font-size: .85rem; white-space: nowrap; }
.opt-qty-ctrl {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.opt-qty-dec, .opt-qty-inc {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--white);
    cursor: pointer;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background .15s;
}
.opt-qty-dec:hover, .opt-qty-inc:hover { background: var(--bg); }
.opt-qty-val {
    min-width: 22px;
    text-align: center;
    font-weight: 700;
    font-size: .95rem;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--white);
}

.option-item:hover { border-color: var(--gray-400); background: var(--gray-100); }
.option-item.selected { border-color: var(--primary); background: var(--primary-light); }
.option-item input { display: none; }

.option-check {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    flex-shrink: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.option-item.selected .option-check {
    border-color: var(--primary);
    background: var(--primary);
}

.option-item.selected .option-check::after {
    content: '✓';
    font-size: .68rem;
    color: var(--white);
    font-weight: 700;
}

.option-checkbox .option-check { border-radius: 6px; }
.option-label { flex: 1; font-size: .9rem; font-weight: 500; color: var(--gray-800); }
.option-price { font-size: .9rem; font-weight: 600; color: var(--gray-600); }
.option-price.positive { color: var(--accent); }
.option-price.free-tag { color: #38a169; font-size: .8rem; font-weight: 700; }
.free-counter { font-size: .78rem; font-weight: 600; color: #38a169; }
.free-counter.used { color: #718096; }
.option-item.opt-disabled { opacity: .35; cursor: not-allowed; pointer-events: none; }

/* Quantity in modal */
.modal-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 14px 16px;
    background: var(--gray-100);
    border-radius: 14px;
}

.modal-qty-label { font-weight: 700; color: var(--gray-800); font-size: .95rem; }

.modal-qty-controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

.modal-qty-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--white);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    color: var(--gray-700);
}

.modal-qty-btn:hover { background: var(--primary); color: var(--white); box-shadow: 0 3px 10px rgba(255,107,53,.35); }
.modal-qty-val { font-size: 1.1rem; font-weight: 800; min-width: 28px; text-align: center; color: var(--gray-900); }

.modal-note-label { font-size: .85rem; font-weight: 600; color: var(--gray-700); margin-bottom: 8px; }

.modal-note-input {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: .9rem;
    outline: none;
    resize: none;
    transition: var(--transition);
    font-family: inherit;
    margin-bottom: 20px;
    color: var(--gray-800);
    background: var(--white);
}

.modal-note-input:focus { border-color: var(--primary); background: #fff; }

.btn-add-to-cart {
    width: 100%;
    padding: 17px;
    background: linear-gradient(135deg, var(--primary) 0%, #ff8c5a 100%);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 5px 18px rgba(255,107,53,.4);
    font-family: inherit;
    letter-spacing: -.1px;
}

.btn-add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 22px rgba(255,107,53,.5);
}

/* ============================================================
   CHECKOUT MODAL
   ============================================================ */
/* ── Checkout overlay ── */
.checkout-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.5);
    z-index: 600;
    display: none;
    align-items: flex-end;       /* bottom sheet on all sizes */
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.checkout-overlay.open { display: flex; }

/* ── Checkout modal ── */
.checkout-modal {
    background: var(--white);
    border-radius: 22px 22px 0 0;
    width: 100%;
    max-width: 620px;
    height: 92%;                 /* 92% of overlay = 92% of visible viewport */
    display: flex;
    flex-direction: column;
    overflow: hidden;            /* children scroll, not the modal itself */
    animation: co-slide-up .3s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 -4px 40px rgba(0,0,0,.18);
    overscroll-behavior: contain;
}

/* Drag handle */
.checkout-modal::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: var(--gray-300, #d1d5db);
    margin: 10px auto 0;
    flex-shrink: 0;
}

@keyframes co-slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

@keyframes cart-slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.checkout-header {
    padding: 14px 24px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;              /* never shrinks — always visible */
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    z-index: 1;
}

.checkout-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -.25px;
}

.checkout-close {
    width: 34px;
    height: 34px;
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: var(--transition);
}

.checkout-close:hover { background: var(--gray-200); color: var(--gray-900); }

/* Steps indicator */
.checkout-steps {
    display: flex;
    padding: 16px 24px;
    position: relative;
    flex-shrink: 0;
    border-bottom: 1px solid var(--gray-200);
    background: var(--white);
}

.checkout-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    position: relative;
}

.checkout-step::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 50%;
    right: -50%;
    height: 2px;
    background: var(--gray-200);
    z-index: 0;
}

.checkout-step:last-child::before { display: none; }

.step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 700;
    color: var(--gray-500);
    position: relative;
    z-index: 1;
    transition: all var(--transition);
}

.checkout-step.active .step-dot {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 3px 10px rgba(255,107,53,.4);
}

.checkout-step.done .step-dot {
    background: var(--accent);
    color: var(--white);
    box-shadow: 0 3px 10px rgba(56,161,105,.3);
}

.checkout-step.done .step-dot::after { content: '✓'; }

.step-label { font-size: .68rem; color: var(--gray-500); font-weight: 600; text-align: center; letter-spacing: .02em; }
.checkout-step.active .step-label { color: var(--primary); font-weight: 700; }

.checkout-body {
    padding: 0 24px 28px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    flex: 1;                     /* takes remaining height, scrolls */
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
}
.checkout-section { display: none; }
.checkout-section.active { display: block; }

.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
    letter-spacing: -.05px;
}

.form-label .req { color: #e53e3e; }

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid var(--gray-200);
    border-radius: 11px;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
    color: var(--gray-800);
    background: var(--white);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,107,53,.1);
}

/* Prevent iOS Safari auto-zoom: inputs < 16px trigger page zoom on tap.
   Applied globally (not inside a media query) so every screen size is covered. */
input, input[type="text"], input[type="email"], input[type="tel"],
input[type="password"], input[type="number"], input[type="search"],
textarea, select,
.form-input, .form-select, .form-textarea,
.modal-note-input, .header-search input {
    font-size: 1rem !important;
}

.form-input.error, .form-select.error { border-color: #e53e3e; }
.form-error { font-size: .78rem; color: #e53e3e; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-textarea { resize: vertical; min-height: 80px; }

/* Postcode row */
.postcode-row { display: flex; gap: 8px; align-items: stretch; }
.postcode-row .form-input { flex: 1; text-transform: uppercase; }

.btn-find-address {
    flex-shrink: 0;
    padding: 11px 18px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: .87rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition);
    font-family: inherit;
}

.btn-find-address:hover { background: var(--primary-dark); }
.btn-find-address:disabled { opacity: .6; cursor: not-allowed; }

/* Timing / service toggles */
.timing-toggle-row { display: flex; gap: 10px; margin-top: 8px; }

.timing-opt {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 14px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    font-size: .875rem;
    font-weight: 600;
    color: var(--gray-600);
    background: var(--white);
    transition: all .18s ease;
    user-select: none;
    font-family: inherit;
}

.timing-opt input[type="radio"] { display: none; }

.timing-opt:hover:not(.active) {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.timing-opt.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(255,107,53,.35);
}

.svc-opt {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 14px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    font-size: .875rem;
    font-weight: 600;
    color: var(--gray-600);
    background: var(--white);
    transition: all .18s ease;
    user-select: none;
}

.svc-opt:hover:not(.active) {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.svc-opt.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(255,107,53,.35);
}

/* Payment methods */
.payment-methods { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.payment-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 14px;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--white);
}

.payment-option:hover { border-color: var(--gray-400); background: var(--gray-100); }
.payment-option.selected { border-color: var(--primary); background: var(--primary-light); }
.payment-option input[type="radio"] { display: none; }
.payment-icon { font-size: 1.5rem; }
.payment-label { flex: 1; }
.payment-label-title { font-weight: 700; color: var(--gray-900); font-size: .9rem; }
.payment-label-sub { font-size: .77rem; color: var(--gray-500); margin-top: 2px; }

.payment-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.payment-option.selected .payment-radio {
    border-color: var(--primary);
    background: var(--primary);
}

.payment-option.selected .payment-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--white);
    border-radius: 50%;
}

#sumup-card { min-height: 200px; }

/* Order summary in checkout */
.checkout-summary {
    background: var(--gray-100);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 20px;
    border: 1px solid var(--gray-200);
}

.checkout-summary-title {
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--gray-900);
    font-size: .95rem;
    letter-spacing: -.15px;
}

.checkout-sum-item {
    display: flex;
    justify-content: space-between;
    font-size: .85rem;
    color: var(--gray-700);
    margin-bottom: 7px;
}

.checkout-sum-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--gray-900);
    padding-top: 12px;
    border-top: 2px solid var(--gray-300);
    margin-top: 4px;
    letter-spacing: -.2px;
}

/* Auth modal */
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--gray-500); font-size: .85rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }

.btn-nav {
    padding: 12px 28px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 600;
    transition: all var(--transition);
    font-family: inherit;
}

.btn-back { background: var(--gray-200); color: var(--gray-700); }
.btn-back:hover { background: var(--gray-300); }
.btn-next { background: var(--primary); color: var(--white); box-shadow: 0 3px 12px rgba(255,107,53,.35); }
.btn-next:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 5px 16px rgba(255,107,53,.4); }
.btn-place { background: var(--accent); color: var(--white); flex: 1; box-shadow: 0 3px 12px rgba(56,161,105,.3); }
.btn-place:hover { background: #2f855a; transform: translateY(-1px); }

.checkout-nav { display: flex; gap: 12px; margin-top: 22px; }

/* Order Confirmation */
.order-confirmation { text-align: center; padding: 44px 28px; }
.order-conf-icon { font-size: 5rem; margin-bottom: 20px; animation: bounce-in .45s cubic-bezier(.4,0,.2,1); }

@keyframes bounce-in {
    0% { transform: scale(0) rotate(-10deg); opacity: 0; }
    60% { transform: scale(1.15) rotate(5deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); }
}

.order-conf-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 8px;
    letter-spacing: -.4px;
}

.order-conf-num {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
    letter-spacing: -.2px;
}

.order-conf-msg { color: var(--gray-600); margin-bottom: 28px; line-height: 1.65; }

.btn-continue-shopping {
    display: inline-block;
    padding: 13px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, #ff8c5a 100%);
    color: var(--white);
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 16px rgba(255,107,53,.4);
    font-size: .95rem;
    font-family: inherit;
    transition: all var(--transition);
}

.btn-continue-shopping:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,53,.5);
}

/* Login / Register */
.auth-modal {
    background: var(--white);
    border-radius: 22px;
    width: 100%;
    max-width: 420px;
    max-height: calc(var(--vh, 1vh) * 92);
    overflow-y: auto;
    animation: pop-in .22s cubic-bezier(.4,0,.2,1);
    box-shadow: var(--shadow-lg);
}

.auth-modal .auth-tabs { display: flex; border-bottom: 1px solid var(--gray-200); }

.auth-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    color: var(--gray-500);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.auth-body { padding: 24px; }
.auth-section { display: none; }
.auth-section.active { display: block; }

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 26px;
    right: 26px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 20px;
    border-radius: 14px;
    background: var(--gray-900);
    color: var(--white);
    font-size: .88rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    animation: toast-in .28s cubic-bezier(.4,0,.2,1);
    max-width: 320px;
}

.toast.success { background: #166534; }
.toast.error { background: #991b1b; }
.toast.warning { background: #854d0e; }

@keyframes toast-in {
    from { transform: translateX(110%) translateY(8px); opacity: 0; }
    to { transform: translateX(0) translateY(0); opacity: 1; }
}

/* ============================================================
   MOBILE BOTTOM CHECKOUT BAR
   ============================================================ */
.mobile-bar {
    display: none; /* shown by JS when cart has items */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 250;
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    background: var(--secondary);
    box-shadow: 0 -4px 24px rgba(0,0,0,.28);
    /* GPU compositing — prevents iOS Safari jump */
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.mobile-bar-btn {
    display: flex;
    align-items: center;
    width: 100%;
    background: var(--primary);
    border: none;
    border-radius: 14px;
    padding: 14px 18px;
    color: #fff;
    cursor: pointer;
    font-size: .95rem;
    font-weight: 600;
    gap: 8px;
    box-shadow: 0 4px 18px rgba(232,98,42,.45);
    transition: background .15s;
}
.mobile-bar-btn:active { background: var(--primary-dark); }

.mobile-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.mobile-bar-icon { font-size: 1.1rem; }
.mobile-bar-count {
    background: rgba(255,255,255,.22);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: .8rem;
    font-weight: 700;
    white-space: nowrap;
}
.mobile-bar-mid {
    flex: 1;
    text-align: center;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .01em;
}
.mobile-bar-total {
    font-size: .95rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1180px) {
    :root { --cart-width: 320px; }
    .menu-content { max-width: calc(100% - var(--sidebar-w) - 320px); }
}

@media (max-width: 960px) {
    :root { --sidebar-w: 68px; }
    .category-sidebar { padding: 16px 8px; }
    .cat-nav-item { justify-content: center; padding: 10px; gap: 0; border-radius: 10px; }
    .cat-nav-item span:not(.cat-nav-icon) { display: none; }
    .sidebar-title { display: none; }
    .cat-nav-count { display: none; }
    .menu-content { max-width: calc(100% - 68px - 320px); }
}

@media (max-width: 768px) {
    /* ── Header: 2-row layout ─────────────────────────────────── */
    :root { --header-h: calc(108px + env(safe-area-inset-top)); }

    .order-header {
        height: auto;
        padding: calc(10px + env(safe-area-inset-top)) 16px 0;
        align-items: flex-start;
    }
    .order-header-inner {
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
        padding-bottom: 10px;
    }
    .order-logo {
        flex: 1;
        font-size: .9rem;
        min-width: 0;
    }
    .order-logo-icon { width: 30px; height: 30px; font-size: 1rem; }
    .header-spacer  { display: none; }
    .header-search  { display: none; }

    /* Controls row: full width, centred below logo */
    .header-controls {
        order: 10;
        flex-basis: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        flex-wrap: wrap;
        padding-bottom: 4px;
    }
    /* Override the old display:none — switchers are now inside .header-controls */
    .header-controls .service-switcher { display: flex; }
    .service-btn { padding: 6px 13px; font-size: .78rem; gap: 4px; }
    .header-sep   { display: block; height: 18px; }

    /* ── Mobile bar visible + padding ───────────────────────────── */
    :root { --mobile-bar-h: 78px; }
    .mobile-bar { display: block; }

    /* ── Layout ───────────────────────────────────────────────── */
    .category-sidebar { display: none; }
    .menu-content {
        max-width: 100%;
        padding: 14px 12px calc(var(--mobile-bar-h) + env(safe-area-inset-bottom) + 16px);
    }

    /* ── Cart drag handle ─────────────────────────────────────── */
    .cart-drag-handle { display: block; }

    /* ── Cart panel — full-screen bottom sheet on mobile ──────── */
    .cart-panel {
        display: none;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        width: 100%;
        max-height: calc(var(--vh, 1vh) * 92);
        z-index: 350;
        border-radius: 22px 22px 0 0;
        border-left: none;
        box-shadow: 0 -8px 40px rgba(0,0,0,.25);
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
    .cart-panel.open {
        display: flex;
        animation: cart-slide-up .28s cubic-bezier(.4, 0, .2, 1);
    }
    .cart-panel-close { display: flex; }

    /* ── Menu items grid ──────────────────────────────────────── */
    .items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .item-img  { height: 130px; }
    .item-name { font-size: .9rem; }
    .item-desc { display: none; }
    .item-price { font-size: .9rem; }

    /* ── Section headings ─────────────────────────────────────── */
    .menu-section-title { font-size: 1.15rem; }

    /* ── Session banner ───────────────────────────────────────── */
    .session-banner { font-size: .82rem; padding: 8px 14px; }

}

@media (max-width: 500px) {
    :root { --header-h: calc(112px + env(safe-area-inset-top)); }

    .order-header { padding: calc(10px + env(safe-area-inset-top)) 12px 0; }
    .service-btn  { padding: 6px 11px; font-size: .75rem; }

    /* Checkout: taller sheet on small screens */
    .checkout-modal { height: 96%; }
    .modal-sheet { border-radius: 22px 22px 0 0; max-height: 96%; }
    .form-row { grid-template-columns: 1fr; }

    /* Items grid: 2 equal columns for narrow phones */
    .items-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .item-img   { height: 110px; }
    .item-card  { border-radius: 14px; }
    .item-body  { padding: 10px 10px 12px; }
    .item-name  { font-size: .82rem; }
    .item-price { font-size: .82rem; }

    /* Tighter menu content on small phones */
    .menu-content { padding-left: 10px; padding-right: 10px; }

    /* Modal sheet slightly shorter to leave thumb space */
    .modal-item-img { height: 40px; }
    .modal-handle { margin: 8px auto 0; }
    .modal-body { padding: 16px 20px 24px; }

    /* Bottom bar slightly shorter */
    :root { --mobile-bar-h: 74px; }
    .mobile-bar { padding: 8px 12px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
    .mobile-bar-btn { padding: 12px 14px; font-size: .88rem; }
}

/* ============================================================
   DASHBOARD PANEL
   ============================================================ */
.dashboard-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(28,25,23,.48);
    z-index: 500;
    backdrop-filter: blur(2px);
}
.dashboard-overlay.open { display: block; }

.dashboard-panel {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 420px;
    max-width: 100vw;
    background: var(--bg);
    z-index: 501;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 40px rgba(80,40,10,.18);
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}
.dashboard-panel.open { transform: translateX(0); }

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(20px + env(safe-area-inset-top)) 24px 16px;
    background: var(--secondary);
    color: #fff;
    flex-shrink: 0;
}
.dashboard-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -.01em;
}
.dashboard-close {
    background: rgba(255,255,255,.12);
    border: none;
    color: #fff;
    width: 32px; height: 32px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition);
}
.dashboard-close:hover { background: rgba(255,255,255,.22); }

.dashboard-tabs {
    display: flex;
    background: #fff;
    border-bottom: 2px solid var(--gray-200);
    flex-shrink: 0;
}
.dashboard-tab-btn {
    flex: 1;
    padding: 13px 8px;
    background: none;
    border: none;
    font-size: .875rem;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color var(--transition), border-color var(--transition);
}
.dashboard-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.dashboard-tab-btn:hover:not(.active) { color: var(--gray-700); }

.dashboard-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 20px 40px;
}

.dashboard-section { display: none; }
.dashboard-section.active { display: block; }

.dash-loading { color: var(--gray-400); font-size: .875rem; text-align: center; padding: 32px 0; }
.dash-empty   { color: var(--gray-400); font-size: .875rem; text-align: center; padding: 40px 0; }

/* ── Orders list ── */
.dash-order-row {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-xs);
}
.dash-order-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.dash-order-num {
    font-weight: 700;
    font-size: .9rem;
    color: var(--gray-800);
}
.dash-order-date {
    font-size: .78rem;
    color: var(--gray-400);
}
.dash-order-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .85rem;
    color: var(--gray-600);
    margin-bottom: 10px;
}
.dash-order-actions {
    display: flex;
    gap: 8px;
}
.btn-dash-sm {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--gray-300);
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
}
.btn-dash-sm:hover { background: var(--gray-200); }
.btn-dash-reorder { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-dash-reorder:hover { background: rgba(232,98,42,.16); }
.btn-dash-track { border-color: #3182ce; color: #3182ce; background: #ebf8ff; }
.btn-dash-track:hover { background: #bee3f8; }

/* Status badges */
.dash-status-badge {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 2px 8px;
    border-radius: 20px;
}
.status-pending   { background: #fefcbf; color: #744210; }
.status-confirmed { background: #c6f6d5; color: #276749; }
.status-preparing { background: #bee3f8; color: #2a4365; }
.status-ready     { background: #c6f6d5; color: #276749; }
.status-delivered { background: var(--gray-200); color: var(--gray-600); }
.status-cancelled { background: #fed7d7; color: #822727; }

/* ── Address cards ── */
.dash-addr-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-xs);
}
.dash-addr-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    gap: 8px;
}
.dash-addr-label {
    font-weight: 700;
    font-size: .875rem;
    color: var(--gray-800);
}
.dash-addr-text {
    font-size: .82rem;
    color: var(--gray-500);
    line-height: 1.5;
}
.dash-addr-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.btn-dash-xs {
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--gray-300);
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: .75rem;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
}
.btn-dash-xs:hover { background: var(--gray-200); }
.btn-dash-del { border-color: #fed7d7; color: #e53e3e; background: #fff5f5; }
.btn-dash-del:hover { background: #fed7d7; }

.addr-default-badge {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    padding: 1px 7px;
    margin-left: 4px;
    vertical-align: middle;
}

/* Address form */
.dash-form-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-200);
}
.dash-label-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.label-chip {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--gray-300);
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}
.label-chip.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

/* Profile section */
.dash-pw-section {
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}
.dash-pw-toggle {
    font-size: .875rem;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    user-select: none;
}
.dash-pw-toggle:hover { color: var(--primary); }
#dash-pw-fields { margin-top: 14px; }

/* ============================================================
   SAVED ADDRESS PICKER (checkout step 1)
   ============================================================ */
.saved-address-picker {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.saved-addr-card {
    flex: 0 0 auto;
    min-width: 150px;
    max-width: 200px;
    background: #fff;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition);
    box-shadow: var(--shadow-xs);
}
.saved-addr-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.saved-addr-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(232,98,42,.15);
}
.saved-addr-label {
    font-size: .8rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 4px;
}
.saved-addr-card.selected .saved-addr-label { color: var(--primary); }
.saved-addr-text {
    font-size: .75rem;
    color: var(--gray-500);
    line-height: 1.4;
}
.link-subtle {
    font-size: .8rem;
    color: var(--primary);
    text-decoration: none;
}
.link-subtle:hover { text-decoration: underline; }

.save-address-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    color: var(--gray-600);
    cursor: pointer;
    padding: 8px 0;
}
.save-address-check input { cursor: pointer; accent-color: var(--primary); width: 16px; height: 16px; }

/* ============================================================
   LIVE ORDER TRACKING
   ============================================================ */
.order-tracking {
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    margin: 16px 0;
    text-align: left;
}
.tracking-title {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--gray-500);
    margin-bottom: 16px;
}
.tracking-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.tracking-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    position: relative;
    padding-bottom: 18px;
}
.tracking-step:last-child { padding-bottom: 0; }
.tracking-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 9px;
    top: 22px;
    bottom: 0;
    width: 2px;
    background: var(--gray-300);
    transition: background .4s;
}
.tracking-step.done::after  { background: var(--accent); }
.tracking-step.active::after { background: var(--gray-300); }

.tracking-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2.5px solid var(--gray-300);
    background: #fff;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    margin-top: 1px;
    transition: border-color .4s, background .4s;
}
.tracking-step.done .tracking-dot {
    background: var(--accent);
    border-color: var(--accent);
}
.tracking-step.done .tracking-dot::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: .65rem;
    color: #fff;
    font-weight: 900;
}
.tracking-step.active .tracking-dot {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 5px var(--primary-light);
    animation: track-pulse 1.6s infinite;
}
.tracking-step.pending .tracking-dot {
    background: #fff;
    border-color: var(--gray-300);
}

@keyframes track-pulse {
    0%, 100% { box-shadow: 0 0 0 5px var(--primary-light); }
    50%       { box-shadow: 0 0 0 9px rgba(232,98,42,.06); }
}

.tracking-info { padding-top: 1px; }
.tracking-label {
    font-size: .875rem;
    font-weight: 600;
    color: var(--gray-700);
    transition: color .4s;
}
.tracking-step.active .tracking-label { color: var(--primary); }
.tracking-step.done .tracking-label   { color: var(--accent); }
.tracking-step.pending .tracking-label { color: var(--gray-400); }

.tracking-time {
    font-size: .75rem;
    color: var(--gray-400);
    margin-top: 2px;
}
.tracking-note {
    font-size: .75rem;
    color: var(--gray-400);
    text-align: center;
    margin-top: 14px;
}

/* ============================================================
   DASHBOARD RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
    .dashboard-panel { width: 100vw; }
    .saved-address-picker { flex-direction: column; }
    .saved-addr-card { max-width: 100%; }
}

/* ============================================================
   OPTION SETS — mobile compact styles (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
    .option-set { margin-bottom: 6px; }

    .option-set-header {
        padding: 10px 12px;
        margin-bottom: 0;
    }
    .option-set-header:active { background: var(--gray-200); }

    /* Expand: show list with a small gap below header */
    .option-set:not(.collapsed) .option-list {
        margin-top: 8px;
    }

    .option-set-name { font-size: .88rem; }
    .option-set-meta { font-size: .72rem; }

    .option-item {
        padding: 8px 11px;
        border-radius: 9px;
        gap: 9px;
    }
    .option-label { font-size: .88rem; }
    .option-price { font-size: .82rem; }

    .option-check {
        width: 18px;
        height: 18px;
    }
    .option-check::after { width: 8px; height: 8px; }

    .option-list { gap: 6px; }
}

/* ============================================================
   CLOSED BANNER
   Fixed below the nav — JS measures its height and sets --closed-banner-h
   so the layout and sidebar can push down the correct amount.
   ============================================================ */
.closed-banner {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    z-index: 199;                  /* just below the header (z-index 200) */
    background: #fff3cd;
    border-bottom: 2px solid #f6c23e;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 20px;
    text-align: center;
}
/* Push layout and sidebar down by header + banner height when store is closed.
   52px is a fallback until JS measures the real banner height. */
body.store-closed .order-layout {
    margin-top: calc(var(--header-h) + var(--closed-banner-h, 52px));
    min-height: calc(var(--vh, 1vh) * 100 - var(--header-h) - var(--closed-banner-h, 52px));
}
body.store-closed .category-sidebar {
    top: calc(var(--header-h) + var(--closed-banner-h, 52px));
    height: calc(var(--vh, 1vh) * 100 - var(--header-h) - var(--closed-banner-h, 52px));
}

/* ============================================================
   SESSION BANNER
   ============================================================ */
.session-banner {
    padding: 10px 20px;
    font-size: .875rem;
    border-radius: 0;
    text-align: center;
}
/* Session banner becomes fixed when visible — like the closed-banner */
.session-banner.visible {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    z-index: 198; /* below closed-banner (199) and header (200) */
}
/* When store is also closed, sit below the closed-banner */
body.store-closed .session-banner.visible {
    top: calc(var(--header-h) + var(--closed-banner-h, 52px));
}
/* Push layout/sidebar down when session banner is visible */
body.session-banner-visible .order-layout {
    margin-top: calc(var(--header-h) + var(--session-banner-h, 40px));
    min-height: calc(var(--vh, 1vh) * 100 - var(--header-h) - var(--session-banner-h, 40px));
}
body.session-banner-visible .category-sidebar {
    top: calc(var(--header-h) + var(--session-banner-h, 40px));
    height: calc(var(--vh, 1vh) * 100 - var(--header-h) - var(--session-banner-h, 40px));
}
/* When BOTH closed-banner AND session-banner are visible */
body.store-closed.session-banner-visible .order-layout {
    margin-top: calc(var(--header-h) + var(--closed-banner-h, 52px) + var(--session-banner-h, 40px));
    min-height: calc(var(--vh, 1vh) * 100 - var(--header-h) - var(--closed-banner-h, 52px) - var(--session-banner-h, 40px));
}
body.store-closed.session-banner-visible .category-sidebar {
    top: calc(var(--header-h) + var(--closed-banner-h, 52px) + var(--session-banner-h, 40px));
    height: calc(var(--vh, 1vh) * 100 - var(--header-h) - var(--closed-banner-h, 52px) - var(--session-banner-h, 40px));
}
.session-open {
    background: #c6f6d5;
    color: #276749;
    border-bottom: 1px solid #9ae6b4;
}
.session-closed {
    background: #fefcbf;
    color: #744210;
    border-bottom: 1px solid #faf089;
}

/* ============================================================
   PROMO / DISCOUNT CODE
   ============================================================ */
.promo-section {
    margin-bottom: 16px;
}
.promo-row {
    display: flex;
    gap: 8px;
}
.promo-input {
    flex: 1;
    font-family: monospace;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.btn-apply-promo {
    padding: 0 18px;
    background: var(--secondary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .15s;
}
.btn-apply-promo:hover { opacity: .85; }
.promo-msg {
    margin-top: 6px;
    font-size: .8rem;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 6px;
}
.promo-msg-success { background: #f0fff4; color: #276749; }
.promo-msg-error   { background: #fff5f5; color: #c53030; }

/* ============================================================
   LOYALTY POINTS ROW (checkout)
   ============================================================ */
.loyalty-row {
    background: #fffbeb;
    border: 1px solid #faf089;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 16px;
}
.loyalty-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .875rem;
    color: #744210;
    cursor: pointer;
}
.loyalty-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ============================================================
   LOYALTY DASHBOARD TAB
   ============================================================ */
.loyalty-balance-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark, #c04d1e));
    color: #fff;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
}
.loyalty-balance-pts {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.1;
}
.loyalty-balance-pts span {
    font-size: 1rem;
    font-weight: 500;
    opacity: .85;
}
.loyalty-balance-val {
    font-size: .875rem;
    opacity: .9;
    margin-top: 6px;
}
.loyalty-txn-title {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gray-400);
    margin-bottom: 10px;
}
.loyalty-txn-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.loyalty-txn-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: .875rem;
}
.loyalty-txn-note { font-weight: 500; color: var(--text-primary); }
.loyalty-txn-date { font-size: .75rem; color: var(--gray-400); margin-top: 2px; }
.loyalty-txn-pts  { font-weight: 700; font-size: .9rem; white-space: nowrap; }

/* ── Header session separator ───────────────────────────────── */
.header-sep {
    width: 1px;
    height: 22px;
    background: rgba(255,255,255,.18);
    flex-shrink: 0;
    display: none; /* shown by JS when session switcher is visible */
}

/* Legacy — kept for backward compat but no longer rendered */
.session-tab-time {
    font-size: .75rem;
    opacity: .8;
}

/* ── Customer Alerts Popup (promo-style) ─────────────────────── */
.ca-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(5,5,5,.65);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    opacity: 0; visibility: hidden;
    transition: opacity .35s ease, visibility .35s ease;
}
.ca-overlay.open { opacity: 1; visibility: visible; }
.ca-overlay.open .ca-card { transform: translateY(0) scale(1); opacity: 1; }

.ca-card {
    background: #fff;
    border-radius: 20px;
    padding: 36px 32px 28px;
    max-width: 420px; width: 100%;
    position: relative;
    transform: translateY(28px) scale(.96); opacity: 0;
    transition: transform .4s cubic-bezier(.22,1,.36,1), opacity .35s ease;
    box-shadow: 0 24px 80px rgba(0,0,0,.28);
    max-height: 90vh; overflow-y: auto;
}

.ca-close {
    position: absolute; top: 16px; right: 16px;
    width: 32px; height: 32px;
    background: #f7fafc; border: none; border-radius: 50%;
    cursor: pointer; font-size: .9rem; color: #718096;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s, color .2s; line-height: 1;
}
.ca-close:hover { background: #edf2f7; color: #1a202c; }

.ca-top { display: flex; align-items: center; margin-bottom: 18px; }
.ca-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: #fff3cd; color: #92400e;
    padding: 5px 14px; border-radius: 50px;
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
}

.ca-title {
    font-size: 1.5rem; font-weight: 800; color: #1a202c;
    letter-spacing: -.035em; line-height: 1.2; margin-bottom: 16px;
}

.ca-body {
    display: flex; flex-direction: column; gap: 12px;
    margin-bottom: 24px;
}
.ca-body > div {
    border-radius: 10px; padding: 13px 15px;
    border-left: 4px solid;
}

.ca-btn {
    width: 100%; padding: 13px;
    background: var(--primary, #e63946); color: #fff;
    border: none; border-radius: 10px;
    font-size: .95rem; font-weight: 700;
    cursor: pointer; font-family: inherit;
    transition: opacity .2s;
}
.ca-btn:hover { opacity: .88; }

@media (max-width: 480px) {
    .ca-card { padding: 28px 20px 22px; border-radius: 16px; }
    .ca-title { font-size: 1.25rem; }
}

/* ── Item coloured tags (from admin Tags feature) ─────── */
.item-colored-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 4px 0 2px;
}
.item-tag-colored {
    font-size: .68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid;
    letter-spacing: .01em;
}
