/**
 * Govee home — category grid and product sections.
 * Loaded only on shop.home.index via @push('styles').
 */

/* ------------------------------------------------------------------ */
/* Hero (Bagisto image_carousel / v-carousel)                          */
/* SSR first paint uses object-cover; Vue slides do not → stretch.    */
/* Desktop: force cover crop inside the 2.743 aspect box.             */
/* Mobile: leave alone (SSR cover + current look).                    */
/* ------------------------------------------------------------------ */

@media (min-width: 768px) {
    /*
     * Scope: only the home hero track (w-screen slides under v-carousel).
     * Do not target product cards or category images.
     */
    main.govee-dark .relative.m-auto.flex.w-full.overflow-hidden .w-screen img {
        object-fit: cover !important;
        object-position: center center;
    }
}

/* ------------------------------------------------------------------ */
/* Shared section titles (categories + product grids)                 */
/* ------------------------------------------------------------------ */

.govee-home-categories__title,
.govee-home-rooms__title,
.govee-home-product-grid .container > .flex.justify-between > h2 {
    margin: 0 0 var(--govee-space-10);
    font-family: var(--govee-font-sans);
    font-size: var(--govee-text-title);
    font-weight: var(--govee-weight-semibold);
    line-height: var(--govee-leading-tight);
    letter-spacing: var(--govee-tracking-display);
    color: var(--govee-text);
    text-align: center;
}

.govee-home-categories__title::after,
.govee-home-rooms__title::after,
.govee-home-product-grid .container > .flex.justify-between > h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    margin: var(--govee-space-5) auto 0;
    border-radius: var(--govee-radius-pill);
    background: linear-gradient(90deg, var(--govee-cyan), var(--govee-violet));
}

/* ------------------------------------------------------------------ */
/* Categories                                                         */
/* ------------------------------------------------------------------ */

.govee-home-categories {
    background: var(--govee-bg);
    padding: var(--govee-space-12) 0;
    overflow-x: clip;
    max-width: 100%;
}

.govee-home-categories__inner {
    max-width: var(--govee-container-max);
    margin: 0 auto;
    padding: 0 var(--govee-container-pad);
    min-width: 0;
}

@media (min-width: 768px) {
    .govee-home-categories__inner {
        padding: 0 var(--govee-container-pad-md);
    }
}

@media (min-width: 1180px) {
    .govee-home-categories__inner {
        padding: 0 var(--govee-container-pad-lg);
    }
}

.govee-home-categories__carousel {
    position: relative;
    min-width: 0;
    max-width: 100%;
}

.govee-home-categories__track {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0 0.5rem;
    display: flex;
    gap: var(--govee-space-3);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-width: 100%;
}

.govee-home-categories__track::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

@media (min-width: 768px) {
    .govee-home-categories__track {
        gap: var(--govee-space-4);
        padding-inline: 2.25rem;
    }
}

.govee-home-categories__item {
    margin: 0;
    flex: 0 0 42%;
    max-width: 150px;
    min-width: 0;
    scroll-snap-align: start;
}

@media (min-width: 480px) {
    .govee-home-categories__item {
        flex-basis: 34%;
        max-width: 150px;
    }
}

@media (min-width: 768px) {
    .govee-home-categories__item {
        flex-basis: 140px;
        max-width: 150px;
    }
}

@media (min-width: 1180px) {
    .govee-home-categories__item {
        flex-basis: 150px;
        max-width: 160px;
    }
}

.govee-home-categories__card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    text-decoration: none;
    color: var(--govee-text);
    background: var(--govee-card);
    border: 1px solid var(--govee-border);
    border-radius: var(--govee-radius-lg);
    box-shadow: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.govee-home-categories__card:hover,
.govee-home-categories__card:focus-visible {
    border-color: rgba(24, 200, 255, 0.45);
    box-shadow: var(--govee-shadow-elevated);
    transform: translateY(-2px);
    outline: none;
}

.govee-home-categories__media {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--govee-card-2);
    line-height: 0;
}

.govee-home-categories__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.3s ease;
}

.govee-home-categories__card:hover .govee-home-categories__image,
.govee-home-categories__card:focus-visible .govee-home-categories__image {
    transform: scale(1.04);
}

.govee-home-categories__name {
    display: block;
    padding: var(--govee-space-3) var(--govee-space-3);
    font-family: var(--govee-font-sans);
    font-size: 0.8125rem;
    font-weight: var(--govee-weight-medium);
    line-height: var(--govee-leading-snug);
    color: var(--govee-text);
    text-align: center;
}

