/* =========================================================================
   Featured Products + home search results — Browse Gear's card, unchanged.

   template-parts/sections/featured.php AND the home page's search-results
   section (template-parts/sections/results.php, when a search — including
   picking a city from the search bar — returns matches) both render the
   exact same card partial Browse Gear / Category Listing uses
   (template-parts/inner/product-card, .ll-prod* / .ll-grid*) — same markup,
   same API-backed data. Those classes are normally styled by
   css/inner-pages.css, which is not loaded on the home page: its :root also
   fixes --ll-fs-* to pixel values for its own layouts, and loading it here
   would resize every heading on the home page (see ll_enqueue_assets()).
   The rules below are copied from css/inner-pages.css / css/inner-responsive.css
   — same values, not a new design — scoped to #featured-products and
   #ll-search-results so they cannot reach anywhere else on the home page.
   ========================================================================= */

#featured-products,
#featured-products *,
#featured-products *::before,
#featured-products *::after,
#ll-search-results,
#ll-search-results *,
#ll-search-results *::before,
#ll-search-results *::after {
    box-sizing: border-box;
}

#featured-products,
#ll-search-results {
    --ll-s2: 6px;
    --ll-s3: 10px;
    --ll-s4: 12px;
    --ll-s5: 16px;
    --ll-s6: 20px;
    --ll-r-card: 16px;
    --ll-r-pill: 100px;
    --ll-surface-raised: #0B0B0B;
    --ll-surface-inset: #111111;
    --ll-border-card: #232323;
    --ll-text-secondary: #8E8E93;
    --ll-good: #4ADE80;
    --ll-gap-card: 20px;
    --ll-hairline-card: inset 0 0 0 1px var(--ll-border-card);
    --ll-hairline-accent: inset 0 0 0 1px var(--ll-red);
}

#featured-products .ll-grid,
#ll-search-results .ll-grid {
    display: grid;
    gap: var(--ll-gap-card);
    /*
     * The gap under the section heading, same 50/40/32px steps as the other
     * homepage sections whose content sits directly under one (.ll-products,
     * .ll-trust__grid in style.css / css/responsive.css) — .ll-grid carries no
     * top margin of its own, unlike .ll-products, which this card replaced.
     */
    margin-top: 50px;
}

#featured-products .ll-grid--4,
#ll-search-results .ll-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

#featured-products .ll-prod,
#ll-search-results .ll-prod {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: var(--ll-r-card);
    background-color: var(--ll-surface-raised);
    box-shadow: var(--ll-hairline-card);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

#featured-products .ll-prod:hover,
#ll-search-results .ll-prod:hover {
    transform: translateY(-3px);
    box-shadow: var(--ll-hairline-accent);
    color: inherit;
}

#featured-products .ll-prod__shot,
#ll-search-results .ll-prod__shot {
    position: relative;
    aspect-ratio: 25 / 12;
    background-color: var(--ll-surface-inset);
    overflow: hidden;
}

#featured-products .ll-prod__shot img,
#ll-search-results .ll-prod__shot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#featured-products .ll-prod__badge,
#ll-search-results .ll-prod__badge {
    position: absolute;
    top: var(--ll-s4);
    left: var(--ll-s4);
    padding: 6px 12px;
    border-radius: var(--ll-r-pill);
    background-color: var(--ll-red);
    font-size: 12px;
    font-weight: 600;
    color: var(--ll-white);
}

#featured-products .ll-prod__body,
#ll-search-results .ll-prod__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 5px;
    padding: var(--ll-s6);
}

#featured-products .ll-prod__name,
#ll-search-results .ll-prod__name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 0;
    min-height: 50px;
    font-size: var(--ll-fs-meta);
    font-weight: 700;
    line-height: 1.375;
    color: var(--ll-white);
}

#featured-products .ll-prod__where,
#ll-search-results .ll-prod__where {
    margin: 0;
    font-size: 15px;
    color: var(--ll-text-secondary);
}

#featured-products .ll-prod__price-row,
#ll-search-results .ll-prod__price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--ll-s4);
    margin-top: var(--ll-s2);
}

#featured-products .ll-prod__price,
#ll-search-results .ll-prod__price {
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
    color: var(--ll-white);
}

#featured-products .ll-prod__price small,
#ll-search-results .ll-prod__price small {
    font-size: var(--ll-fs-small);
    font-weight: 400;
    color: var(--ll-text-secondary);
}

#featured-products .ll-prod__verified,
#ll-search-results .ll-prod__verified {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    flex-shrink: 0;
    white-space: nowrap;
    font-size: var(--ll-fs-small);
    font-weight: 500;
    color: var(--ll-good);
}

#featured-products .ll-prod__foot,
#ll-search-results .ll-prod__foot {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--ll-s5);
    padding-top: var(--ll-s3);
    box-shadow: inset 0 1px 0 0 var(--ll-border-card);
    font-size: var(--ll-fs-small);
    color: var(--ll-text-secondary);
}

#featured-products .ll-prod__trust,
#ll-search-results .ll-prod__trust {
    flex-shrink: 0;
    color: var(--ll-text-secondary);
}

#featured-products .ll-prod__view,
#ll-search-results .ll-prod__view {
    align-self: stretch;
    justify-content: center;
    height: 40px;
    margin-top: var(--ll-s3);
    box-shadow: none;
    font-size: var(--ll-fs-small);
}

#featured-products .ll-prod:hover .ll-prod__view,
#featured-products .ll-prod__view:hover,
#ll-search-results .ll-prod:hover .ll-prod__view,
#ll-search-results .ll-prod__view:hover {
    background-color: var(--ll-red);
    box-shadow: none;
    color: var(--ll-white);
}

@media (max-width: 1180px) {
    #featured-products .ll-grid--4,
    #ll-search-results .ll-grid--4 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    #featured-products .ll-grid,
    #ll-search-results .ll-grid {
        margin-top: 40px;
    }

    #featured-products .ll-grid--4,
    #ll-search-results .ll-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    #featured-products .ll-grid--4,
    #ll-search-results .ll-grid--4 {
        grid-template-columns: 1fr;
        gap: var(--ll-s6);
    }
}

@media (max-width: 480px) {
    #featured-products .ll-grid,
    #ll-search-results .ll-grid {
        margin-top: 32px;
    }
}
