/* ============================================================
   LOTTERIA HV — Responsive UI  (mobile-first)
   Phong cách tham khảo: lotteria.vn
   ============================================================ */

/* ── CSS Variables ── */
:root {
    --red:         #e31e24;
    --red-dark:    #c0181d;
    --red-light:   #fff0f0;
    --yellow:      #ffcb05;
    --yellow-dark: #e6b700;
    --dark:        #1a1a1a;
    --gray:        #6c757d;
    --gray-light:  #f4f4f4;
    --border:      #e8e8e8;
    --white:       #ffffff;
    --radius-xs:   6px;
    --radius-sm:   10px;
    --radius:      14px;
    --radius-lg:   20px;
    --shadow-sm:   0 2px 8px rgba(0,0,0,.07);
    --shadow:      0 6px 24px rgba(0,0,0,.11);
    --shadow-red:  0 4px 16px rgba(227,30,36,.30);
    --header-h:    60px;
    --topbar-h:    34px;
    --sidebar-w:   230px;
    --transition:  .2s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue',
                 Arial, 'Noto Sans', sans-serif;
    background: #f5f5f5;
    color: var(--dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}
img  { display: block; max-width: 100%; height: auto; }
a    { text-decoration: none; color: inherit; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }

/* ── Utility ── */
.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}


/* ================================================================
   TOPBAR
   ================================================================ */
.topbar {
    background: var(--red-dark);
    color: rgba(255,255,255,.88);
    font-size: .75rem;
    padding: 0 16px;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    overflow: hidden;
    white-space: nowrap;
}
.topbar a { color: white; font-weight: 600; }
.topbar .tb-sep { opacity: .35; }

/* ================================================================
   HEADER
   ================================================================ */