@media (min-width: 768px) {
    .govee-home-categories__name {
        font-size: var(--govee-text-sm);
        padding: var(--govee-space-3) var(--govee-space-4);
    }
}

.govee-home-categories__nav {
    display: none;
    position: absolute;
    top: 42%;
    z-index: 2;
    transform: translateY(-50%);
    width: 2.25rem;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--govee-border);
    background: var(--govee-card);
    color: var(--govee-text);
    cursor: pointer;
    padding: 0;
}

.govee-home-categories__nav:hover,
.govee-home-categories__nav:focus-visible {
    border-color: rgba(24, 200, 255, 0.45);
    color: var(--govee-cyan);
    outline: none;
}

.govee-home-categories__nav:disabled,
.govee-home-categories__nav[aria-disabled="true"] {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.govee-home-categories__nav--prev {
    left: 0;
}

.govee-home-categories__nav--next {
    right: 0;
}

@media (min-width: 768px) {
    .govee-home-categories__nav {
        display: inline-flex;
    }
}

/* ------------------------------------------------------------------ */
/* Compra por Ambiente (Shop by Room)                                 */
/* ------------------------------------------------------------------ */

.govee-home-rooms {
    background: var(--govee-card);
    padding: var(--govee-space-12) 0;
    overflow-x: clip;
    max-width: 100%;
}

.govee-home-rooms__inner {
    max-width: var(--govee-container-max);
    margin: 0 auto;
    padding: 0 var(--govee-container-pad);
}

@media (min-width: 768px) {
    .govee-home-rooms__inner {
        padding: 0 var(--govee-container-pad-md);
    }
}

@media (min-width: 1180px) {
    .govee-home-rooms__inner {
        padding: 0 var(--govee-container-pad-lg);
    }
}

.govee-home-rooms__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--govee-space-4);
}

@media (min-width: 768px) {
    .govee-home-rooms__grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--govee-space-7);
    }
}

.govee-home-rooms__item {
    margin: 0;
    min-width: 0;
}

.govee-home-rooms__card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    text-decoration: none;
    color: var(--govee-text);
    background: var(--govee-bg);
    border: 1px solid var(--govee-border);
    border-radius: var(--govee-radius-lg);
    box-shadow: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.govee-home-rooms__card:hover,
.govee-home-rooms__card:focus-visible {
    border-color: rgba(24, 200, 255, 0.45);
    box-shadow: var(--govee-shadow-elevated);
    transform: translateY(-2px);
    outline: none;
}

.govee-home-rooms__media {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--govee-card-2);
}

.govee-home-rooms__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.govee-home-rooms__card:hover .govee-home-rooms__image,
.govee-home-rooms__card:focus-visible .govee-home-rooms__image {
    transform: scale(1.04);
}

.govee-home-rooms__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 100%;
    background:
        linear-gradient(145deg, rgba(24, 200, 255, 0.12), transparent 55%),
        linear-gradient(325deg, rgba(124, 58, 237, 0.14), transparent 50%),
        var(--govee-card-2);
}

.govee-home-rooms__placeholder-label {
    font-family: var(--govee-font-sans);
    font-size: var(--govee-text-sm);
    font-weight: var(--govee-weight-medium);
    color: var(--govee-muted);
    letter-spacing: var(--govee-tracking-display);
    padding: var(--govee-space-4);
    text-align: center;
}

.govee-home-rooms__name {
    display: block;
    padding: var(--govee-space-5) var(--govee-space-6);
    font-family: var(--govee-font-sans);
    font-size: var(--govee-text-sm);
    font-weight: var(--govee-weight-medium);
    line-height: var(--govee-leading-snug);
    color: var(--govee-text);
}

@media (min-width: 768px) {
    .govee-home-rooms__name {
        font-size: var(--govee-text-base);
        padding: var(--govee-space-6) var(--govee-space-7);
    }
}

/* ------------------------------------------------------------------ */
/* Product grids (Destacados / Nuevos) — carousel restyled as CSS grid */
/* ------------------------------------------------------------------ */

/*
 * Band rhythm (after hero on --govee-bg):
 * Destacados = --govee-bg → Nuevos = --govee-card (band) →
 * Categorías = --govee-bg → Services = --govee-card.
 * Band class lives on "Nuevos" so no two equal tones sit adjacent.
 */
.govee-home-product-grid {
    background: var(--govee-bg);
    padding: var(--govee-space-12) 0;
}

/*
 * Full-bleed band: section spans the main (edge to edge);
 * .container inside keeps content at --govee-container-max (1440px).
 */
.govee-home-product-grid--band {
    background: var(--govee-card);
    width: 100%;
}

