
:root {
    --primary-purple: #7C3AED;
    --primary-purple-dark: #6D28D9;
    --primary-purple-light: #A78BFA;
    --lavender-bg: #F3E8FF;
    --soft-pink: #FCE7F3;
    --pink-accent: #EC4899;
    --text-dark: #1F2937;
    --text-muted: #6B7280;
    --white: #FFFFFF;
    --border-light: #E9D5FF;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', -apple-system, sans-serif;
    background: var(--lavender-bg);
    color: var(--text-dark);
    min-height: 100vh;
    font-size: 1rem;
    line-height: 1.6;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/*LAYOUT & SIDEBAR*/

:root {
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 72px;
    --topbar-height: 68px;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0.5rem 1.25rem 0.5rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

    .sidebar-logo img {
        width: 70px;
        height: 70px;
        object-fit: contain;
        margin-bottom: 0.5rem;
    }

.sidebar-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-purple);
    line-height: 1.1;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.5px;
}

.sidebar-logo-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
}

    .nav-item:hover {
        background: var(--lavender-bg);
        color: var(--primary-purple);
    }

    .nav-item.active {
        background: var(--lavender-bg);
        color: var(--primary-purple);
        font-weight: 600;
    }

    .nav-item .nav-icon {
        width: 22px;
        height: 22px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.15rem;
        flex-shrink: 0;
    }

.sidebar-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

/* Collapsed state (desktop) */
body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .sidebar-logo-text,
body.sidebar-collapsed .sidebar-logo-sub {
    display: none;
}

body.sidebar-collapsed .sidebar-logo {
    padding: 0.75rem 0.5rem 1rem 0.5rem;
    justify-content: center;
}

    body.sidebar-collapsed .sidebar-logo img {
        width: 42px;
        height: 42px;
        margin-bottom: 0;
    }

body.sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 0.75rem;
    gap: 0;
}

    body.sidebar-collapsed .nav-item span:not(.nav-icon) {
        display: none;
    }

body.sidebar-collapsed .sidebar-footer .nav-item {
    justify-content: center;
}

body.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* Main content  */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 1.5rem 2rem 2rem 2rem;
    min-height: 100vh;
    transition: margin-left 0.25s ease;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/*  Hamburger / Collapse button  */
.menu-toggle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--white);
    border: 1.5px solid var(--border-light);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary-purple);
    transition: background 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
}

    .menu-toggle:hover {
        background: var(--lavender-bg);
        border-color: var(--primary-purple);
    }

/* Mobile backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.25s ease;
}

body.sidebar-open .sidebar-backdrop {
    display: block;
    opacity: 1;
}

/* Tablet & Mobile  */
@media (max-width: 1024px) {
    .main-content {
        padding: 1.25rem 1.25rem 2rem 1.25rem;
    }
}

@media (max-width: 768px) {
    /* Sidebar becomes off-canvas drawer */
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important; /* override collapsed */
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    /* Force expand appearance inside mobile drawer */
    body.sidebar-collapsed .sidebar-logo-text,
    body.sidebar-collapsed .sidebar-logo-sub {
        display: block;
    }

    body.sidebar-collapsed .sidebar-logo {
        justify-content: flex-start;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    body.sidebar-collapsed .nav-item {
        justify-content: flex-start;
        padding: 0.75rem 1rem;
        gap: 0.85rem;
    }

        body.sidebar-collapsed .nav-item span:not(.nav-icon) {
            display: inline;
        }

    /* Main content takes full width */
    .main-content,
    body.sidebar-collapsed .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: calc(var(--topbar-height) + 0.5rem);
    }

    /* Page title smaller */
    .page-title {
        font-size: 1.25rem;
    }

    /* Prevent body scroll when drawer is open */
    body.sidebar-open {
        overflow: hidden;
    }

    /* Grid tweaks for smaller screens */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}   

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-icon-wrapper {
    position: relative;
    width: 44px;
    height: 44px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.1);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--primary-purple);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Cards ---- */
.card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 2px 12px rgba(124, 58, 237, 0.06);
    border: none;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

/* ---- Buttons ---- */
.btn {
    padding: 0.65rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-purple);
    color: white;
}

    .btn-primary:hover {
        background: var(--primary-purple-dark);
        color: white;
    }

.btn-outline {
    background: transparent;
    color: var(--primary-purple);
    border: 2px solid var(--primary-purple);
}

    .btn-outline:hover {
        background: var(--lavender-bg);
    }

.btn-pink {
    background: var(--pink-accent);
    color: white;
}

.btn-block {
    width: 100%;
}

