/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Loader */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}
button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    border-radius: 5px;
}

    button:hover {
        background-color: #45a049;
    }
.loader {
    text-align: center;
}

.loader-circle {
    border: 5px solid #3498db;
    border-top: 5px solid transparent;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

.loader-text {
    margin-top: 10px;
    font-size: 16px;
}

/* Header */
.header-short {
    background-color: #333;
    padding: 10px 20px; /* CORREGIDO: espacio entre 10px y 20px */
    text-align: center;
    color: white;
}
.formulario-envio-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #111;
    color: #fff;
    border-radius: 20px;
    z-index: 9999;
    padding: 20px;
    min-width: 300px;
    box-shadow: 0 0 20px #000;
}

.formulario-envio-contenido {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

    .formulario-envio-contenido input {
        margin: 5px 0;
        padding: 8px;
        border-radius: 5px;
        border: none;
    }

.formulario-envio-botones {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.cerrar-formulario {
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
    font-size: 20px;
}

#mapa-preview {
    margin: 10px 0;
    min-height: 100px;
}
/* Botón del Menú Desplegable - IZQUIERDA */
.BotonMenu {
    position: fixed;
    top: 20px;
    left: 20px; /* MENÚ A LA IZQUIERDA */
    z-index: 1100;
    width: 44px;
    height: 44px;
}

/* Botón del Carrito - DERECHA */
.Carrito {
    position: fixed;
    top: 20px;
    right: 20px; /* CARRITO A LA DERECHA */
    z-index: 1100;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    border: 2px solid #444;
    border-radius: 10px;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

    .Carrito:hover {
        background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
        border-color: #555;
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    }

.carrito-modal {
    position: fixed;
    top: 0;
    right: 0;
    width: 350px;
    height: 100vh;
    background: transparent;
    z-index: 2000;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}

.carrito-sidebar {
    background: linear-gradient(145deg, #121212 0%, #1e1e1e 100%);
    border: 4px solid #333;
    border-radius: 20px;
    margin: 20px 0 0 0;
    width: 320px;
    min-height: 400px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    position: relative;
    padding: 16px 12px 12px 12px;
    color: #fff;
}

.cerrar-carrito {
    position: absolute;
    top: 10px;
    right: 18px;
    font-size: 28px;
    cursor: pointer;
    font-weight: bold;
    color: #fff;
    transition: color 0.2s ease;
}

    .cerrar-carrito:hover {
        color: #ff6b6b;
    }

.carrito-lista {
    border: 4px solid #333;
    border-radius: 12px;
    background: #1a1a1a;
    padding: 12px;
    margin-top: 32px;
    margin-bottom: 12px;
    min-height: 120px;
    max-height: 180px;
    overflow-y: auto;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 16px;
    color: #fff;
}

/* Estilo para cada producto en el carrito */
.producto-carrito {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 4px;
    border-bottom: 1px solid #333;
    transition: background-color 0.2s ease;
}

    .producto-carrito:hover {
        background-color: #2a2a2a;
    }

.producto-info {
    flex: 1;
}

.producto-nombre {
    font-weight: 500;
    margin-bottom: 4px;
}

.producto-precio {
    color: #ddd;
    font-size: 14px;
}

/* Botón eliminar producto */
.borrar-producto {
    background-color: #dc3545;
    color: white;
    border: 2px solid #dc3545;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

    .borrar-producto:hover {
        background-color: #c82333;
        border-color: #bd2130;
        transform: scale(1.05);
    }

.carrito-total {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 16px;
    text-align: right;
    color: #fff;
    padding-top: 8px;
    border-top: 2px solid #333;
}

.carrito-btn {
    width: 95%;
    margin: 8px auto;
    padding: 10px 0;
    border: 3px solid;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    display: block;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Botón vaciar carrito */
.vaciar-carrito {
    background-color: #dc3545 !important;
    color: white !important;
    border-color: #dc3545 !important;
}

    .vaciar-carrito:hover {
        background-color: #c82333 !important;
        border-color: #bd2130 !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
    }

#vaciarCarrito,
#vaciarCarrito:hover {
    background-color: #a71d2a !important;
    color: #fff !important;
    border-color: #a71d2a !important;
}

    #vaciarCarrito:hover {
        background-color: #7a1620 !important;
        border-color: #7a1620 !important;
    }

/* Botón enviar pedido */
.enviar-pedido {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

    .enviar-pedido:hover {
        background-color: #218838;
        border-color: #1e7e34;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
    }

/* Botón cerrar pedido */
.cerrar-pedido {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

    .cerrar-pedido:hover {
        background-color: #5a6268;
        border-color: #545b62;
        transform: translateY(-2px);
    }

/* Personalizar scrollbar */
.carrito-lista::-webkit-scrollbar {
    width: 8px;
}

.carrito-lista::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 4px;
}

.carrito-lista::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

    .carrito-lista::-webkit-scrollbar-thumb:hover {
        background: #555;
    }

/* Efecto de entrada */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.carrito-sidebar {
    animation: slideIn 0.3s ease-out;
}

/* Botón del Menú - IZQUIERDA */
.btn {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    font-size: 30px;
    border: 2px solid #444;
    padding: 10px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    font-weight: 600;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn:hover {
        background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
        border-color: #555;
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    }

/* DropdownMenu - se despliega desde la IZQUIERDA */
.DropdownMenu {
    display: none;
    position: absolute;
    top: 50px;
    left: 0; /* Alineado a la izquierda con el botón */
    background: linear-gradient(145deg, #121212 0%, #1e1e1e 100%);
    border: 2px solid #333;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    min-width: 200px;
    z-index: 1200;
}

    .DropdownMenu a {
        display: block;
        padding: 12px 16px;
        color: white;
        text-decoration: none;
        white-space: nowrap;
        transition: background-color 0.2s ease;
        border-bottom: 1px solid #333;
    }

        .DropdownMenu a:last-child {
            border-bottom: none;
        }

        .DropdownMenu a:hover {
            background-color: #2a2a2a;
        }

    /* Estilo para mostrar el menú desplegable cuando tiene la clase 'show' */
    .DropdownMenu.show {
        display: block;
        animation: slideIn 0.3s ease-out;
    }

.Portada {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    min-height: 300px;
    border-radius: 10px;
    margin: 0 auto;
    top: 100px;
    width: 100%;
    max-width: 800px;
    margin-top: 80px;
}

/* Main Content */
main {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    margin-top: 80px; /* Espacio para los botones fijos */
}

.productos-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

/* Footer */
footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    flex-shrink: 0;
    background-color: #333;
    color: white;
    text-align: center;
    padding: 14px;
    margin-top: 0;
}

    footer p {
        font-size: 14px;
    }

/* Animación de giro para el Loader */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive: asegurar que el footer se vea en pantallas pequeñas */
@media (max-height: 740px) {
    .Portada {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    min-height: 300px;
    border-radius: 10px;
    margin: 0 auto;
    top: 100px;
    width: 100%;
    max-width: 800px;
    margin-top: 80px;
}

    .informacion-container {
        padding: 14px 12px;
    }

    main {
        gap: 12px;
        padding: 12px;
        margin-top: 70px;
    }

    .Carrito {
        position: fixed;
        top: 20px;
        right: 20px; /* CARRITO A LA DERECHA */
        z-index: 1100;
        margin: 0;
        font-size: 20px;
        border-radius: 10px;
        padding: 10px;
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
        color: white;
        border: 2px solid #444;
        cursor: pointer;
        transition: all 0.3s ease;
        font-weight: 600;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        width: 44px;
        height: 44px;
    }

    .BotonMenu {
        position: fixed;
        top: 20px;
        left: 20px; /* MENÚ A LA IZQUIERDA */
        z-index: 1100;
    }
}

/* Media query para pantallas muy pequeñas */
@media (max-width: 480px) {
    .Carrito {
        right: 10px; /* CARRITO A LA DERECHA */
        width: 40px;
        height: 40px;
        font-size: 26px;
    }
    .Portada {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    min-height: 300px;
    border-radius: 10px;
    margin: 0 auto;
    top: 100px;
    width: 100%;
    max-width: 800px;
    margin-top: 80px;
}

    .BotonMenu {
        left: 10px; /* MENÚ A LA IZQUIERDA */
    }

    .btn {
        font-size: 26px;
        padding: 8px;
        width: 40px;
        height: 40px;
    }

    .carrito-modal {
        width: 100%;
    }

    .carrito-sidebar {
        width: 95%;
        margin: 10px auto;
    }
}

/* ESTILOS ADICIONALES PARA FORZAR POSICIÓN - AGREGAR AL FINAL */
.BotonMenu {
    position: fixed !important;
    top: 20px !important;
    left: 20px !important;
    right: auto !important;
    z-index: 1100 !important;
}

.Carrito {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    left: auto !important;
    z-index: 1100 !important;
}
