/* ==========================================================================
   Cafe Runner Platform - Unified Storefront Layout Styles
   Guarantees 100% visual parity across all web pages, routes & standalone views
   ========================================================================== */

:root {
    --cr-primary: #820202;
    --cr-primary-hover: #9c0303;
    --cr-accent: #F26522;
    --cr-accent-hover: #d95314;
    --cr-bg: #f8fafc;
    --cr-surface: #ffffff;
    --cr-text: #0f172a;
    --cr-text-muted: #64748b;
    --cr-border: #e2e8f0;
}

/* Base Body Alignment */
body.cr-storefront-body {
    background-color: var(--cr-bg);
    color: var(--cr-text);
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

main.cr-storefront-main {
    flex: 1 0 auto;
}

/* ==========================================================================
   Header Navigation (Unified Desktop Top Utility Ribbon + Main Navbar)
   ========================================================================== */
.cr-desktop-header-wrap {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 1. Top Utility Ribbon */
.cr-top-utility-bar {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 6px 0;
    font-size: 12px;
    color: #475569;
}

.cr-location-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    text-decoration: none;
    transition: color 0.15s ease;
}

.cr-location-pill:hover {
    color: var(--cr-primary);
    text-decoration: none;
}

.cr-location-pill .loc-icon {
    color: var(--cr-primary);
    font-size: 13px;
}

.cr-location-pill .loc-label {
    font-weight: 700;
    color: #0f172a;
}

.cr-location-pill .loc-text {
    color: #475569;
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cr-utility-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.cr-join-dropdown-btn {
    color: #475569;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.15s ease;
}

.cr-join-dropdown-btn:hover {
    color: var(--cr-primary);
    text-decoration: none;
}

.cr-utility-divider {
    height: 12px;
    width: 1px;
    background: #cbd5e1;
    display: inline-block;
}

.cr-theme-toggle-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #f59e0b;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cr-theme-toggle-btn:hover {
    border-color: #94a3b8;
    transform: scale(1.05);
}

/* 2. Main Navigation Bar */
.cr-main-navbar {
    background: #ffffff;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.cr-brand-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-right: 22px;
}

.cr-brand-logo-link img {
    height: 40px;
    width: auto;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    object-fit: contain;
}

.cr-brand-logo-text {
    display: flex;
    flex-direction: column;
    margin-left: 10px;
    line-height: 1.1;
}

.cr-brand-logo-text .title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 1.15rem;
    color: var(--cr-primary);
    letter-spacing: -0.5px;
}

.cr-brand-logo-text .subtitle {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--cr-accent);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.cr-main-nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
}

.cr-nav-item-link {
    color: #334155;
    font-size: 14.5px;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.cr-nav-item-link:hover {
    color: var(--cr-primary);
    background: rgba(130, 2, 2, 0.04);
    text-decoration: none;
}

.cr-nav-item-link.active {
    color: var(--cr-primary);
    font-weight: 800;
    background: rgba(130, 2, 2, 0.08);
}

.cr-nav-item-link.catering-link {
    color: var(--cr-accent) !important;
    font-weight: 700;
}

.cr-nav-item-link.catering-link:hover {
    background: rgba(242, 101, 34, 0.08);
}

.cr-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.cr-action-icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    font-size: 13.5px;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.cr-action-icon-circle:hover {
    background: #ffffff;
    border-color: var(--cr-primary);
    color: var(--cr-primary);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(130, 2, 2, 0.12);
}

.cr-cart-badge-count {
    position: absolute;
    top: -3px;
    right: -3px;
    background: var(--cr-primary);
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 800;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}

.cr-nav-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cr-nav-profile-btn:hover {
    background: var(--cr-primary);
    border-color: var(--cr-primary);
    color: #ffffff;
    text-decoration: none;
}

.cr-nav-hamburger-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: none;
    align-items: center;
    justify-content: center;
    color: #475569;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.cr-nav-hamburger-btn:hover {
    background: #f1f5f9;
    color: var(--cr-primary);
}

/* 3. Responsive Mobile Drawer */
@media (max-width: 991px) {
    .cr-main-nav-links, .cr-nav-profile-btn {
        display: none !important;
    }
    .cr-nav-hamburger-btn {
        display: inline-flex !important;
    }
    .cr-location-pill .loc-text {
        max-width: 160px;
    }
}

.cr-mobile-drawer {
    display: none;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    padding: 12px 16px;
}

.cr-mobile-drawer.open {
    display: block !important;
    animation: crDrawerSlide 0.25s ease-out;
}

@keyframes crDrawerSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.cr-mobile-drawer-link {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    color: #1e293b;
    font-size: 14.5px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s ease;
}

.cr-mobile-drawer-link:hover {
    background: #f8fafc;
    color: var(--cr-primary);
    text-decoration: none;
}

.cr-mobile-drawer-link.active {
    background: rgba(130, 2, 2, 0.08);
    color: var(--cr-primary);
    font-weight: 700;
}

.cr-mobile-drawer-link.catering {
    color: var(--cr-accent);
}

/* ==========================================================================
   Unified Global Footer (Matching FooterViewWidget Parity)
   ========================================================================== */
.cr-storefront-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 50px 0 30px;
    margin-top: auto;
    border-top: 3px solid var(--cr-accent);
}

.cr-storefront-footer a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.15s ease;
}

.cr-storefront-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.cr-footer-brand-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 1.25rem;
    color: #ffffff;
    letter-spacing: -0.5px;
    margin-bottom: 2px;
}

.cr-footer-brand-sub {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--cr-accent);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}

.cr-footer-tagline {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 6px;
}

.cr-footer-desc {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.5;
    max-width: 380px;
}

.cr-footer-heading {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.cr-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cr-footer-links li {
    margin-bottom: 9px;
}

.cr-footer-links a {
    font-size: 0.88rem;
    color: #94a3b8;
}

.cr-footer-links a:hover {
    color: #ffffff;
}

.cr-footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
    color: #64748b;
}
