/* Custom CSS for Chinese/Japanese Restaurant Theme */

:root {
    /* Rojo de marca — legible sobre fondos oscuros (#1a1a1a) */
    --primary-color: #ef4444;
    --primary-hover: #f87171;
    --primary-solid: #dc2626;
    --primary-solid-hover: #b91c1c;
    --primary-rgb: 239, 68, 68;
    --bg-dark: #121212;
    --bg-card: #1a1a1a;
    --text-light: #e0e0e0;
    --text-muted: #aaaaaa;
    --accent-gold: #d4af37;
    --granmurallasushi-hero-gradient: linear-gradient(to bottom, rgba(10, 10, 10, 0.1), rgba(10, 10, 10, 0.90));

    /* Bootstrap 5 global overrides */
    --bs-primary: var(--primary-solid);
    --bs-primary-rgb: 220, 38, 38;
    --bs-link-color: var(--primary-color);
    --bs-link-hover-color: var(--primary-hover);
    --bs-nav-pills-link-active-bg: var(--primary-solid);
    --bs-nav-pills-link-active-color: #ffffff;
    --bs-body-bg: var(--bg-dark);
    --bs-body-color: var(--text-light);
    --bs-body-bg-rgb: 18, 18, 18;
    --bs-body-color-rgb: 224, 224, 224;
}

body {
    background-color: var(--bg-dark) !important;
    color: var(--text-light) !important;
    font-family: 'Inter', sans-serif !important;
}

/* Header & Navigation */
.navbar,
.header {
    background-color: var(--bg-card) !important;
    border-bottom: 1px solid #2a2a2a !important;
    position: relative;
    z-index: 1030;
}

@media (min-width: 992px) {
    .header {
        position: sticky;
        top: 0;
    }

    body.menu-page-active .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
    }

    body.menu-page-active .header,
    body.menu-page-active .header .navbar {
        border-bottom: none !important;
    }

    body.menu-page-active main {
        padding-top: var(--site-header-offset, 0px);
    }

    .menu-page-sticky-header {
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }
}

.header .dropdown-menu {
    z-index: 1031;
    background-color: var(--bg-card) !important;
    border: 1px solid #2a2a2a !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    --bs-dropdown-link-color: var(--text-light);
    --bs-dropdown-link-hover-color: #ffffff;
    --bs-dropdown-link-hover-bg: rgba(var(--primary-rgb), 0.18);
    --bs-dropdown-link-active-color: #ffffff;
    --bs-dropdown-link-active-bg: var(--primary-solid);
}

.header .dropdown-item {
    color: var(--text-light) !important;
}

.header .dropdown-item:hover,
.header .dropdown-item:focus {
    color: #ffffff !important;
    background-color: rgba(var(--primary-rgb), 0.18) !important;
}

.header .dropdown-item.active,
.header .dropdown-item:active {
    color: #ffffff !important;
    background-color: var(--primary-solid) !important;
}

.menu-categories-bar {
    z-index: 1;
}

/* Video background: fixed video + semi-opaque center column on all pages */
body.video-bg-active {
    background-color: #000000 !important;
}

body.video-bg-active main {
    z-index: 1;
    margin-top: 0;
    background: transparent !important;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

body.video-bg-active #page-wrapper {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Footer — mismo fondo que header/navbar */
.footer {
    background-color: var(--bg-card) !important;
    border-top: 1px solid #2a2a2a;
}

.footer > .py-5 {
    background-color: transparent !important;
    border-top: 0 !important;
}

.footer .text-danger {
    color: var(--primary-color) !important;
}

body.video-bg-active .footer {
    position: relative;
    z-index: 1;
}

.menu-page,
.home-page,
.site-page {
    --menu-panel-background: rgba(10, 10, 10, 0.25);
    --menu-panel-header: rgba(10, 10, 10, 0.90);
    position: relative;
    margin-top: 0;
    padding-top: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: transparent;
}

.site-page .menu-page-inner {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.site-page--static .heading-section h2 {
    color: #ffffff;
}

.site-page--static .nav.flex-column .nav-link.active {
    background-color: rgba(var(--primary-rgb), 0.18) !important;
    color: var(--primary-color) !important;
}

.site-page--static .nav.flex-column .nav-link:hover,
.site-page--static .nav.flex-column .nav-link:focus {
    color: var(--primary-color) !important;
}

.menu-page-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.menu-page-bg video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

@media (max-width: 991.98px) {
    .menu-page-bg video {
        object-position: right;
    }
}

.menu-page-stage {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1140px;
    flex: 1 1 auto;
    min-height: 100%;
    margin: 0 auto;
    padding: 0 0.75rem 1.5rem;
    background-color: var(--menu-panel-background);
}

.menu-page-sticky-header {
    position: sticky;
    top: var(--site-header-offset, 0px);
    z-index: 1018;
    margin: 0 -0.75rem;
    padding: 0 0.75rem;
    background-color: var(--menu-panel-background);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 992px) {
    .home-page .menu-page-stage {
        background-color: var(--menu-panel-header);
    }

    .menu-page-sticky-header {
        background-color: var(--menu-panel-header);
    }
}

.menu-page .menu-categories-bar {
    background: transparent !important;
    border: 0 !important;
    margin: 0;
    padding: 0;
}

.menu-page #navbar-categories {
    padding-top: 0.5rem;
    padding-bottom: 0;
}

.menu-page #navbar-categories .nav-link {
    color: var(--text-light) !important;
}

