:root {
    --bg: #0f0f14;
    --bg-card: #18181f;
    --bg-alt: #131318;
    --sidebar-bg: #0c0c12;
    --border: #2a2a35;
    --text: #f2f2f7;
    --text-muted: #9494a8;
    --gold: #cf3163;
    --gold-light: #e8457a;
    --accent: #cf3163;
    --primary: var(--gold);
    --primary-dark: #a82550;
    --success: #00b894;
    --danger: #e17055;
    --whatsapp: #25d366;
    --radius: 10px;
    --shadow: 0 8px 32px rgba(0,0,0,.45);
    --header-h: 56px;
    --sidebar-w: 260px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; transition: color .2s, opacity .2s; }
a:hover { color: var(--gold-light); }

.container { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 16px; }

/* ===== LAYOUT ===== */
.app-layout { display: flex; min-height: 100vh; width: 100%; }

.site-sidebar {
    position: fixed; inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    z-index: 300;
    transform: translateX(0);
    transition: transform .28s ease;
}

.sidebar-inner {
    display: flex; flex-direction: column;
    height: 100%; padding: 16px 0;
    overflow: hidden;
}

.sidebar-logo {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 20px 16px;
    font-weight: 700; font-size: 1.05rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
    flex-shrink: 0;
}
.sidebar-logo .logo-img { height: 34px; width: auto; max-width: 150px; object-fit: contain; }
.sidebar-logo .logo-icon { color: var(--gold); font-size: 1.15rem; }

.sidebar-nav {
    flex: 1; overflow-y: auto; padding: 4px 10px;
    -webkit-overflow-scrolling: touch;
}

.sidebar-section { margin-top: 4px; }
.sidebar-section-title {
    display: block; padding: 10px 12px 4px;
    font-size: .68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .1em; color: var(--text-muted);
}

.sidebar-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 8px;
    color: var(--text-muted); font-size: .875rem; font-weight: 500;
    transition: background .15s, color .15s;
    margin-bottom: 1px;
}
.sidebar-link:hover { background: rgba(207,49,99,.1); color: var(--text); }
.sidebar-link.active { background: rgba(207,49,99,.18); color: var(--gold); }
.sidebar-link svg { flex-shrink: 0; opacity: .75; }
.sidebar-link.active svg { opacity: 1; stroke: var(--gold); }
.sidebar-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border); flex-shrink: 0; }
.sidebar-link.active .sidebar-dot { background: var(--gold); }
.sidebar-link span:not(.sidebar-dot) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-link small {
    font-size: .72rem; color: var(--text-muted);
    background: var(--bg-card); padding: 2px 7px; border-radius: 10px; flex-shrink: 0;
}
.sidebar-link.active small { background: rgba(207,49,99,.25); color: var(--gold-light); }

.sidebar-footer { padding: 12px 10px 0; border-top: 1px solid var(--border); flex-shrink: 0; }
.sidebar-apply-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 12px; border: none; border-radius: 8px;
    background: linear-gradient(135deg, var(--gold), var(--primary-dark));
    color: #fff; font-weight: 600; font-size: .875rem; cursor: pointer;
}

.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.6); z-index: 290;
    opacity: 0; transition: opacity .28s;
}
.sidebar-overlay.active { display: block; opacity: 1; }

.app-main {
    flex: 1; min-width: 0;
    margin-left: var(--sidebar-w);
    display: flex; flex-direction: column;
    min-height: 100vh;
}

