/**
 * Yellow Pages — home layout, amber primary
 */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --yp-primary: #f59e0b;
    --yp-primary-light: #fbbf24;
    --yp-primary-dark: #d97706;
    --yp-soft: #fffbeb;
    --yp-bg: #f8fafc;
    --yp-card: #ffffff;
    --yp-text: #0f172a;
    --yp-muted: #64748b;
    --yp-border: #e2e8f0;
    --yp-success: #10b981;
    --yp-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
    --yp-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.03);
    --yp-shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
    --yp-radius: 14px;
    --yp-radius-lg: 18px;
    --yp-font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
    --yp-font-body: 'Inter', system-ui, sans-serif;
}

html { height: 100%; }
body {
    min-height: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.yp-page {
    font-family: var(--yp-font-body);
    background: var(--yp-bg);
    color: var(--yp-text);
    flex: 1 0 auto;
}

.yp-page .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
}

.yp-hero {
    background: linear-gradient(135deg, var(--yp-primary) 0%, var(--yp-primary-dark) 100%);
    padding: 48px 0 72px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.yp-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -12%;
    width: 48%;
    height: 180%;
    background: rgba(255, 255, 255, 0.08);
    transform: rotate(18deg);
    pointer-events: none;
}

.yp-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

.yp-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    font-size: 0.85rem;
}
.yp-breadcrumb a { color: rgba(255, 255, 255, 0.8); text-decoration: none; }
.yp-breadcrumb a:hover { color: #fff; }
.yp-breadcrumb span { color: rgba(255, 255, 255, 0.45); }
.yp-breadcrumb .current { color: #fff; }

.yp-hero h1 {
    font-family: var(--yp-font-display);
    font-size: clamp(1.75rem, 4vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
}

.yp-hero p {
    margin: 0 0 14px;
    max-width: 36rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.55;
    font-size: 1.02rem;
}

.yp-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.yp-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 0.82rem;
    font-weight: 600;
}

.yp-search-wrapper {
    margin-top: -48px;
    position: relative;
    z-index: 4;
    padding: 0 15px 8px;
}

.yp-search-card {
    background: var(--yp-card);
    border: 1px solid var(--yp-border);
    border-radius: var(--yp-radius-lg);
    padding: 20px 22px;
    box-shadow: var(--yp-shadow-lg);
    max-width: 960px;
    margin: 0 auto;
}

.yp-search-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.yp-search-input-wrapper {
    flex: 1;
    min-width: 220px;
    position: relative;
}

.yp-search-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--yp-muted);
}

.yp-search-input {
    width: 100%;
    border: 1px solid var(--yp-border);
    border-radius: 12px;
    padding: 13px 16px 13px 42px;
    font-size: 1rem;
    background: var(--yp-bg);
    color: var(--yp-text);
}

.yp-search-input:focus {
    outline: none;
    border-color: var(--yp-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.yp-category-select {
    min-width: 180px;
    border: 1px solid var(--yp-border);
    border-radius: 12px;
    padding: 13px 14px;
    font-size: 0.95rem;
    background: var(--yp-bg);
    color: var(--yp-text);
    cursor: pointer;
}

.yp-category-select:focus {
    outline: none;
    border-color: var(--yp-primary);
    background: #fff;
}

.yp-stats-bar {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--yp-border);
}

.yp-stat { text-align: center; }
.yp-stat-value {
    font-family: var(--yp-font-display);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--yp-primary-dark);
    line-height: 1.1;
}
.yp-stat-label {
    font-size: 0.72rem;
    color: var(--yp-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    margin-top: 4px;
}

.yp-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 16px;
}

.yp-category-pill {
    background: var(--yp-bg);
    border: 1px solid var(--yp-border);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--yp-muted);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.yp-category-pill:hover {
    border-color: var(--yp-primary);
    color: var(--yp-primary-dark);
}

.yp-category-pill.active {
    background: var(--yp-primary);
    border-color: var(--yp-primary);
    color: #fff;
}

.yp-category-pill .count {
    background: rgba(15, 23, 42, 0.08);
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 0.72rem;
    margin-left: 4px;
}

.yp-category-pill.active .count { background: rgba(255, 255, 255, 0.22); }

.yp-content {
    max-width: 1140px;
    margin: 0 auto;
    padding: 24px 15px 64px;
}

.yp-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.yp-results-count {
    font-size: 0.92rem;
    color: var(--yp-muted);
}

.yp-results-count strong { color: var(--yp-text); font-weight: 800; }

.yp-view-toggle {
    display: flex;
    gap: 4px;
    background: var(--yp-card);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--yp-border);
}

.yp-view-btn {
    width: 38px;
    height: 34px;
    border: 0;
    background: transparent;
    border-radius: 8px;
    color: var(--yp-muted);
    cursor: pointer;
}