.menu-page #navbar-categories .nav-link:hover,
.menu-page #navbar-categories .nav-link:focus {
    color: #ffffff !important;
    background-color: rgba(var(--primary-rgb), 0.18) !important;
}

.menu-page #navbar-categories .nav-link.active,
.menu-page #navbar-categories .nav-link.active:hover,
.menu-page #navbar-categories .nav-link.active:focus {
    background-color: var(--primary-solid) !important;
    color: #ffffff !important;
}

.menu-page-inner {
    width: 100%;
}

@media (prefers-reduced-motion: reduce) {
    .menu-page-bg video {
        display: none;
    }

    .menu-page-bg {
        background-image: url('/images/bg-poster.jpg');
        background-position: center;
        background-size: cover;
        background-repeat: no-repeat;
    }
}

.menu-page .menu-search-sticky {
    padding: 0.5rem 0 0.75rem;
    background: transparent !important;
    border: 0;
}

.menu-page .menu-search-sticky .input-group {
    margin-bottom: 0;
}

.menu-page .menu-list {
    padding-top: 0.75rem;
}

.menu-scroll-top {
    position: fixed;
    right: 1rem;
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    z-index: 1020;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.5rem);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, background-color 0.2s ease;
    pointer-events: none;
}

.menu-scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.menu-scroll-top:hover,
.menu-scroll-top:focus-visible {
    background-color: var(--primary-solid-hover) !important;
    border-color: rgba(255, 255, 255, 0.25);
}

@media (max-width: 991.98px) {
    body.menu-page-active:has(.cart-mobile-bar) .menu-scroll-top {
        bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
    }
}

@media (min-width: 992px) {
    .menu-scroll-top {
        right: 1.5rem;
        bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
        width: 3.25rem;
        height: 3.25rem;
    }
}

.menu-page .menu-item-card.bg-white {
    background-color: rgba(0, 0, 0, 0.28) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.menu-page .menu-item-card.shadow-hover:hover {
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
    border-color: rgba(var(--primary-rgb), 0.4) !important;
}

.menu-page .menu-search .input-group.bg-white,
.menu-page .menu-search .input-group .bg-white,
.menu-page .menu-search .input-group .form-control.bg-white {
    background-color: rgba(0, 0, 0, 0.35) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: var(--text-light) !important;
}


@media (max-width: 991.98px) {
    .menu-search-sticky {
        transition: max-height 0.25s ease, padding 0.25s ease, opacity 0.2s ease;
        max-height: 4.5rem;
        overflow: hidden;
    }

    .menu-search-sticky.is-collapsed {
        max-height: 0;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        opacity: 0;
        pointer-events: none;
    }

    .menu-search-sticky .input-group .form-control,
    .menu-search-sticky .input-group .btn {
        padding-top: 0.45rem;
        padding-bottom: 0.45rem;
    }
}

.cart-offcanvas {
    --bs-offcanvas-width: min(420px, 88vw);
    z-index: 1045;
}

/* Checkout: keep header cart visible but disabled */
body.checkout-page-active .cart-header-toggle {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

/* Checkout: sidebar cart should not overflow its box */
.checkout-cart-sidebar {
    position: sticky;
    top: calc(var(--site-header-offset, 0px) + 1rem);
}

.checkout-cart-sidebar #cart-box {
    max-width: 100%;
    padding: 1rem 1.1rem !important;
}

.checkout-cart-sidebar .cart-items > ul > li {
    gap: 0.65rem;
    padding-bottom: 0.85rem;
    margin-bottom: 0.85rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.checkout-cart-sidebar .cart-items > ul > li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 0 !important;
}

.checkout-cart-sidebar .cart-items > ul > li:not(.cart-gift-item) {
    align-items: flex-start;
}

.checkout-cart-sidebar #cart-items .cart-item-edit-btn {
    position: relative;
    min-width: 0;
    flex: 1 1 auto;
    padding: 0.55rem 2rem 0.55rem 0.65rem !important;
}