.govee-home-product-grid .container {
    max-width: var(--govee-container-max);
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-left: var(--govee-container-pad) !important;
    padding-right: var(--govee-container-pad) !important;
}

@media (min-width: 768px) {
    .govee-home-product-grid .container {
        padding-left: var(--govee-container-pad-md) !important;
        padding-right: var(--govee-container-pad-md) !important;
    }
}

@media (min-width: 1180px) {
    .govee-home-product-grid .container {
        padding-left: var(--govee-container-pad-lg) !important;
        padding-right: var(--govee-container-pad-lg) !important;
    }
}

/* Center carousel title row (side chrome already hidden) */
.govee-home-product-grid .container > .flex.justify-between {
    justify-content: center !important;
    align-items: center;
}

.govee-home-product-grid .container > .flex.justify-between > h2 {
    font-size: var(--govee-text-title) !important;
    letter-spacing: var(--govee-tracking-display);
    text-align: center;
    margin: 0 0 var(--govee-space-10);
}

/* Hide carousel chrome (arrows / “view all”) — grid shows all items */
.govee-home-product-grid .container > .flex.justify-between > div,
.govee-home-product-grid .container > a.secondary-button {
    display: none !important;
}

/*
 * products.carousel row is flex + overflow-auto. Force a responsive grid
 * so few products sit side-by-side instead of a useless slider.
 */
.govee-home-product-grid .scrollbar-hide {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: var(--govee-space-4) !important;
    margin-top: 0 !important;
    padding-bottom: 0 !important;
    overflow: visible !important;
    white-space: normal !important;
}

@media (min-width: 640px) {
    .govee-home-product-grid .scrollbar-hide {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .govee-home-product-grid .scrollbar-hide {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--govee-space-6) !important;
    }
}

/* 4 columns on desktop; with fewer than 4 items, empty tracks stay empty (left-aligned). */
@media (min-width: 1180px) {
    .govee-home-product-grid .scrollbar-hide {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: var(--govee-space-7) !important;
        justify-items: stretch;
    }
}

.govee-home-product-grid .scrollbar-hide > * {
    min-width: 0 !important;
    max-width: none !important;
    width: 100% !important;
    flex: none !important;
}

.govee-home-product-grid .govee-product-card {
    width: 100% !important;
    max-width: none !important;
}

.govee-home-product-grid .govee-product-card__media,
.govee-home-product-grid .govee-product-card__body {
    max-width: 100% !important;
}

/* ------------------------------------------------------------------ */
/* Services strip — home only (hasFeature). Dark band, no white bags. */
/* ------------------------------------------------------------------ */

.govee-services.container.mt-20 {
    display: block;
    max-width: none !important;
    width: 100%;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: var(--govee-space-12) 0 !important;
    background: var(--govee-card) !important;
    color: var(--govee-text);
    overflow-x: clip;
}

.govee-services__row {
    max-width: var(--govee-container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--govee-container-pad);
    padding-right: var(--govee-container-pad);
    gap: var(--govee-space-8) !important;
}

@media (min-width: 768px) {
    .govee-services__row {
        padding-left: var(--govee-container-pad-md);
        padding-right: var(--govee-container-pad-md);
    }
}

@media (min-width: 1180px) {
    .govee-services__row {
        padding-left: var(--govee-container-pad-lg);
        padding-right: var(--govee-container-pad-lg);
    }
}

.govee-services__item {
    background: transparent !important;
    align-items: flex-start;
    min-width: 0;
}

.govee-services__icon {
    background: transparent !important;
    border: 1px solid var(--govee-border) !important;
    color: var(--govee-cyan) !important;
    flex-shrink: 0;
}

.govee-services__title {
    font-family: var(--govee-font-sans) !important;
    font-size: var(--govee-text-base) !important;
    font-weight: var(--govee-weight-semibold);
    color: var(--govee-text) !important;
}

.govee-services__text {
    color: var(--govee-muted) !important;
    font-weight: var(--govee-weight-regular) !important;
    max-width: 14rem;
}

/* ------------------------------------------------------------------ */
/* Tech logos — after services, before footer (home only via @push)   */
/* Band: --govee-bg (services is --govee-card). Grid, never carousel. */
/* Desktop: 4×2 (8-in-a-row too tight for names at 1440). Mobile: 2.  */
/* ------------------------------------------------------------------ */

.govee-home-tech {
    background: var(--govee-bg);
    color: var(--govee-text);
    padding: var(--govee-space-12) 0;
    width: 100%;
}

.govee-home-tech__inner {
    max-width: var(--govee-container-max);
    margin: 0 auto;
    padding: 0 var(--govee-container-pad);
}