.header {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 300;
    box-shadow: 0 2px 14px rgba(0,0,0,.08);
    border-bottom: 3px solid var(--red);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    text-decoration: none;
}
.logo-icon  { font-size: 1.75rem; line-height: 1; }
.logo-img   {
    width: 48px; height: 48px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.logo-text  { color: var(--dark); line-height: 1.15; }
.logo-text strong { font-size: 1rem; font-weight: 900; display: block; letter-spacing: .3px; color: var(--red); }
.logo-text span   { font-size: .65rem; color: #888; font-weight: 500; }

/* Sidebar logo layout */
.sidebar-logo { display: flex; align-items: center; gap: 10px; }

/* Search */
.header-search {
    flex: 1;
    max-width: 360px;
    position: relative;
    margin: 0 4px;
}
.header-search input {
    width: 100%;
    padding: 9px 16px 9px 38px;
    border-radius: 50px;
    border: 1.5px solid #e8e8e8;
    background: #f7f7f7;
    color: var(--dark);
    font-size: .88rem;
    outline: none;
    transition: border-color var(--transition), background var(--transition);
}
.header-search input::placeholder { color: #aaa; }
.header-search input:focus { background: #fff; border-color: var(--red); }
.header-search .search-icon {
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    pointer-events: none;
    opacity: .5;
}

/* Nav links (desktop) */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0 4px;
}
.nav-links a {
    color: #333;
    padding: 7px 11px;
    border-radius: var(--radius-sm);
    font-size: .86rem;
    font-weight: 500;
    transition: color var(--transition), background var(--transition);
    white-space: nowrap;
    position: relative;
}
.nav-links a:hover { color: var(--red); background: #fff5f5; }
.nav-links a.active { color: var(--red); background: #fff5f5; font-weight: 700; }
.nav-promo { color: var(--red) !important; font-weight: 700 !important; }

/* Cart trigger */
.cart-trigger {
    background: var(--yellow);
    color: var(--dark);
    border: none;
    border-radius: 50px;
    padding: 8px 14px;
    font-size: .88rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    transition: background var(--transition), transform .1s;
    position: relative;
    white-space: nowrap;
}
.cart-trigger:hover { background: var(--yellow-dark); transform: translateY(-1px); }
.cart-trigger:active { transform: scale(.97); }

.cart-badge {
    background: var(--red);
    color: white;
    border-radius: 50%;
    width: 20px; height: 20px;
    font-size: .72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Hamburger (mobile) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px; height: 40px;
    padding: 8px;
    background: #f5f5f5;
    border: 1.5px solid #e8e8e8;
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--transition), border-color var(--transition);
}
.hamburger:hover { background: #fee2e2; border-color: var(--red); }
.hamburger span {
    display: block;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: all .25s ease;
    transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    padding-top: var(--header-h);
    z-index: 299;
    pointer-events: none;
}
.mobile-nav.open { pointer-events: all; }

.mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    opacity: 0;
    transition: opacity .25s;
    z-index: 298;
}
.mobile-nav.open .mobile-nav-backdrop { opacity: 1; }

.mobile-nav-menu {
    background: #fff;
    border-bottom: 3px solid var(--red);
    padding: 4px 0 12px;
    transform: translateY(-8px);
    opacity: 0;
    transition: transform .25s ease, opacity .25s;
    position: relative;
    z-index: 299;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.mobile-nav.open .mobile-nav-menu {
    transform: translateY(0);
    opacity: 1;
}
.mobile-nav-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 20px;
    color: #333;
    font-size: .95rem;
    font-weight: 600;
    border-bottom: 1px solid #f0f0f0;
    transition: background var(--transition), color var(--transition);
}
.mobile-nav-menu a:last-child { border-bottom: none; }
.mobile-nav-menu a:hover  { background: #fff5f5; color: var(--red); }
.mobile-nav-menu a.active { background: #fff5f5; color: var(--red); border-left: 3px solid var(--red); }
.mobile-nav-menu a.nav-promo { color: var(--red); font-weight: 800; }


/* ================================================================
   HERO BANNER
   ================================================================ */
.hero-banner {
    background: linear-gradient(135deg, var(--red) 0%, #b01218 60%, #7a0d12 100%);
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 280px;
    display: flex;
    align-items: center;
}
/* decorative circles */
.hero-banner::before {
    content: '';
    position: absolute;
    width: 480px; height: 480px;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
    top: -200px; right: -120px;
    pointer-events: none;
}
.hero-banner::after {
    content: '';
    position: absolute;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
    bottom: -70px; left: 15%;
    pointer-events: none;
}
.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px;
    width: 100%;
    position: relative;
    z-index: 1;
}
.hero-text h1 {
    font-size: clamp(1.5rem, 4vw, 2.4rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,.2);
}
.hero-text p {
    font-size: clamp(.88rem, 2.2vw, 1rem);
    opacity: .92;
    margin-bottom: 22px;
    line-height: 1.6;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-visual {
    font-size: clamp(4rem, 10vw, 8rem);
    line-height: 1;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,.25));
    animation: heroFloat 3s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes heroFloat {
    0%,100% { transform: translateY(0) rotate(-3deg); }
    50%      { transform: translateY(-12px) rotate(3deg); }
}


/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 12px 22px;
    border-radius: 50px;
    font-weight: 700;
    font-size: .9rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all .18s;
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.btn-yellow { background: var(--yellow); color: var(--dark); border-color: var(--yellow); }
.btn-yellow:hover { background: var(--yellow-dark); border-color: var(--yellow-dark); transform: translateY(-1px); }
.btn-white  { background: white; color: var(--red); }
.btn-white:hover { background: #f0f0f0; }
.btn-red    { background: var(--red); color: white; box-shadow: var(--shadow-red); border-color: var(--red); }
.btn-red:hover { background: var(--red-dark); border-color: var(--red-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--gray); }
.btn-outline:hover { border-color: #ccc; }
.btn-outline-red { background: transparent; color: var(--red); border-color: var(--red); }
.btn-outline-red:hover { background: var(--red-light); }
.btn-sm  { padding: 8px 16px; font-size: .82rem; }
.btn-lg  { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }


/* ================================================================
   SECTIONS
   ================================================================ */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 16px;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 8px;
}
.section-title {
    font-size: clamp(1rem, 3vw, 1.25rem);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.3;
}
.section-title .accent { color: var(--red); }
.section-more {
    color: var(--red);
    font-size: .84rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.section-more:hover { text-decoration: underline; }


/* ================================================================
   FEATURE STRIP
   ================================================================ */
.feature-strip {
    background: white;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.feature-strip-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.feature-item {
    padding: 16px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-right: 1px solid var(--border);
}
.feature-item:last-child { border-right: none; }
.feature-item .fi-icon  { font-size: 1.6rem; flex-shrink: 0; }
.feature-item .fi-text strong { display: block; font-size: .85rem; font-weight: 700; line-height: 1.3; }
.feature-item .fi-text span   { font-size: .75rem; color: var(--gray); }


/* ================================================================
   PROMO CARDS
   ================================================================ */
.promo-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* snap for mobile */
    scroll-snap-type: x mandatory;
}
.promo-scroll::-webkit-scrollbar { display: none; }

.promo-card {
    flex-shrink: 0;
    width: 280px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: white;
    transition: transform .2s, box-shadow .2s;
    scroll-snap-align: start;
}
.promo-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.promo-banner-img {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.promo-banner-img .big-discount {
    font-size: 2.8rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,.3);
    z-index: 1;
}
.promo-body { padding: 14px 16px 16px; }
.promo-body h3 { font-size: .93rem; font-weight: 700; margin-bottom: 4px; }
.promo-body p  { font-size: .8rem; color: var(--gray); margin-bottom: 10px; line-height: 1.5; }
.promo-code-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fffbea;
    border: 1.5px dashed var(--yellow-dark);
    color: #7a5c00;
    border-radius: var(--radius-xs);
    padding: 4px 10px;
    font-size: .77rem;
    font-weight: 700;
    letter-spacing: .5px;
}


/* ================================================================
   CATEGORY PILLS
   ================================================================ */
.cat-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 50px;
    border: 2px solid var(--border);
    background: white;
    cursor: pointer;
    font-size: .86rem;
    font-weight: 600;
    color: var(--gray);
    transition: all .15s;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    /* larger tap target */
    min-height: 44px;
}
.cat-tab .cat-icon { font-size: 1.05rem; }
.cat-tab:hover  { border-color: var(--red); color: var(--red); background: var(--red-light); }
.cat-tab.active { background: var(--red); color: white; border-color: var(--red); }


/* ================================================================
   MENU GRID & CARDS
   ================================================================ */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.menu-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}
.menu-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.menu-card-img {
    position: relative;
    padding-top: 72%; /* 4:3 aspect ratio */
    background: #fafafa;
    overflow: hidden;
    flex-shrink: 0;
}
.menu-card-img img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.menu-card-placeholder {
    position: absolute; inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe3e3 100%);
}

.badge {
    position: absolute;
    top: 8px;
    padding: 3px 8px;
    border-radius: 50px;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    z-index: 1;
}
.badge-hot { left: 8px; background: var(--red); color: white; }
.badge-new { right: 8px; background: #16a34a; color: white; }

.menu-card-body {
    padding: 11px 12px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.menu-card-name {
    font-size: .9rem;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.35;
}
.menu-card-desc {
    font-size: .76rem;
    color: var(--gray);
    flex: 1;
    margin-bottom: 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.menu-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    gap: 8px;
}
.menu-price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--red);
    line-height: 1;
}

.add-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--red);
    color: white;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(227,30,36,.3);
    transition: background .15s, transform .1s, box-shadow .15s;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.add-btn:hover  { background: var(--red-dark); transform: scale(1.12); box-shadow: 0 4px 12px rgba(227,30,36,.4); }
.add-btn:active { transform: scale(.93); }
@keyframes cartBounce {
    0%,100% { transform: scale(1); }
    40%     { transform: scale(1.2); }
    70%     { transform: scale(.95); }
}
.add-btn.added { animation: cartBounce .4s ease forwards; }


/* ================================================================
   CART SIDEBAR
   ================================================================ */
.cart-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 400;
    display: none;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.cart-overlay.open { display: block; }

.cart-sidebar {
    position: fixed;
    top: 0; right: -420px;
    width: 420px;
    max-width: 100vw;
    height: 100dvh;
    height: 100vh; /* fallback */
    background: white;
    z-index: 401;
    display: flex;
    flex-direction: column;
    transition: right .3s cubic-bezier(.4,0,.2,1);
    box-shadow: -4px 0 28px rgba(0,0,0,.14);
}
.cart-sidebar.open { right: 0; }

.cart-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.cart-header h2 { font-size: 1rem; font-weight: 800; flex: 1; }
.cart-item-count {
    background: var(--red-light);
    color: var(--red);
    border-radius: 50px;
    padding: 2px 9px;
    font-size: .76rem;
    font-weight: 700;
}
.close-btn {
    background: var(--gray-light);
    border: none;
    font-size: 1.1rem;
    color: var(--gray);
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}
.close-btn:hover { background: #e0e0e0; color: var(--dark); }

.cart-items-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 18px;
    -webkit-overflow-scrolling: touch;
}
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 10px;
    color: var(--gray);
    text-align: center;
    padding: 24px;
}
.cart-empty .empty-icon { font-size: 3.5rem; opacity: .5; }
.cart-empty p { font-size: .9rem; }
.cart-empty a { color: var(--red); font-weight: 600; font-size: .88rem; }

.cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-emoji { font-size: 1.9rem; flex-shrink: 0; width: 36px; text-align: center; }
.cart-item-info  { flex: 1; min-width: 0; }
.cart-item-info strong {
    display: block; font-size: .86rem; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cart-item-info .unit-price { font-size: .75rem; color: var(--gray); margin-top: 2px; }
.qty-ctrl {
    display: flex; align-items: center; gap: 5px; flex-shrink: 0;
}
.qty-btn {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: white;
    font-size: 1rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    transition: all .15s;
    color: var(--dark);
    -webkit-tap-highlight-color: transparent;
}
.qty-btn:hover       { border-color: var(--red); color: var(--red); }
.qty-btn.minus:hover { border-color: #dc2626; color: #dc2626; }
.qty-val { font-weight: 700; font-size: .9rem; min-width: 22px; text-align: center; }
.cart-item-total { font-weight: 800; font-size: .88rem; color: var(--red); min-width: 62px; text-align: right; flex-shrink: 0; }

/* promo row */
.promo-input-row {
    display: flex; gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    background: #fafafa;
    flex-shrink: 0;
}
.promo-input-row input {
    flex: 1;
    padding: 9px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .86rem;
    outline: none;
    text-transform: uppercase;
    letter-spacing: .5px;
    transition: border .15s;
    background: white;
}
.promo-input-row input:focus { border-color: var(--red); }
.promo-msg { padding: 0 18px 8px; font-size: .79rem; min-height: 20px; flex-shrink: 0; }

/* summary */
.cart-summary { padding: 10px 18px 0; border-top: 1px solid var(--border); flex-shrink: 0; }
.summary-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 5px 0; font-size: .87rem; color: var(--gray);
}
.summary-row.total-row {
    font-size: 1.05rem; font-weight: 800; color: var(--dark);
    border-top: 2px solid var(--border); margin-top: 6px; padding-top: 10px;
}
.summary-row.total-row .price-val { color: var(--red); }

.cart-cta { padding: 14px 18px; flex-shrink: 0; }
.checkout-btn {
    width: 100%;
    background: var(--red);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 14px 20px;
    font-size: .98rem;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: background .15s, transform .1s, box-shadow .15s;
    box-shadow: var(--shadow-red);
    -webkit-tap-highlight-color: transparent;
}
.checkout-btn:hover:not(:disabled) { background: var(--red-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(227,30,36,.4); }
.checkout-btn:active:not(:disabled) { transform: scale(.98); }
.checkout-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.checkout-btn .btn-total { background: rgba(255,255,255,.25); border-radius: 50px; padding: 2px 10px; font-size: .84rem; }


/* ================================================================
   CHECKOUT FORM
   ================================================================ */
.checkout-layout {
    max-width: 980px;
    margin: 28px auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}
.form-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 14px;
}
.form-card:last-child { margin-bottom: 0; }
.form-card-title {
    font-size: .98rem;
    font-weight: 800;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.form-group { margin-bottom: 14px; }
.form-group label {
    display: block;
    font-size: .78rem;
    font-weight: 700;
    color: var(--gray);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .93rem;
    font-family: inherit;
    outline: none;
    transition: border .15s, box-shadow .15s;
    background: white;
    color: var(--dark);
    /* iOS prevents zoom on small inputs */
    font-size: max(.93rem, 16px);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(227,30,36,.08);
}
.form-group textarea { resize: vertical; min-height: 84px; font-size: .93rem; }

.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-card {
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    align-items: center;
    gap: 10px;
    -webkit-tap-highlight-color: transparent;
}
/* CSS :has() with fallback for older browsers */
.radio-card:has(input:checked) { border-color: var(--red); background: var(--red-light); }
.radio-card input { accent-color: var(--red); }
.radio-card .rc-icon { font-size: 1.4rem; flex-shrink: 0; }
.radio-card .rc-text strong { display: block; font-size: .88rem; font-weight: 700; }
.radio-card .rc-text span   { font-size: .76rem; color: var(--gray); }

.order-sidebar { position: sticky; top: calc(var(--header-h) + 12px); }
.order-items-list .oi {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; font-size: .86rem;
    border-bottom: 1px solid var(--border); gap: 8px;
}
.order-items-list .oi:last-child { border-bottom: none; }
.oi-name  { flex: 1; font-weight: 600; }
.oi-qty   { color: var(--gray); font-size: .78rem; min-width: 28px; }
.oi-price { font-weight: 800; color: var(--red); text-align: right; min-width: 68px; }


/* ================================================================
   PAGE HEADER  (menu, track, promotions)
   ================================================================ */
.page-header {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    color: white;
    padding: 28px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
    top: -100px; right: -80px;
    pointer-events: none;
}
.page-header h1 { font-size: clamp(1.3rem, 4vw, 1.7rem); font-weight: 900; margin-bottom: 4px; position: relative; }
.page-header p  { opacity: .88; font-size: .9rem; position: relative; }


/* ================================================================
   ALERTS
   ================================================================ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: .87rem;
    font-weight: 500;
    margin-bottom: 16px;
}
.alert-success { background: #dcfce7; color: #166534; border-left: 4px solid #16a34a; }
.alert-error   { background: #fee2e2; color: #991b1b; border-left: 4px solid #dc2626; }
.alert-info    { background: #dbeafe; color: #1e40af; border-left: 4px solid #3b82f6; }


/* ================================================================
   STATUS BADGES
   ================================================================ */
.status {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 50px;
    font-size: .76rem;
    font-weight: 700;
}
.status-pending   { background: #fef9c3; color: #854d0e; }
.status-confirmed { background: #dbeafe; color: #1e40af; }
.status-preparing { background: #e0f2fe; color: #0369a1; }
.status-ready     { background: #dcfce7; color: #15803d; }
.status-delivered { background: #dcfce7; color: #15803d; }
.status-cancelled { background: #fee2e2; color: #991b1b; }


/* ================================================================
   SUCCESS PAGE
   ================================================================ */
.success-page {
    max-width: 520px;
    margin: 36px auto;
    padding: 0 16px;
    text-align: center;
}
.success-page .success-icon {
    font-size: 4rem;
    margin-bottom: 12px;
    animation: popIn .5s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes popIn {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
.success-page h1 { font-size: 1.6rem; font-weight: 900; color: #15803d; margin-bottom: 8px; }
.order-code {
    background: var(--red);
    color: white;
    border-radius: var(--radius-sm);
    padding: 14px 24px;
    display: inline-block;
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 3px;
    margin: 12px 0;
    box-shadow: var(--shadow-red);
}


/* ================================================================
   PROMOTIONS PAGE
   ================================================================ */
.promo-full-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
}
.promo-full-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}
.promo-full-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pfc-banner {
    padding: 28px 20px;
    text-align: center;
    color: white;
}
.pfc-discount {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.pfc-title { font-size: 1rem; font-weight: 700; opacity: .95; }
.pfc-body  { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.pfc-desc  { color: var(--gray); font-size: .88rem; line-height: 1.6; margin-bottom: 12px; }
.pfc-meta  {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: .8rem;
    color: var(--gray);
    margin-bottom: 14px;
}
.pfc-meta strong { color: var(--dark); }
.pfc-code-box {
    background: #fffbea;
    border: 2px dashed var(--yellow-dark);
    border-radius: var(--radius-sm);
    padding: 14px;
    text-align: center;
    margin-bottom: 4px;
}
.pfc-code-label { font-size: .76rem; color: #7a5c00; margin-bottom: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.pfc-code       { font-size: 1.5rem; font-weight: 900; letter-spacing: 3px; color: #7a5c00; margin-bottom: 8px; }
.pfc-copy-btn {
    background: none;
    border: 1.5px solid var(--yellow-dark);
    padding: 5px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-size: .8rem;
    color: #7a5c00;
    font-weight: 600;
    transition: all .2s;
}
.pfc-copy-btn:hover { background: var(--yellow); border-color: var(--yellow); color: var(--dark); }

@media (max-width: 640px) {
    .promo-full-grid { grid-template-columns: 1fr; gap: 14px; }
    .pfc-discount { font-size: 2.2rem; }
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
    background: #111;
    color: rgba(255,255,255,.6);
    padding: 44px 20px 24px;
    margin-top: 56px;
}
.footer-inner  { max-width: 1200px; margin: 0 auto; }
.footer-grid   { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-bottom: 28px; }
.footer-col h3 { color: white; font-size: .92rem; margin-bottom: 12px; font-weight: 700; }
.footer-col p,
.footer-col a  { font-size: .83rem; line-height: 2; color: rgba(255,255,255,.58); display: block; }
.footer-col a:hover { color: var(--yellow); }
.footer-logo   { font-size: 1.05rem; font-weight: 900; color: white; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 18px; text-align: center; font-size: .8rem; }


/* ================================================================
   ADMIN
   ================================================================ */
.admin-layout { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    background: #111;
    color: white;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.sidebar-logo {
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-size: .92rem;
    font-weight: 800;
    line-height: 1.4;
    flex-shrink: 0;
}
.sidebar-nav { flex: 1; padding: 8px 0; overflow-y: auto; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 20px;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    font-size: .87rem;
    font-weight: 500;
    transition: all .15s;
    border-left: 3px solid transparent;
}
.sidebar-nav a:hover   { background: rgba(255,255,255,.06); color: white; }
.sidebar-nav a.active  { background: rgba(227,30,36,.2); color: white; border-left-color: var(--red); }
.sidebar-nav .nav-section {
    padding: 12px 20px 4px;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,.25);
}
.sidebar-footer { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.08); font-size: .8rem; color: rgba(255,255,255,.38); flex-shrink: 0; }

.admin-main   { flex: 1; overflow: auto; background: #f5f5f5; min-width: 0; }
.admin-topbar {
    background: white;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 10;
}
.admin-topbar h1 { font-size: 1.05rem; font-weight: 800; }
.admin-content   { padding: 20px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--red);
}
.stat-card .icon  { font-size: 1.7rem; margin-bottom: 8px; }
.stat-card .value { font-size: 1.65rem; font-weight: 900; color: var(--red); line-height: 1; }
.stat-card .label { font-size: .78rem; color: var(--gray); margin-top: 3px; }

.table-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 20px; }
.table-header {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.table-header h2 { font-size: .92rem; font-weight: 700; }

table { width: 100%; border-collapse: collapse; }
th {
    background: #fafafa;
    padding: 10px 14px;
    text-align: left;
    font-size: .75rem;
    color: var(--gray);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    white-space: nowrap;
}
td { padding: 10px 14px; border-top: 1px solid #f5f5f5; font-size: .87rem; vertical-align: middle; }
tr:hover td { background: #fafafa; }

.actions { display: flex; gap: 5px; flex-wrap: wrap; }
.btn-icon {
    padding: 5px 10px;
    border-radius: var(--radius-xs);
    font-size: .76rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.btn-edit   { background: #dbeafe; color: #1e40af; }
.btn-delete { background: #fee2e2; color: #991b1b; }
.btn-view   { background: #dcfce7; color: #15803d; }
.btn-edit:hover   { background: #bfdbfe; }
.btn-delete:hover { background: #fecaca; }
.btn-view:hover   { background: #bbf7d0; }


/* ================================================================
   STORE CLOSED BANNER
   ================================================================ */
.store-closed-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d0000 100%);
    color: white;
    padding: 14px 20px;
    border-radius: var(--radius);
    margin: 0 0 20px;
    border-left: 5px solid #e31e24;
    box-shadow: 0 4px 16px rgba(227,30,36,.25);
}
.scb-icon { font-size: 1.8rem; flex-shrink: 0; animation: pulse-dot 1.5s ease-in-out infinite; }
@keyframes pulse-dot { 0%,100% { opacity:1; } 50% { opacity:.4; } }

/* ── Khi cửa hàng đóng: disable nút + và giỏ hàng ── */
.store-closed .add-btn {
    background: #ccc !important;
    box-shadow: none !important;
    cursor: not-allowed;
    opacity: .65;
}
.store-closed .add-btn:hover  { transform: none !important; background: #ccc !important; }
.store-closed .add-btn:active { transform: none !important; }
.store-closed .checkout-btn   { opacity: .5; cursor: not-allowed; }

/* banner hiển thị trên trang menu / trang chủ */
.store-closed-top-banner {
    background: linear-gradient(90deg, #1a1a1a 0%, #2d0000 60%, #1a1a1a 100%);
    color: #fff;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: .88rem;
    font-weight: 600;
    text-align: center;
    flex-wrap: wrap;
}
.sctb-icon { font-size: 1.2rem; animation: pulse-dot 1.5s ease-in-out infinite; }
.sctb-msg  { color: #fff; }
.sctb-msg strong { color: #fca5a5; }
.sctb-hours { font-size: .78rem; opacity: .75; }

/* ================================================================
   QR PAYMENT CARD
   ================================================================ */
.qr-payment-card {
    background: white;
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    margin-top: 14px;
    border: 1.5px solid #e0f2fe;
}
.qr-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}
.qr-bank-badge {
    background: linear-gradient(135deg, #00703c 0%, #005a30 100%);
    color: white;
    font-size: .72rem;
    font-weight: 900;
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: .5px;
    flex-shrink: 0;
}
.qr-img-wrap {
    position: relative;
    text-align: center;
    margin-bottom: 12px;
}
.qr-img-wrap img {
    width: 180px;
    height: 180px;
    border-radius: 10px;
    border: 2px solid #f0f0f0;
    display: block;
    margin: 0 auto;
}
.qr-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    pointer-events: none;
    opacity: 0;
}
.qr-info-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.qr-row {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: .82rem;
}
.qr-key {
    color: #888;
    min-width: 84px;
    flex-shrink: 0;
    font-size: .76rem;
    padding-top: 1px;
}
.qr-val { font-size: .84rem; line-height: 1.4; }
.qr-note { color: #444; }
.qr-copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: .8rem;
    padding: 1px 4px;
    border-radius: 4px;
    line-height: 1;
    vertical-align: middle;
    opacity: .7;
    transition: opacity .15s;
}
.qr-copy-btn:hover { opacity: 1; background: #f0f0f0; }

/* ================================================================
   ADMIN: STORE STATUS WIDGET
   ================================================================ */
.store-status-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 6px 10px;
    flex-shrink: 0;
}
.store-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dot-open   { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.2); animation: dot-pulse 2s infinite; }
.dot-closed { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.2); }
@keyframes dot-pulse {
    0%,100% { box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
    50%      { box-shadow: 0 0 0 6px rgba(34,197,94,.05); }
}
.store-mode-btns {
    display: flex;
    gap: 4px;
    margin-left: 6px;
}
.st-btn {
    padding: 3px 9px;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    font-size: .72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
    color: #555;
}
.st-btn:hover  { border-color: #94a3b8; color: #333; }
.st-btn.st-active { background: #f0fdf4; border-color: #22c55e; color: #15803d; }
.st-btn.st-active.st-closed { background: #fef2f2; border-color: #ef4444; color: #dc2626; }
.st-btn:disabled { opacity: .5; cursor: wait; }

/* ================================================================
   RESPONSIVE BREAKPOINTS
   mobile-first: base styles for ~320px and up
   ================================================================ */

/* ── Large desktop (≥ 1100px) ── */
@media (min-width: 1100px) {
    .header-inner { padding: 0 32px; }
    .section      { padding: 36px 32px; }
}

/* ── Tablet (≤ 900px) ── */
@media (max-width: 900px) {
    .checkout-layout { grid-template-columns: 1fr; }
    .order-sidebar   { position: static; }
    .footer-grid     { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .feature-strip-inner { grid-template-columns: repeat(2,1fr); }
    .feature-item { border-right: none; border-bottom: 1px solid var(--border); }
    .feature-item:nth-child(2n) { border-right: none; }
    .feature-item:nth-last-child(-n+2) { border-bottom: none; }
    .hero-visual { font-size: 5rem; }
}

/* ── Mobile (≤ 768px) ── */
@media (max-width: 768px) {
    :root { --header-h: 56px; }

    /* Show hamburger, hide desktop nav */
    .hamburger      { display: flex; }
    .nav-links      { display: none; }
    .header-search  { display: none; }
    .mobile-nav     { display: block; }

    /* Topbar: shorter */
    .topbar {
        font-size: .7rem;
        padding: 0 12px;
        gap: 8px;
        height: 30px;
        --topbar-h: 30px;
    }
    .topbar .tb-sep  { display: none; }
    /* Show only phone on very small */
    .topbar .tb-address { display: none; }

    /* Logo: hide subtitle on very small */
    .logo-text span { display: none; }

    /* Cart trigger: shorter text */
    #cart-trigger-text { display: none; }
    .cart-trigger { padding: 8px 12px; }

    /* Hero */
    .hero-content { padding: 28px 16px; grid-template-columns: 1fr; }
    .hero-visual  { display: none; }
    .hero-text h1 { font-size: 1.6rem; }
    .hero-actions .btn { font-size: .88rem; padding: 10px 18px; }

    /* Feature strip */
    .feature-strip-inner { grid-template-columns: 1fr 1fr; }

    /* Menu grid: 2 columns */
    .menu-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

    /* Promo scroll: smaller cards */
    .promo-card { width: 240px; }

    /* Sections */
    .section { padding: 20px 14px; }

    /* Cart sidebar: full screen */
    .cart-sidebar { width: 100%; right: -100%; }

    /* Page header */
    .page-header { padding: 22px 16px; }
}

/* ── Small mobile (≤ 480px) ── */
@media (max-width: 480px) {
    .topbar { display: none; } /* hide entirely on tiny screens */

    .hero-text h1 { font-size: 1.4rem; }
    .hero-text p  { font-size: .84rem; }

    /* Menu: 2 tighter columns */
    .menu-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .menu-card-body { padding: 9px 10px 10px; }
    .menu-card-name { font-size: .84rem; }
    .menu-card-desc { display: none; } /* hide desc on tiny screens */
    .menu-price     { font-size: .92rem; }
    .add-btn        { width: 32px; height: 32px; font-size: 1.2rem; }

    /* Footer: single column */
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
    .footer { padding: 32px 16px 20px; }

    /* Checkout */
    .form-card { padding: 16px; }
    .radio-cards { grid-template-columns: 1fr; }

    /* Promo cards */
    .promo-card { width: 210px; }

    /* Feature strip */
    .feature-strip-inner { grid-template-columns: 1fr; }
    .feature-item { border-right: none; border-bottom: 1px solid var(--border); }
    .feature-item:last-child { border-bottom: none; }

    /* Section header */
    .section { padding: 16px 12px; }

    /* Buttons */
    .hero-actions { gap: 8px; }
    .hero-actions .btn { font-size: .84rem; padding: 9px 16px; }

    /* Admin: hide sidebar, stack */
    .admin-layout    { flex-direction: column; }
    .sidebar         { width: 100%; height: auto; position: static; }
    .admin-content   { padding: 14px; }
    .stats-grid      { grid-template-columns: repeat(2,1fr); }
}

/* ================================================================
   SHIPPING / GPS LOCATION FEATURE
   ================================================================ */

/* GPS button inside address field wrapper */
.address-field-wrap {
    position: relative;
}
.address-field-wrap input[type="text"] {
    padding-right: 148px; /* room for GPS button */
}
.gps-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    background: var(--red);
    color: white;
    border: none;
    border-radius: var(--radius-xs);
    font-size: .75rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
    line-height: 1;
}
.gps-btn:hover  { background: #c0181e; }
.gps-btn:active { background: #a01418; }
.gps-btn.loading { background: #aaa; cursor: not-allowed; }
.gps-btn.success { background: #16a34a; }

/* Location status bar */
.location-status {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 9px 13px;
    border-radius: var(--radius-xs);
    font-size: .82rem;
    font-weight: 500;
    line-height: 1.4;
}
.location-status.show { display: flex; }
.location-status.ok   { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.location-status.warn { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }
.location-status.err  { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.location-status .loc-icon { font-size: 1.1rem; flex-shrink: 0; }
.location-status .loc-text { flex: 1; }
.location-status .loc-map  {
    font-size: .74rem;
    color: #1d4ed8;
    text-decoration: underline;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Shipping fee row in order summary */
.ship-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 4px 0;
    font-size: .88rem;
}
.ship-row .ship-label { color: var(--gray); }
.ship-row .ship-label small { font-size: .74rem; display: block; }
.ship-row .ship-val   { font-weight: 700; color: #0369a1; }
.ship-row .ship-val.free { color: #16a34a; }
.ship-row .ship-val.warn { color: #dc2626; font-size: .82rem; }

/* Ship fee badge on submit button */
.ship-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,.22);
    border-radius: 20px;
    padding: 2px 8px;
    font-size: .75rem;
}

/* ═══════════════════════════════════════════════════════════
   LANGUAGE SWITCHER
   ═══════════════════════════════════════════════════════════ */
.lang-switcher {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
}
.lang-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,.35);
    color: rgba(255,255,255,.75);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: .72rem;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
    line-height: 1.6;
}
.lang-btn:hover,
.lang-btn.active {
    background: rgba(255,255,255,.22);
    color: #fff;
    border-color: rgba(255,255,255,.6);
}
.mobile-lang {
    display: flex;
    gap: 8px;
    padding: 10px 16px 4px;
    border-top: 1px solid rgba(255,255,255,.08);
    margin-top: 6px;
}
.mobile-lang .lang-btn {
    flex: 1;
    text-align: center;
    padding: 6px 0;
    font-size: .82rem;
    /* override white-on-white: mobile nav has #fff background */
    color: #555;
    background: rgba(0,0,0,.04);
    border-color: rgba(0,0,0,.15);
}
.mobile-lang .lang-btn:hover,
.mobile-lang .lang-btn.active {
    background: #fff5f5;
    color: var(--red);
    border-color: rgba(227,30,36,.4);
}
/* Hide hours text on very small screens */
@media (max-width: 480px) {
    .tb-hide-xs { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   CUSTOMER GREETING & LOGIN BUTTON (header)
   ═══════════════════════════════════════════════════════════ */
.cust-greeting {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.cust-hello {
    font-size: .8rem;
    color: #444;
    white-space: nowrap;
}
@media (max-width: 768px) {
    .cust-hello { display: none; }
}
.cust-orders-link {
    color: var(--red);
    text-decoration: none;
    background: rgba(227,30,36,.08);
    border: 1px solid rgba(227,30,36,.2);
    padding: 4px 11px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background .15s;
}
.cust-orders-link:hover { background: rgba(227,30,36,.15); }
.cust-edit-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: .82rem;
    opacity: .65;
    padding: 2px 4px;
    border-radius: 4px;
    transition: opacity .15s;
}
.cust-edit-btn:hover { opacity: 1; }
.cust-login-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(0,0,0,.05);
    border: 1.5px solid #e0e0e0;
    color: #333;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all .15s;
    font-family: inherit;
    flex-shrink: 0;
}
.cust-login-btn:hover { background: #fff5f5; border-color: var(--red); color: var(--red); }
@media (max-width: 600px) {
    .cust-login-btn span { display: none; }
    .cust-login-btn { padding: 6px 8px; }
}

/* ═══════════════════════════════════════════════════════════
   CUSTOMER PROFILE MODAL
   ═══════════════════════════════════════════════════════════ */
.cust-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.52);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
    padding: 16px;
}
.cust-modal.show {
    opacity: 1;
    pointer-events: all;
}
.cust-modal-box {
    background: #fff;
    border-radius: 20px;
    padding: 32px 28px 24px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 24px 64px rgba(0,0,0,.3);
    transform: translateY(20px);
    transition: transform .28s;
    text-align: center;
    position: relative;
}
.cust-modal.show .cust-modal-box {
    transform: translateY(0);
}
.cm-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: #f5f5f5;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: .9rem;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.cm-close:hover { background: #ebebeb; }
.cm-logo {
    width: 68px;
    height: 68px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 4px 16px rgba(227,30,36,.3);
    margin-bottom: 14px;
}
.cust-modal-box h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 6px;
}
.cust-modal-box > p {
    color: #888;
    font-size: .85rem;
    margin: 0 0 20px;
}
.cust-modal-box .form-group label {
    font-size: .8rem;
    font-weight: 600;
    color: #555;
}
.cm-skip {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    color: #aaa;
    font-size: .82rem;
    cursor: pointer;
    margin-top: 10px;
    padding: 6px;
    text-decoration: underline;
    font-family: inherit;
    transition: color .15s;
}
.cm-skip:hover { color: #888; }

/* ═══════════════════════════════════════════════════════════
   TRACK PAGE — TABS
   ═══════════════════════════════════════════════════════════ */
.track-tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
    gap: 0;
}
.track-tab {
    padding: 10px 22px;
    cursor: pointer;
    font-size: .88rem;
    font-weight: 600;
    color: #888;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    background: transparent;
    font-family: inherit;
    transition: all .15s;
    border-radius: 0;
}
.track-tab:hover  { color: var(--red); }
.track-tab.active { color: var(--red); border-bottom-color: var(--red); }

/* ═══════════════════════════════════════════════════════════
   MY ORDERS CARD
   ═══════════════════════════════════════════════════════════ */
.my-order-card {
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    margin-bottom: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .15s, box-shadow .15s;
    position: relative;
}
.my-order-card:hover {
    border-color: var(--red);
    box-shadow: 0 4px 20px rgba(227,30,36,.12);
}
.moc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.moc-code {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .02em;
}
.moc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.moc-total {
    font-weight: 700;
    color: var(--red);
    font-size: .95rem;
}
.moc-meta {
    font-size: .76rem;
    color: #999;
}
.moc-view {
    position: absolute;
    right: 16px;
    bottom: 12px;
    font-size: .74rem;
    color: var(--red);
    font-weight: 600;
    opacity: 0;
    transition: opacity .15s;
}
.my-order-card:hover .moc-view { opacity: 1; }