.checkout-cart-sidebar #cart-items .cart-item-edit-btn > p.mb-1 {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.checkout-cart-sidebar #cart-items .cart-item-edit-label {
    position: absolute;
    top: 0.5rem;
    right: 0.55rem;
    font-size: 0;
    line-height: 1;
}

.checkout-cart-sidebar #cart-items .cart-item-edit-label .fa {
    font-size: 0.8rem;
}

.checkout-cart-sidebar #cart-items .cart-item-edit-hint {
    display: none;
}

.checkout-cart-sidebar #cart-items .price {
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start;
    padding-top: 0.15rem;
    margin-left: 0.5rem !important;
}

.checkout-cart-sidebar #cart-items p,
.checkout-cart-sidebar #cart-items span {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.gift-promotion .fa-gift.text-danger,
#cart-box .gift-promotion .fa-gift,
.cart-offcanvas .gift-promotion .fa-gift {
    color: var(--bs-danger) !important;
}

.gift-promotion-select {
    border: 2px solid #4ade80 !important;
    background-color: #16a34a !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 0 0 0.2rem rgba(34, 197, 94, 0.4);
    cursor: pointer;
}

.gift-promotion-select:hover {
    background-color: #22c55e !important;
    border-color: #86efac !important;
}

.gift-promotion-select:focus,
.gift-promotion-select:focus-visible {
    border-color: #86efac !important;
    background-color: #22c55e !important;
    box-shadow: 0 0 0 0.3rem rgba(34, 197, 94, 0.5) !important;
    outline: none;
}

.gift-promotion-select option {
    color: #111827;
    background-color: #ffffff;
}

.cart-offcanvas .offcanvas-header {
    background-color: var(--bg-card);
}

.cart-offcanvas .offcanvas-body {
    background-color: var(--bg-card);
    overflow-y: auto;
}

.cart-offcanvas #cart-box {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: transparent !important;
}

.cart-offcanvas #cart-box > #cart-items > h5 {
    display: none;
}

.cart-offcanvas #cart-buttons {
    position: sticky;
    bottom: 0;
    z-index: 1;
    margin-top: 1rem;
    padding-top: 1rem;
    background-color: var(--bg-card);
    border-top: 1px solid #2a2a2a;
}

#cart-box .text-success,
.cart-offcanvas .text-success,
.cart-preview .text-success {
    color: var(--bs-success) !important;
}

.cart-gift-item .cart-gift-badge {
    background-color: rgba(var(--bs-success-rgb, 25, 135, 84), 0.15) !important;
    color: var(--bs-success) !important;
}

.cart-gift-remove-btn,
.cart-gift-remove-btn .fa {
    color: var(--bs-danger) !important;
}

.cart-gift-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0 !important;
    border: 0;
    border-radius: 999px;
    line-height: 1;
    text-decoration: none;
}

.cart-gift-remove-btn:hover,
.cart-gift-remove-btn:focus-visible {
    color: var(--bs-danger) !important;
    background-color: rgba(var(--bs-danger-rgb, 220, 53, 69), 0.12);
}

#cart-items .cart-gift-item .cart-gift-badge {
    background-color: rgba(var(--bs-success-rgb, 25, 135, 84), 0.15) !important;
    color: var(--bs-success) !important;
}

#cart-items .cart-gift-remove-btn,
#cart-items .cart-gift-remove-btn .fa {
    color: var(--bs-danger) !important;
}

.cart-mobile-bar {
    z-index: 1025;
    padding: 0.625rem 0.75rem calc(0.625rem + env(safe-area-inset-bottom, 0px));
    background-color: var(--bg-card);
    border-top: 1px solid #2a2a2a;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.cart-mobile-bar__btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    margin: 0;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 999px;
    background-color: var(--primary-solid);
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.2;
    text-align: left;
}

.cart-mobile-bar__btn:active {
    background-color: var(--primary-solid-hover);
}

.cart-mobile-bar__icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.cart-mobile-bar__count {
    position: absolute;
    top: -0.55rem;
    right: -0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background-color: #ffffff;
    color: var(--primary-color);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
}

