/* ==========================================================================
   1. RESETS & VARIABLES GLOBALES
   ========================================================================== */
:root {
    --primary-color: #111111;
    --secondary-color: #767676;
    --accent-color: #a18a68;
    --bg-light: #f9f9f9;
    --bg-white: #ffffff;
    --text-main: #222222;
    --border-color: #e5e5e5;
    --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --max-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-base);
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--bg-white);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}



/* ==========================================================================
   2. HEADER & NAVIGATION (Estilo Legacy)
   ========================================================================== */
.top-bar {
    background-color: var(--primary-color);
    color: var(--bg-white);
    text-align: center;
    padding: 8px 10px;
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}
/* Logo */
.nav-logo{
    display:flex;
    align-items:center;
}

.nav-logo a{
    display:flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding:4px 30px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 100;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.nav-actions {
    display: flex;
    gap: 20px;
    font-size: 2rem;
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--primary-color);
    color: var(--bg-white);
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 50%;
}

/* ==========================================================================
   3. SECCIÓN HERO / BANNER PRINCIPAL (Actualizado)
   ========================================================================== */
/* Contenedor Principal Hero */
.hero-banner {
    position: relative;
    min-height: 80vh;
    width: 100%;
    background-size: cover;
    background-position: center right;
    display: flex;
    align-items: center;
    padding: 3rem 5%;
    box-sizing: border-box;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(10, 25, 47, 0.9) 30%, rgba(10, 25, 47, 0.4) 100%);
    z-index: 1;
}

.hero-content-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Caja de Texto */
.hero-text-box {
    max-width: 600px;
}

.hero-title {
    color: #ffffff;
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-description {
    color: #cbd5e1;
    font-size: 1.1rem;
    line-height: 1.5;
}

/* Grid de Tarjetas de Acción */
.hero-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

/* Tarjeta Base */
.hero-action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.hero-action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.2);
}

/* Estilo Tarjeta Naranja (Principal) */
.hero-card-primary {
    background: #ff5722; /* Naranja Eléctrico */
    color: #ffffff;
}

.hero-card-primary .card-title {
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
}

.hero-card-primary .card-subtext {
    font-size: 0.85rem;
    color: #ffe0b2;
}

/* Estilo Tarjetas Blancas (Secundarias) */
.hero-card-secondary {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

.hero-card-secondary .card-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #0f172a;
}

.hero-card-secondary .card-subtext {
    font-size: 0.85rem;
    color: #64748b;
}

/* Iconos de las tarjetas */
.card-info {
    display: flex;
    flex-direction: column;
}

.card-icon {
    font-size: 2rem;
}

/* ==========================================================================
   6. MEDIA QUERIES (Actualización para el Hero)
   ========================================================================== */
@media (max-width: 768px) {
    /* ... (estilos anteriores) ... */
    
    .hero-banner {
        height: 70vh; /* Un poco más bajo en móvil */
        background-position: 35% center; /* Ajusta el foco de la foto */
    }
    
    .hero-overlay {
        background: rgba(0,0,0,0.5); /* Overlay uniforme en móvil */
    }
    
    .hero-text-box {
        text-align: center;
        margin: 0 auto;
    }

    .hero-title {
        font-size: 2.5rem; /* Texto más chico en móvil */
    }
    
    .hero-actions {
        justify-content: center;
        flex-direction: column; /* Botones uno arriba del otro */
        gap: 10px;
    }
    
    .btn-hero {
        width: 100%; /* Botones de ancho completo */
    }
}

/* ==========================================================================
   4. SECCIONES DEL CONTENIDO (Grillas y Títulos)
   ========================================================================== */
.main-content {
    max-width: var(--max-width);
    margin: 0 auto;
}

h2 {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.6rem;
    margin-bottom: 40px;
}

/* Grilla de Categorías */
.categories-grid, .featured-products {
    margin-bottom: 80px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.category-card {
    background-color: var(--bg-light);
    height: 300px;
    width: 500px;
    display: block;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: transform 0.3s, border-color 0.3s;
}

.category-card > img {
    max-width: 400px;
    max-height: 500px;
    width: 100%;
    height: auto;
    object-fit: cover;
}


.category-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
}


/* ==========================================================================
   5. PIE DE PÁGINA (Footer)
   ========================================================================== */
.site-footer {
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
    padding: 60px 4% 20px;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
}
.footer-social{
    display:flex;
    flex-direction:column;
    gap:12px;
    margin-top:15px;
}

.footer-social a{
    color:#fff;
    text-decoration:none;
    display:flex;
    align-items:center;
    gap:10px;
    transition:.3s;
}

.footer-social a:hover{
    color:#d9b36a;
}