/* ===== TOPBAR ===== */
.site-topbar {
    position: sticky; top: 0; z-index: 200;
    background: rgba(15,15,20,.92);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.topbar-inner {
    display: flex; align-items: center;
    min-height: var(--header-h); padding: 0 16px; gap: 12px;
}

.sidebar-toggle {
    display: none; flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 40px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 8px;
    cursor: pointer; padding: 8px; flex-shrink: 0;
}
.sidebar-toggle span { display: block; width: 100%; height: 2px; background: var(--text); border-radius: 2px; }

.topbar-logo {
    display: none; align-items: center;
    font-weight: 700; font-size: 1rem; color: var(--text);
}
.topbar-logo .logo-img { height: 28px; width: auto; }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.btn-apply {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 8px; border: none;
    background: linear-gradient(135deg, var(--gold), var(--primary-dark));
    color: #fff; font-weight: 600; font-size: .875rem; cursor: pointer;
}

.fab-apply {
    display: none; position: fixed;
    bottom: calc(16px + env(safe-area-inset-bottom)); right: 16px;
    z-index: 180; align-items: center; gap: 8px;
    padding: 14px 20px; border: none; border-radius: 50px;
    background: linear-gradient(135deg, var(--gold), var(--primary-dark));
    color: #fff; font-weight: 700; font-size: .875rem; cursor: pointer;
    box-shadow: 0 6px 24px rgba(207,49,99,.45);
}

#main-content { flex: 1; width: 100%; }

/* ===== HERO ===== */
.hero {
    padding: 40px 0 32px; text-align: center;
    background: radial-gradient(ellipse at 50% -20%, rgba(207,49,99,.12) 0%, transparent 65%);
}
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.5rem); font-weight: 700; margin-bottom: 10px; line-height: 1.2; }
.hero-sub { color: var(--text-muted); font-size: .95rem; max-width: 520px; margin: 0 auto 24px; }
.hero-stats { display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; }
.stat strong { display: block; font-size: 1.4rem; color: var(--gold); font-weight: 700; }
.stat span { font-size: .78rem; color: var(--text-muted); }

/* ===== SECTIONS ===== */
.section { padding: 36px 0; }
.section-alt { background: var(--bg-alt); }
.section-header { margin-bottom: 24px; }
.section-header h2 { font-size: 1.35rem; font-weight: 700; margin-bottom: 4px; }
.section-header p { color: var(--text-muted); font-size: .875rem; }

/* ===== MODEL GRID ===== */
.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.model-card {
    display: block; background: var(--bg-card);
    border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--border);
    color: var(--text);
    transition: transform .2s, border-color .2s, box-shadow .2s;
}
.model-card:hover {
    transform: translateY(-3px);
    border-color: rgba(207,49,99,.45);
    box-shadow: var(--shadow);
    color: var(--text);
}

.model-card-image { position: relative; aspect-ratio: 3/4; overflow: hidden; background: var(--bg-alt); }
.model-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.model-card:hover .model-card-image img { transform: scale(1.05); }

.model-card-placeholder {
    display: flex; align-items: center; justify-content: center;
    height: 100%; font-size: 2.5rem; color: var(--gold); opacity: .25;
}