.yp-view-btn.active {
    background: var(--yp-primary);
    color: #fff;
}

.yp-grid {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

.yp-grid.active { display: grid; }

.yp-contact-card {
    background: var(--yp-card);
    border-radius: var(--yp-radius);
    padding: 18px;
    box-shadow: var(--yp-shadow-sm);
    border: 1px solid var(--yp-border);
    border-left: 4px solid var(--yp-primary);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.yp-contact-card:hover {
    box-shadow: var(--yp-shadow-md);
    transform: translateY(-2px);
}

.yp-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.yp-avatar {
    width: 46px;
    height: 46px;
    background: var(--yp-soft);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--yp-primary-dark);
    flex-shrink: 0;
}

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

.yp-card-name {
    font-family: var(--yp-font-display);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--yp-text);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yp-card-shop {
    font-size: 0.84rem;
    color: var(--yp-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yp-card-category {
    background: var(--yp-soft);
    color: var(--yp-primary-dark);
    font-size: 0.68rem;
    font-weight: 800;
    padding: 4px 9px;
    border-radius: 999px;
    letter-spacing: 0.03em;
    white-space: nowrap;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yp-card-phone {
    background: var(--yp-bg);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.yp-phone-number {
    font-size: 1rem;
    font-weight: 700;
    color: var(--yp-text);
    letter-spacing: 0.02em;
}

.yp-phone-number i { color: var(--yp-primary); margin-right: 8px; }

.yp-copy-btn {
    background: #fff;
    border: 1px solid var(--yp-border);
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--yp-muted);
    cursor: pointer;
}

.yp-copy-btn:hover { border-color: var(--yp-primary); color: var(--yp-primary-dark); }
.yp-copy-btn.copied {
    background: var(--yp-success);
    border-color: var(--yp-success);
    color: #fff;
}

.yp-card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.yp-action-btn {
    flex: 1;
    padding: 10px 12px;
    border-radius: 11px;
    border: 0;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none;
}

.yp-action-btn.call { background: #ecfdf5; color: #047857; }
.yp-action-btn.call:hover { background: var(--yp-success); color: #fff; }
.yp-action-btn.whatsapp { background: #dcfce7; color: #15803d; }
.yp-action-btn.whatsapp:hover { background: #25d366; color: #fff; }
.yp-action-btn.disabled {
    background: var(--yp-bg);
    color: #94a3b8;
    cursor: default;
}

.yp-list { display: none; }
.yp-list.active { display: block; }

.yp-list-item {
    background: var(--yp-card);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 8px;
    box-shadow: var(--yp-shadow-sm);
    border: 1px solid var(--yp-border);
    display: flex;
    align-items: center;
    gap: 14px;
}

.yp-list-item:hover { border-color: var(--yp-primary-light); }

.yp-list-avatar {
    width: 42px;
    height: 42px;
    background: var(--yp-soft);
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--yp-primary-dark);
    flex-shrink: 0;
}

.yp-list-info { flex: 1; min-width: 0; }
.yp-list-name { font-weight: 800; color: var(--yp-text); }
.yp-list-shop { font-size: 0.84rem; color: var(--yp-muted); }

.yp-list-category {
    background: var(--yp-soft);
    color: var(--yp-primary-dark);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
}

.yp-list-phone {
    font-weight: 700;
    color: var(--yp-text);
    min-width: 120px;
    text-align: right;
}

.yp-list-actions { display: flex; gap: 6px; }

.yp-list-action {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.yp-list-action.call { background: #ecfdf5; color: #047857; }
.yp-list-action.call:hover { background: var(--yp-success); color: #fff; }
.yp-list-action.whatsapp { background: #dcfce7; color: #16a34a; }
.yp-list-action.whatsapp:hover { background: #25d366; color: #fff; }

.yp-loading, .yp-empty {
    text-align: center;
    padding: 56px 20px;
    color: var(--yp-muted);
    background: var(--yp-card);
    border: 1px solid var(--yp-border);
    border-radius: var(--yp-radius-lg);
}

.yp-loading i, .yp-empty i {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--yp-primary);
}

.yp-empty i { opacity: 0.7; }

footer.bg-dark { margin-top: auto; }

@media (max-width: 768px) {
    .yp-hero { padding: 32px 0 64px; }
    .yp-search-row { flex-direction: column; }
    .yp-search-input-wrapper, .yp-category-select { min-width: 100%; width: 100%; }
    .yp-stats-bar { gap: 16px; }
    .yp-categories {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }
    .yp-category-pill { flex-shrink: 0; }
    .yp-grid { grid-template-columns: 1fr; }
    .yp-list-item { flex-wrap: wrap; }
    .yp-list-phone {
        width: 100%;
        text-align: left;
        margin-top: 4px;
    }
    .yp-list-actions { margin-left: auto; }
    .yp-results-header { flex-wrap: wrap; }
}