/* ---- Forms ---- */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid var(--border-light);
    border-radius: 10px;
    font-size: 0.95rem;
    background: var(--white);
    transition: border-color 0.2s ease;
    font-family: inherit;
}

    .form-control:focus {
        outline: none;
        border-color: var(--primary-purple);
        box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.product-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(124, 58, 237, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15);
    }

    .product-card img {
        width: 100%;
        height: 140px;
        object-fit: cover;
    }

.product-card-body {
    padding: 0.85rem 1rem;
}

.product-card-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.product-card-price {
    font-weight: 700;
    color: var(--primary-purple);
    font-size: 0.95rem;
}

.category-circles {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.category-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.category-circle-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--soft-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid var(--white);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.1);
}

    .category-circle-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.category-circle-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dark);
    text-align: center;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.status-pending {
    background: #FEF3C7;
    color: #92400E;
}

.status-confirmed {
    background: #D1FAE5;
    color: #065F46;
}

.status-ready {
    background: #DBEAFE;
    color: #1E40AF;
}

.status-completed {
    background: #E5E7EB;
    color: #374151;
}

.status-cancelled {
    background: #FEE2E2;
    color: #991B1B;
}

.status-placed {
    background: #EDE9FE;
    color: #5B21B6;
}

.status-inpreparation {
    background: #FFEDD5;
    color: #9A3412;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 2px 12px rgba(124, 58, 237, 0.06);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-dark);
}

.table-wrapper {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(124, 58, 237, 0.06);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

    .table th {
        text-align: left;
        padding: 1rem 1.25rem;
        font-size: 0.8rem;
        color: var(--text-muted);
        font-weight: 600;
        background: #FAF5FF;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .table td {
        padding: 1rem 1.25rem;
        border-top: 1px solid var(--border-light);
        font-size: 0.9rem;
    }

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
}

.toast {
    background: var(--white);
    border-left: 4px solid var(--primary-purple);
    padding: 1rem 1.25rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 0.5rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }

        .sidebar.open {
            transform: translateX(0);
        }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* HOME PAGE */

/* Hero Banner */
.hero-banner {
    background: linear-gradient(135deg, #F3E8FF 0%, #FCE7F3 100%);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
    overflow: hidden;
    position: relative;
}

.hero-content {
    flex: 1;
    min-width: 260px;
}

.hero-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-purple);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.hero-images {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 100%;
}

    .hero-images img {
        width: 120px;
        height: 120px;
        object-fit: cover;
        border-radius: 16px;
        box-shadow: 0 4px 15px rgba(124, 58, 237, 0.15);
        flex-shrink: 0;
    }

/* Section headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0 1rem 0;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.section-link {
    color: var(--primary-purple);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

    .section-link:hover {
        text-decoration: underline;
    }

/* Category Row */
.category-row {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-dark);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

    .category-card:hover {
        transform: translateY(-4px);
    }

