/* =============================================
   Rivage Showrooms Locator  |  #ba9765
   ============================================= */

:root {
    --sr-gold:      #ba9765;
    --sr-gold-dark: #a07a4e;
    --sr-dark:      #1a1a1a;
    --sr-text:      #374151;
    --sr-muted:     #6b7280;
    --sr-border:    #e5e7eb;
    --sr-bg:        #f9fafb;
}

.rivage-showrooms-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: inherit;
}

/* ── Tabs — full width equal blocks ─────────────────────────────────── */
.showrooms-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border: 1.5px solid var(--sr-border);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.showrooms-tab {
    flex: 1;
    padding: 14px 10px;
    border: none;
    border-right: 1.5px solid var(--sr-border);
    background: #fff;
    color: var(--sr-muted);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    letter-spacing: 0.01em;
    text-align: center;
    white-space: nowrap;
}

.showrooms-tab:last-child {
    border-right: none;
}

.showrooms-tab:hover:not(.active) {
    background: #fdf8f2;
    color: var(--sr-gold);
}

.showrooms-tab.active {
    background: var(--sr-gold);
    color: #fff;
    font-weight: 700;
}

/* ── Sidebar filter header — sits above the scroll area ─────────────── */
.sidebar-filters {
    flex-shrink: 0;
    padding: 14px 18px;
    border-bottom: 1.5px solid #ede8e0;
    background: #fdfaf6;
    margin: 15px;
}

.sidebar-filter-row {
    display: flex;
    gap: 12px;
}

.sidebar-filter-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-filter-item label {
    font-weight: 700;
    color: var(--sr-gold);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.sidebar-filter-item select,
#filter-country,
#filter-city {
    width: 100% !important;
    padding: 9px 12px !important;
    border: 1px solid #b99765 !important;
    border-radius: 5px !important;
    background: #fff !important;
    color: #333 !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    word-wrap: normal;
    box-sizing: border-box;
    height: 34px;
}

.sidebar-filter-item select:hover,
#filter-country:hover,
#filter-city:hover {
    border-color: var(--sr-gold-dark) !important;
}

.sidebar-filter-item select:focus,
#filter-country:focus,
#filter-city:focus {
    outline: none !important;
    border-color: var(--sr-gold) !important;
    box-shadow: 0 0 0 3px rgba(186,151,101,0.15) !important;
}

/* ── Layout: sidebar + map ───────────────────────────────────────────── */
.showrooms-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 0;
    border: 1.5px solid var(--sr-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
    min-height: 640px;
}

/* ── Sidebar wrapper: filters fixed on top, list scrolls below ──────── */
.showrooms-sidebar-wrap {
    display: flex;
    flex-direction: column;
    border-right: 1.5px solid var(--sr-border);
    background: #fff;
    min-height: 640px;
    max-height: 740px;
    overflow: hidden;
}

/* ── Sidebar scrollable list ─────────────────────────────────────────── */
.showrooms-sidebar {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.showrooms-list {
    display: flex;
    flex-direction: column;
}

/* ── Card ────────────────────────────────────────────────────────────── */
.showroom-card {
    padding: 22px 24px 0;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s ease;
    position: relative;
}

.showroom-card:last-child {
    border-bottom: none;
}

.showroom-card:hover {
    background: #fdf8f2;
}

.showroom-card.active {
    background: #fdf6ee;
    border-left: 3px solid var(--sr-gold);
}

.showroom-card-inner {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.showroom-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: var(--sr-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-top: 2px;
}

.showroom-icon svg {
    width: 22px;
    height: 22px;
}

.showroom-card.active .showroom-icon {
    background: var(--sr-gold);
}

.showroom-info {
    flex: 1;
    min-width: 0;
}

.showroom-name {
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
    line-height: 1.3;
}

.showroom-address {
    color: var(--sr-muted);
    margin: 0 0 8px;
    line-height: 1.5;
}

.showroom-phone {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--sr-text);
    text-decoration: none;
    margin-bottom: 7px;
    font-weight: 600;
}

.showroom-phone svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.showroom-phone:hover {
    color: var(--sr-gold);
}

.showroom-hours {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    color: var(--sr-muted);
    margin: 0;
    line-height: 1.5;
}

.showroom-hours svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Card footer */
.showroom-card-footer {
    padding: 12px 0 18px;
}

.showroom-directions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--sr-gold);
    text-decoration: none;
    transition: opacity 0.2s;
}

.showroom-directions svg {
    width: 16px;
    height: 16px;
}

.showroom-directions:hover {
    opacity: 0.75;
}

/* No results */
.showrooms-no-results {
    padding: 48px 24px;
    text-align: center;
    color: var(--sr-muted);
    font-size: 0.9375rem;
}

/* ── Map panel ───────────────────────────────────────────────────────── */
.showrooms-map-panel {
    position: relative;
    background: #f1f5f9;
    min-height: 640px;
}

.showrooms-map-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 640px;
}

#showroom-map-iframe {
    width: 100%;
    height: 100%;
    min-height: 640px;
    border: none;
    display: block;
}

.map-overlay-label {
    position: absolute;
    bottom: 24px;
    left: 24px;
    background: rgba(26, 26, 26, 0.88);
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    pointer-events: none;
    backdrop-filter: blur(6px);
    letter-spacing: 0.01em;
}

/* Map placeholder */
.map-no-location {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 640px;
    gap: 16px;
    color: #c4c9d4;
    font-size: 0.9375rem;
}

.map-no-location svg {
    width: 72px;
    height: 72px;
    opacity: 0.4;
}

/* Empty state */
.showrooms-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--sr-muted);
    font-size: 1rem;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .showrooms-layout {
        grid-template-columns: 380px 1fr;
    }
}

@media (max-width: 900px) {
    .showrooms-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 420px;
    }

    .showrooms-sidebar-wrap {
        border-right: none;
        border-bottom: 1.5px solid var(--sr-border);
        max-height: 400px;
        min-height: unset;
    }

    .showrooms-map-panel,
    .showrooms-map-container,
    #showroom-map-iframe,
    .map-no-location {
        min-height: 420px;
    }

    .showrooms-filters {
        flex-wrap: wrap;
    }

    .filter-select-wrap {
        flex: 1;
        min-width: 140px;
    }
}

@media (max-width: 600px) {
    .showrooms-tab {
        font-size: 0.75rem;
        padding: 12px 6px;
    }

    .showroom-name { font-size: 1rem; }

    .showroom-address,
    .showroom-phone,
    .showroom-directions { font-size: 0.875rem; }

    .showroom-hours { font-size: 0.8125rem; }
}
