:root {
    --color-primary: #A80010;
    --color-primary-hover: #8a000d;
    --color-accent: #BF0404;
    --color-dark: #0D0D0D;
    --color-slate: #2C2F34;
    --color-light: #F2F2F2;
    --font-display: 'Barlow Condensed', sans-serif;
    --font-body: 'Barlow', sans-serif;
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--color-light);
}

main {
    flex: 1 0 auto;
    min-width: 0;
    
}

.site-footer {
    flex-shrink: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, .btn, .navbar-brand, .card-title {
    font-family: var(--font-display);
}

/* ---------- Header ---------- */
.site-header {
    background-color: var(--color-dark);
    border-bottom: 3px solid var(--color-primary);
}

.site-header .navbar {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.logo-slot {
    min-width: 180px;
}

.logo-placeholder {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.03em;
    color: #ffffff;
}

.logo-img {
    height: 44px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-shrink: 0;
    z-index: 2;
}

.categories-panel {
    background-color: var(--color-slate);
    border-top: 1px solid #3a3d42;
    padding: 1rem 0;
}

.categories-row {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.categories-row::-webkit-scrollbar {
    display: none;
}

.category-pill {
    flex: 0 0 auto;
    background: none;
    border: none;
    color: #f2f2f2;
    padding: 0.45rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
}

.category-pill:hover {
    color: var(--color-accent);
}

.btn-categories-toggle {
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-categories-toggle i {
    transition: transform 0.2s ease;
}

.btn-categories-toggle:not(.collapsed) i {
    transform: rotate(180deg);
}


.text-accent {
    color: var(--color-accent);
}

.search-form {
    display: flex;
    align-items: center;
    background-color: var(--color-slate);
    border: 1px solid #444;
    border-radius: 50rem;
    overflow: hidden;
    max-width: 380px;
    width: 100%;
}

.search-form .form-control {
    background-color: transparent;
    border: none;
    color: #fff;
    box-shadow: none;
    padding-left: 1.1rem;
}

.search-form .form-control::placeholder {
    color: #aaa;
}

.search-form .form-control:focus {
    background-color: transparent;
    color: #fff;
    box-shadow: none;
}

.btn-search {
    background-color: transparent;
    border: none;
    color: #fff;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    padding: 0;
}

.btn-search:hover {
    color: var(--color-accent);
}

.navbar-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0.75rem;
}

.navbar-inner .logo-slot {
    flex-shrink: 0;
    z-index: 2;
}

.navbar-inner .cart-link {
    flex-shrink: 0;
    z-index: 2;
}

.navbar-inner .search-form {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(420px, 55%);
    z-index: 1;
}

@media (max-width: 576px) {
    .navbar-inner .search-form {
        width: min(200px, 45%);
    }
}

.logo-slot {
    min-width: 180px;
}

.search-form {
    min-width: 0;
    max-width: 420px;
}

.search-form .form-control {
    min-width: 0;
}

/* Pantallas chicas: achicamos logo y buscador para que entre todo en una fila */
@media (max-width: 576px) {
    .logo-img {
        height: 32px;
        max-width: 110px;
    }

    .search-form .form-control {
        padding-left: 0.75rem;
        font-size: 0.85rem;
    }

    .btn-search {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }

    .cart-link {
        font-size: 0.85rem;
    }
}

.cart-link {
    position: relative;
    color: #ffffff !important;
    font-size: 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.cart-link:hover {
    color: var(--color-accent) !important;
}

.cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: var(--color-primary);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 3px;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 62vh;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: top center;
    background-color: var(--color-light);
    overflow: hidden;
}
.btn-brand,
.btn-brand:hover,
.btn-brand:focus,
.btn-brand:active {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #ffffff !important;
    font-weight: 600;
    padding: 0.6rem 1.6rem;
    letter-spacing: 0.02em;
}
.hero .container {
    display: flex;
    justify-content: flex-end;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 3rem 0 3.5rem;
    text-align: right;
    max-width: 480px;
}

.hero-title {
    color: #ffffff;
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.hero-subtitle {
    color: #e6e6e6;
    font-family: var(--font-body);
    font-size: 1.05rem;
    margin-top: 0.4rem;
    margin-bottom: 0;
}

.hero .btn-brand {
    margin-top: 0.75rem;
}

.btn-brand:hover {
    background-color: var(--color-primary-hover);
    color: #ffffff;
}

/* ---------- Sección Destacados ---------- */

.section-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.9rem;
    margin-bottom: 1.75rem;
}

.featured-section {
    position: relative;
    z-index: 2;
    background: transparent;
    margin-top: -20vh;
    padding: 0 0 3rem;
}

@media (min-width: 768px) {
    .featured-section {
        margin-top: -18vw;
    }
}

.featured-section .section-title {
    color: var(--color-dark);
}

.featured-grid {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
}

.featured-grid::-webkit-scrollbar {
    display: none;
}

.featured-card-wrap {
    flex: 0 0 50%;
    scroll-snap-align: start;
}

@media (min-width: 768px) {
    .featured-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        overflow-x: visible;
    }

    .featured-card-wrap {
        flex: unset;
    }
}

.featured-card {
    position: relative;
    display: block;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
}

.featured-card img,
.featured-card-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.featured-card-placeholder {
    background-color: var(--color-slate);
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 13, 13, 0.8) 0%, rgba(13, 13, 13, 0) 55%);
}