.category-card-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--soft-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.12);
    border: 3px solid var(--white);
}

    .category-card-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.category-card-name {
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    max-width: 90px;
    color: var(--text-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-banner {
        flex-direction: column-reverse;
        padding: 1.5rem;
        text-align: center;
    }

    .hero-title {
        font-size: 1.4rem;
    }

    .hero-images {
        justify-content: center;
    }

        .hero-images img {
            width: 80px;
            height: 80px;
        }

    .category-card-img {
        width: 70px;
        height: 70px;
    }
}

/* 
   MOBILE POLISH  */

/* Prevent horizontal scroll / overflow globally */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Ensure images never overflow their containers */
img {
    max-width: 100%;
    height: auto;
}

/*  TABLET (≤ 1024px) */
@media (max-width: 1024px) {
    .main-content {
        padding: 1.25rem 1rem 2rem 1rem;
    }

    .hero-banner {
        padding: 1.5rem;
        gap: 1rem;
    }

    .hero-images img {
        width: 100px;
        height: 100px;
    }
}

/* MOBILE (≤ 768px) */
@media (max-width: 768px) {

    /* --- Global layout --- */
    .main-content {
        padding: 1rem 0.75rem 2rem 0.75rem !important;
        margin-left: 0 !important;
    }

    /* --- Topbar --- */
    .topbar {
        padding: 0.5rem 0 1rem 0;
        gap: 0.5rem;
        flex-wrap: nowrap;
    }

    .topbar-left {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        min-width: 0;
        flex: 1;
    }

    .page-title {
        font-size: 1.15rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .topbar-actions {
        gap: 0.5rem;
    }

    /* --- Hero Banner --- */
    .hero-banner {
        flex-direction: column-reverse;
        padding: 1.25rem;
        text-align: center;
        gap: 1rem;
        border-radius: 16px;
    }

    .hero-title {
        font-size: 1.25rem;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 0.85rem;
    }

    .hero-images {
        justify-content: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

        .hero-images img {
            width: 72px;
            height: 72px;
            border-radius: 12px;
        }

    /* --- Category circles --- */
    .category-row {
        gap: 0.75rem;
        padding-bottom: 0.75rem;
        margin: 0 -0.75rem 1rem -0.75rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .category-card-img {
        width: 68px !important;
        height: 68px !important;
    }

    .category-card-name {
        font-size: 0.75rem;
        max-width: 72px;
    }

    /* --- Product grid --- */
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
    }

    .product-card img {
        height: 110px;
    }

    .product-card-body {
        padding: 0.65rem 0.75rem;
    }

    .product-card-name {
        font-size: 0.85rem;
        line-height: 1.2;
    }

    .product-card-price {
        font-size: 0.85rem;
    }

    /* --- Stats cards --- */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
    }

    .stat-card {
        padding: 0.9rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    /* --- Cards --- */
    .card {
        padding: 1rem;
        border-radius: 14px;
    }

    .card-title {
        font-size: 1rem;
    }

    /* --- Tables (horizontal scroll) --- */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 12px;
    }

    .table {
        min-width: 640px; /* force scroll on small screens */
    }

        .table th, .table td {
            padding: 0.65rem 0.75rem;
            font-size: 0.8rem;
        }

    /* --- Buttons --- */
    .btn {
        padding: 0.55rem 1rem;
        font-size: 0.85rem;
    }

    /* --- Section headers --- */
    .section-header {
        margin: 1.25rem 0 0.75rem 0;
    }

    .section-title {
        font-size: 1rem;
    }

    .section-link {
        font-size: 0.8rem;
    }

    /* --- Two-column grids become single column --- */
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns: 1fr 320px"],
    [style*="grid-template-columns: 1fr 380px"],
    [style*="grid-template-columns: 2fr 1fr"],
    [style*="grid-template-columns: 1fr 340px"] {
        grid-template-columns: 1fr !important;
    }

    /* --- Cart items on mobile --- */
    .cart-item-row {
        grid-template-columns: 60px 1fr auto !important;
        gap: 0.5rem !important;
    }

    /* --- Category & product detail layout --- */
    .card[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 1.25rem !important;
    }
}

/* SMALL PHONES (≤ 480px) */
@media (max-width: 480px) {
    .hero-images img {
        width: 60px;
        height: 60px;
    }

    .hero-title {
        font-size: 1.1rem;
    }

    .category-card-img {
        width: 60px !important;
        height: 60px !important;
    }

    .product-grid {
        grid-template-columns: 1fr !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .menu-toggle {
        width: 38px;
        height: 38px;
    }
}

/* GUEST HEADER */

.guest-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 0.75rem 2rem;
    box-shadow: 0 2px 12px rgba(124, 58, 237, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    gap: 1rem;
}

.guest-header-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    min-width: 0;
    flex-shrink: 1;
}

    .guest-header-brand img {
        width: 36px;
        height: 36px;
        object-fit: contain;
        flex-shrink: 0;
    }

    .guest-header-brand span {
        font-weight: 700;
        color: var(--primary-purple);
        font-size: 1.1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.guest-header-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

    .guest-header-nav .btn {
        padding: 0.5rem 1rem;
        white-space: nowrap;
    }

/* Mobile: compact guest header */
@media (max-width: 768px) {
    .guest-header {
        padding: 0.6rem 0.75rem;
        gap: 0.5rem;
    }

    .guest-header-brand img {
        width: 30px;
        height: 30px;
    }

    .guest-header-brand span {
        font-size: 0.9rem;
    }

    .guest-header-nav {
        gap: 0.3rem;
    }

        .guest-header-nav .btn {
            padding: 0.4rem 0.6rem;
            font-size: 0.75rem;
        }

        /* Hide "Sign Up" text on tiny screens, show icon-style */
        .guest-header-nav .btn-primary {
            padding: 0.4rem 0.55rem;
            font-size: 0.75rem;
        }
}

@media (max-width: 400px) {
    /* On very tiny phones, collapse further */
    .guest-header-brand span {
        display: none; /* hide "Roti O Sandton" text, just show logo */
    }

    .guest-header-nav .btn {
        padding: 0.35rem 0.5rem;
        font-size: 0.7rem;
    }
}

.product-placeholder {
    width: 100%;
    height: 140px;
    background: var(--soft-pink);
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary-purple);
}

@media (max-width: 768px) {
    .product-placeholder {
        height: 110px;
        font-size: 2rem;
    }
}

/* CART ITEM — Desktop */
.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto auto auto;
    gap: 1rem;
    align-items: center;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-light);
}

.cart-item-img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
}

