/* Estilos Generales */
:root {
    --kfc-red: #e4002b;
    --kfc-dark-red: #c4001b;
    --kfc-black: #202020;
    --kfc-gray: #f5f5f5;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: var(--kfc-black);
}

/* Header y NavegaciÃ³n */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
                url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

/* Productos */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.product-card img {
    height: 200px;
    object-fit: cover;
}

.product-card .card-title {
    font-weight: 600;
}

.price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--kfc-red);
}

/* Carrito */
.quantity-control {
    max-width: 120px;
}

.cart-summary {
    position: sticky;
    top: 20px;
}

/* Formularios */
.form-control:focus {
    border-color: var(--kfc-red);
    box-shadow: 0 0 0 0.2rem rgba(228, 0, 43, 0.25);
}

.btn-danger {
    background-color: var(--kfc-red);
    border-color: var(--kfc-red);
}

.btn-danger:hover {
    background-color: var(--kfc-dark-red);
    border-color: var(--kfc-dark-red);
}

/* Checkout */
.checkout-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.checkout-step {
    flex: 1;
    text-align: center;
    padding: 1rem;
    position: relative;
}

.checkout-step.active {
    color: var(--kfc-red);
    font-weight: bold;
}

/* CategorÃ­as */
.category-card {
    transition: transform 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-10px);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        min-height: 40vh;
    }

    .product-card img {
        height: 150px;
    }

    .checkout-steps {
        flex-direction: column;
    }
}

/* Alertas y Mensajes */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Importar fuente Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Variables CSS para colores consistentes */
:root {
    --kfc-red: #e4002b;
    --kfc-red-dark: #c4001b;
    --kfc-red-light: #ff4757;
    --text-dark: #2c3e50;
    --text-muted: #6c757d;
    --gold: #ffd700;
    --success: #2ed573;
    --warning: #ff6b6b;
    --background: #f8f9fa;
    --white: #ffffff;
    --shadow-light: 0 4px 15px rgba(0,0,0,0.1);
    --shadow-medium: 0 8px 25px rgba(0,0,0,0.15);
    --shadow-heavy: 0 20px 40px rgba(0,0,0,0.2);
    --gradient-primary: linear-gradient(135deg, var(--kfc-red) 0%, var(--kfc-red-light) 100%);
    --gradient-card: linear-gradient(45deg, var(--kfc-red), var(--kfc-red-light));
}

/* Reset y configuraci¨®n global */
* {
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text-dark);
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
    margin-bottom: 4rem;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="white" opacity="0.1"/><circle cx="80" cy="40" r="1.5" fill="white" opacity="0.1"/><circle cx="40" cy="80" r="1" fill="white" opacity="0.1"/></svg>');
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-100px) rotate(360deg); }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    text-align: center;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 50px;
    color: var(--white);
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.3);
}

.hero-badge i {
    margin-right: 8px;
    color: var(--gold);
}

/* T¨ªtulos principales */
h1.text-center {
    font-weight: 600;
    color: var(--text-dark);
    position: relative;
    margin-bottom: 3rem;
}

h1.text-center::after {
    content: '';
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Filtros de categor¨ªa mejorados */
.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 3rem;
}

.btn-outline-danger,
.btn-danger {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--white);
    border: 2px solid var(--background);
    border-radius: 20px;
    padding: 20px 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: var(--shadow-light);
    min-width: 120px;
    color: var(--text-dark);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-outline-danger::before,
.btn-danger::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    z-index: -1;
}

.btn-outline-danger:hover,
.btn-danger {
    border-color: var(--kfc-red);
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    color: var(--white);
}

.btn-outline-danger:hover::before,
.btn-danger::before {
    left: 0;
}

.btn-danger {
    background: var(--gradient-primary);
    color: var(--white);
}

/* Tarjetas de producto mejoradas */
.card {
    background: var(--white);
    border: none;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.4s ease;
    height: 100%;
    position: relative;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.product-image-container {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
}

.card:hover .product-image {
    transform: scale(1.1);
}

/* Badge de favorito */
.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kfc-red);
    font-size: 1.2rem;
    z-index: 2;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-badge:hover {
    background: var(--kfc-red);
    color: var(--white);
    transform: scale(1.1);
}

/* Overlay de producto */
.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(228,0,43,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.card:hover .product-overlay {
    opacity: 1;
}

.quick-view-btn {
    background: var(--white);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--kfc-red);
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.product-overlay:hover .quick-view-btn {
    transform: scale(1);
}

/* Contenido de la tarjeta */
.card-body {
    padding: 25px;
    position: relative;
}

.card-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.card-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.text-muted {
    font-size: 0.85rem;
    color: var(--kfc-red) !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Sistema de rating */
.product-rating {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.product-rating i {
    color: var(--gold);
    margin-right: 2px;
    font-size: 0.9rem;
}

.product-rating span {
    margin-left: 8px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
}

/* Precios */
.h5 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--kfc-red);
    margin-bottom: 0;
}

/* Botones de acci¨®n */
.btn-danger {
    background: var(--gradient-card);
    border: none;
    color: var(--white);
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn-danger:hover {
    background: linear-gradient(45deg, var(--kfc-red-dark), var(--kfc-red));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(228,0,43,0.4);
    color: var(--white);
}

.btn-secondary {
    background: var(--text-muted);
    border: none;
    color: var(--white);
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    opacity: 0.7;
}

/* Bot¨®n flotante del carrito */
.cart-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.cart-btn {
    background: var(--gradient-card);
    border: none;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
    box-shadow: var(--shadow-medium);
    transition: all 0.3s ease;
    position: relative;
}

.cart-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(228,0,43,0.4);
    color: var(--white);
}

.cart-counter {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--gold);
    color: var(--text-dark);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.cart-bounce {
    animation: cartBounce 0.5s ease;
}

@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Toast mejorado */
.toast {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

.toast-header.bg-success {
    background: var(--gradient-primary) !important;
    border: none;
}

.toast-body {
    font-weight: 500;
    color: var(--text-dark);
}

/* Animaciones de carga */
.card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efectos adicionales para productos */
.d-flex.justify-content-between.align-items-center {
    margin-top: auto;
    padding-top: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-section {
        padding: 60px 0 40px;
    }

    .btn-outline-danger,
    .btn-danger {
        min-width: 100px;
        padding: 15px 20px;
        font-size: 0.9rem;
    }

    .product-image-container {
        height: 200px;
    }

    .card-body {
        padding: 20px;
    }

    .cart-floating {
        bottom: 20px;
        right: 20px;
    }

    .cart-btn {
        width: 60px;
        height: 60px;
        font-size: 1.3rem;
    }

    .cart-counter {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

    .category-filters {
        gap: 10px;
    }

    .btn-outline-danger,
    .btn-danger {
        min-width: 80px;
        padding: 12px 16px;
        font-size: 0.8rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .h5 {
        font-size: 1.3rem;
    }
}

/* Mejoras adicionales para interactividad */
.btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(228, 0, 43, 0.25);
}

.card-img-top {
    border-radius: 0;
}

/* Efectos de hover para toda la p¨¢gina */
.container {
    position: relative;
}

/* Clase para agregar el hero din¨¢micamente */
.menu-hero {
    background: var(--gradient-primary);
    padding: 60px 0;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.menu-hero h1 {
    color: var(--white);
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 1rem;
}

.menu-hero p {
    color: rgba(255,255,255,0.9);
    font-size: 1.2rem;
    margin-bottom: 0;
}