.cart-mobile-bar__label {
    flex: 1 1 auto;
    font-weight: 600;
    white-space: nowrap;
}

.cart-mobile-bar__total {
    font-weight: 700;
    white-space: nowrap;
}

.cart-mobile-bar__chevron {
    flex-shrink: 0;
    opacity: 0.85;
    font-size: 0.85rem;
}

.cart-mobile-bar--empty .cart-mobile-bar__btn {
    opacity: 0.88;
}

@media (max-width: 991.98px) {
    .cart-header-toggle-wrap {
        display: flex;
        align-items: center;
    }

    .cart-header-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        color: #ffffff !important;
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 999px;
        padding: 0.35rem 0.65rem;
    }

    .cart-header-toggle__badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 1.2rem;
        height: 1.2rem;
        padding: 0 0.3rem;
        border-radius: 999px;
        background-color: var(--primary-solid);
        color: #ffffff;
        font-size: 0.6875rem;
        font-weight: 700;
        line-height: 1;
    }

    .menu-page,
    .home-page,
    .site-page {
        max-width: 100%;
    }

    .menu-page-stage,
    .home-page .menu-page-stage,
    .site-page .menu-page-stage {
        max-width: 100%;
        padding-left: max(0.75rem, calc(var(--bs-gutter-x, 1.5rem) * 0.5));
        padding-right: max(0.75rem, calc(var(--bs-gutter-x, 1.5rem) * 0.5));
    }

    .home-page .granmurallasushi-hero {
        margin-left: calc(-1 * max(0.75rem, calc(var(--bs-gutter-x, 1.5rem) * 0.5)));
        margin-right: calc(-1 * max(0.75rem, calc(var(--bs-gutter-x, 1.5rem) * 0.5)));
        padding-left: max(0.75rem, calc(var(--bs-gutter-x, 1.5rem) * 0.5));
        padding-right: max(0.75rem, calc(var(--bs-gutter-x, 1.5rem) * 0.5));
    }

    .menu-page-sticky-header {
        margin-left: calc(-1 * max(0.75rem, calc(var(--bs-gutter-x, 1.5rem) * 0.5)));
        margin-right: calc(-1 * max(0.75rem, calc(var(--bs-gutter-x, 1.5rem) * 0.5)));
        padding-left: max(0.75rem, calc(var(--bs-gutter-x, 1.5rem) * 0.5));
        padding-right: max(0.75rem, calc(var(--bs-gutter-x, 1.5rem) * 0.5));
    }

    .menu-page-inner {
        width: 100%;
        max-width: 100%;
    }

    .menu-categories-bar {
        overflow-x: clip;
        max-width: 100%;
    }

    .menu-categories-bar .layout-scrollable {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .menu-categories-bar #navbar-categories {
        width: max-content;
        min-width: 100%;
    }

    .cart-mobile-bar {
        left: 0;
        right: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .cart-mobile-bar__btn {
        max-width: 100%;
        overflow: hidden;
    }

    .cart-mobile-bar__icon {
        margin-right: 0.15rem;
    }

    .cart-mobile-bar__count {
        top: -0.45rem;
        right: -0.45rem;
    }

    /* Menú móvil: hueco para la barra fija de cesta */
    body.menu-page-active .menu-page {
        padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px)) !important;
    }

    .cart-offcanvas.offcanvas-end {
        top: auto;
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 88vh;
        border-top-left-radius: 1.25rem;
        border-top-right-radius: 1.25rem;
        border-right: 0;
        transform: translateY(100%) !important;
    }

    .cart-offcanvas.offcanvas-end.showing,
    .cart-offcanvas.offcanvas-end.show:not(.hiding) {
        transform: translateY(0) !important;
    }

    .cart-offcanvas.offcanvas-end.hiding {
        transform: translateY(100%) !important;
    }

    .cart-offcanvas-sheet-top {
        display: flex;
        justify-content: center;
        padding: 0.65rem 0 0.15rem;
        background-color: var(--bg-card);
    }

    .cart-offcanvas-handle {
        display: block;
        width: 2.75rem;
        height: 0.3rem;
        border-radius: 999px;
        background-color: #555555;
    }

    .cart-offcanvas .offcanvas-header {
        padding-top: 0.5rem;
    }

    .cart-offcanvas #cart-buttons {
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
    }
}