.cart-item-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: var(--soft-pink);
    color: var(--primary-purple);
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.cart-item-price {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

    .cart-item-qty .form-control {
        width: 70px;
        text-align: center;
        padding: 0.4rem 0.5rem;
    }

.cart-item-unit {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cart-item-subtotal {
    font-weight: 700;
    color: var(--primary-purple);
    min-width: 80px;
    text-align: right;
    font-size: 0.95rem;
}

.cart-item-remove {
    display: flex;
    justify-content: flex-end;
}

.btn-remove {
    background: transparent;
    border: 1.5px solid var(--danger);
    color: var(--danger);
    border-radius: 10px;
    width: 34px;
    height: 34px;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .btn-remove:hover {
        background: #FEE2E2;
    }

/* CART ITEM — Mobile: stack into 2 rows */
@media (max-width: 600px) {
    .cart-item {
        grid-template-columns: 60px 1fr auto;
        grid-template-areas:
            "img  info  remove"
            "img  qty   subtotal";
        gap: 0.5rem 0.75rem;
        align-items: center;
        padding: 0.75rem 0;
    }

    .cart-item-img,
    .cart-item-placeholder {
        grid-area: img;
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
        align-self: start;
    }

    .cart-item-info {
        grid-area: info;
        min-width: 0;
    }

    .cart-item-name {
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .cart-item-price {
        font-size: 0.75rem;
    }

    .cart-item-qty {
        grid-area: qty;
    }

        .cart-item-qty .form-control {
            width: 60px;
            padding: 0.35rem 0.4rem;
            font-size: 0.85rem;
        }

    .cart-item-unit {
        font-size: 0.7rem;
    }

    .cart-item-subtotal {
        grid-area: subtotal;
        min-width: 0;
        font-size: 0.9rem;
    }

    .cart-item-remove {
        grid-area: remove;
    }

    .btn-remove {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
}

.category-circles {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

/* Make each circle snap nicely */
.category-circle {
    scroll-snap-align: start;
    flex-shrink: 0;
}

/* Hide scrollbar but keep scrollability on mobile */
.category-circles::-webkit-scrollbar {
    height: 4px;
}

.category-circles::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

/* FORCE MOBILE SIDEBAR BEHAVIOUR */
@media (max-width: 768px) {
    /* Sidebar is always off-canvas on mobile */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 260px !important;
        height: 100vh !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
        z-index: 1000 !important;
    }

    /* When open, slide it in */
    body.sidebar-open .sidebar {
        transform: translateX(0) !important;
    }

    /* Main content always full width on mobile — no sidebar offset */
    .main-content,
    body.sidebar-collapsed .main-content {
        margin-left: 0 !important;
        padding: 1rem 0.75rem 2rem 0.75rem !important;
        width: 100% !important;
    }

    /* Topbar takes full width */
    .topbar {
        padding: 0.5rem 0 1rem 0 !important;
        width: 100% !important;
    }
}

.sidebar {
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
    opacity: 1 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

    .sidebar .sidebar-logo,
    .sidebar .sidebar-nav,
    .sidebar .sidebar-footer {
        background: #FFFFFF !important;
    }

/* SITE FOOTER */
.site-footer {
    margin-top: 3rem;
    padding: 2rem 0 1.5rem 0;
    border-top: 1px solid var(--border-light);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 2rem;
    padding-bottom: 1.5rem;
}

.footer-col {
    min-width: 0;
}

/* Brand block */
.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

    .footer-brand img {
        width: 48px;
        height: 48px;
        object-fit: contain;
        flex-shrink: 0;
    }

.footer-brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-purple);
    line-height: 1.1;
}

.footer-brand-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.footer-tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 320px;
}

/* Headings */
.footer-heading {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.85rem;
}

/* Links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .footer-links a {
        color: var(--text-muted);
        text-decoration: none;
        font-size: 0.9rem;
        transition: color 0.2s ease;
    }

        .footer-links a:hover {
            color: var(--primary-purple);
            text-decoration: underline;
        }

/* Contact */
.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

    .footer-contact li {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.9rem;
        color: var(--text-muted);
    }

    .footer-contact a {
        color: var(--text-muted);
        text-decoration: none;
        transition: color 0.2s ease;
    }

        .footer-contact a:hover {
            color: var(--primary-purple);
        }

.footer-icon {
    font-size: 0.95rem;
    width: 1.2rem;
    text-align: center;
    flex-shrink: 0;
}

/* Social buttons */
.footer-socials {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.footer-social-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--lavender-bg);
    color: var(--primary-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

    .footer-social-btn:hover {
        background: var(--primary-purple);
        color: #FFFFFF;
        transform: translateY(-2px);
    }

/* Responsive */
@media (max-width: 768px) {
    .site-footer {
        margin-top: 2rem;
        padding: 1.5rem 0 1rem 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding-bottom: 1rem;
    }

    .footer-tagline {
        max-width: 100%;
    }
}