/* ===================================
   BUSCA REGIONAL - STYLES
   =================================== */

:root {
    --orange: #E8690A;
    --orange-dark: #c95a08;
    --orange-light: #fef3ec;
    --blue: #1a73e8;
    --dark: #1a1a2e;
    --text: #333;
    --muted: #6c757d;
    --border: #e8e8e8;
    --bg-light: #f8f9fa;
    --shadow: 0 2px 15px rgba(0,0,0,.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,.15);
    --radius: 12px;
    --radius-sm: 8px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: #fff;
    overflow-x: hidden;
}

/* ---- UTILITIES ---- */
.text-orange { color: var(--orange) !important; }
.bg-orange { background-color: var(--orange) !important; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* ---- BUTTONS ---- */
.btn-orange {
    background-color: var(--orange);
    border-color: var(--orange);
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all .25s;
}
.btn-orange:hover, .btn-orange:focus {
    background-color: var(--orange-dark);
    border-color: var(--orange-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(232,105,10,.35);
}
.btn-outline-orange {
    border-color: var(--orange);
    color: var(--orange);
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all .25s;
}
.btn-outline-orange:hover {
    background-color: var(--orange);
    color: #fff;
}

/* ---- NAVBAR ---- */
.navbar {
    padding: 12px 0;
    z-index: 1030;
}
.navbar-brand { font-weight: 700; text-decoration: none; }

.logo-icon {
    width: 38px;
    height: 38px;
    background: var(--orange);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}
.logo-text {
    font-size: 18px;
    font-weight: 800;
    color: var(--orange);
    letter-spacing: -.3px;
}

.nav-link {
    color: var(--text) !important;
    font-weight: 500;
    padding: 8px 14px !important;
    border-radius: var(--radius-sm);
    transition: all .2s;
}
.nav-link:hover, .nav-link.active {
    color: var(--orange) !important;
    background: var(--orange-light);
}

.dropdown-item:hover { color: var(--orange); background: var(--orange-light); }
.dropdown-menu { border-radius: var(--radius); }

.avatar-xs {
    width: 26px; height: 26px;
    background: var(--orange);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 12px;
}

/* ---- HERO ---- */
.hero-section {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2013 50%, #3d2a0d 100%);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: url('https://images.unsplash.com/photo-1548199973-03cce0bbc87b?w=1600&q=20') center/cover;
    opacity: .3;
}

.hero-map {
    position: absolute;
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
    width: 55%;
    max-width: 650px;
    opacity: .12;
}

.hero-logo {
    width: 140px;
    height: 140px;
    background: var(--orange);
    border-radius: 50% 50% 50% 10% / 50% 50% 10% 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 64px;
    margin: 0 auto 24px;
    box-shadow: 0 20px 60px rgba(232,105,10,.4);
    animation: float 3s ease-in-out infinite;
    position: relative;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.hero-logo::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 20px;
    background: var(--orange-dark);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    border-radius: 0 0 4px 4px;
}

.hero-title {
    font-size: clamp(18px, 3vw, 26px);
    font-weight: 400;
    color: rgba(255,255,255,.9);
    margin-bottom: 32px;
    text-shadow: 0 2px 10px rgba(0,0,0,.3);
}

.hero-search-box {
    background: #fff;
    border-radius: var(--radius);
    padding: 6px;
    display: flex;
    gap: 6px;
    box-shadow: 0 10px 40px rgba(0,0,0,.3);
    max-width: 700px;
    margin: 0 auto;
}

.hero-search-box .form-control {
    border: none;
    outline: none;
    box-shadow: none;
    font-size: 15px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
}
.hero-search-box .form-control:focus { box-shadow: none; }

.hero-search-box .form-select {
    border: none;
    border-left: 1px solid var(--border);
    border-radius: 0;
    font-size: 14px;
    min-width: 160px;
    box-shadow: none;
}
.hero-search-box .form-select:focus { box-shadow: none; }

.hero-search-box .btn {
    padding: 10px 24px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

/* ---- SECTION TITLES ---- */
.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}
.section-title-divider {
    width: 50px;
    height: 4px;
    background: var(--orange);
    border-radius: 2px;
    margin: 0 auto 12px;
}
.section-subtitle {
    color: var(--muted);
    font-size: 15px;
}

/* ---- CATEGORY CARDS ---- */
.cat-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all .3s;
    aspect-ratio: 16/9;
    text-decoration: none;
    display: block;
}
.cat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}
.cat-card img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.cat-card:hover img { transform: scale(1.08); }

