/* =========================================
   RESETEO Y ESTILOS GLOBALES
   ========================================= */
/* Importamos las fuentes de Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Play:wght@400;700&family=Roboto:wght@300;400;500&display=swap');

:root {
    /* Paleta de Colores Extraída de tu Diseño */
    --clr-bg-light: #FFF8EE; /* Fondo beige claro */
    --clr-primary: #BF4304;   /* Naranja/Marrón principal */
    --clr-primary-hover: #D94E07; /* Naranja más brillante para hovers */
    --clr-text-dark: #333333;   /* Texto oscuro */
    --clr-text-light: #F4F4F4;  /* Texto claro (footer) */
    --clr-border: #E0E0E0;      /* Bordes e inputs */
    --clr-footer-bg: #121A26;   /* Fondo de footer oscuro */
    --clr-accent-red: #D32F2F;  /* Rojo para eliminar/alertas */
    --clr-accent-green: #388E3C; /* Verde para entregado */

    /* Fuentes */
    --font-main: 'Play', sans-serif;
    --font-secondary: 'Roboto', sans-serif;

    /* Sombras y Bordes */
    --shadow-card: 0 4px 12px rgba(0,0,0,0.08);
    --br-radius: 8px;
    --br-radius-round: 30px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--clr-bg-light);
    color: var(--clr-text-dark);
    line-height: 1.6;
    overflow-x: hidden; /* Evitar scroll horizontal */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    color: var(--clr-text-dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button, .btn {
    border: none;
    cursor: pointer;
    font-family: var(--font-secondary);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

input, textarea, select {
    font-family: var(--font-secondary);
    outline: none;
}

/* =========================================
   COMPONENTES COMUNES (HEADER Y FOOTER)
   ========================================= */

/* --- Header --- */
header {
    background-color: #FFFFFF;
    padding: 1rem 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.header-logo img {
    height: 40px; /* Ajusta según tu logo real */
}

.header-nav ul {
    display: flex;
    gap: 2.5rem;
}

.header-nav a {
    font-weight: 500;
}

.header-nav a:hover,
.header-nav a.active {
    color: var(--clr-primary);
}

.header-icons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.icon-btn {
    position: relative;
    background: none;
    font-size: 1.5rem;
}

.icon-btn .count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--clr-primary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
}

.icon-btn.user-icon {
    font-size: 1.8rem;
    color: var(--clr-primary);
}


/* --- Footer --- */
footer {
    background-color: var(--clr-footer-bg);
    color: var(--clr-text-light);
    padding: 4rem 10% 2rem;
    margin-top: auto; /* Empuja el footer hacia abajo */
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    color: var(--clr-text-light);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-logo img {
    height: 35px;
    margin-bottom: 1rem;
}

.footer-section.alma p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a:hover {
    color: var(--clr-primary-hover);
    padding-left: 5px; /* Animación leve en hover */
    transition: all 0.3s ease;
}

.footer-contact ul {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    font-size: 0.9rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.7;
}


/* =========================================
   ESTILOS DE PÁGINA GENERALES
   ========================================= */
main {
    margin-top: 80px; /* Compensa el header fixed */
    padding: 2rem 10%;
}

.section-title {
    margin-bottom: 2rem;
    font-size: 2.2rem;
}

.section-subtitle {
    font-size: 1rem;
    color: #666;
    margin-top: -1.5rem;
    margin-bottom: 3rem;
}


/* =========================================
   BOTONES GENERALES
   ========================================= */
.btn-primary {
    background-color: var(--clr-primary);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: var(--br-radius);
    font-weight: 500;
}

.btn-primary:hover {
    background-color: var(--clr-primary-hover);
    transform: translateY(-2px); /* Animación leve */
}

.btn-outline {
    background: none;
    border: 1px solid var(--clr-primary);
    color: var(--clr-primary);
    padding: 0.8rem 2rem;
    border-radius: var(--br-radius);
    font-weight: 500;
}

.btn-outline:hover {
    background-color: rgba(191, 67, 4, 0.05);
}

.btn-full {
    width: 100%;
    text-align: center;
}

/* =========================================
   TARJETAS GENERALES (PRODUCTOS, EVENTOS)
   ========================================= */
.card {
    background-color: white;
    border-radius: var(--br-radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: scale(1.02); /* Animación leve de escala */
}


/* =========================================
   ESTILOS DEL MODAL DEL CARRITO
   ========================================= */
.cart-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 2000;
    display: none; /* Oculto por defecto */
    justify-content: flex-end;
}

.cart-modal {
    width: 400px;
    height: 100%;
    background-color: white;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.4s ease; /* Animación de entrada */
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.close-cart {
    background: none;
    font-size: 1.5rem;
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--clr-border);
    padding-bottom: 1rem;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: var(--br-radius);
    object-fit: cover;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-title {
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.cart-item-price-qty {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.cart-item-qty-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #F0F0F0;
    border-radius: var(--br-radius-round);
    padding: 2px;
}

.qty-btn {
    background: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
}

.qty-btn:hover {
    background-color: #E0E0E0;
}

.cart-item-delete {
    color: var(--clr-accent-red);
    background: none;
}

.cart-summary {
    border-top: 1px solid var(--clr-border);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
}

.summary-row.total {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--clr-primary);
}

.cart-actions {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}


/* =========================================
   ANIMACIONES LEVES
   ========================================= */
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}