.badge {
    position: absolute; top: 8px; padding: 3px 8px;
    border-radius: 4px; font-size: .62rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em;
}
.badge-verified { left: 8px; background: var(--success); color: #fff; }
.badge-featured { right: 8px; background: var(--gold); color: #fff; }

.model-card-body { padding: 10px 12px 12px; }
.model-name { font-size: .9rem; font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model-meta { display: flex; flex-wrap: wrap; gap: 4px; font-size: .72rem; color: var(--text-muted); }
.model-meta span:not(:last-child)::after { content: '·'; margin-left: 4px; }
.model-location { font-size: .72rem; color: var(--text-muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.model-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tag { padding: 2px 7px; border-radius: 4px; font-size: .62rem; background: rgba(207,49,99,.14); color: var(--gold-light); }

/* ===== CATEGORY GRID ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.category-card {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px; background: var(--bg-card);
    border-radius: var(--radius); border: 1px solid var(--border);
    color: var(--text); transition: border-color .2s, background .2s;
}
.category-card:hover { border-color: var(--gold); background: rgba(207,49,99,.06); color: var(--text); }
.category-card h3 { font-size: 1rem; color: var(--gold); margin-bottom: 2px; font-weight: 600; }
.category-card p { font-size: .8rem; color: var(--text-muted); line-height: 1.4; }
.category-count { font-size: .75rem; color: var(--text-muted); margin-top: 6px; display: block; }
.category-arrow { font-size: 1.2rem; color: var(--gold); opacity: .5; flex-shrink: 0; margin-left: 12px; }

/* ===== MODEL DETAIL ===== */
.model-detail { padding: 20px 0 40px; }

.breadcrumb { font-size: .78rem; color: var(--text-muted); margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--gold); }

.model-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }

.gallery-carousel { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--bg-card); touch-action: pan-y; }
.gallery-track { display: flex; transition: transform .3s ease; }
.gallery-slide { flex: 0 0 100%; min-width: 100%; }
.gallery-slide img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.gallery-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border-radius: 50%; border: none;
    background: rgba(0,0,0,.65); color: #fff; font-size: 1.3rem;
    cursor: pointer; z-index: 2;
}
.gallery-prev { left: 8px; }
.gallery-next { right: 8px; }
.gallery-counter {
    position: absolute; bottom: 10px; right: 10px;
    background: rgba(0,0,0,.65); color: #fff;
    padding: 3px 9px; border-radius: 20px; font-size: .72rem;
}
.gallery-dots { display: flex; justify-content: center; gap: 5px; margin-top: 10px; }
.gallery-dot { width: 7px; height: 7px; border-radius: 50%; border: none; background: var(--border); cursor: pointer; padding: 0; }
.gallery-dot.active { background: var(--gold); width: 20px; border-radius: 4px; }
.gallery-thumbs { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.gallery-thumb { flex-shrink: 0; width: 56px; height: 70px; border-radius: 6px; overflow: hidden; border: 2px solid transparent; cursor: pointer; padding: 0; background: none; }
.gallery-thumb.active { border-color: var(--gold); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-placeholder {
    aspect-ratio: 3/4; display: flex; align-items: center; justify-content: center;
    background: var(--bg-card); border-radius: var(--radius);
    font-size: 3rem; color: var(--gold); opacity: .25;
}

.model-info-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.model-info-header h1 { font-size: clamp(1.4rem, 3vw, 1.85rem); font-weight: 700; line-height: 1.2; }
.model-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.model-badges .badge { position: static; }

.info-grid {
    background: var(--bg-card); border-radius: var(--radius);
    border: 1px solid var(--border); padding: 4px 16px; margin-bottom: 16px;
}
.info-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 11px 0; border-bottom: 1px solid var(--border); gap: 12px;
}
.info-item:last-child { border-bottom: none; }
.info-label { color: var(--text-muted); font-size: .78rem; flex-shrink: 0; }
.info-value { font-weight: 500; font-size: .85rem; text-align: right; }
.info-tags { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.info-tag {
    padding: 3px 9px; border-radius: 5px; font-size: .72rem; font-weight: 500;
    background: rgba(207,49,99,.12); color: var(--gold-light);
    border: 1px solid rgba(207,49,99,.2);
}

.model-tags-lg { margin-bottom: 16px; }
.model-bio { margin-bottom: 20px; }
.model-bio h2 { font-size: .95rem; margin-bottom: 6px; color: var(--gold); font-weight: 600; }
.model-bio p { color: var(--text-muted); line-height: 1.65; font-size: .875rem; }

.model-contact { display: flex; gap: 10px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 24px; border-radius: 8px; border: none;
    font-weight: 600; font-size: .9rem; cursor: pointer;
    transition: transform .2s, box-shadow .2s; font-family: var(--font);
}
.btn-primary { background: linear-gradient(135deg, var(--gold), var(--primary-dark)); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(207,49,99,.35); color: #fff; }
.btn-whatsapp { background: var(--whatsapp); color: #fff; width: 100%; padding: 15px 24px; font-size: .95rem; }
.btn-whatsapp:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(37,211,102,.35); color: #fff; }
.btn-lg { padding: 14px 28px; font-size: .95rem; }
.btn-block { width: 100%; }

/* ===== CTA / PAGE ===== */
.cta-section { text-align: center; padding: 48px 0; background: radial-gradient(ellipse at 50% 100%, rgba(207,49,99,.07) 0%, transparent 65%); }
.cta-section h2 { font-size: 1.35rem; margin-bottom: 6px; }
.cta-section p { color: var(--text-muted); margin-bottom: 20px; font-size: .9rem; }

.page-header { padding: 24px 0 12px; }
.page-header h1 { font-size: clamp(1.4rem, 3vw, 1.85rem); font-weight: 700; }
.page-desc { color: var(--text-muted); margin-top: 6px; font-size: .875rem; }

.pagination { display: flex; justify-content: center; gap: 5px; margin-top: 28px; flex-wrap: wrap; }
.page-link {
    padding: 8px 13px; border-radius: 8px; background: var(--bg-card);
    border: 1px solid var(--border); color: var(--text-muted); font-size: .85rem;
}
.page-link.active, .page-link:hover { border-color: var(--gold); color: var(--gold); }
.page-dots { padding: 8px; color: var(--text-muted); }

/* ===== FOOTER ===== */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 0 20px; margin-top: auto;
    background: var(--bg-alt); flex-shrink: 0;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.footer-brand p { color: var(--text-muted); margin-top: 10px; font-size: .85rem; line-height: 1.65; }
.footer-contact { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.footer-contact a { color: var(--text-muted); font-size: .85rem; }
.footer-social { display: flex; gap: 12px; margin-top: 10px; }
.footer-social a { font-size: .85rem; color: var(--gold); }
.footer-links h4 { font-size: .85rem; margin-bottom: 10px; color: var(--gold); font-weight: 600; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 5px; }
.footer-links a { color: var(--text-muted); font-size: .85rem; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { text-align: center; padding-top: 18px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: .78rem; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.logo-img { height: 32px; width: auto; max-width: 140px; object-fit: contain; }
.logo-icon { color: var(--gold); }

/* ===== MODAL ===== */
.modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,.78); backdrop-filter: blur(4px);
    align-items: flex-end; justify-content: center;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.modal-overlay.active { display: flex; }

.modal {
    background: var(--bg-card); border-radius: var(--radius) var(--radius) 0 0;
    border: 1px solid var(--border); width: 100%; max-width: 520px;
    max-height: 92vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.modal-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 18px 18px 0; position: sticky; top: 0;
    background: var(--bg-card); z-index: 1;
}
.modal-apply .apply-form { padding: 14px 18px 22px; }
.modal-close {
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--bg);
    color: var(--text-muted); font-size: 1.2rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.modal h2 { font-size: 1.15rem; }
.modal-subtitle { color: var(--text-muted); font-size: .82rem; margin-top: 2px; }

.photo-upload {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 20px; border: 2px dashed var(--border); border-radius: var(--radius);
    cursor: pointer; text-align: center;
}
.photo-upload-text { font-size: .82rem; color: var(--text-muted); }
.photo-preview { max-width: 100%; max-height: 130px; border-radius: 8px; object-fit: cover; }

body.modal-open, body.sidebar-open { overflow: hidden; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: .78rem; color: var(--text-muted); margin-bottom: 5px; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 11px 13px; border-radius: 8px;
    border: 1px solid var(--border); background: var(--bg);
    color: var(--text); font-size: 16px; font-family: var(--font); outline: none;
}
.form-group textarea { font-size: .875rem; resize: vertical; min-height: 72px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--gold); }

.form-message { padding: 10px; border-radius: 8px; margin-bottom: 10px; font-size: .85rem; display: none; }
.form-message.success { display: block; background: rgba(0,184,148,.15); color: var(--success); }
.form-message.error { display: block; background: rgba(225,112,85,.15); color: var(--danger); }

.error-page, .empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.error-page h1 { font-size: 3rem; color: var(--gold); margin-bottom: 10px; }

/* ===== RESPONSIVE ===== */
@media (min-width: 769px) {
    .modal-overlay { align-items: center; padding: 20px; }
    .modal { border-radius: var(--radius); max-height: 88vh; }
    .container { padding: 0 24px; }
    .model-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
}

@media (min-width: 1025px) {
    .sidebar-toggle { display: none; }
    .topbar-logo { display: none; }
    .site-topbar .btn-apply { display: none; }
    .fab-apply { display: none; }
    .site-topbar { display: none; }
    .app-main { margin-left: var(--sidebar-w); }
}

@media (max-width: 1024px) {
    .site-sidebar { transform: translateX(-100%); }
    .site-sidebar.open { transform: translateX(0); }
    .app-main { margin-left: 0; }
    .sidebar-toggle { display: flex; }
    .topbar-logo { display: flex; flex: 1; }
    .site-topbar .btn-apply { display: none; }
    .fab-apply { display: flex; }
}

@media (max-width: 768px) {
    .model-detail-grid { grid-template-columns: 1fr; gap: 20px; }
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
    .site-footer { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
    .form-row { grid-template-columns: 1fr; }
    .model-contact {
        position: sticky; bottom: 0; z-index: 50;
        background: var(--bg); padding: 12px 0;
        margin: 0 -16px; padding-left: 16px; padding-right: 16px;
        border-top: 1px solid var(--border);
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 480px) {
    .model-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .model-card-body { padding: 8px 10px 10px; }
    .fab-apply span { display: none; }
    .fab-apply { width: 50px; height: 50px; border-radius: 50%; padding: 0; justify-content: center; }
}

@media (min-width: 481px) and (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
