/* ========================================
   Wahnbuechlein Directory — Brand Design
   Universal text: #3a3a3a body, #1a1a1a heads
   ======================================== */

/* --- Hero Section — light & airy --- */
.hw-directory-hero {
    position: relative;
    background: #faf8f5;
    overflow: visible;
    padding: 3.5em 1.5em 2.5em;
    text-align: center;
    border-bottom: 1px solid #f0ebe4;
    z-index: 10;
}
.hw-directory-hero-inner {
    position: relative;
    max-width: 580px;
    margin: 0 auto;
}
.hw-directory-hero h1 {
    font-family: 'Bodoni Moda', 'Georgia', serif;
    font-weight: 400;
    font-style: italic;
    color: #1a1a1a;
    font-size: 2rem;
    margin-bottom: 0.3em;
    letter-spacing: 0.01em;
}
.hw-directory-hero p {
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    color: #3a3a3a;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.8em;
}
@media (min-width: 48em) {
    .hw-directory-hero { padding: 4.5em 2em 3em; }
    .hw-directory-hero h1 { font-size: 2.5rem; }
}

/* --- Search Bar — button outside input --- */
.hw-search-bar {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    max-width: 480px;
    margin: 0 auto;
}
.hw-search-bar *,
.hw-search-bar *::before,
.hw-search-bar *::after {
    box-sizing: border-box;
}
.hw-search-bar input[type="text"] {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    border: 1px solid #e8e0d6 !important;
    outline: none !important;
    box-shadow: none !important;
    margin: 0;
    padding: 10px 14px;
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    font-size: 0.82rem;
    color: #3a3a3a;
    background: #fff !important;
    border-radius: 2px;
    -webkit-appearance: none;
    appearance: none;
    height: auto;
    line-height: normal;
}
.hw-search-bar input::placeholder { color: #737373; }
.hw-search-bar button {
    flex: 0 0 auto;
    position: relative;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    background: #ecc3ad !important;
    color: #1a1a1a !important;
    width: 38px;
    height: 38px;
    padding: 0 !important;
    cursor: pointer;
    transition: background 0.2s;
    -webkit-appearance: none !important;
    appearance: none !important;
    line-height: normal !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    font-size: 0 !important;
    overflow: hidden;
}
.hw-search-bar button svg {
    width: 15px;
    height: 15px;
    stroke: #1a1a1a !important;
    display: block !important;
    position: relative;
    z-index: 1;
}
.hw-search-bar button::before,
.hw-search-bar button::after {
    display: none !important;
    content: none !important;
}
.hw-search-bar button:hover { background: #d4a48e !important; }

/* --- Auto-suggest Dropdown --- */
.hw-suggest-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 46px;
    background: #fff;
    border: 1px solid #e8e0d6;
    border-top: none;
    border-radius: 0 0 2px 2px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    z-index: 100;
    max-height: 340px;
    overflow-y: auto;
}
.hw-suggest-dropdown.active { display: block; }
.hw-suggest-group-label {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #737373;
    padding: 10px 16px 4px;
}
.hw-suggest-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    text-decoration: none;
    color: #3a3a3a;
    transition: background 0.15s;
    cursor: pointer;
}
.hw-suggest-item:hover,
.hw-suggest-item.hw-suggest-active {
    background: #faf8f5;
}
.hw-suggest-item-label {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 0.82rem;
    color: #1a1a1a;
}
.hw-suggest-item-meta {
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    font-size: 0.7rem;
    color: #737373;
}
.hw-suggest-item-type {
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    font-size: 0.65rem;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex-shrink: 0;
    margin-left: 12px;
}

/* --- Region Filter (collapsible toggle) --- */
.hw-filters {
    padding: 1em 1.5em 0;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}
.hw-filters__toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    -webkit-appearance: none !important;
    appearance: none !important;
    background: transparent !important;
    border: 1px solid #ddd !important;
    border-radius: 20px !important;
    padding: 7px 18px !important;
    font-family: 'Lato', sans-serif !important;
    font-weight: 400 !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: #767676 !important;
    cursor: pointer;
    margin: 0 auto 1em;
    box-shadow: none !important;
    outline: none !important;
    transition: all 0.2s;
}
.hw-filters__toggle::before,
.hw-filters__toggle::after {
    display: none !important;
    content: none !important;
}
.hw-filters__toggle:hover {
    border-color: #ecc3ad !important;
    color: #a06840 !important;
}
.hw-filters__toggle[aria-expanded="true"] {
    background: #ecc3ad !important;
    border-color: #ecc3ad !important;
    color: #fff !important;
}
.hw-filters__toggle-icon {
    font-size: 0.6em;
    transition: transform 0.2s;
}
.hw-filters__toggle[aria-expanded="true"] .hw-filters__toggle-icon {
    transform: rotate(180deg);
}
.hw-filters__body {
    display: none;
    padding-top: 0.8em;
}
.hw-filters__body.open {
    display: block;
}
.hw-pill-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.hw-pill {
    display: inline-block;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #3a3a3a;
    border: 1px solid #ddd;
    padding: 5px 14px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s;
}
.hw-pill:hover {
    border-color: #ecc3ad;
    color: #d4a08a;
}

