/* ============================================
   BiteVibe - Shared Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary: #c9972e;
    --primary-dark: #a87b1f;
    --dark: #1a1a1a;
    --charcoal: #232323;
    --gray: #6b6b6b;
    --light-gray: #f4f4f4;
    --cream: #faf7f2;
    --border: #e2e2e2;
    --success: #2e9e5b;
    --danger: #d64545;
    --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
    background: #fff;
    color: var(--dark);
    line-height: 1.5;
}

.font-display { font-family: 'Playfair Display', serif; }

a { text-decoration: none; color: inherit; }

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---- Top Navbar (customer side) ---- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar .logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; }
.topbar .logo img { height: 34px; width: 34px; border-radius: 50%; object-fit: cover; }
.cart-icon { position: relative; font-size: 22px; }
.cart-badge {
    position: absolute; top: -6px; right: -10px;
    background: var(--primary); color: #fff;
    font-size: 11px; padding: 1px 6px; border-radius: 10px;
}

/* ---- Hero banner carousel ---- */
.hero-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    max-height: 200px;
    border-radius: var(--radius);
    overflow: hidden;
    margin: 12px 0;
    background: var(--light-gray);
}
.hero-slide-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}
.hero-slide-item.active { opacity: 1; }
.hero-slide-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-overlay {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 30px 16px 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0));
    color: #fff;
}
.hero-overlay h3 { font-size: 18px; margin-bottom: 2px; }
.hero-overlay p { font-size: 12px; opacity: 0.9; }
.hero-tag {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    margin-bottom: 6px;
}
.hero-dots {
    position: absolute;
    bottom: 8px; right: 12px;
    display: flex; gap: 5px;
}
.hero-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
}
.hero-dot.active { background: #fff; width: 18px; border-radius: 4px; }

/* ---- Category chips ---- */
.category-scroll { display: flex; gap: 10px; overflow-x: auto; padding: 10px 0; }
.category-chip {
    flex-shrink: 0; padding: 8px 16px; border-radius: 20px;
    background: var(--light-gray); font-size: 14px; white-space: nowrap;
}
.category-chip.active { background: var(--primary); color: #fff; }

/* ---- Menu item card ---- */
.menu-item {
    display: flex; gap: 12px; padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.menu-item img { width: 84px; height: 84px; border-radius: var(--radius); object-fit: cover; background: var(--light-gray); }
.menu-item-info { flex: 1; }
.menu-item-info h4 { font-size: 15px; margin-bottom: 4px; }
.menu-item-info p { font-size: 12px; color: var(--gray); margin-bottom: 6px; }
.veg-dot { display: inline-block; width: 10px; height: 10px; border: 2px solid var(--success); border-radius: 2px; position: relative; margin-right: 4px; }
.veg-dot::after { content: ''; position: absolute; inset: 2px; background: var(--success); border-radius: 50%; }
.nonveg-dot { border-color: var(--danger); }
.nonveg-dot::after { background: var(--danger); }

.price-row { display: flex; align-items: center; justify-content: space-between; }
.price { font-weight: 700; }

/* ---- Buttons ---- */
.btn {
    display: inline-block; padding: 10px 18px; border-radius: 8px;
    border: none; cursor: pointer; font-size: 14px; font-weight: 600;
    text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-danger { background: var(--danger); color: #fff; }

/* ---- Sticky bottom bar (cart / checkout) ---- */
.sticky-bottom {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: #fff; border-top: 1px solid var(--border);
    padding: 12px 16px; z-index: 100;
}

/* ---- Forms ---- */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; margin-bottom: 6px; font-weight: 600; }
.form-control {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 14px;
}
.radio-group { display: flex; gap: 10px; }
.radio-option {
    flex: 1; border: 1.5px solid var(--border); border-radius: 8px;
    padding: 12px; text-align: center; font-size: 13px; cursor: pointer;
}
.radio-option.active { border-color: var(--primary); background: #fff4ee; color: var(--primary); font-weight: 600; }

/* ---- Cards / tables (merchant dashboard) ---- */
.dash-wrap { max-width: 100%; }
.dash-card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px; margin-bottom: 16px;
}
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
.stat-box { background: var(--light-gray); border-radius: var(--radius); padding: 14px; }
.stat-box .num { font-size: 22px; font-weight: 700; color: var(--primary); }
.stat-box .label { font-size: 12px; color: var(--gray); }

table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table th, table.data-table td { padding: 8px; border-bottom: 1px solid var(--border); text-align: left; }
table.data-table th { background: var(--light-gray); }

.status-badge { padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.status-received { background: #fff3cd; color: #997404; }
.status-preparing { background: #cfe2ff; color: #0a58ca; }
.status-ready { background: #d1e7dd; color: #146c43; }
.status-completed { background: #e2e3e5; color: #41464b; }
.status-cancelled { background: #f8d7da; color: #b02a37; }

/* ---- Merchant sidebar ---- */
.merchant-wrap { display: flex; min-height: 100vh; }
.sidebar { width: 210px; background: var(--dark); color: #fff; flex-shrink: 0; padding: 20px 0; }
.sidebar a { display: block; padding: 12px 20px; color: #ccc; font-size: 14px; }
.sidebar a.active, .sidebar a:hover { background: var(--primary); color: #fff; }
.main-content { flex: 1; padding: 20px; background: #fafafa; }

@media (max-width: 700px) {
    .merchant-wrap { flex-direction: column; }
    .sidebar { width: 100%; display: flex; overflow-x: auto; padding: 0; }
    .sidebar a { white-space: nowrap; }
}

.empty-state { text-align: center; padding: 40px 20px; color: var(--gray); }
.alert { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.alert-success { background: #d1e7dd; color: #146c43; }
.alert-danger { background: #f8d7da; color: #b02a37; }

/* ============================================
   LUXURY HOMEPAGE LAYOUT (index.php)
   ============================================ */

html, body { max-width: 100%; overflow-x: hidden; }

.lux-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    background: var(--dark);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 200;
}
.lux-navbar .logo { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lux-navbar .logo img { height: 36px; width: 36px; flex-shrink: 0; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); }
.lux-navbar .logo span {
    font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 700; letter-spacing: 0.3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lux-cart {
    position: relative;
    display: flex; align-items: center; gap: 5px;
    background: var(--primary);
    color: #1a1a1a;
    padding: 7px 14px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
    white-space: nowrap;
}
.lux-cart .cart-badge-lux {
    position: absolute; top: -6px; right: -6px;
    background: #fff; color: var(--dark);
    font-size: 11px; font-weight: 700;
    padding: 1px 6px; border-radius: 10px;
    border: 1px solid var(--primary);
}

.site-wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---- Big hero carousel for homepage ---- */
.lux-hero {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    max-height: 220px;
    border-radius: 16px;
    overflow: hidden;
    margin: 16px 0;
    background: var(--light-gray);
}
.lux-hero .hero-slide-item { position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease-in-out; }
.lux-hero .hero-slide-item.active { opacity: 1; }
.lux-hero .hero-slide-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lux-hero .hero-overlay {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 40px 20px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
    color: #fff;
}
.lux-hero .hero-overlay h3 { font-family: 'Playfair Display', serif; font-size: 22px; margin-bottom: 4px; line-height: 1.25; }
.lux-hero .hero-overlay p { font-size: 13px; opacity: 0.9; }
.lux-hero .hero-tag {
    display: inline-block;
    background: var(--primary); color: #1a1a1a;
    font-size: 11px; font-weight: 700;
    padding: 3px 12px; border-radius: 14px;
    margin-bottom: 8px; letter-spacing: 0.5px;
}
.lux-hero .hero-dots { position: absolute; bottom: 12px; right: 16px; display: flex; gap: 5px; }
.lux-hero .hero-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: all 0.3s; }
.lux-hero .hero-dot.active { background: var(--primary); width: 18px; border-radius: 4px; }

@media (min-width: 700px) {
    .lux-navbar { padding: 16px 24px; }
    .lux-navbar .logo img { height: 40px; width: 40px; }
    .lux-navbar .logo span { font-size: 20px; }
    .lux-cart { padding: 8px 16px; font-size: 14px; }
    .site-wrap { padding: 0 20px; }
    .lux-hero { aspect-ratio: 21 / 9; max-height: 420px; margin: 24px 0; }
    .lux-hero .hero-overlay { padding: 60px 40px 30px; }
    .lux-hero .hero-overlay h3 { font-size: 32px; }
    .lux-hero .hero-overlay p { font-size: 15px; }
    .lux-hero .hero-tag { font-size: 12px; padding: 4px 14px; margin-bottom: 10px; }
}

/* ---- Shop layout: sidebar + menu grid (stays side-by-side on ALL screen sizes) ---- */
.shop-layout { display: flex; gap: 12px; align-items: flex-start; margin-top: 10px; }

.category-sidebar {
    width: 78px;
    flex-shrink: 0;
    position: sticky;
    top: 66px;
    background: var(--cream);
    border-radius: 14px;
    padding: 10px 6px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}
.category-sidebar h4 { display: none; }
.cat-side-item {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 8px 4px; border-radius: 10px;
    margin-bottom: 4px; cursor: pointer;
    transition: background 0.2s;
    color: var(--dark);
    text-align: center;
}
.cat-side-item:hover, .cat-side-item.active { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.cat-side-item.active { border-bottom: 2px solid var(--primary); }
.cat-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.cat-side-item span.cname {
    font-size: 10.5px; font-weight: 500; line-height: 1.2;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    word-break: break-word;
}

.menu-main { flex: 1; min-width: 0; }
.menu-section { margin-bottom: 30px; scroll-margin-top: 66px; }
.menu-section h3 { font-family: 'Playfair Display', serif; font-size: 19px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--light-gray); }

.item-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.item-card {
    background: #fff; border: 1px solid var(--border); border-radius: 14px;
    overflow: hidden; transition: transform 0.25s, box-shadow 0.25s;
    min-width: 0;
}
.item-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,0,0,0.08); }
.item-card img { width: 100%; height: 100px; object-fit: cover; display: block; }
.item-card-body { padding: 10px; }
.item-card-body h4 { font-size: 13px; margin-bottom: 3px; }
.item-card-body p { font-size: 11px; color: var(--gray); margin-bottom: 8px; min-height: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.item-card .price { font-weight: 700; color: var(--dark); font-size: 13px; }
.item-card form { margin: 0; }

@media (min-width: 700px) {
    .shop-layout { gap: 28px; }
    .category-sidebar { width: 220px; top: 90px; padding: 12px; }
    .category-sidebar h4 { display: block; font-family: 'Playfair Display', serif; padding: 8px 10px 12px; font-size: 15px; color: var(--gray); }
    .cat-side-item { flex-direction: row; align-items: center; gap: 12px; padding: 10px 12px; text-align: left; }
    .cat-side-item.active { border-left: 3px solid var(--primary); border-bottom: none; }
    .cat-avatar { width: 34px; height: 34px; font-size: 14px; }
    .cat-side-item span.cname { font-size: 14px; -webkit-line-clamp: unset; }
    .menu-section { scroll-margin-top: 90px; }
    .menu-section h3 { font-size: 24px; margin-bottom: 16px; }
    .item-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
    .item-card img { height: 140px; }
    .item-card-body { padding: 14px; }
    .item-card-body h4 { font-size: 15px; }
    .item-card-body p { font-size: 12px; white-space: normal; }
}

/* ---- Footer ---- */
.site-footer {
    text-align: center;
    padding: 24px 0 8px;
    margin-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--gray);
    font-size: 12px;
}
.site-footer strong { color: var(--dark); }
