:root {
    --restaurant-primary: #8B0000;
    --restaurant-secondary: #FFD700;
    --restaurant-light: #FFF8E1;
    --restaurant-dark: #5D4037;
    
    /* Variables para tema claro (ahora por defecto) */
    --light-bg: #ffffff;
    --light-card: #f9f9f9;
    --light-text: #333333;
    --light-border: #e0e0e0;
    --light-shadow: rgba(0, 0, 0, 0.1);
    
    /* Variables para tema oscuro */
    --dark-bg: #121212;
    --dark-card: #1E1E1E;
    --dark-text: #E0E0E0;
    --dark-border: #333333;
    --dark-shadow: rgba(0, 0, 0, 0.4);
    
    /* Colores Uruguay */
    --uruguay-blue: #0038A8;
    --uruguay-white: #FFFFFF;
    --uruguay-gold: #FFD700;
    --uruguay-sun: #F9A602;
}

/* Tema claro por defecto */
body {
    background-color: var(--light-bg);
    color: var(--light-text);
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Tema oscuro */
.dark-mode {
    --light-bg: var(--dark-bg);
    --light-card: var(--dark-card);
    --light-text: var(--dark-text);
    --light-border: var(--dark-border);
    --light-shadow: var(--dark-shadow);
}

/* Encabezado de navegación */
.navigation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--light-card);
    border-bottom: 1px solid var(--light-border);
    margin-bottom: 15px;
    flex-wrap: wrap;
    box-shadow: 0 2px 10px var(--light-shadow);
}

.section-title {
    color: var(--restaurant-primary);
    font-size: 1.5rem;
    margin: 0;
    font-family: 'Playfair Display', serif;
    order: 1;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background-color: var(--restaurant-primary);
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    order: 2;
    box-shadow: 0 2px 5px rgba(139, 0, 0, 0.2);
}

.back-button:hover {
    background-color: var(--restaurant-dark);
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(139, 0, 0, 0.3);
}

.back-button i {
    font-size: 0.9em;
    transition: transform 0.3s ease;
}

.back-button:hover i {
    transform: translateX(3px);
}

/* Estilos del carrusel */
.circular-carousel-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    margin: 0 auto;
    perspective: 1000px;
}

.circular-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card {
    position: absolute;
    width: 250px;
    height: 350px;
    left: 50%;
    top: 50%;
    transform-origin: center;
    transform-style: preserve-3d;
    transition: all 0.8s ease;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 1s;
    border-radius: 20px;
}

.product-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px var(--light-shadow);
}

.card-front {
    background: linear-gradient(135deg, var(--uruguay-blue) 0%, #00267A 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 8px solid var(--uruguay-white);
}

.card-front::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 12px;
    background: var(--uruguay-white);
    transform: translateY(-50%);
    box-shadow: 0 24px 0 var(--uruguay-white),
                0 -24px 0 var(--uruguay-white);
}

.card-back {
    background: linear-gradient(to bottom right, var(--light-card), #f0f0f0);
    transform: rotateY(180deg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dark-mode .card-back {
    background: linear-gradient(to bottom right, var(--dark-card), #2a2a2a);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s;
    position: relative;
    z-index: 1;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    color: var(--light-text);
    text-align: center;
}

.dark-mode .product-info {
    color: var(--dark-text);
}

.product-name {
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--uruguay-blue);
}

.product-desc {
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-family: 'Open Sans', sans-serif;
    color: var(--light-text);
    opacity: 0.9;
}

.dark-mode .product-desc {
    color: var(--dark-text);
    opacity: 0.8;
}

.product-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--uruguay-blue);
    margin-bottom: 15px;
    position: relative;
}

.product-price::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: var(--uruguay-gold);
}

.carousel-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    z-index: 10;
}

.carousel-prev, .carousel-next {
    background: var(--uruguay-blue);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 56, 168, 0.3);
}

.carousel-prev:hover, .carousel-next:hover {
    background: #0044CC;
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 56, 168, 0.4);
}

.carousel-message {
    text-align: center;
    padding: 40px;
    color: var(--light-text);
}

.dark-mode .carousel-message {
    color: var(--dark-text);
}

.carousel-message i {
    font-size: 3rem;
    color: var(--light-border);
    margin-bottom: 20px;
}

.dark-mode .carousel-message i {
    color: var(--dark-border);
}

.carousel-message p {
    font-size: 1.2rem;
}

/* Estilos para el modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--light-card);
    border-radius: 12px;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    position: relative;
}

.dark-mode .modal-container {
    background: var(--dark-card);
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--light-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #0038A8 0%, #00267A 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-title {
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
}

.modal-close:hover {
    transform: rotate(90deg);
}

.modal-body {
    display: flex;
    padding: 0;
}

.modal-image-container {
    flex: 1;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--light-bg);
}

.dark-mode .modal-image-container {
    background: var(--dark-bg);
}

.modal-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    object-fit: contain;
}

.modal-content {
    flex: 1;
    padding: 20px;
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--uruguay-blue);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.modal-price {
    font-size: 1.8rem;
    color: var(--uruguay-blue);
    font-weight: bold;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.modal-description {
    line-height: 1.6;
    color: var(--light-text);
}

.dark-mode .modal-description {
    color: var(--dark-text);
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    border-top: 1px solid var(--light-border);
    background: var(--light-bg);
    border-radius: 0 0 12px 12px;
}

.dark-mode .modal-footer {
    background: var(--dark-bg);
}

.btn-back {
    background: var(--uruguay-blue);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 56, 168, 0.2);
}

.btn-back:hover {
    background: #00267A;
    transform: translateX(-5px);
    box-shadow: 0 4px 8px rgba(0, 56, 168, 0.3);
}

.btn-action {
    background: var(--uruguay-gold);
    color: var(--uruguay-blue);
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(0, 56, 168, 0.2);
}

.btn-action:hover {
    background: var(--uruguay-sun);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 56, 168, 0.3);
}

/* Botón de cambio de tema */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--restaurant-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 1200px) {
    .product-card {
        width: 220px;
        height: 320px;
    }
}

@media (max-width: 992px) {
    .circular-carousel-container {
        height: 450px;
    }
    
    .modal-body {
        flex-direction: column;
    }
    
    .modal-image-container {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .navigation-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .section-title {
        font-size: 1.3rem;
        order: 2;
    }
    
    .back-button {
        order: 1;
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .circular-carousel-container {
        height: 400px;
    }
    
    .product-card {
        width: 180px;
        height: 280px;
    }
    
    .product-name {
        font-size: 1.2rem;
    }
    
    .product-desc {
        font-size: 0.8rem;
    }
    
    .modal-container {
        width: 95%;
    }
}

@media (max-width: 576px) {
    .circular-carousel-container {
        height: 350px;
    }
    
    .product-card {
        width: 150px;
        height: 240px;
    }
    
    .product-name {
        font-size: 1rem;
    }
    
    .product-price {
        font-size: 1.1rem;
    }
    
    .carousel-prev, .carousel-next {
        width: 35px;
        height: 35px;
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        bottom: 15px;
        right: 15px;
    }
}

@media (max-width: 400px) {
    .product-card {
        width: 130px;
        height: 210px;
    }
    
    .card-back {
        padding: 15px;
    }
    
    .product-desc {
        display: none;
    }
}