@media (min-width: 992px) {
    .menu-page-inner {
        width: 100%;
    }

    .cart-header-toggle-wrap {
        display: flex;
        align-items: center;
    }

    .cart-header-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        color: #ffffff !important;
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 999px;
        padding: 0.4rem 0.85rem;
        white-space: nowrap;
        text-decoration: none;
    }

    .cart-header-toggle:hover,
    .cart-header-toggle:focus {
        color: #ffffff !important;
        border-color: var(--primary-color);
        background-color: rgba(var(--primary-rgb), 0.15);
    }

    .cart-header-toggle__badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 1.35rem;
        height: 1.35rem;
        padding: 0 0.35rem;
        border-radius: 999px;
        background-color: var(--primary-solid);
        color: #ffffff;
        font-size: 0.75rem;
        font-weight: 700;
        line-height: 1;
    }

    .cart-header-toggle__total {
        font-size: 0.9rem;
        font-weight: 600;
    }

    .cart-offcanvas {
        --bs-offcanvas-width: min(420px, 92vw);
    }
}

.navbar-brand,
.nav-link {
    color: #ffffff !important;
}

/* Fix mobile menu toggle icon */
.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.2) !important;
}
.navbar-toggler-icon {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Cards & Containers */
.card,
.modal-content,
.bg-white {
    background-color: var(--bg-card) !important;
    color: var(--text-light) !important;
    border: 1px solid #2a2a2a !important;
}

.border {
    border-color: #2a2a2a !important;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6,
.card-title {
    color: #ffffff !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    background-color: var(--primary-solid) !important;
    border-color: var(--primary-solid) !important;
    color: #ffffff !important;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-secondary:hover {
    background-color: var(--primary-solid-hover) !important;
    border-color: var(--primary-solid-hover) !important;
    box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.45);
}

/* Inputs & Forms */
.form-control,
.form-select,
.form-check-input {
    background-color: #2a2a2a !important;
    color: #ffffff !important;
    border-color: #444444 !important;
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
}

.form-control:focus,
.form-select:focus {
    background-color: #3a3a3a !important;
    color: #ffffff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 5px rgba(var(--primary-rgb), 0.5) !important;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Cart & Checkout Specifics */
.cart-box,
.order-details {
    background-color: var(--bg-card) !important;
}

/* Micro-animations */
.btn,
.nav-link,
.card {
    transition: all 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* Accents */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-solid) !important;
}

/* Custom Hero/Home adjustments if needed */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/images/hero-bg.jpg');
    /* Example placeholder */
    background-size: cover;
    background-position: center;
}

/* Fixes for dark theme */

/* Calendar / Tables */
.table {
    --bs-table-color: var(--text-light) !important;
    --bs-table-bg: transparent !important;
    --bs-table-border-color: #2a2a2a !important;
    --bs-table-striped-color: var(--text-light) !important;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.03) !important;
    --bs-table-active-color: #ffffff !important;
    --bs-table-active-bg: rgba(255, 255, 255, 0.1) !important;
    --bs-table-hover-color: #ffffff !important;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.075) !important;
}

.table,
.table th,
.table td {
    color: var(--text-light) !important;
}

.table thead th {
    background-color: #2a2a2a !important;
    color: #ffffff !important;
}

.datepicker,
.datepicker table {
    background-color: var(--bg-card) !important;
    color: var(--text-light) !important;
}

.datepicker td.day:hover,
.datepicker td.day.focused {
    background-color: var(--primary-solid) !important;
    color: #ffffff !important;
}

/* Cart & Checkout Fixes */
.list-group-item,
.list-group {
    background-color: var(--bg-card) !important;
    color: var(--text-light) !important;
    border-color: #2a2a2a !important;
}

.cart-items,
.cart-item,
.cart-total {
    color: var(--text-light) !important;
}

/* Fix for white blocks in checkout */
.bg-white,
[style*="background-color: #ffffff"],
[style*="background-color: white"] {
    background-color: var(--bg-card) !important;
    color: var(--text-light) !important;
}

/* Payment options */
.payment-option,
.payment-item,
.custom-control-label {
    color: var(--text-light) !important;
}

/* General fixes */
span,
label,
p {
    color: inherit;
    /* Fallback to parent color */
}

/* Cart specific fixes */
.bg-light {
    background-color: #2a2a2a !important;
    color: var(--text-light) !important;
}

.btn-outline-secondary {
    color: var(--text-light) !important;
    border-color: #444444 !important;
}

.btn-outline-secondary:hover {
    background-color: var(--primary-solid) !important;
    border-color: var(--primary-solid) !important;
    color: #ffffff !important;
}

/* Calendar specifics */
.datepicker table tr td,
.datepicker table tr th {
    color: var(--text-light) !important;
}