.cat-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.1) 55%, transparent 100%);
}
.cat-card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 12px;
}
.cat-card-count {
    display: inline-block;
    background: var(--orange);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 20px;
    margin-bottom: 4px;
}
.cat-card-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

/* ---- AD CARDS ---- */
.ad-card {
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all .3s;
    height: 100%;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    background: #fff;
    color: var(--text);
}
.ad-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    color: var(--text);
}
.ad-card-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}
.ad-card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.ad-card:hover .ad-card-img img { transform: scale(1.06); }

.ad-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.ad-card-destaque {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #FFD700;
    color: #333;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
}
.ad-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.ad-card-cat {
    font-size: 12px;
    color: var(--orange);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
}
.ad-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ad-card-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ad-card-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
}

/* ---- FEATURED SLIDER ---- */
.featured-section { background: var(--bg-light); }

.swiper { padding-bottom: 40px !important; }
.swiper-pagination-bullet-active { background: var(--orange) !important; }
.swiper-button-next, .swiper-button-prev {
    color: var(--orange) !important;
    background: #fff;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    box-shadow: var(--shadow);
}
.swiper-button-next::after, .swiper-button-prev::after { font-size: 14px !important; font-weight: 900 !important; }

/* ---- AD DETAIL ---- */
.ad-detail-img {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.ad-detail-img img {
    width: 100%;
    height: 380px;
    object-fit: cover;
}

/* Galeria de fotos (entre descrição e mapa) */
.ad-photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
@media (max-width: 768px) {
    .ad-photo-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .ad-photo-gallery-grid { grid-template-columns: 1fr; }
}
.ad-photo-gallery-item {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #f0f2f5;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    transition: transform .2s, box-shadow .2s;
}
.ad-photo-gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.ad-photo-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ad-photo-gallery-zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.35);
    color: #fff;
    font-size: 22px;
    opacity: 0;
    transition: opacity .2s;
}
.ad-photo-gallery-item:hover .ad-photo-gallery-zoom { opacity: 1; }
.gallery-lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    background: rgba(0,0,0,.5);
    padding: 6px 14px;
    border-radius: 20px;
}
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,.88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 56px;
}
.gallery-lightbox:not(.d-none) { display: flex; }
.gallery-lightbox img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}
.gallery-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    opacity: .85;
}
.gallery-lightbox-close:hover { opacity: 1; }
.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 18px;
}
.gallery-lightbox-nav:hover { background: rgba(255,255,255,.3); }
.gallery-lightbox-prev { left: 16px; }
.gallery-lightbox-next { right: 16px; }
.ad-sidebar-card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.ad-sidebar-card .card-header {
    background: var(--orange);
    color: #fff;
    font-weight: 700;
    border: none;
}
.contact-btn {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    transition: all .25s;
}
.contact-btn:hover { transform: translateY(-2px); opacity: .9; }
.contact-whatsapp { background: #25D366; color: #fff; border: none; }
.contact-phone { background: var(--orange); color: #fff; border: none; }
.contact-email { background: #fff; color: var(--dark); border: 2px solid var(--border); }
.contact-email:hover { border-color: var(--orange); color: var(--orange); }

/* ---- SEARCH PAGE ---- */
.search-filters {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 24px;
}

/* ---- BREADCRUMB ---- */
.breadcrumb-section {
    background: var(--bg-light);
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.breadcrumb { margin: 0; font-size: 13px; }
.breadcrumb-item a { color: var(--orange); text-decoration: none; }
.breadcrumb-item.active { color: var(--muted); }

/* ---- FORMS ---- */
.form-control:focus, .form-select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 .2rem rgba(232,105,10,.15);
}
.form-label { font-weight: 600; font-size: 14px; color: var(--dark); }

/* ---- AUTH PAGES ---- */
.auth-wrapper {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2013 100%);
    padding: 40px 0;
}
.auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    padding: 40px;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .logo-icon { width: 60px; height: 60px; font-size: 28px; margin: 0 auto 12px; }
.auth-title { font-size: 24px; font-weight: 700; color: var(--dark); text-align: center; margin-bottom: 4px; }
.auth-subtitle { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 28px; }

/* ---- PAINEL ---- */
.painel-sidebar {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.painel-sidebar .nav-link {
    padding: 12px 20px !important;
    border-radius: 0 !important;
    border-left: 3px solid transparent;
    font-weight: 500;
}
.painel-sidebar .nav-link:hover, .painel-sidebar .nav-link.active {
    background: var(--orange-light) !important;
    border-left-color: var(--orange);
    color: var(--orange) !important;
}
.painel-sidebar .nav-link i { width: 20px; }

.stat-card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    background: #fff;
    transition: all .3s;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.stat-icon {
    width: 54px; height: 54px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

/* ---- ADMIN ---- */
.admin-wrapper { background: #f0f2f5; min-height: 100vh; }
.admin-sidebar {
    width: 260px;
    background: var(--dark);
    min-height: 100vh;
    position: fixed;
    top: 0; left: 0;
    z-index: 1040;
    transition: transform .3s;
}
.admin-logo {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.admin-nav .nav-link {
    color: rgba(255,255,255,.7);
    padding: 12px 20px;
    border-radius: 0;
    transition: all .2s;
    font-weight: 500;
    border-left: 3px solid transparent;
}
.admin-nav .nav-link:hover, .admin-nav .nav-link.active {
    color: #fff;
    background: rgba(232,105,10,.2);
    border-left-color: var(--orange);
}
.admin-nav .nav-link i { width: 22px; }
.admin-content {
    margin-left: 260px;
    padding: 30px;
}
.admin-topbar {
    background: #fff;
    padding: 12px 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    border-radius: var(--radius);
}

/* ---- STATS ---- */
.stats-bar {
    background: var(--dark);
    color: rgba(255,255,255,.8);
    padding: 10px 0;
    font-size: 14px;
}
.stats-bar .stat-item { display: flex; align-items: center; gap: 8px; }
.stats-bar .stat-num { color: var(--orange); font-weight: 700; font-size: 18px; }

/* ---- TABLE ---- */
.table-custom { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table-custom thead th { background: var(--dark); color: #fff; border: none; font-weight: 600; }
.table-custom tbody tr:hover { background: var(--orange-light); }

/* ---- PAGINATION ---- */
.page-link {
    color: var(--orange);
    border-color: var(--border);
    border-radius: var(--radius-sm) !important;
    margin: 0 2px;
}
.page-item.active .page-link { background: var(--orange); border-color: var(--orange); }
.page-link:hover { color: var(--orange-dark); background: var(--orange-light); }

/* ---- FOOTER ---- */
.footer { background: var(--dark); color: rgba(255,255,255,.8); }
.footer-top { border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-title {
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; font-size: 14px; }
.footer-links a { color: rgba(255,255,255,.7); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--orange); }
.footer-bottom { background: rgba(0,0,0,.2); }
.footer-bottom a { color: rgba(255,255,255,.6); text-decoration: none; }
.footer-bottom a:hover { color: var(--orange); }

.social-btn {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: rgba(255,255,255,.1);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.7);
    text-decoration: none;
    transition: all .2s;
    font-size: 14px;
}
.social-btn:hover { background: var(--orange); color: #fff; transform: translateY(-3px); }
.social-btn.whatsapp:hover { background: #25D366; }

/* ---- BACK TO TOP ---- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px; height: 44px;
    background: var(--orange);
    color: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(232,105,10,.4);
    cursor: pointer;
    opacity: 0;
    transition: all .3s;
    z-index: 999;
    display: flex; align-items: center; justify-content: center;
}
.back-to-top.show { opacity: 1; }
.back-to-top:hover { transform: translateY(-4px); }

/* ---- BADGES ---- */
.badge-orange { background: var(--orange); color: #fff; }
.status-ativo { background: #d4edda; color: #155724; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.status-pendente { background: #fff3cd; color: #856404; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.status-inativo { background: #f8d7da; color: #721c24; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }

/* ---- IMAGE UPLOAD PREVIEW ---- */
.img-preview-box {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
}
.img-preview-box:hover { border-color: var(--orange); background: var(--orange-light); }
.img-preview-box img { max-height: 200px; border-radius: var(--radius-sm); }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .hero-section { min-height: 420px; }
    .hero-logo { width: 100px; height: 100px; font-size: 44px; }
    .hero-search-box { flex-direction: column; }
    .hero-search-box .form-select { border-left: none; border-top: 1px solid var(--border); }
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.show { transform: translateX(0); }
    .admin-content { margin-left: 0; padding: 16px; }
    .auth-card { padding: 24px; }
}

@media (max-width: 576px) {
    .section-title { font-size: 22px; }
    .hero-title { font-size: 16px; }
}