.featured-card .card-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.25rem;
    z-index: 2;
}

.card-caption-title {
    display: block;
    font-family: var(--font-display);
    text-transform: uppercase;
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    font-size: 1.05rem;
}

/* ---------- Listado / rail horizontal ---------- */
.catalog-section {
    padding: 3rem 0 3.5rem;
}

.catalog-section .section-title {
    color: var(--color-dark);
}

.rail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.rail-controls .btn-rail {
    background-color: #ffffff;
    border: 1px solid #d0d0d0;
    color: var(--color-dark);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.rail-controls .btn-rail:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.product-rail {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

.product-rail::-webkit-scrollbar {
    display: none;
}

.rail-card {
    flex: 0 0 auto;
    width: 240px;
    background-color: #ffffff;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    overflow: hidden;
}

.rail-card .card-img {
    height: 190px;
    object-fit: cover;
    width: 100%;
    background-color: #e9e9e9;
}

.rail-card .card-body {
    padding: 1rem 1.1rem 1.2rem;
}

.rail-card .card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 0.15rem;
}

.rail-card .card-category {
    color: #777;
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
}

.rail-card .card-price {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

/* ---------- Grilla simple (búsqueda / categoría filtrada) ---------- */
.filtered-grid .rail-card {
    width: 100%;
}

/* ---------- Footer ---------- */
.site-footer {
    background-color: var(--color-slate);
    border-top: 3px solid var(--color-primary);
}

.footer-brand {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.2rem;
    color: #ffffff;
}

.footer-link {
    color: #d8d8d8;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-link:hover {
    color: var(--color-accent);
}

.hero {
    background-image: url("/static/img/hero-mobile.3295ce109f66.png");
}

@media (min-width: 768px) {
    .hero {
        background-image: url("/static/img/hero-desktop.c27f57319fd7.png");
    }
}

@media (min-width: 768px) {
    .hero {
        min-height: 0;
        aspect-ratio: 1920 / 1000;
        background-position: center;
    }
}

/* Ver imagenes */
.product-gallery {
    border-radius: 4px;
    overflow: hidden;
}

.product-image-frame {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #ffffff;
    border: 1px solid #e2e2e2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-image-placeholder {
    background-color: var(--color-light);
}

.product-price {
    color: var(--color-primary);
    font-weight: 600;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: brightness(0.55);
    background-color: rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    padding: 1.2rem;
    background-size: 50%;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    filter: brightness(0.3);
}


.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    padding: 1rem;
    background-color: #ffffff;
}

.cart-item-main {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.cart-item-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    flex-shrink: 0;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    color: var(--color-dark);
    text-decoration: none;
    font-weight: 600;
}

.cart-item-unit-price {
    color: #777;
    font-size: 0.85rem;
}

.cart-item-subtotal {
    font-weight: 600;
    color: var(--color-primary);
    flex-shrink: 0;
}

.cart-item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid #eee;
}

.cart-qty-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-qty-form select,
.cart-qty-form input {
    width: 70px;
}

.cart-remove-form {
    flex-shrink: 0;
}

.cart-total {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    font-size: 1.2rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--color-dark);
}

@media (max-width: 480px) {
    .cart-item-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-qty-form {
        justify-content: space-between;
    }

    .cart-remove-form,
    .cart-remove-form button {
        width: 100%;
    }
}



@media (max-width: 480px) {
    .logo-img {
        height: 30px !important;
        max-width: 95px !important;
    }
}

/* CARACTERÍSTICAS PRODUCTOS */
.features-strip {
    background-color: var(--color-light);
    padding: 2.5rem 0 0.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem 1rem;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.6rem;
}

.feature-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.feature-item span {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: var(--color-dark);
    font-weight: 600;
}

@media (max-width: 480px) {
    .feature-item img {
        width: 48px;
        height: 48px;
    }

    .feature-item span {
        font-size: 0.72rem;
    }
}

/* BURBUJA DE WSP */
.whatsapp-bubble {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 58px;
    height: 58px;
    background-color: #25D366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: transform 0.15s ease;
}

.whatsapp-bubble:hover {
    color: #ffffff;
    transform: scale(1.08);
}

@media (max-width: 480px) {
    .whatsapp-bubble {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        bottom: 16px;
        right: 16px;
    }
}

/* Imagen con texto (diagonal) */
.brand-banner-section {
    padding: 2.5rem 0 1rem;
}

.brand-banner {
    display: flex;
    min-height: 130px;
    background-color: var(--color-accent);
    overflow: hidden;
    border-radius: 4px;
}

.brand-banner-media {
    flex: 0 0 32%;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 82% 100%, 0 100%);
}

.brand-banner-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.brand-banner-text {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 1rem 1.75rem;
}

.brand-banner-text p {
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.45;
    margin: 0;
    max-width: 420px;
}

@media (max-width: 767px) {

    .brand-banner-media img {
        object-position: center 50%;
    }

    .brand-banner-section {
        padding: 2.5rem 0 1rem;
    }

    .brand-banner {
        flex-direction: column;
        min-height: 0;
        border-radius: 0;
    }

    .brand-banner-media {
        flex: 0 0 auto;
        height: 150px;
        clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    }

    .brand-banner-text {
        padding: 1.25rem 1.5rem;
    }

    .brand-banner-text p {
        font-size: 0.95rem;
        max-width: none;
    }
}