* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #d4a574;
    --secondary-color: #8b6f47;
    --dark-color: #2c2c2c;
    --light-color: #f8f8f8;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header y Navegación */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    box-shadow: var(--shadow);
    min-width: 150px;
    padding: 0.5rem 0;
    flex-direction: column;
    gap: 0;
    z-index: 1000;
}

.dropdown-menu.active {
    display: flex !important;
}

.dropdown-menu li {
    padding: 0.5rem 1rem;
}

/* Sección de Categoría */
.category-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 4rem 0 3rem;
    margin-top: 70px;
    color: var(--white);
    text-align: center;
}

.category-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.category-header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.95;
}

.dropdown-menu a {
    display: block;
}

.nav-icons {
    display: flex;
    gap: 1rem;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--dark-color);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.icon-btn:hover {
    color: var(--primary-color);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Hero Banner */
.hero {
    background: linear-gradient(rgba(212, 165, 116, 0.6), rgba(139, 111, 71, 0.6)),
                url('Logos/banner.png') center/cover;
    min-height: 70vh; /* ocupar más altura de la pantalla */
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    margin-bottom: 3rem;
}

.hero-content {
    text-align: center;
}

.hero-content h2 {
    font-size: 3.2rem;
    margin-bottom: 0.75rem;
}

.hero-content p {
    font-size: 1.15rem;
    max-width: 900px;
    margin: 0 auto;
}
/* Botón CTA grande y atractivo en el hero */
.hero-cta-container {
    margin-top: 1.2rem;
}
.hero-cta {
    text-decoration: none;
}
.hero-cta-btn {
    display: inline-block;
    background: linear-gradient(135deg, #e6b686, #d79b61);
    color: white;
    border: none;
    padding: 0.95rem 2.2rem;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(215,155,97,0.25);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}
.hero-cta-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 18px 48px rgba(215,155,97,0.28);
    opacity: 0.98;
}
.hero-cta-btn:active {
    transform: translateY(-1px) scale(0.995);
}
/* Sección de Productos */
.productos-section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

.filter-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* Franja de marcas entre productos y 'Sobre Nosotros' */
.brand-strip {
    background-color: #f5efe6; /* beige claro */
    padding: 2.5rem 0;
}
.brand-strip-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--secondary-color);
    margin-bottom: 1.8rem;
    letter-spacing: 0.08em;
    font-weight: 700;
}
.brand-logos {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
    flex-wrap: nowrap; /* mantener en una fila */
    padding: 1rem 0;
    overflow: visible; /* sin scroll */
}
.brand-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.5rem;
    flex: 1 1 33%; /* cada logo ocupa un tercio del ancho disponible */
    max-width: 33%;
    position: relative; /* para pseudo-elemento de sombra */
}
.brand-logo {
    width: 100%;
    height: auto;
    max-height: 80vh; /* limitar por viewport alto */
    object-fit: contain;
    transition: transform 0.25s ease, filter 0.25s ease;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,0.08));
    cursor: pointer;
    display: block;
}
.brand-logo:hover {
    transform: scale(1.22);
    filter: drop-shadow(0 18px 48px rgba(0,0,0,0.2));
}

/* Sombra difusa detrás de cada logo para dar profundidad */
.brand-item::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 52%;
    transform: translate(-50%, -50%);
    width: 68%;
    height: 64%;
    background: radial-gradient(circle at 50% 40%, rgba(0,0,0,0.22), rgba(0,0,0,0.10) 40%, transparent 75%);
    filter: blur(32px);
    z-index: 0;
    border-radius: 8px;
    pointer-events: none;
}

/* Elevar la imagen por encima de la sombra */
.brand-logo {
    position: relative;
    z-index: 1;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
}


.producto-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.producto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.producto-image-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.producto-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 10;
}

.stock-badge.low {
    background-color: #f39c12;
    color: white;
}

.stock-badge.out {
    background-color: #3498db;
    color: white;
}

.producto-info {
    padding: 1.5rem;
}

