:root {
    --site-bg: #FFE5D1;
    --card-bg: #FCFAF2;
    --header-bg: #f7f2dd;
    --text-dark: #333333;
    --text-muted: #554433;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    --selected-bg: #C9A174;
}

.card {
    background: var(--card-bg);
    width: 320px;
    height: 380px;
    border-radius: 24px;
    padding: 0;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.studio-name {
    flex: 0 0 60px;
    background: var(--header-bg);
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 1.65rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px 24px 0 0;
    margin: 0;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    line-height: 1.1;
    padding: 0 20px;
    box-sizing: border-box;
}

/* CORRECTED: Only long names get smaller font */
.studio-name[data-long-name] {
    font-size: 1.4rem;
}

.location {
    flex: 0 0 24px;
    font-weight: 300;
    color: var(--text-dark);
    line-height: 1.5;
    padding: 0 25px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 10px 0;
}

.shops {
    flex: 0 0 130px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 0 10px;
    overflow: visible;
    margin: 12px 0;
}

.shop-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 54px;
    background: none;
    padding: 0;
    border-radius: 12px;
    position: relative;
}

.shop-item.overflow {
    background: var(--header-bg);
    border-radius: 20px;
    padding: 0px 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.shop-label {
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    color: var(--text-muted);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-emoji {
    font-size: 1.8rem;
    margin-bottom: 2px;
}

.description {
    flex: 0 0 72px;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    font-weight: 300;
    line-height: 1.5;
    margin: 0 15px 10px;
    text-align: center;
    overflow: hidden;
}

.contact-icons {
    flex: 0 0 32px;
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0 auto;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--header-bg);
    font-size: 1rem;
    text-decoration: none;
    color: inherit;
}

.contact-icon:hover {
    transform: scale(1.1);
}

.filters {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 25px;
}

.filter-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* RESTORED original filter-panel styling (PRD §UI) */
.filter-panel {
    position: absolute;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px 20px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    width: auto;
    min-width: 0;
    overflow-x: hidden;
    z-index: 100;
    display: none;
}

/* FINALIZED overflow popup styling) */
.extra-shops-popup {
    position: absolute;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 8px 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    min-width: 120px;
    overflow: visible;
    z-index: 1000;
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    border: 1px solid rgba(0,0,0,0.08);
    pointer-events: auto;
}

.extra-shops-popup .extra-shop {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 0;
    gap: 2px;
    width: 100%;
}

.filter-pill {
    background: var(--header-bg);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: all 0.2s;
}

.filter-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.nav-button {
    background: none;
    border: 2px solid var(--selected-bg);
    color: var(--selected-bg);
    font-size: 2.2rem;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.nav-button:hover {
    background: var(--selected-bg);
    color: var(--card-bg);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(201, 161, 116, 0.25);
}

.neighborhood-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 300px;
    overflow-y: auto;
    width: 100%;
}

.neighborhood-label {
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.neighborhood-emoji {
    font-size: 1.4rem;
}

.neighborhood-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    cursor: pointer;
    padding: 6px 0;
    border-radius: 12px;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.neighborhood-option.active {
    background: var(--selected-bg);
    color: white;
}

.rolodex-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 40px 0;
}

.scroll-emoji {
    font-size: 0.5em;
    vertical-align: middle;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.shop-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.2s;
}

.shop-option.active {
    background: var(--selected-bg);
    color: white;
}

body {
    background: var(--site-bg);
    color: var(--text-dark);
    font-family: 'Roboto', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

h1 {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 4.5rem;
    line-height: 1.05;
    margin-bottom: 16px;
    color: var(--text-dark);
    letter-spacing: -0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