@media (min-width: 768px) {
    .govee-home-tech__inner {
        padding: 0 var(--govee-container-pad-md);
    }
}

@media (min-width: 1180px) {
    .govee-home-tech__inner {
        padding: 0 var(--govee-container-pad-lg);
    }
}

.govee-home-tech__title {
    margin: 0 0 var(--govee-space-8);
    font-family: var(--govee-font-sans);
    font-size: var(--govee-text-title);
    font-weight: var(--govee-weight-semibold);
    line-height: var(--govee-leading-tight, 1.2);
    color: var(--govee-text);
    text-align: center;
}

.govee-home-tech__title::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    margin: var(--govee-space-5) auto 0;
    background: linear-gradient(90deg, var(--govee-cyan), var(--govee-violet));
    border-radius: var(--govee-radius-pill);
}

.govee-home-tech__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--govee-space-4);
}

@media (min-width: 768px) {
    .govee-home-tech__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: var(--govee-space-6);
    }
}

.govee-home-tech__item {
    margin: 0;
    min-width: 0;
}

.govee-home-tech__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: auto;
    padding: var(--govee-space-3) var(--govee-space-3) var(--govee-space-4);
    background: var(--govee-card);
    border: 1px solid var(--govee-border);
    border-radius: var(--govee-radius-lg);
    box-sizing: border-box;
    min-width: 0;
}

/*
 * Fixed logo box: reserves 1:1 space before decode (PNG are 240×240).
 * Caps display size so cards stay compact (no 82%-of-column giants).
 */
.govee-home-tech__media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    line-height: 0;
    overflow: hidden;
}

.govee-home-tech__image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.govee-home-tech__name {
    display: block;
    margin-top: var(--govee-space-2);
    padding: 0 var(--govee-space-1);
    font-family: var(--govee-font-sans);
    font-size: var(--govee-text-sm);
    font-weight: var(--govee-weight-medium);
    line-height: var(--govee-leading-snug, 1.35);
    color: var(--govee-text);
    text-align: center;
}

@media (min-width: 768px) {
    .govee-home-tech__card {
        padding: var(--govee-space-4) var(--govee-space-3) var(--govee-space-4);
    }

    .govee-home-tech__media {
        width: 80px;
        height: 80px;
    }

    .govee-home-tech__name {
        font-size: var(--govee-text-base);
        margin-top: var(--govee-space-3);
    }
}

/* ------------------------------------------------------------------ */
/* Recursos — latest articles (after tech compatibility)              */
/* Card chrome lives in govee-recursos.css (.govee-recursos-card).    */
/* ------------------------------------------------------------------ */

.govee-home-recursos {
    overflow-x: clip;
    max-width: 100%;
    background: var(--govee-card);
    color: var(--govee-text);
    padding: var(--govee-space-12) 0;
    width: 100%;
}

.govee-home-recursos__inner {
    max-width: var(--govee-container-max);
    margin: 0 auto;
    padding: 0 var(--govee-container-pad);
    min-width: 0;
}

@media (min-width: 768px) {
    .govee-home-recursos__inner {
        padding: 0 var(--govee-container-pad-md);
    }
}

@media (min-width: 1180px) {
    .govee-home-recursos__inner {
        padding: 0 var(--govee-container-pad-lg);
    }
}

.govee-home-recursos__head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--govee-space-4);
    margin: 0 0 var(--govee-space-8);
    text-align: center;
}

.govee-home-recursos__title {
    margin: 0;
    font-family: var(--govee-font-sans);
    font-size: var(--govee-text-title);
    font-weight: var(--govee-weight-semibold);
    line-height: var(--govee-leading-tight, 1.2);
    color: var(--govee-text);
}

.govee-home-recursos__title::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    margin: var(--govee-space-5) auto 0;
    background: linear-gradient(90deg, var(--govee-cyan), var(--govee-violet));
    border-radius: var(--govee-radius-pill);
}

.govee-home-recursos__more {
    color: var(--govee-cyan);
    font-family: var(--govee-font-sans);
    font-size: var(--govee-text-sm);
    font-weight: var(--govee-weight-medium);
    text-decoration: none;
}

.govee-home-recursos__more:hover,
.govee-home-recursos__more:focus-visible {
    color: var(--govee-text);
    outline: none;
}

.govee-home-recursos__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--govee-space-7);
    margin: 0;
    padding: 0;
    list-style: none;
    min-width: 0;
}

@media (min-width: 640px) {
    .govee-home-recursos__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .govee-home-recursos__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.govee-home-recursos__item {
    min-width: 0;
    margin: 0;
}
