/* Home page scoped overrides to refine layout without bloating global stylesheet */

/* Hero layout: text left, stats stacked vertically on the right */
.hero-content {
    grid-template-columns: 1fr 280px;
    align-items: center;
}

.hero-stats {
    display: grid;
    grid-auto-rows: max-content;
    gap: 30px;
    justify-items: center;
}

/* Search + sort layout: inline on desktop, stacked on mobile */
.chips-showcase .search-sort-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}

/* Tighten input padding when no search icon wrapper is used */
.chips-showcase .search-input {
    padding: 18px 24px;
    border-radius: 50px;
}

/* Match select height and appearance to input */
.chips-showcase .sort-select {
    height: 56px;
    padding: 0 16px;
    border-radius: 50px;
    padding-right: 40px; /* Ensure space for custom arrow */
    
    /* Safari-specific fixes for home page */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    /* Custom dropdown arrow for home page */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
}

/* Grid density and card media size on home page */
.chips-showcase .chips-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 22px;
}

.chips-showcase .chip-image {
    width: 150px;
    height: 150px;
}

/* Remove hover overlay emphasis; actions are visible below */
.chips-showcase .chip-card .chip-overlay { display: none; }

/* No-results heading alignment with existing styles (HTML uses h3) */
.no-chips h3 {
    color: #ffffff;
    font-size: 1.5rem;
    margin: 15px 0 10px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
    .hero-stats {
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
        justify-content: center;
        gap: 16px;
    }
    .chips-showcase .search-sort-form {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .chips-showcase .sort-select {
        height: 52px;
    }
    .chips-showcase .chips-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 16px;
    }
    .chips-showcase .chip-image {
        width: 130px;
        height: 130px;
    }
}

@media (max-width: 480px) {
    .chips-showcase .chips-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 14px;
    }
    .chips-showcase .chip-image {
        width: 115px;
        height: 115px;
    }
}