.datepicker table tr th.datepicker-switch,
.datepicker table tr th.prev,
.datepicker table tr th.next {
    color: #ffffff !important;
}

.datepicker table tr th.dow {
    color: #ffffff !important;
    /* Days of week */
}

/* Checkout & Totals specifics */
.cart-preview,
.cart-totals,
.cart-total-item {
    background-color: var(--bg-card) !important;
    color: var(--text-light) !important;
}

#checkout-form .bg-white,
#cart-box .bg-white {
    background-color: var(--bg-card) !important;
}

/* --- New contrast fixes from subagent inspection --- */

/* Reservation Calendar (Flatpickr) */
.flatpickr-weekdays span.flatpickr-weekday,
.flatpickr-weekday {
    color: #f3f4f6 !important;
}

.flatpickr-day {
    color: #e5e7eb !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay,
.flatpickr-day.flatpickr-disabled {
    color: #6b7280 !important;
}

.flatpickr-monthDropdown-months,
.numInput.cur-year {
    color: #f3f4f6 !important;
}

.flatpickr-prev-month svg,
.flatpickr-next-month svg {
    fill: #ffffff !important;
}

.flatpickr-prev-month:hover svg,
.flatpickr-next-month:hover svg {
    fill: var(--primary-color) !important;
}

/* Make the inline reservation calendar fluid on small screens so the
   Sunday column doesn't get clipped by flatpickr's fixed widths. */
@media (max-width: 575.98px) {
    .flatpickr-calendar.inline,
    .flatpickr-calendar.inline .flatpickr-rContainer,
    .flatpickr-calendar.inline .flatpickr-days,
    .flatpickr-calendar.inline .dayContainer,
    .flatpickr-calendar.inline .flatpickr-weekdaycontainer,
    .flatpickr-calendar.inline .flatpickr-weekdays {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .flatpickr-calendar.inline .flatpickr-days {
        overflow: visible !important;
    }

    .flatpickr-calendar.inline .flatpickr-day {
        max-width: 14.2857143% !important;
        flex-basis: 14.2857143% !important;
    }

    /* Prevent the prev/next-month arrows from overlapping the month/year
       header on very narrow screens. Use flex layout instead of flatpickr's
       default absolute positioning so the arrows and the centered month text
       each get their own space. */
    .flatpickr-calendar.inline .flatpickr-months {
        display: flex !important;
        align-items: center !important;
    }

    .flatpickr-calendar.inline .flatpickr-months .flatpickr-prev-month,
    .flatpickr-calendar.inline .flatpickr-months .flatpickr-next-month {
        position: static !important;
        flex: 0 0 auto !important;
        padding: 8px 6px !important;
    }

    .flatpickr-calendar.inline .flatpickr-months .flatpickr-current-month {
        position: static !important;
        left: auto !important;
        width: auto !important;
        flex: 1 1 auto !important;
        text-align: center !important;
        padding: 0 2px !important;
        font-size: 90% !important;
    }
}

/* Menus Page (Cart / Basket Items) */
.cart-box .cart-list p,
.cart-box .cart-list button,
.cart-item-name,
.cart-item p {
    color: #f3f4f6 !important;
}

.cart-box .cart-list span,
.cart-item span {
    color: #9ca3af !important;
}

/* Checkout Page & Cart Totals Block */
#cart-totals,
.cart-box table,
.cart-box .table,
.cart-totals-table,
.cart-box .table-responsive {
    background-color: transparent !important;
    background: var(--bg-card) !important;
}

#cart-totals table td,
#cart-totals td,
.cart-box .table td {
    color: #e5e7eb !important;
}

.checkout-payment,
[id^="payment-"] {
    background-color: var(--bg-card) !important;
    color: #f3f4f6 !important;
}

/* Fix for nested table backgrounds in totals */
#cart-totals,
#cart-totals .table-responsive,
#cart-totals table,
#cart-totals tr,
#cart-totals td {
    background-color: transparent !important;
    background: transparent !important;
}

#cart-totals td,
#cart-totals th,
#cart-totals span,
#cart-totals div {
    color: #e5e7eb !important;
}

/* Fix for cart items text color */
#cart-items button,
#cart-items p,
#cart-items span,
#cart-items div {
    color: #e5e7eb !important;
}

/* Ensure the background of the cart items container stays dark if needed */
#cart-items {
    background-color: transparent !important;
}

/* Fix for placeholders globally */
::placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

