:root {
    /* PALETA NUEVA */
    --brand-yellow: #f3c623; /* Primario (botones, acentos) */
    --brand-yellow-hover: #e0ac08; /* Primario hover */
    --brand-dark: #222222; /* Títulos */
    --brand-gray: #777777; /* Texto secundario */
    --bg-light: #fffaf3; /* Fondo cálido principal */
    --bg-white: #ffffff; /* Blanco puro */
    --border-color: #e5e5e5; /* Borde suave */
    --shadow-soft: 0 8px 20px rgba(0,0,0,0.06); /* Sombras suaves */

    --text-primary: #333333; /* Texto principal */
    --text-secondary: #777777; /* Texto secundario */
}

body {
    background-color: var(--bg-light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Para que el footer se quede abajo */
}

/* --- HEADER --- */
.home-topbar {
    background-color: var(--bg-white);
    border-bottom: 3px solid var(--brand-yellow); /* Línea amarilla decorativa */
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

/* Logo */
.logo-box {
    background-color: var(--brand-dark);
    color: var(--brand-yellow); /* Texto amarillo sobre fondo oscuro */
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 1.5rem;
    line-height: 1;
    letter-spacing: -1px;
}

/* Barra de Búsqueda */
.search-bar-container {
    max-width: 700px;
    width: 100%;
}

.search-input {
    border: 2px solid var(--brand-dark); /* Borde oscuro */
    border-right: none;
    border-radius: 6px 0 0 6px;
    padding: 10px 20px;
    font-size: 1rem;
    background-color: var(--bg-white);
    color: var(--text-primary);
}

    .search-input::placeholder {
        color: var(--text-secondary);
    }

    .search-input:focus {
        box-shadow: none;
        border-color: var(--brand-yellow);
        background-color: var(--bg-white);
    }

.search-btn {
    background-color: var(--brand-yellow);
    color: #222222;
    border: 2px solid var(--brand-yellow);
    border-radius: 0 6px 6px 0;
    padding: 0 25px;
    transition: all 0.3s ease;
    font-weight: 600;
}

    .search-btn:hover {
        background-color: var(--brand-yellow-hover);
        border-color: var(--brand-yellow-hover);
        color: #222222;
    }

/* Botones Navegación (Cuenta, Cesta) */
.nav-icon-btn {
    color: var(--brand-dark);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 15px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

    .nav-icon-btn i {
        font-size: 1.4rem;
        margin-bottom: 2px;
    }

    .nav-icon-btn:hover {
        background-color: #fff4cf;
        color: var(--brand-dark);
    }

.cart-badge {
    position: absolute;
    top: -5px;
    right: 5px;
    background-color: var(--brand-yellow);
    color: #222222; /* Texto oscuro para contraste */
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(0,0,0,0.10);
}

/* --- CARRUSEL --- */
.hero-carousel {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    margin-bottom: 2rem;
    background-color: #f0f0f0; /* Fondo mientras carga */
}

    .hero-carousel img {
        width: 100%;
        height: 400px; /* Altura fija */
        object-fit: cover;
        object-position: center;
    }

/* --- CATEGORÍAS --- */
.categories-section {
    background: var(--bg-white);
    padding: 25px 0;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
}

.cat-item {
    text-decoration: none;
    color: var(--brand-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: transform 0.2s, color 0.2s;
    width: 110px;
}

    .cat-item:hover {
        transform: translateY(-5px);
        color: var(--brand-dark);
    }

.cat-img-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid transparent; /* Preparado para hover */
    padding: 10px;
    background: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: border-color 0.3s;
}

.cat-item:hover .cat-img-circle {
    border-color: var(--brand-yellow);
}

.cat-img-circle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cat-name {
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    color: var(--text-primary);
}

/* --- PRODUCTOS --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 0 rgba(0,0,0,0);
}

    .product-card:hover {
        box-shadow: var(--shadow-soft);
        transform: translateY(-5px);
        border-color: var(--brand-yellow);
    }

.card-img-wrapper {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

    .card-img-wrapper img {
        max-height: 100%;
        max-width: 100%;
        object-fit: contain;
        transition: transform 0.3s;
    }

.product-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.product-title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em; /* Mantiene altura uniforme */
    color: var(--brand-dark);
}

.product-cat {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand-dark);
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-add {
    background-color: #fff7d8;
    color: var(--brand-dark);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    font-size: 1.2rem;
    border: 1px solid transparent;
}

.product-card:hover .btn-add {
    background-color: var(--brand-yellow);
    color: #222222;
    box-shadow: 0 4px 12px rgba(243, 198, 35, 0.45);
    border-color: var(--brand-yellow);
}

/* --- FOOTER --- */
footer {
    background-color: var(--brand-dark);
    color: var(--bg-white);
    margin-top: auto; /* Empuja el footer al final */
    padding: 40px 0;
    border-top: 5px solid var(--brand-yellow);
}

    footer a {
        color: #d6d6d6;
        text-decoration: none;
        transition: 0.3s;
    }

        footer a:hover {
            color: var(--brand-yellow);
        }

/* Textos generales */
h1, h2, h3, h4, h5, h6 {
    color: var(--brand-dark);
}

p, span, li, small {
    color: var(--text-primary);
}

.text-muted {
    color: var(--text-secondary) !important;
}

/* Banners / imágenes grandes (Index) */
img.img-fluid.rounded-3.shadow-sm {
    box-shadow: var(--shadow-soft) !important;
}

/* Formularios newsletter / inputs genéricos */
input.form-control,
textarea.form-control,
select.form-select {
    border-color: var(--border-color);
    color: var(--text-primary);
    background-color: var(--bg-white);
}

    input.form-control:focus,
    textarea.form-control:focus,
    select.form-select:focus {
        border-color: var(--brand-yellow);
        box-shadow: 0 0 0 0.15rem rgba(243, 198, 35, 0.35);
    }

/* Botones oscuros (Newsletter, etc.) – puedes ajustarlos si quieres que también sean amarillos */
.btn-dark {
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #ffffff;
}

    .btn-dark:hover {
        background-color: #111111;
        border-color: #111111;
    }

/* Botón outline de "Ver todo" */
.btn-outline-dark {
    border-color: var(--brand-dark);
    color: var(--brand-dark);
}

    .btn-outline-dark:hover {
        background-color: var(--brand-dark);
        color: #ffffff;
    }

/* Toast de carrito */
.toast {
    border-radius: 10px;
    box-shadow: var(--shadow-soft);
}

/* ===== Cookie Consent Banner ===== */
.cc-banner {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 2000;
    padding: 16px;
    display: flex;
    justify-content: center;
}

.cc-card {
    width: min(980px, 100%);
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,.08);
    padding: 16px 18px;
}

.cc-title {
    font-weight: 800;
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.cc-text {
    color: #6c757d;
    font-size: .95rem;
    line-height: 1.35rem;
}

.cc-options {
    display: grid;
    gap: 10px;
}

.cc-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0,0,0,.03);
}

.cc-option-title {
    font-weight: 700;
    margin-bottom: 2px;
}

.cc-option-desc {
    color: #6c757d;
    font-size: .9rem;
}

.cc-badge {
    font-size: .85rem;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--brand-yellow, #ffc107);
    color: #111;
    border: 1px solid rgba(0,0,0,.08);
}

.cc-footnote {
    color: #6c757d;
    font-size: .8rem;
}
