@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --primary: #FF9304;     /* Naranja vibrante */
    --primary-dark: #E67A00;
    --secondary: #AB3428;   
    --accent: #F5D061;      
    --dark: #FFFFFF;        /* Texto blanco */
    --light: #1A1A1A;       /* Fondo oscuro para elementos */
    --gray: #B0B0B0;        
    --radius: 20px;
    --shadow: 0 15px 35px rgba(0,0,0,0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    /* Fondo con gradiente premium, mantiene el naranja pero le da profundidad */
    background: linear-gradient(135deg, #FF9B26 0%, #E85D04 100%);
    background-attachment: fixed;
    color: var(--dark);
    padding-bottom: 90px; 
    -webkit-font-smoothing: antialiased;
}

/* Header */
.header {
    background: rgba(17, 17, 17, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    border: 2px solid var(--primary);
    box-shadow: 0 0 15px rgba(255, 147, 4, 0.3);
}

.logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-text h1 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-text p {
    font-size: 0.75rem;
    color: var(--gray);
    font-weight: 400;
    letter-spacing: 1px;
}

/* Hero Section */
.hero {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(17,17,17,0.95), rgba(17,17,17,0.1));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px 150px 30px 20px; /* El padding derecho de 150px evita que el texto choque con el avatar */
    color: #FFFFFF;
}

.hero-overlay h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 5px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
    line-height: 1.1;
}

.hero-overlay p {
    font-size: 1rem;
    font-weight: 300;
    color: var(--gray);
}

.floating-avatar {
    position: fixed;
    top: 90px;
    right: 15px;
    width: 120px;
    height: auto;
    z-index: 1500;
    pointer-events: none; /* Permite clickar lo que haya debajo */
    filter: drop-shadow(0 0 5px var(--primary)) drop-shadow(0 5px 15px rgba(0,0,0,0.6));
    animation: floatAnim 4s ease-in-out infinite;
}

.floating-avatar img {
    width: 100%;
    height: auto;
    display: block;
}

@keyframes floatAnim {
    0% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0); }
}

/* Main Container */
.menu-container {
    padding: 0 20px 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* Order Type Selector */
.order-type-container {
    background: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.order-type-container h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #FFFFFF;
    text-align: center;
    font-weight: 600;
}

.order-type-options {
    display: flex;
    gap: 15px;
}

.order-type-label {
    flex: 1;
    cursor: pointer;
}

.order-type-label input {
    display: none;
}

.custom-radio {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    font-weight: 600;
    color: var(--gray);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.order-type-label input:checked + .custom-radio {
    background: rgba(255, 147, 4, 0.15);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 20px rgba(255, 147, 4, 0.15);
}

/* Categories */
.category-section {
    margin-bottom: 45px;
}

.category-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.category-title i {
    color: var(--dark);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 650px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Product Card */
.product-card {
    background: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    height: 130px;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    border-color: rgba(255, 147, 4, 0.3);
}

.product-card:active {
    transform: scale(0.98);
}

.product-image {
    width: 130px;
    height: 100%;
    object-fit: cover;
    border-right: 1px solid rgba(255,255,255,0.05);
}

.product-details {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.3;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
}

.product-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

.btn-control {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: #FFFFFF;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-control:hover {
    background: rgba(255,255,255,0.2);
}

.btn-control:active {
    background: var(--primary);
    color: #FFF;
    transform: scale(0.9);
}

.product-qty {
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 20px;
    text-align: center;
    color: #FFFFFF;
}

/* Floating Cart */
.floating-cart {
    position: fixed;
    bottom: 20px; 
    left: 50%;
    width: calc(100% - 40px);
    max-width: 500px;
    border-radius: 40px;
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 12px 15px 12px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    z-index: 1000;
    transform: translate(-50%, 150%);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1.1);
}

.floating-cart.visible {
    transform: translate(-50%, 0);
}

.cart-info {
    display: flex;
    flex-direction: column;
}

.cart-total-label {
    font-size: 0.8rem;
    color: var(--gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cart-total-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #1DA851 100%);
    color: #FFFFFF;
    border: none;
    padding: 14px 28px;
    border-radius: 30px;
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-whatsapp::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:hover::after {
    left: 100%;
}

.btn-whatsapp:active {
    transform: scale(0.95);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: #FFFFFF;
    font-size: 0.8rem;
    font-weight: 800;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #111111;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.bottom-padding {
    height: 80px;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: flex-end; 
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(26, 26, 26, 0.98);
    width: 100%;
    max-width: 500px;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    padding: 25px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
    border-top: 1px solid rgba(255,255,255,0.1);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (min-width: 600px) {
    .modal-overlay {
        align-items: center; 
    }
    .modal-content {
        border-radius: 25px;
        border: 1px solid rgba(255,255,255,0.1);
    }
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
}

.modal-header h2 {
    color: #FFFFFF;
    font-size: 1.3rem;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--gray);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-close-modal:hover {
    color: #FFFFFF;
}

.modal-body {
    margin-bottom: 20px;
}

.summary-type {
    background: rgba(255, 147, 4, 0.15);
    color: var(--primary);
    padding: 8px 15px;
    border-radius: 10px;
    display: inline-block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.summary-items {
    max-height: 40vh;
    overflow-y: auto;
    margin-bottom: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    color: #FFFFFF;
}

.summary-item-name {
    flex: 1;
    font-size: 1.05rem;
}

.summary-item-qty {
    color: var(--gray);
    margin-right: 12px;
    font-weight: bold;
}

.summary-item-price {
    font-weight: bold;
    color: var(--primary);
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.3rem;
    color: #FFFFFF;
    font-weight: 800;
    border-top: 1px dashed rgba(255,255,255,0.2);
    padding-top: 15px;
}

/* Image Modal */
.image-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.image-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.expanded-image {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    object-fit: contain;
}

.image-modal-overlay.active .expanded-image {
    transform: scale(1);
}

.btn-close-image {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #FFF;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s;
    z-index: 3010;
}

.btn-close-image:hover {
    background: rgba(255,255,255,0.3);
}

.product-image {
    cursor: pointer;
}
