:root {
    --color-primary: #2d5016;
    --color-secondary: #8B4513;
}

body { font-family: 'Segoe UI', system-ui, sans-serif; }
.text-primary { color: var(--color-primary) !important; }
.bg-primary { background-color: var(--color-primary) !important; }
.btn-primary { background-color: var(--color-primary); border-color: var(--color-primary); }
.btn-primary:hover { background-color: #1e3a0f; border-color: #1e3a0f; }
.btn-outline-primary { color: var(--color-primary); border-color: var(--color-primary); }
.btn-outline-primary:hover { background-color: var(--color-primary); border-color: var(--color-primary); }

.site-header .site-navbar {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    min-height: 0;
}

.site-header .navbar-brand.site-logo {
    padding: 0;
    margin-right: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
}

.site-logo-img {
    display: block;
    height: 56px;
    width: auto;
    object-fit: contain;
    object-position: left center;
}

.site-logo-text {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1.1rem;
    white-space: nowrap;
}

@media (min-width: 992px) {
    .site-logo-img {
        height: 64px;
    }
}

@media (max-width: 768px) {
    .site-header .site-navbar {
        padding-top: 0.4rem;
        padding-bottom: 0.4rem;
    }
    .site-logo-img {
        height: 48px;
    }
}

.site-header .navbar-nav .nav-link {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.hero-slider {
    --hero-offset: 88px;
    margin-bottom: 0 !important;
}
.hero-slider .heroSwiper,
.hero-slider .swiper-wrapper,
.hero-slide {
    height: calc(100svh - var(--hero-offset));
    min-height: 560px;
    max-height: 960px;
}
.hero-slide {
    position: relative;
    overflow: hidden;
}
.hero-slide--image { background: #1a1a1a; }
.hero-slide__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.hero-slide__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: none;
}
/* Móvil: imagen mobile */
.hero-slide__img--mobile { display: block; }
/* Tablet: imagen tablet */
@media (min-width: 768px) {
    .hero-slide__img--mobile { display: none; }
    .hero-slide__img--tablet { display: block; }
}
/* Desktop: imagen desktop */
@media (min-width: 992px) {
    .hero-slide__img--tablet { display: none; }
    .hero-slide__img--desktop { display: block; }
}
.hero-slide__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.12) 45%, rgba(0,0,0,0.05) 100%);
    pointer-events: none;
}
.hero-slide__overlay--soft {
    background: rgba(0,0,0,0.08);
}
.hero-slide__content {
    position: relative;
    z-index: 2;
    height: 100%;
    min-height: 100%;
}
.hero-slider .swiper-button-next,
.hero-slider .swiper-button-prev {
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,.45);
}
.hero-slider .swiper-pagination-bullet {
    background: #fff;
    opacity: .55;
}
.hero-slider .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--color-primary);
}
/*
 * Tablet / móvil: la imagen define la altura (100% del ancho, sin recorte ni franjas).
 * Desktop mantiene cover a pantalla casi completa.
 */
@media (max-width: 991.98px) {
    .hero-slider { --hero-offset: 80px; }
    .hero-slider .heroSwiper,
    .hero-slider .swiper-wrapper,
    .hero-slide {
        height: auto;
        min-height: 0;
        max-height: none;
    }
    .hero-slide {
        display: flex;
        flex-direction: column;
    }
    .hero-slide__media {
        position: relative;
        inset: auto;
        width: 100%;
        height: auto;
        flex: 0 0 auto;
    }
    .hero-slide__img {
        position: static;
        inset: auto;
        width: 100%;
        height: auto;
        max-height: none;
        object-fit: unset;
        object-position: center center;
        display: none;
    }
    .hero-slide__img--mobile { display: block; }
    .hero-slide:not(.hero-slide--image) {
        min-height: 280px;
    }
    .hero-slide__overlay {
        position: absolute;
        inset: 0;
    }
    .hero-slide__content {
        position: absolute;
        inset: 0;
        height: auto;
        min-height: 0;
        pointer-events: none;
    }
    .hero-slide__content .btn,
    .hero-slide__content .stretched-link {
        pointer-events: auto;
    }
}
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-slide__img--mobile { display: none; }
    .hero-slide__img--tablet { display: block; }
}
@media (max-width: 767.98px) {
    .hero-slider { --hero-offset: 72px; }
}

.section-title { position: relative; padding-bottom: 10px; }
.section-title::after {
    content: ''; display: block; width: 60px; height: 3px;
    background: var(--color-primary); margin: 10px auto 0;
}

.category-card { display: block; }
.category-card:hover .category-icon {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,.15);
}
.category-icon {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: .75rem;
    transition: transform .2s ease, box-shadow .2s ease;
}
.category-icon--image {
    background: #f8f9fa;
    border: 1px solid rgba(0,0,0,.08);
    padding: .5rem;
}
.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.category-list-card {
    transition: transform .2s ease, box-shadow .2s ease;
    overflow: hidden;
}
.category-list-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0,0,0,.12) !important;
}
.category-list-card__media {
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-bottom: 1px solid rgba(0,0,0,.06);
    padding: .75rem;
}
.category-list-card__media--empty {
    min-height: 140px;
}
.category-list-card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brandsSwiper {
    padding: .25rem 0 .5rem;
}
.brandsSwiper .swiper-wrapper {
    transition-timing-function: linear;
}
.brand-carousel-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 96px;
    padding: 1rem 1.25rem;
    background: #fff;
    border-radius: .75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    text-decoration: none;
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease;
}
.brand-carousel-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.brand-carousel-item img {
    width: 100%;
    height: 100%;
    max-height: 56px;
    object-fit: contain;
    display: block;
}
.brand-carousel-item__name {
    font-weight: 600;
    font-size: .95rem;
    color: #343a40;
    text-align: center;
}

