/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

body {
    font-family: 'Poppins', Arial, sans-serif;
    margin: 0;
    background: #f8f9fa;
    color: #232946;
    overflow-x: hidden;
    scroll-behavior: smooth;
}
body.dark-mode {
    background: #181a20;
    color: #f8f9fa;
}
body.dark-mode .cover-header {
    background: #232946;
}
body.dark-mode .cover-overlay {
    background: linear-gradient(120deg, rgba(35,41,70,0.65) 0%, rgba(238,188,29,0.10) 100%);
}
body.dark-mode .category-section {
    background: #232946;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    border: 1px solid #232946;
}
body.dark-mode .category-title {
    color: #eebc1d;
}
body.dark-mode .category-divider {
    border-top: 3px solid #eebc1d;
}
body.dark-mode .category-tabs {
    background: #232946;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}
body.dark-mode .category-tab {
    color: #f8f9fa;
}
body.dark-mode .category-tab:hover, body.dark-mode .category-tab:focus {
    color: #eebc1d;
    background: #181a20;
    border-bottom: 3px solid #eebc1d;
}
body.dark-mode .cat-icon {
    color: #eebc1d;
}
body.dark-mode .dish-card-modern {
    background: #232946;
    box-shadow: 0 2px 16px rgba(0,0,0,0.18);
}
body.dark-mode .dish-title-modern {
    color: #eebc1d;
}
body.dark-mode .dish-desc-modern {
    color: #b8c1ec;
}
body.dark-mode .dish-price-main {
    color: #eebc1d;
}
body.dark-mode .dish-add-btn {
    background: #181a20;
    color: #eebc1d;
    border: 1.5px solid #eebc1d;
}
body.dark-mode .dish-add-btn:hover {
    background: #eebc1d;
    color: #232946;
    border: 1.5px solid #232946;
}
body.dark-mode .header-btn {
    background: #232946;
    color: #eebc1d;
    border: 1.5px solid #eebc1d;
}
body.dark-mode .header-btn:hover {
    background: #eebc1d;
    color: #232946;
    border: 1.5px solid #232946;
}
body.dark-mode .logo-img {
    background: #fff;
    border: 4px solid #eebc1d;
}
body.dark-mode .status-dot.open {
    background: #22c55e;
    border: 2px solid #232946;
}
body.dark-mode .status-dot.closed {
    background: #dc3545;
    border: 2px solid #232946;
}
body.dark-mode .container {
    background: none;
}

/* Modal de Información */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(35, 41, 70, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
    transition: opacity 0.18s;
    opacity: 1;
}

.modal-overlay.show {
    display: flex;
}

.modal-overlay.hide {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(35, 41, 70, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
    transition: opacity 0.18s, transform 0.18s;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.modal-hide {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    pointer-events: none;
}

.modal-content.hide {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    pointer-events: none;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px 24px;
    border-bottom: 2px solid #eebc1d;
    background: linear-gradient(135deg, #232946 0%, #2d3748 100%);
    border-radius: 20px 20px 0 0;
}

.modal-title {
    color: #eebc1d;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title i {
    font-size: 1.6rem;
}

.modal-close {
    background: none;
    border: none;
    color: #eebc1d;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(238, 188, 29, 0.1);
    transform: scale(1.1);
}

.modal-body {
    padding: 24px;
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #eebc1d;
    transition: all 0.2s;
}

.info-item:hover {
    background: #e9ecef;
    transform: translateX(4px);
}

.info-item i {
    font-size: 1.4rem;
    color: #eebc1d;
    margin-top: 2px;
    min-width: 20px;
}
.info-item:hover i{
    color: #eebc1d;
}

.info-item .services-list{
    color: #232946 !important;
    }
.info-item .services-list span:hover,.info-item .services-list span:hover i{
    color: #eebc1d !important;
    }
.info-item .services-list i{
color: #232946 !important;
}

.info-content h3 {
    color: #232946;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 6px 0;
}

.info-content p {
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.open {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.status-badge.closed {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.whatsapp-link {
    color: #25d366;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.whatsapp-link:hover {
    color: #128c7e;
    transform: scale(1.05);
}

.services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.service-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #eebc1d;
    color: #232946;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 2px solid #eebc1d;
    transition: all 0.2s;
}

.service-badge:hover {
    background: #232946;
    color: #eebc1d;
    transform: scale(1.05);
}

.service-badge.disabled {
    background: #6c757d;
    color: #fff;
    border-color: #6c757d;
}

.service-badge.disabled:hover {
    background: #5a6268;
    transform: none;
}

/* Dark mode para el modal */
body.dark-mode .modal-content {
    background: #232946;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

body.dark-mode .info-item {
    background: #2d3748;
    border-left-color: #eebc1d;
}

body.dark-mode .info-item:hover {
    background: #4a5568;
}

body.dark-mode .info-content h3 {
    color: #eebc1d;
}

body.dark-mode .info-content p {
    color: #b8c1ec;
}

body.dark-mode .status-badge.open {
    background: #22543d;
    color: #9ae6b4;
    border-color: #38a169;
}

body.dark-mode .status-badge.closed {
    background: #742a2a;
    color: #feb2b2;
    border-color: #e53e3e;
}

body.dark-mode .service-badge {
    background: #eebc1d;
    color: #232946;
    border-color: #eebc1d;
}

body.dark-mode .service-badge:hover {
    background: #232946;
    color: #eebc1d;
}

body.dark-mode .info-item .servicios-entrega span.service-badge i{
    color: #232946 !important;
}

body.dark-mode .service-badge.disabled {
    background: #4a5568;
    color: #a0aec0;
    border-color: #4a5568;
}

/* Responsive para el modal */
@media (max-width: 600px) {
    .modal-content {
        max-width: 95vw !important;
        width: 95% !important;
        margin: 20px;
        max-height: 90vh;
        height: 85vh;
    }
    
    .modal-header {
        padding: 20px 20px 12px 20px;
    }
    
    .modal-title {
        font-size: 1.2rem;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .info-item {
        padding: 12px;
        gap: 12px;
    }
    
    .info-item i {
        font-size: 1.2rem;
    }
    
    .services-list {
        flex-direction: column;
    }
    
    .service-badge {
        justify-content: center;
    }
}

/* Encabezado moderno */
.cover-header {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    margin-bottom: 32px;
    background: #fff;
}
.cover-img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}
.cover-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(120deg, rgba(35,41,70,0.25) 0%, rgba(238,188,29,0.10) 100%);
    z-index: 1;
}
.cover-content {
    position: absolute;
    left: 40px;
    bottom: 24px;
    display: flex;
    align-items: center;
    z-index: 2;
    width: calc(100% - 80px);
}
.logo-img {
    width: 90px;
    height: 90px;
    border-radius: 18px;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 2px 12px rgba(60,60,120,0.18);
    background: #fff;
}
.header-info {
    margin-left: 24px;
    flex: 1;
}
.restaurant-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(40,40,80,0.18);
}
.header-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
}
.status-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    margin-right: 2px;
    border: 2px solid #fff;
}
.status-dot.open { background: #22c55e; }
.status-dot.closed { background: #dc3545; }
.status-text { font-weight: 600; }
.header-actions {
    display: flex;
    gap: 12px;
    margin-left: 24px;
}
.header-btn {
    background: #fff;
    color: #232946;
    border: 1.5px solid #eebc1d;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 2px 8px rgba(35,41,70,0.10);
    transition: background 0.2s, color 0.2s, border 0.2s;
    text-decoration: none;
}
.header-btn:hover {
    background: #eebc1d;
    color: #232946;
    border: 1.5px solid #232946;
}

/* Menú de categorías tipo tabs */
.category-tabs {
    display: flex;
    gap: 18px;
    justify-content: center;
    align-items: center;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(35,41,70,0.07);
    margin: -32px auto 32px auto;
    padding: 0 18px;
    max-width: 900px;
    overflow-x: auto;
}
.category-tab {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 14px 18px 10px 18px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #232946;
    border-bottom: 3px solid transparent;
    text-decoration: none;
    transition: color 0.2s, border 0.2s, background 0.2s;
    background: none;
    border-radius: 0 0 12px 12px;
}
.category-tab:hover, .category-tab:focus {
    color: #eebc1d;
    background: #f8f9fa;
    border-bottom: 3px solid #eebc1d;
}
.cat-icon {
    font-size: 1.3em;
}

/* Contenedor principal */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px 0;
}

/* Sección de categoría */
.category-section {
    margin-bottom: 3.5rem;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(35,41,70,0.07);
    padding: 32px 24px 24px 24px;
    border: 1px solid #eebc1d22;
}
.category-title {
    text-align: left;
    font-size: 2rem;
    margin-bottom: 1rem;
    margin-left: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #232946;
    display: flex;
    align-items: center;
    gap: 10px;
}
.category-divider {
    width: 80px;
    margin: 0 0 2.5rem 0;
    border-top: 3px solid #6366f1;
    border-radius: 2px;
}
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 32px 18px;
    justify-content: center;
}

/* Tarjeta de plato moderna */
.dish-card-modern {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(35,41,70,0.09);
    display: flex;
    align-items: center;
    min-width: 340px;
    max-width: 420px;
    width: 100%;
    margin-bottom: 0;
    padding: 0 0 0 0;
    position: relative;
    transition: box-shadow 0.18s, transform 0.18s;
    margin: 0 12px 32px 12px;
}
.dish-card-modern:hover {
    box-shadow: 0 8px 32px rgba(99,102,241,0.16);
    transform: translateY(-7px) scale(1.03);
}
.dish-img-wrap {
    flex: 0 0 100px;
    height: 100px;
    border-radius: 16px 0 0 16px;
    overflow: hidden;
    background: #e0e7ff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dish-image-modern {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 16px 0 0 16px;
    background: #e0e7ff;
}
.dish-info-modern {
    flex: 1;
    padding: 18px 18px 18px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.dish-title-modern {
    font-weight: 600;
    font-size: 1.15rem;
    color: #232946;
    margin-bottom: 4px;
}
.dish-desc-modern {
    font-size: 0.98rem;
    color: #6c757d;
    margin-bottom: 10px;
}
.dish-prices-modern {
    display: flex;
    align-items: center;
    gap: 10px;
}
.dish-price-main {
    font-size: 1.15rem;
    font-weight: bold;
    color: #eebc1d;
}
.dish-price-old {
    font-size: 1rem;
    color: #b0b0b0;
    text-decoration: line-through;
}
.dish-discount {
    font-size: 0.95rem;
    color: #eebc1d;
    font-weight: 600;
    margin-left: 4px;
}
.dish-add-btn {
    position: absolute;
    right: 18px;
    bottom: 18px;
    background: #232946;
    color: #fff;
    border: 1.5px solid #eebc1d;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(99,102,241,0.10);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border 0.2s;
}
.dish-add-btn:hover {
    background: #eebc1d;
    color: #232946;
    border: 1.5px solid #232946;
    transform: scale(1.08);
}

/* Estilos para nuevos elementos de la carta */
.dish-presentation {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 1rem;
    margin-bottom: 4px;
}

.presentation-name {
    color: #4a5568;
}

body.dark-mode .presentation-name {
    color: #a0aec0;
}

.presentation-price {
    font-weight: 600;
    color: #2d3748;
}

body.dark-mode .presentation-price {
    color: #e2e8f0;
}

.dish-allergens-modern {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.allergen-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.dish-extras-modern {
    margin-top: 10px;
    font-size: 0.9rem;
}

.dish-extras-modern strong {
    color: #232946;
    margin-right: 5px;
}

body.dark-mode .dish-extras-modern strong {
    color: #eebc1d;
}

.dish-extras-modern .badge {
    font-size: 0.85rem;
    padding: 4px 8px;
    margin: 2px;
}

.dish-title-modern {
    display: flex;
    align-items: center;
    gap: 8px; /* Espacio entre icono de sabor y nombre */
}

.dish-modal-footer-sticky {
    position: sticky;
    position: -webkit-sticky;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 10;
    padding: 16px 0 12px 0;
    box-shadow: 0 -2px 12px rgba(35,41,70,0.07);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}
body.dark-mode .dish-modal-footer-sticky {
    background: #1b1f36;
    padding: 20px;
    border-radius: 15px;
}
.dish-modal-body-padding {
    padding-bottom: 40px !important;
}

.cant-label {
    font-weight:500;
    display: flex;
    align-items: center;
    gap: 8px;
}
.qty-btn {
    background: #eebc1d;
    color: #232946;
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(35,41,70,0.08);
}
.qty-btn:hover {
    background: #232946;
    color: #eebc1d;
}
body.dark-mode .qty-btn {
    background: #232946;
    color: #eebc1d;
    border: 1.5px solid #eebc1d;
}
body.dark-mode .qty-btn:hover {
    background: #eebc1d;
    color: #232946;
}

/* Responsive */
@media (max-width: 900px) {
    .container {
        width: 98%;
        padding: 10px 0;
    }
    .row {
        gap: 24px 10px;
    }
    .cover-content {
        left: 10px;
        width: calc(100% - 20px);
    }
}
@media (max-width: 600px) {
    .category-section {
        padding: 12px 2px 8px 2px;
    }
    .category-section .row{
        margin: 0;
    }
    .login-container {
        width: 98%;
        margin: 40px auto;
        padding: 18px 5px 12px 5px;
    }
    .row {
        flex-direction: column;
        gap: 18px 0;
    }
    .cover-header, .cover-img {
        height: 140px;
        border-bottom-left-radius: 12px;
        border-bottom-right-radius: 12px;
    }
    .logo-img {
        width: 70px;
        height: 70px;
        border-radius: 12px;
    }
    .cover-content {
        left: 5px;
        bottom: 8px;
        width: calc(100% - 10px);
    }
    .restaurant-title {
        font-size: 1.1rem;
    }
    .dish-card-modern {
        min-width: 0;
        max-width: 95%;
        align-items: center;
        text-align: left;
        padding: 20px;
        padding-bottom: 38px;
        margin: 0 auto 18px auto;
    }
    .dish-info-modern {
        align-items: center;
    }
    .dish-img-wrap, .dish-image-modern {
        width: 100%;
        height: 120px;
        border-radius: 12px 12px 0 0;
    }
    .dish-add-btn {
        right: 12px;
        bottom: 12px;
    }
    .category-tabs {
        padding: 8px 4px;
        gap: 10px;
        border-radius: 10px;
        margin: 8px auto 12px auto;
        max-width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start;
    }
    .category-tab {
        min-width: 90px;
        padding: 10px 12px 8px 12px;
        font-size: 1rem;
        margin-right: 6px;
    }
    .header-actions {
        flex-direction: row;
        align-items: flex-end;
        gap: 10px;
        position: relative;
    }
    .dark-toggle-btn {
        position: absolute;
        top: -48px;
        right: 0;
        margin-bottom: 0;
        z-index: 2;
    }
    .category-tabs::-webkit-scrollbar {
        display: none;
    }
    .category-tab {
        display: inline-flex;
        padding: 14px 20px 10px 20px;
        font-size: 1.08rem;
        border-radius: 10px 10px 14px 14px;
        min-width: 110px;
        justify-content: center;
        margin-right: 10px;
        margin-left: 0;
        white-space: normal;
    }
    .category-tab:first-child {
        margin-left: 6px; /* Espacio para que no se corte la primera */
    }
    .category-tab:last-child {
        margin-right: 0; /* Quitar espacio extra al final */
    }
    .cat-icon {
        font-size: 1.2em;
    }
    .dish-modal-footer-sticky {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .cant-label {
        font-weight:500;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    #addToCartBtn {
        width: 100%;
        font-size: 1.15em;
        padding: 14px 0;
        margin-top: 4px;
    }
    .qty-btn, #dishQty {
        font-size: 1.1em;
        height: 38px;
    }
}
@media (min-width: 601px) {
    .modal-content {
        max-width: 420px;
        width: 95%;
        margin: 40px auto;
        border-radius: 24px;
        padding: 0;
    }
    .dish-modal-footer-sticky {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 16px;
        padding: 12px 18px 12px 18px;
        border-radius: 15px;
        background: #fff;
        box-shadow: 0 -2px 12px rgba(35,41,70,0.07);
        margin-top: 18px;
        margin-bottom: 0;
    }
    body.dark-mode .dish-modal-footer-sticky {
        background: #1b1f36;
    }
    #addToCartBtn {
        width: auto;
        min-width: 140px;
        font-size: 1em;
        padding: 10px 18px;
        margin-top: 0;
    }
    .cant-label {
        justify-content: flex-start;
    }
}
