/*
Theme Name: Tienda Bragantina
Author: Bragantina Embutidos
Description: Tema personalizado para catálogo de chorizos y salchichas Bragantina estilo Sofía.
Version: 1.1
*/

:root {
    --rojo-bragantina: #d32027;
    --naranja-bragantina: #f58220;
    --vino-bragantina: #581220;
    --negro-texto: #1a1a1a;
    --gris-texto: #666666;
    --gris-fondo: #f7f7f7;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #ffffff;
    color: var(--negro-texto);
    overflow-x: hidden;
}

/* --- 1. HEADER Y NAVEGACIÓN --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 12px 6%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    background: var(--rojo-bragantina);
    color: #ffffff;
    font-weight: 900;
    font-size: 1.5rem;
    padding: 8px 24px;
    border-radius: 50px;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 2px var(--rojo-bragantina);
    cursor: pointer;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 22px;
}

.main-nav ul li a {
    text-decoration: none;
    color: var(--negro-texto);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s ease;
}

.main-nav ul li a:hover {
    color: var(--rojo-bragantina);
}

.lang-select {
    padding: 6px 12px;
    font-size: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: var(--gris-texto);
    background: #fff;
}

/* --- 2. HERO BANNER PRINCIPAL --- */
#hero-banner {
    position: relative;
    height: 75vh;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.45)),
                url('https://images.unsplash.com/photo-1555939594-58d7cb561ad1?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
    display: flex;
    align-items: center;
    padding: 0 10%;
}

.hero-content {
    max-width: 480px;
}

.hero-badge {
    background-color: rgba(211, 32, 39, 0.92);
    color: #ffffff;
    font-size: 2.8rem;
    font-weight: 900;
    padding: 16px 36px;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-cta {
    display: inline-block;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 25px;
    border: 2px solid #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-cta:hover {
    background: var(--rojo-bragantina);
    border-color: var(--rojo-bragantina);
}

/* --- 3. CABECERA ONDULADA DE CATEGORÍA --- */
.wave-banner {
    position: relative;
    background: linear-gradient(135deg, #f6a04d 0%, #fbd6b6 100%);
    padding: 55px 12% 95px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
}

.wave-banner h1 {
    color: #ffffff;
    font-size: 2.8rem;
    font-weight: 900;
    text-transform: uppercase;
    z-index: 2;
    text-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

/* Círculo ajustado para el logo Bragantina Producto Artesanal */
.wave-banner .pan-image {
    width: 330px;
    height: 330px;
    object-fit: contain;
    background-color: var(--vino-bragantina);
    padding: 12px;
    border-radius: 50%;
    border: 8px solid rgba(255,255,255,0.45);
    box-shadow: 0 14px 32px rgba(0,0,0,0.25);
    z-index: 2;
}

.wave-bottom-svg {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    z-index: 1;
}

/* --- 4. FILTROS Y GRILLA DEL CATÁLOGO --- */
.catalog-wrapper {
    max-width: 1140px;
    margin: 0 auto;
    padding: 30px 20px 70px;
}

.catalog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

.filter-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--gris-texto);
    cursor: pointer;
    text-transform: uppercase;
    border-radius: 3px;
    transition: all 0.2s;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--rojo-bragantina);
    color: #ffffff;
}

.order-dropdown {
    padding: 8px 14px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    color: var(--gris-texto);
    font-size: 0.85rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 35px;
}

/* Tarjeta individual de Chorizo */
.chorizo-card {
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 6px 22px rgba(0,0,0,0.07);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease;
}

.chorizo-card:hover {
    transform: translateY(-5px);
}

.chorizo-img-box {
    padding: 25px;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
}

.chorizo-img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.chorizo-card-body {
    padding: 18px 24px 24px;
}

.chorizo-title {
    font-size: 1.1rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 10px;
    line-height: 1.25;
    color: var(--negro-texto);
}

.chorizo-unit {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--rojo-bragantina);
    text-transform: uppercase;
}

/* Efecto Hover Degradado */
.chorizo-hover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(245, 130, 32, 0.88) 0%, rgba(211, 32, 39, 0.95) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 25px;
    text-align: center;
}