.producto-marca {
    color: var(--secondary-color);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.producto-nombre {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.producto-categoria {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.producto-precio {
    font-size: 1.4rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 1rem;
}

.producto-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-secondary {
    flex: 1;
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-add-cart {
    flex: 2;
}

.btn-primary:disabled,
.btn-secondary:disabled {
    background-color: #ccc;
    border-color: #ccc;
    color: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-primary:disabled:hover {
    background-color: #ccc;
    transform: none;
}

/* Sobre Nosotros */
.about-section {
    background-color: var(--white);
    padding: 4rem 0;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--white);
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    color: var(--secondary-color);
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--dark-color);
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--primary-color);
}

/* Carrito */
.cart-items {
    padding: 1.5rem;
    min-height: 200px;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: bold;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.quantity-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
}

.remove-item {
    background-color: #e74c3c;
    color: var(--white);
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 2px solid #eee;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.empty-cart {
    text-align: center;
    padding: 2rem;
    color: #999;
}

/* Usuario/Auth */
.tabs {
    display: flex;
    border-bottom: 2px solid #eee;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: #999;
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.auth-form {
    display: none;
    padding: 2rem;
    flex-direction: column;
    gap: 1rem;
}

.auth-form.active {
    display: flex;
}

.auth-form input,
.auth-form textarea,
#checkoutForm input,
#checkoutForm textarea {
    padding: 0.8rem;
    border: 2px solid #eee;
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

.auth-form input:focus,
#checkoutForm input:focus,
#checkoutForm textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.user-panel {
    padding: 2rem;
}

.user-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.user-menu-btn {
    background-color: var(--light-color);
    border: none;
    padding: 1rem;
    border-radius: 5px;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
    transition: var(--transition);
}

.user-menu-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.user-menu-btn i {
    margin-right: 0.5rem;
}

.orders-list {
    margin-top: 1.5rem;
}

.order-item {
    background-color: var(--light-color);
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.order-status {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    background-color: var(--primary-color);
    color: var(--white);
}

/* Checkout */
.checkout-modal {
    max-width: 700px;
}

#checkoutForm {
    padding: 1.5rem;
}

#checkoutForm h4 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

#checkoutForm textarea {
    min-height: 80px;
    resize: vertical;
}

.order-summary {
    background-color: var(--light-color);
    padding: 1.5rem;
    border-radius: 5px;
    margin: 1.5rem 0;
}

#checkoutItems {
    margin: 1rem 0;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #ddd;
}

.checkout-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--primary-color);
}

.btn-whatsapp {
    width: 100%;
    background-color: #25D366;
}

.btn-whatsapp:hover {
    background-color: #1ea952;
}

.btn-whatsapp i {
    margin-right: 0.5rem;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-section i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}


/* === Barra de anuncio === */
.announcement-bar {
    background: var(--secondary-color);
    color: var(--white);
    text-align: center;
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* === Testimonios / Reseñas === */
.reviews-section {
    background-color: var(--white);
    padding: 4rem 0;
}
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}
.review-card {
    background: var(--light-color);
    border-radius: 12px;
    padding: 1.8rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.review-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.11);
}
.review-stars {
    color: var(--primary-color);
    font-size: 1.3rem;
    letter-spacing: 0.05em;
}
.review-text {
    font-style: italic;
    color: #555;
    line-height: 1.7;
    font-size: 0.95rem;
    flex: 1;
}
.review-author {
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 0.88rem;
}

/* === Breadcrumb === */
.breadcrumb {
    padding: 0.6rem 0 0;
    font-size: 0.88rem;
    color: #999;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}
.breadcrumb a {
    color: var(--secondary-color);
    text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }

/* === Filtro de precio === */
.price-filter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 2rem;
}
.price-filter label {
    font-size: 0.92rem;
    color: var(--secondary-color);
    font-weight: 600;
}
#precioSlider {
    width: 300px;
    accent-color: var(--primary-color);
    cursor: pointer;
    height: 5px;
}

/* === WhatsApp flotante === */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 58px;
    height: 58px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.7rem;
    box-shadow: 0 6px 24px rgba(37,211,102,0.4);
    z-index: 950;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 32px rgba(37,211,102,0.55);
    color: white;
}

/* === Volver arriba === */
.back-to-top {
    position: fixed;
    bottom: 6.8rem;
    right: 2rem;
    width: 46px;
    height: 46px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    z-index: 950;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.2s ease;
}
.back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}
.back-to-top:hover {
    transform: translateY(-3px);
}

/* === Fade-in tarjetas al hacer scroll === */
.producto-card {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.45s ease, transform 0.45s ease, box-shadow 0.3s ease;
}
.producto-card.visible {
    opacity: 1;
    transform: translateY(0);
}
.producto-card.visible:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .productos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .brand-logo {
        max-height: 320px;
    }
    .brand-logos {
        /* en móvil permitimos que los logos se apilen verticalmente para mantenerlos completos */
        flex-wrap: wrap;
        gap: 2.5rem;
    }
    .brand-item {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-cta-btn {
        padding: 0.85rem 1.6rem;
        font-size: 1rem;
    }

    .reviews-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    #precioSlider { width: 200px; }
    .whatsapp-float { bottom: 1.2rem; right: 1.2rem; width: 52px; height: 52px; font-size: 1.5rem; }
    .back-to-top { bottom: 5.2rem; right: 1.2rem; width: 40px; height: 40px; font-size: 0.95rem; }
}