:-ms-input-placeholder {
    color: #9ca3af !important;
}

::-ms-input-placeholder {
    color: #9ca3af !important;
}

/* Fix for specific labels and text inside modals */
.modal-content label,
.modal-content .text-muted,
.modal-body p {
    color: #e5e7eb !important;
}

/* Fix for close buttons (X) in modals and alerts */
.btn-close,
.close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
}

.btn-close:hover,
.close:hover {
    opacity: 1;
}

/* Product modal: smaller menu item image (desktop) */
#orange-modal .modal-top {
    display: flex;
    justify-content: center;
    padding: 0.75rem 1rem 0;
    max-height: 200px;
    overflow: hidden;
}

#orange-modal .modal-top img {
    max-height: 160px;
    width: auto !important;
    max-width: 100%;
    object-fit: contain;
    border-radius: 0.375rem;
}

#orange-modal .modal-item-description {
    padding: 0.75rem 1rem 0;
}

#orange-modal .cart-item-quantity-value {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 1.125rem;
}

@media (max-width: 991.98px) {
    #orange-modal .modal-dialog {
        margin: 0;
    }

    #orange-modal .modal-content {
        min-height: 100dvh;
        border-radius: 0;
    }

    #orange-modal .modal-header {
        padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
    }

    #orange-modal .modal-footer {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
        background-color: var(--bg-card);
        border-top: 1px solid #2a2a2a !important;
    }

    #orange-modal .modal-item-intro {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0 1rem 0.75rem;
    }

    #orange-modal .modal-top {
        max-height: none;
        width: 88px;
        flex-shrink: 0;
        padding-inline: 0;
    }

    #orange-modal .modal-top img {
        width: 88px !important;
        height: 88px;
        max-height: 88px;
        object-fit: cover;
        border-radius: 0.375rem;
    }

    #orange-modal .modal-item-description {
        flex: 1;
        min-width: 0;
        font-size: 0.875rem;
        line-height: 1.35;
        margin: 0;
        padding: 0;
    }

    #orange-modal .modal-title {
        font-size: 1.125rem;
        line-height: 1.3;
    }
}

/* Menu grid: compact vertical product cards */
.menu-item-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.menu-item-card.shadow-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.menu-item-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

@media (max-width: 991.98px) {
    .menu-item-card-image {
        width: 88px;
        min-width: 88px;
        height: 88px;
        aspect-ratio: auto;
        border-radius: 0.375rem;
    }

    .menu-item-card-name {
        min-height: auto;
        -webkit-line-clamp: 2;
    }

    .menu-item-card-description {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.35;
    }
}

@media (min-width: 992px) {
    .menu-item-card-image {
        aspect-ratio: 200 / 190;
        width: calc(100% + 0.5rem);
        max-width: none;
        height: auto;
        max-height: 95px;
        margin: -0.25rem -0.25rem 0.25rem;
        border-radius: 0 !important;
    }

    .menu-item-card-name {
        font-size: 0.8125rem;
        line-height: 1.2;
        min-height: 2.4em;
    }

    .menu-item-card-price {
        font-size: 0.8125rem;
    }

    .menu-items .menu-item-card .ingredients {
        margin-top: 0;
        padding-top: 0;
        gap: 0.2rem !important;
    }

    .menu-item-card-tags {
        min-height: 1.125rem;
    }

    .menu-item-allergen-img {
        width: 16px;
        height: 16px;
    }

    .menu-item-allergen-icon.menu-item-tag-red .menu-item-allergen-img {
        width: 16px;
        height: 16px;
    }
}

.menu-item-card-name {
    font-size: 0.875rem;
    line-height: 1.25;
    min-height: 2.5em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-item-card-price {
    font-size: 0.9rem;
    color: var(--accent-gold, #d4af37);
}

.menu-item-allergen-icon {
    display: inline-flex;
    line-height: 0;
}

.menu-item-allergen-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.menu-items .menu-item-card .ingredients {
    margin-top: 0;
    padding-top: 0;
}

.menu-item-card-tags {
    min-height: 1.25rem;
    margin-top: 0.25rem;
}

.menu-item-card-body + .menu-item-card-tags .ingredients {
    margin-top: 0;
}

.menu-item-meta .ingredients span {
    font-size: 0.8rem;
}

.menu-item-tag-red {
    background-color: var(--primary-solid) !important;
    color: #ffffff !important;
    font-weight: 600;
    line-height: 1.2;
}

.menu-item-tag-red .menu-item-tag-label {
    color: #ffffff !important;
}

.menu-item-tag-red .menu-item-allergen-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    background-color: #ffffff;
    padding: 1px;
}

.menu-item-allergen-icon.menu-item-tag-red {
    background-color: var(--primary-solid) !important;
    padding: 2px;
    line-height: 0;
}

.menu-item-allergen-icon.menu-item-tag-red .menu-item-allergen-img {
    width: 20px;
    height: 20px;
}

/* --- Gran Muralla Sushi Replication Styles --- */

.granmurallasushi-hero {
    min-height: clamp(380px, 62vh, 72vh);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 3vw, 1.5rem);
}