.chorizo-card:hover .chorizo-hover-overlay {
    opacity: 1;
}

.btn-mas-info {
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    padding: 11px 30px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    margin-bottom: 18px;
}

.overlay-product-name {
    color: rgba(255,255,255,0.85);
    font-weight: 900;
    font-size: 1.05rem;
    text-transform: uppercase;
}

/* --- 5. VISTA DE FICHA TÉCNICA DEL PRODUCTO --- */
#ficha-producto-view {
    display: none;
    max-width: 1080px;
    margin: 50px auto;
    padding: 0 20px;
}

.btn-volver {
    background: none;
    border: none;
    color: var(--rojo-bragantina);
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.ficha-grid {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 50px;
    align-items: start;
}

.galeria-producto {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.foto-principal-box {
    background: #f4f4f4;
    border-radius: 6px;
    padding: 30px;
    text-align: center;
}

.foto-principal-box img {
    max-width: 100%;
    max-height: 360px;
    object-fit: contain;
}

.miniatura-box {
    width: 115px;
    height: 115px;
    background: #f4f4f4;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    cursor: pointer;
}

.miniatura-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ficha-detalles h1 {
    font-size: 2.2rem;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.15;
    margin-bottom: 12px;
}

.barra-divisora {
    height: 4px;
    background: var(--negro-texto);
    margin-bottom: 15px;
}

.ficha-unidad {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.ficha-descripcion {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 22px;
}

.bloque-caracteristica {
    margin-bottom: 18px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #444444;
}

.bloque-caracteristica strong {
    color: var(--negro-texto);
    display: block;
    margin-bottom: 4px;
}

.bloque-caracteristica strong::before {
    content: "❯ ";
    color: var(--rojo-bragantina);
    font-weight: 900;
}

.titulo-nutricional {
    font-size: 1.15rem;
    font-weight: 900;
    text-transform: uppercase;
    margin: 30px 0 15px;
}

.tabla-nutricional {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.tabla-nutricional th,
.tabla-nutricional td {
    padding: 10px 8px;
    border-bottom: 1px solid #dcdcdc;
    text-align: left;
    font-weight: 700;
}

.tabla-nutricional th:last-child,
.tabla-nutricional td:last-child {
    text-align: center;
}

.nota-conservacion {
    font-size: 0.85rem;
    color: var(--gris-texto);
    line-height: 1.5;
    margin-top: 12px;
}

.relacionados-wrapper {
    margin-top: 70px;
    padding-top: 40px;
    border-top: 1px solid #eeeeee;
}

.relacionados-titulo {
    text-align: center;
    margin-bottom: 35px;
}

.relacionados-titulo h2 {
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    display: inline-block;
    border-bottom: 4px solid var(--negro-texto);
    padding-bottom: 8px;
}

/* --- 6. PIE DE PÁGINA: CONTACTO Y MAPA --- */
.footer-contacto {
    background: var(--gris-fondo);
    padding: 70px 10%;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
}

.footer-heading {
    font-size: 1.7rem;
    font-weight: 900;
    text-transform: uppercase;
    border-bottom: 4px solid var(--negro-texto);
    padding-bottom: 8px;
    margin-bottom: 25px;
    display: inline-block;
}

.form-bragantina input,
.form-bragantina textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 14px;
    border: 1px solid #d5d5d5;
    border-radius: 4px;
    font-size: 0.88rem;
}

.form-bragantina button {
    background: var(--rojo-bragantina);
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
}

.ubicaciones-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.sucursal-item {
    background: #ffffff;
    padding: 15px;
    border-left: 4px solid var(--rojo-bragantina);
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.sucursal-item h4 {
    color: var(--rojo-bragantina);
    font-size: 0.88rem;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.sucursal-item p {
    font-size: 0.8rem;
    color: var(--gris-texto);
    line-height: 1.4;
}

.mapa-box iframe {
    width: 100%;
    height: 290px;
    border: 0;
    border-radius: 6px;
}

@media (max-width: 860px) {
    .ficha-grid,
    .footer-contacto,
    .ubicaciones-grid {
        grid-template-columns: 1fr;
    }
    .wave-banner {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }
}