.footer-social i{
    width:20px;
    font-size:18px;
}
.footer-section ul li {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-section p {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}
.footer-bottom {
    text-align: center;
    font-size: 0.8rem;
    color: var(--secondary-color);
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

/* ==========================================================================
   6. MEDIA QUERIES (Diseño Responsive)
   ========================================================================== */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* En producción esto se manejaría con un menú hamburguesa */
    }
    
    .banner-container h1 {
        font-size: 2rem;
    }
    
    .grid-container, .footer-container {
        grid-template-columns: 1fr;
    }
    
    .category-card {
        height: 180px;
    }
}/* ==========================================================================
   7. FORMULARIOS Y AUTENTICACIÓN
   ========================================================================== */
.auth-container {
    max-width: 450px;
    margin: 0 auto;
    padding: 20px;
}

.auth-subtitle {
    text-align: center;
    color: var(--secondary-color);
    font-size: 0.95rem;
    margin-top: -30px;
    margin-bottom: 30px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.form-group input {
    padding: 12px;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: var(--primary-color);
}

.btn-full {
    width: 100%;
    text-align: center;
    cursor: pointer;
    border: none;
    margin-top: 10px;
}

.auth-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
}

.alert-error {
    background-color: #fdf2f2;
    border-left: 4px solid #d9534f;
    padding: 15px;
    margin-bottom: 25px;
    color: #b02a37;
    font-size: 0.9rem;
}

.alert-error ul {
    list-style: disc;
    margin-left: 20px;
}
/* ==========================================================================
   8. CARRITO DE COMPRAS
   ========================================================================== */
.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: 20px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.cart-table th {
    border-bottom: 2px solid var(--primary-color);
    padding: 12px 10px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cart-table td {
    padding: 15px 10px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.cart-product-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-product-info img {
    width: 60px;
    height: 80px;
    object-fit: cover;
}

.btn-delete {
    color: #d9534f;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.btn-delete:hover {
    color: #a02622;
}

/* Resumen del pedido (Columna derecha) */
.cart-summary {
    background-color: var(--bg-light);
    padding: 25px;
    border: 1px solid var(--border-color);
    height: fit-content;
}

.cart-summary h3 {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.summary-row.total {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 15px;
}
/* ==========================================================================
   9. CHECKOUT Y CONFIRMACIÓN
   ========================================================================== */
.checkout-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 40px;
    margin-top: 20px;
}

.alert-success-box {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-top: 4px solid #28a745;
    padding: 40px 20px;
    text-align: center;
    max-width: 600px;
    margin: 40px auto;
}

.alert-success-box h2 {
    color: #28a745;
    margin-bottom: 15px;
}

.alert-success-box p {
    color: var(--secondary-color);
    font-size: 1rem;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
}
/* Responsive para el carrito */
@media (max-width: 768px) {
    .cart-container {
        grid-template-columns: 1fr;
    }
    
    .cart-table {
        display: block;
        overflow-x: auto; /* Permite scroll horizontal en pantallas muy chicas */
    }
}
/* Estilos base para el perfil y formularios */
.perfil-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.perfil-container h3 {
    margin-bottom: 20px;
    color: #333;
}

.admin-form label {
    display: block;
    margin-top: 15px;
    font-weight: 600;
    color: #555;
}

.admin-form input, .admin-form textarea {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.btn-shop {
    margin-top: 20px;
    background-color: #a3d4cc; /* Tu color de acento */
    color: #fff;
    padding: 4px 6px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-shop:hover {
    background-color: #8cc3ba;
}

/* Botón de volver */
.btn-back {
    display: inline-block;
    margin-top: 20px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
}
/* Botón de Iniciar Sesión en Navbar */
.btn-login-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--primary-color);
    color: var(--bg-white) !important;
    padding: 8px 16px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 2px;
    transition: background-color 0.3s;
}

.btn-login-nav:hover {
    background-color: var(--accent-color);
}

/* Alerta para productos bloqueados */
.alert-login-required {
    background-color: var(--bg-light);
    border: 1px dashed var(--secondary-color);
    padding: 20px;
    text-align: center;
    margin-top: 15px;
}

.alert-login-required p {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.btn-disabled-style {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--secondary-color);
}

/*imagenes card de catalogo de categorias*/
.products-container {
    display: grid;
    /* Esto crea columnas de máximo 300px, si la pantalla es grande, se ponen una al lado de otra */
    grid-template-columns: repeat(auto-fill, minmax(300px, 300px)); 
    justify-content: center; /* Centra las cards en la pantalla */
    gap: 20px;
    padding: 20px;
}

.product-card {
    width: 300px; /* Tamaño fijo para la tarjeta */
    display: flex;
    flex-direction: column;
}

.image-wrapper {
    width: 300px;
    height: 300px;
    overflow: hidden;
    display: block; /* Importante */
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 3. El efecto hover debe cambiar la imagen, no el wrapper */
.image-wrapper:hover img {
    transform: scale(1.1); /* Zoom suave al pasar el mouse */
}

.product-info {
    padding: 10px 0;
}

.product-info h3 {
    font-size: 14px;
    color: #333;
    margin: 5px 0;
}

.product-info .price {
    font-weight: bold;
    color: #000;
}