/* --- Featured Section --- */
.hw-featured-section {
    padding: 3em 1.5em;
    max-width: 1200px;
    margin: 0 auto;
}
.hw-section-header {
    text-align: center;
    margin-bottom: 2em;
}
.hw-section-header h2 {
    font-family: 'Bodoni Moda', 'Georgia', serif;
    font-weight: 400;
    font-style: italic;
    color: #1a1a1a;
    font-size: 1.6rem;
    margin-bottom: 0.3em;
}
.hw-section-header p {
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    color: #3a3a3a;
    font-size: 0.85rem;
}
.hw-featured-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 36em) { .hw-featured-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em) { .hw-featured-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 85em) { .hw-featured-grid { grid-template-columns: repeat(4, 1fr); } }

/* Featured Vendor Card — lookbook overlay style */
.hw-featured-card {
    position: relative;
    border-radius: 2px;
    overflow: hidden;
    background: #f5f5f5;
    transition: box-shadow 0.25s, transform 0.25s;
    text-decoration: none;
    display: block;
}
.hw-featured-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.hw-featured-card-img {
    position: relative;
    padding-top: 120%;
    overflow: hidden;
}
.hw-featured-card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.hw-featured-card:hover .hw-featured-card-img img {
    transform: scale(1.03);
}
.hw-featured-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 50%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.2em;
}
.hw-featured-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #d4a44a 0%, #c49a3c 50%, #b8912e 100%);
    color: #fff;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 2px;
    z-index: 2;
}
.hw-featured-card-cat {
    font-family: 'Lato', sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.8);
    margin-bottom: 0.25em;
}
.hw-featured-card-name {
    font-family: 'Bodoni Moda', 'Georgia', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 1.1rem;
    color: #fff;
    line-height: 1.3;
    margin: 0;
}

/* --- Category Grid --- */
.hw-category-section {
    padding: 2em 1.5em 3em;
    max-width: 1200px;
    margin: 0 auto;
}
.hw-category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (min-width: 48em) { .hw-category-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 64em) { .hw-category-grid { grid-template-columns: repeat(4, 1fr); } }

.hw-category-card {
    position: relative;
    display: block;
    text-decoration: none;
    border-radius: 2px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: #f5f5f5;
}
.hw-category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.hw-category-card:hover img {
    transform: scale(1.04);
}
.hw-category-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.03) 55%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1em;
}
.hw-category-card-overlay h3 {
    font-family: 'Bodoni Moda', 'Georgia', serif;
    font-weight: 400;
    font-style: italic;
    color: #fff;
    font-size: 1.05rem;
    margin: 0 0 2px;
    line-height: 1.2;
}
.hw-category-card-overlay span {
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.75);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
@media (min-width: 48em) {
    .hw-category-card-overlay h3 { font-size: 1.15rem; }
}

/* --- Footer CTA --- */
.hw-directory-footer-cta {
    text-align: center;
    padding: 3em 1.5em;
    background: #faf8f5;
    border-top: 1px solid #f0ebe4;
}
.hw-directory-footer-cta h2 {
    font-family: 'Bodoni Moda', 'Georgia', serif;
    font-weight: 400;
    font-style: italic;
    color: #1a1a1a;
    font-size: 1.5rem;
    margin-bottom: 0.4em;
}
.hw-directory-footer-cta p {
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    color: #3a3a3a;
    font-size: 0.9rem;
    max-width: 520px;
    margin: 0 auto 1.5em;
    line-height: 1.7;
}
.hw-directory-footer-cta .hw-cta-btn {
    display: inline-block;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: #ecc3ad;
    border: 1px solid #ecc3ad;
    padding: 12px 32px;
    text-decoration: none;
    transition: all 0.2s;
}
.hw-directory-footer-cta .hw-cta-btn:hover {
    background: #e0b19a;
    border-color: #e0b19a;
}

/* ========================================
   MOBILE OPTIMIZATIONS — less scroll to first vendor
   ======================================== */
@media (max-width: 47.99em) {
    /* Tighter hero */
    .hw-directory-hero {
        padding: 1.8em 1em 1.4em;
    }
    .hw-directory-hero h1 {
        font-size: 1.5rem;
        margin-bottom: 0.2em;
    }
    .hw-directory-hero p {
        font-size: 0.8rem;
        margin-bottom: 1.2em;
        line-height: 1.5;
    }

    /* Region pills — horizontal scroll instead of wrap */
    .hw-region-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        padding: 0.8em 1em;
        gap: 6px;
        scrollbar-width: none; /* Firefox */
    }
    .hw-region-pills::-webkit-scrollbar { display: none; }
    .hw-region-pill {
        flex-shrink: 0;
        font-size: 0.65rem;
        padding: 5px 12px;
    }

    /* Featured section — tighter, limit visible cards */
    .hw-featured-section {
        padding: 1.5em 1em;
    }
    .hw-featured-section .hw-section-header {
        margin-bottom: 1em;
    }
    .hw-featured-section .hw-section-header h2 {
        font-size: 1.2rem;
    }
    .hw-featured-section .hw-section-header p {
        font-size: 0.78rem;
    }
    /* Show only first 4 cards on mobile, hide the rest */
    .hw-featured-grid .hw-featured-card:nth-child(n+5) {
        display: none;
    }
    /* Shorter cards on mobile — 4:5 → closer to 3:4 */
    .hw-featured-card-img {
        padding-top: 100%;
    }

    /* Category section — tighter */
    .hw-category-section {
        padding: 1.2em 1em 2em;
    }
    .hw-category-section .hw-section-header {
        margin-bottom: 0.8em;
    }
    .hw-category-section .hw-section-header h2 {
        font-size: 1.2rem;
    }
    .hw-category-grid {
        gap: 10px;
    }
}