.home-page .granmurallasushi-hero {
    margin: 0 -0.75rem;
    padding-left: max(0.75rem, calc(var(--bs-gutter-x, 1.5rem) * 0.5));
    padding-right: max(0.75rem, calc(var(--bs-gutter-x, 1.5rem) * 0.5));
    background-image: var(--granmurallasushi-hero-gradient), url('/images/restaurant_banner.gif');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.home-page-featured {
    width: 100%;
}

.home-page .granmurallasushi-schedule {
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.granmurallasushi-hero-content {
    width: 100%;
    max-width: 920px;
    padding: 0 0.25rem;
}

.granmurallasushi-title {
    font-size: clamp(1.85rem, 7vw, 3.75rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: clamp(0.02em, 0.4vw, 0.08em);
    color: #ffffff;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

.granmurallasushi-subtitle {
    font-size: clamp(1.2rem, 2.8vw, 1.35rem);
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: clamp(0.06em, 0.25vw, 0.14em);
    color: var(--primary-color);
    text-transform: uppercase;
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.granmurallasushi-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.btn-granmurallasushi-pill {
    background-color: rgba(20, 20, 20, 0.85) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-radius: 50px !important;
    padding: clamp(12px, 2.5vw, 16px) clamp(24px, 5vw, 40px) !important;
    font-weight: 600 !important;
    font-size: clamp(0.9rem, 2.5vw, 1.05rem);
    text-transform: uppercase;
    transition: all 0.3s ease !important;
    display: inline-block;
    margin: 0;
    white-space: normal;
    text-align: center;
    max-width: 100%;
}

.btn-granmurallasushi-pill:hover {
    background-color: rgba(40, 40, 40, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    color: #ffffff !important;
}

.granmurallasushi-schedule {
    padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 1.5rem);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin: clamp(1rem, 4vw, 2rem) auto;
    max-width: 800px;
}

.granmurallasushi-schedule-title {
    color: #ffffff;
    font-size: clamp(1.25rem, 4vw, 1.8rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: clamp(1rem, 3vw, 2rem);
}

.granmurallasushi-schedule-text {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.granmurallasushi-schedule-closed {
    color: var(--primary-color);
    font-weight: 600;
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin-top: 1rem;
}

@media (max-width: 575.98px) {
    .granmurallasushi-hero-actions {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .granmurallasushi-hero-actions .btn-granmurallasushi-pill {
        width: min(100%, 300px);
    }

    .navbar-brand-group {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.35rem !important;
    }
}

/* Opening status indicator */
.navbar-brand-group {
    max-width: calc(100% - 3.5rem);
}

.opening-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    line-height: 1.3;
    font-size: 0.875rem;
}

.opening-status--compact {
    font-size: 0.8125rem;
    gap: 0.35rem;
}

.opening-status-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.opening-status--compact .opening-status-dot {
    width: 7px;
    height: 7px;
}

.opening-status-dot--open {
    background-color: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

.opening-status-dot--closed {
    background-color: var(--primary-color);
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

.opening-status-label {
    font-weight: 600;
    color: #ffffff;
}

.opening-status-detail {
    color: var(--text-muted);
}

/* Cart item edit affordance */
.cart-item-edit-btn {
    cursor: pointer;
    border: 1px dashed rgba(255, 255, 255, 0.15) !important;
    border-radius: 0.5rem;
    padding: 0.4rem 0.55rem !important;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.cart-item-edit-btn:hover,
.cart-item-edit-btn:focus-visible {
    border-color: rgba(var(--primary-rgb), 0.55) !important;
    background-color: rgba(255, 255, 255, 0.04) !important;
}

.cart-item-edit-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color) !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cart-item-edit-hint {
    color: #9ca3af !important;
    font-style: italic;
}

.cart-item-comment {
    color: #e5e7eb !important;
}

.opening-status-detail::before {
    content: '·';
    margin-right: 0.35rem;
    color: var(--text-muted);
}