/* assets/homepage.css */
.sf-homepage-component {
    display: grid;
    grid-template-columns: 120px 1fr;
    grid-template-areas: "thumbs hero";
    gap: 20px;
    margin: 40px 0;
}

.sf-homepage-hero {
    grid-area: hero;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f9f9f9;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.sf-homepage-thumbnails {
    grid-area: thumbs;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sf-thumb {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    background: var(--global-palette9, #fff);
    border: 4px solid var(--global-palette9, #fff);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.sf-thumb:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: var(--global-palette1, #0073aa);
}

.sf-thumb:focus-visible,
.sf-hero-link:focus-visible {
    outline: 2px solid var(--global-palette-highlight, #0073aa);
    outline-offset: 2px;
}

.sf-thumb-link {
    display: block;
    text-decoration: none !important;
    color: inherit;
    padding: 0;
}

.sf-thumb img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

/* Thumbnail title and price removed */

.sf-hero-link {
    display: block;
    text-decoration: none !important;
    color: inherit;
    height: 100%;
}

.sf-hero-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 5/3;
    overflow: hidden;
}

.sf-hero-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.sf-hero-link:hover .sf-hero-image-wrapper img {
    transform: scale(1.03);
}

.sf-hero-content {
    position: absolute;
    bottom: 15px;
    right: 15px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 6px;
    text-align: right;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 10;
}

.sf-hero-title {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--global-palette3, #333);
}

/* Price and Button removed from hero */

/* Animations */
.sf-fade-in {
    animation: sfFadeIn 0.3s forwards;
}

@keyframes sfFadeIn {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

/* Breakpoints */
@media (max-width: 992px) {
    .sf-homepage-component {
        grid-template-columns: 100px 1fr;
    }
}

@media (max-width: 768px) {
    /* Tablet layout: Hero on top, thumbs in a grid below */
    .sf-homepage-component {
        display: flex;
        flex-direction: column;
    }
    
    .sf-homepage-hero {
        order: 1;
        margin-bottom: 20px;
    }
    
    .sf-homepage-hero .sf-hero-image-wrapper {
        aspect-ratio: 16/9;
    }
    
    .sf-homepage-thumbnails {
        order: 2;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .sf-thumb-link {
        text-align: center;
    }
    
    .sf-thumb img {
        width: 100%;
        height: auto;
        aspect-ratio: 1/1;
    }
}

@media (max-width: 480px) {
    /* Mobile: Hero on top, horizontal scrolling thumbs */
    .sf-homepage-thumbnails {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 15px;
        gap: 15px;
        -webkit-overflow-scrolling: touch;
    }
    
    .sf-thumb {
        flex: 0 0 70%;
        scroll-snap-align: start;
    }
    
    .sf-thumb img {
        aspect-ratio: 1/1;
    }
}