.brand-list-card {
    transition: transform .2s ease, box-shadow .2s ease;
    overflow: hidden;
}
.brand-list-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0,0,0,.12) !important;
}
.brand-list-card__media {
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,.06);
    padding: 1.25rem 1.5rem;
}
.brand-list-card__media--empty {
    min-height: 120px;
    background: #f8f9fa;
}
.brand-list-card__media img {
    width: 100%;
    height: 100%;
    max-height: 88px;
    object-fit: contain;
    object-position: center;
    display: block;
}

.product-card { transition: transform 0.2s, box-shadow 0.2s; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important; }
.product-actions { opacity: 0; transition: opacity 0.2s; }
.product-card:hover .product-actions { opacity: 1; }

.destacadosSwiper {
    padding-bottom: 2.25rem;
}
.destacadosSwiper .swiper-slide {
    height: auto;
}
.destacadosSwiper .product-card {
    height: 100%;
}
.destacadosSwiper .card-img-top {
    height: 220px;
    object-fit: cover;
    width: 100%;
}
.destacados-pagination.swiper-pagination-bullets {
    bottom: 0;
}
.destacados-pagination .swiper-pagination-bullet-active {
    background: var(--color-primary);
}
.destacados-nav .btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.blog-page {
    background:
        linear-gradient(180deg, rgba(45, 80, 22, 0.04) 0%, transparent 220px),
        #fff;
}
.blog-card {
    transition: transform .2s ease, box-shadow .2s ease;
}
.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0,0,0,.12) !important;
}
.blog-card__media {
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f6f3;
    padding: 1rem;
    overflow: hidden;
}
.blog-card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.blog-card__media--empty {
    min-height: 180px;
}
.blog-card__date {
    letter-spacing: .02em;
}

.whatsapp-float {
    position: fixed; bottom: 25px; right: 25px; z-index: 1000;
    width: 60px; height: 60px; background: #25d366; color: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 32px; box-shadow: 0 4px 15px rgba(37,211,102,0.4);
    text-decoration: none; transition: transform 0.2s;
}
.whatsapp-float:hover { transform: scale(1.1); color: #fff; }

.cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
    background: #fff; border-top: 1px solid #dee2e6; padding: 15px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

/* Honeypot: oculto para usuarios, visible para bots ingenuos */
.hp-field {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.gallery-thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
    cursor: pointer;
}
.gallery-thumb.active {
    border-color: var(--color-primary) !important;
    border-width: 2px !important;
}

/* Zoom producto */
.main-image {
    background: #f8f9fa;
    overflow: hidden;
}
.product-zoom-trigger {
    position: relative;
    display: block;
    width: 100%;
    min-height: 320px;
    max-height: 450px;
    padding: 0;
    border: 0;
    background-color: #f8f9fa;
    background-repeat: no-repeat;
    cursor: zoom-in;
}
.product-zoom-img {
    display: block;
    width: 100%;
    max-height: 450px;
    object-fit: contain;
    transition: opacity .15s ease;
}
.product-zoom-trigger.is-zooming {
    background-size: 220%;
}
.product-zoom-trigger.is-zooming .product-zoom-img {
    opacity: 0;
}
.product-zoom-hint {
    position: absolute;
    right: .75rem;
    bottom: .75rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    font-size: .9rem;
}
.product-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,.88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.product-lightbox[hidden] {
    display: none !important;
}
.product-lightbox img {
    max-width: min(1100px, 96vw);
    max-height: 90vh;
    object-fit: contain;
    border-radius: .35rem;
}
.product-lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}
.product-lightbox__close:hover {
    background: rgba(255,255,255,.28);
}
body.product-lightbox-open {
    overflow: hidden;
}
@media (hover: none) {
    .product-zoom-trigger.is-zooming .product-zoom-img {
        opacity: 1;
    }
    .product-zoom-trigger.is-zooming {
        background-image: none !important;
    }
}

.site-footer .footer-logo img {
    display: block;
    max-width: 240px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
}
.site-footer .footer-text {
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 1rem;
}
.site-footer .footer-links li {
    margin-bottom: .35rem;
}
.site-footer .footer-links a,
.site-footer .footer-link {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
}
.site-footer .footer-links a:hover,
.site-footer .footer-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* Dark mode */
[data-theme="dark"] {
    --bs-body-bg: #1a1a2e;
    --bs-body-color: #e0e0e0;
}
[data-theme="dark"] .bg-white,
[data-theme="dark"] .navbar-light,
[data-theme="dark"] .card { background-color: #16213e !important; color: #e0e0e0; }
[data-theme="dark"] .bg-light { background-color: #0f3460 !important; }
[data-theme="dark"] .text-dark { color: #e0e0e0 !important; }
[data-theme="dark"] .navbar-light .nav-link { color: #e0e0e0; }
