/* ============================================================
   TREM DE LOUCO — style.css
   Identidade visual moderna mineira
   ============================================================ */

/* ---------- VARIÁVEIS ---------- */
:root {
    --tdl-primary: #D4541A;
    --tdl-primary-dark: #B8441A;
    --tdl-dark: #1A1A1A;
    --tdl-dark-soft: #2C2C2C;
    --tdl-gray: #6C757D;
    --tdl-light: #F5F3F0;
    --tdl-white: #FFFFFF;
    --tdl-border: #E0DED9;
    --tdl-shadow: 0 2px 15px rgba(0,0,0,0.08);
    --tdl-radius: 10px;
}

/* ---------- BASE ---------- */
html {
    scroll-behavior: smooth;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--tdl-light);
    color: var(--tdl-dark);
    font-size: 16px;
    line-height: 1.6;
}

a {
    transition: color 0.2s ease, opacity 0.2s ease;
}

img {
    max-width: 100%;
}

/* ---------- NAVBAR ---------- */
.navbar-tdl {
    background: #F3F0F0 !important;
    border-bottom: 3px solid var(--tdl-primary);
    padding: 0.6rem 0;
    box-shadow: 0 1px 8px rgba(0,0,0,.07);
}
.navbar-tdl .navbar-collapse {
    background: #F3F0F0;
}

.navbar-tdl .navbar-brand img {
    height: 61px;
    width: auto;
    transition: height 0.3s ease;
}
.navbar-tdl {
    transition: padding 0.3s ease, box-shadow 0.3s ease;
}
.navbar-tdl.scrolled {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.12);
}
.navbar-tdl.scrolled .navbar-brand img {
    height: 37px;
}

.navbar-tdl .nav-link {
    color: #2c2c2c;
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    transition: color 0.2s ease;
}

.navbar-tdl .nav-link:hover,
.navbar-tdl .nav-link:focus {
    color: var(--tdl-primary);
}

.navbar-tdl .nav-link.active {
    color: var(--tdl-primary);
}

.navbar-tdl .dropdown-menu {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: var(--tdl-radius);
    padding: 0.5rem 0;
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

.navbar-tdl .dropdown-item {
    color: #2c2c2c;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.navbar-tdl .dropdown-item:hover,
.navbar-tdl .dropdown-item:focus {
    background: rgba(212, 84, 26, 0.08);
    color: var(--tdl-primary);
}

.navbar-tdl .dropdown-divider {
    border-color: #eee;
}

.navbar-tdl .navbar-toggler {
    border: none;
    box-shadow: none;
    padding: 0.5rem 0.65rem;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---------- BOTÕES ---------- */
.btn-tdl-primary {
    background: var(--tdl-primary);
    color: var(--tdl-white);
    border: 2px solid var(--tdl-primary);
    border-radius: 6px;
    font-weight: 700;
    padding: 0.45rem 1.1rem;
    font-size: 0.9rem;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-tdl-primary:hover,
.btn-tdl-primary:focus {
    background: var(--tdl-primary-dark);
    border-color: var(--tdl-primary-dark);
    color: var(--tdl-white);
    transform: translateY(-1px);
}

.btn-tdl-primary:active {
    transform: translateY(0);
}

.btn-tdl-outline {
    background: transparent;
    color: var(--tdl-primary);
    border: 1.5px solid var(--tdl-primary);
    border-radius: 6px;
    font-weight: 600;
    padding: 0.45rem 1.1rem;
    font-size: 0.9rem;
    transition: background 0.2s ease, color 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-tdl-outline:hover,
.btn-tdl-outline:focus {
    background: var(--tdl-primary);
    border-color: var(--tdl-primary);
    color: #fff;
}

.btn-tdl-lg {
    width: 100%;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    justify-content: center;
}

/* ---------- HERO ---------- */
.hero-section {
    background: linear-gradient(135deg, #1A1A1A 0%, #2C2C2C 100%);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 84, 26, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-title {
    color: var(--tdl-white);
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.hero-title .highlight {
    color: var(--tdl-primary);
}

.hero-subtitle {
    color: #bbb;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.hero-search .input-group {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.hero-search .form-control {
    border: none;
    padding: 0.9rem 1.25rem;
    font-size: 1rem;
    background: var(--tdl-white);
    border-radius: 0;
}

.hero-search .form-control:focus {
    box-shadow: none;
    outline: none;
}

.hero-search .btn-search {
    background: var(--tdl-primary);
    color: var(--tdl-white);
    border: none;
    padding: 0 1.75rem;
    font-weight: 700;
    font-size: 0.95rem;
    transition: background 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hero-search .btn-search:hover {
    background: var(--tdl-primary-dark);
    color: var(--tdl-white);
}

.hero-tabs {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.hero-tab {
    flex: 1;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 2px solid transparent;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.hero-tab.ofereco {
    background: var(--tdl-primary);
    color: var(--tdl-white);
    border-color: var(--tdl-primary);
}

.hero-tab.ofereco:hover {
    background: var(--tdl-primary-dark);
    border-color: var(--tdl-primary-dark);
    color: var(--tdl-white);
}

.hero-tab.procuro {
    background: rgba(255,255,255,0.1);
    color: var(--tdl-white);
    border-color: rgba(255,255,255,0.3);
}

.hero-tab.procuro:hover {
    background: rgba(255,255,255,0.18);
    color: var(--tdl-white);
    border-color: rgba(255,255,255,0.5);
}

.hero-tab.todos {
    background: rgba(255,255,255,0.08);
    color: var(--tdl-white);
    border-color: rgba(255,255,255,0.15);
}

.hero-tab.todos:hover {
    background: rgba(255,255,255,0.14);
    color: var(--tdl-white);
    border-color: rgba(255,255,255,0.3);
}

.hero-stats {
    margin-top: 2rem;
    display: flex;
    gap: 2rem;
}

.hero-stat {
    color: #aaa;
    font-size: 0.88rem;
}

.hero-stat strong {
    color: var(--tdl-primary);
    font-size: 1.1rem;
    display: block;
}

/* ---------- SECTIONS ---------- */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tdl-dark);
    margin-bottom: 0;
}

.section-link {
    color: var(--tdl-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.section-link:hover {
    color: var(--tdl-primary-dark);
    text-decoration: underline;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

/* ---------- CATEGORY CARDS ---------- */
.cat-card {
    background: var(--tdl-white);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
    box-shadow: var(--tdl-shadow);
}

.cat-card:hover {
    border-color: var(--tdl-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 84, 26, 0.15);
    text-decoration: none;
}

.cat-icon {
    font-size: 2.2rem;
    color: var(--tdl-primary);
    display: block;
    margin-bottom: 0.6rem;
    line-height: 1;
}

.cat-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--tdl-dark);
    display: block;
    margin-bottom: 0.2rem;
}

.cat-count {
    font-size: 0.8rem;
    color: var(--tdl-gray);
}

/* ---------- AD CARDS ---------- */
.ad-card {
    background: var(--tdl-white);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--tdl-border);
    transition: all 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ad-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.ad-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.ad-card-img-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #f0eeeb 0%, #e8e5e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #ccc;
}

.ad-card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ad-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.4rem;
    gap: 0.5rem;
}

.ad-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--tdl-dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
    flex: 1;
}

.ad-title:hover {
    color: var(--tdl-primary);
}

.ad-price {
    color: var(--tdl-primary);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
    display: block;
}

.ad-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.6rem;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.ad-location {
    color: var(--tdl-gray);
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.ad-time {
    color: #aaa;
    font-size: 0.78rem;
}

.ad-card-actions {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--tdl-border);
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ---------- BADGES ---------- */
.badge-oferece {
    background: #1a6e3c;
    color: var(--tdl-white);
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 10px;
    display: inline-block;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.badge-procura {
    background: #1a3d6e;
    color: var(--tdl-white);
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 10px;
    display: inline-block;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* ---------- WHATSAPP BUTTON ---------- */
.btn-whatsapp {
    background: #25D366;
    color: var(--tdl-white);
    border: none;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.4rem 0.85rem;
    text-decoration: none;
    transition: background 0.2s ease;
}

.btn-whatsapp:hover,
.btn-whatsapp:focus {
    background: #1da851;
    color: var(--tdl-white);
}

/* ---------- HOW IT WORKS ---------- */
.how-it-works {
    background: var(--tdl-dark);
    color: var(--tdl-white);
    padding: 70px 0;
}

.how-it-works .section-title {
    color: var(--tdl-white);
}

.how-step {
    text-align: center;
    padding: 2rem 1rem;
}

.how-step-icon {
    width: 70px;
    height: 70px;
    background: var(--tdl-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1.25rem;
    color: var(--tdl-white);
}

.how-step h4 {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--tdl-white);
    margin-bottom: 0.5rem;
}

.how-step p {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.how-step-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.2);
    font-size: 1.5rem;
    padding-top: 1.5rem;
}

/* ---------- CTA SECTION ---------- */
.cta-section {
    background: var(--tdl-primary);
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -60%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.cta-section h2 {
    color: var(--tdl-white);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.cta-section p {
    color: rgba(255,255,255,0.85);
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.btn-cta-white {
    background: var(--tdl-white);
    color: var(--tdl-primary);
    border: 2px solid var(--tdl-white);
    border-radius: 8px;
    font-weight: 700;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-cta-white:hover,
.btn-cta-white:focus {
    background: transparent;
    color: var(--tdl-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* ---------- FOOTER ---------- */
footer {
    background: var(--tdl-dark);
    color: #aaa;
    padding: 50px 0 25px;
}

.footer-brand {
    color: var(--tdl-white);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 1rem;
}

.footer-brand span {
    color: var(--tdl-primary);
}

.footer-brand:hover {
    color: var(--tdl-white);
}

footer h6 {
    color: var(--tdl-white);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.82rem;
    margin-bottom: 1rem;
}

footer p {
    font-size: 0.88rem;
    color: #aaa;
    line-height: 1.7;
}

footer a {
    color: #aaa;
    text-decoration: none;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s ease;
    line-height: 2;
}

footer a:hover,
footer a:focus {
    color: var(--tdl-primary);
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-divider {
    border-color: #333;
    margin: 1.5rem 0 1.25rem;
}

.footer-bottom {
    font-size: 0.82rem;
    color: #666;
}

.footer-bottom p {
    font-size: 0.82rem;
    color: #666;
    margin: 0;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2c2c2c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: #aaa;
    transition: background 0.2s ease, color 0.2s ease;
    line-height: 1;
}

.footer-social a:hover {
    background: var(--tdl-primary);
    color: var(--tdl-white);
}

/* ---------- FORMS ---------- */
.tdl-card {
    background: var(--tdl-white);
    border-radius: 12px;
    border: 1px solid var(--tdl-border);
    padding: 2rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--tdl-primary);
    box-shadow: 0 0 0 0.2rem rgba(212, 84, 26, 0.15);
}

.form-label {
    font-weight: 600;
    color: #444;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.form-control,
.form-select {
    border-radius: 8px;
    border-color: var(--tdl-border);
    padding: 0.55rem 0.85rem;
    font-size: 0.95rem;
    background-color: var(--tdl-white);
    color: var(--tdl-dark);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-text {
    font-size: 0.8rem;
    color: var(--tdl-gray);
}

/* ---------- STATUS BADGES ---------- */
.status-ativo,
.status-aguardando,
.status-pausado,
.status-vendido,
.status-bloqueado,
.status-expirado {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.status-ativo {
    background: #d4edda;
    color: #155724;
}

.status-aguardando {
    background: #fff3cd;
    color: #856404;
}

.status-pausado {
    background: #e2e3e5;
    color: #495057;
}

.status-vendido {
    background: #d1ecf1;
    color: #0c5460;
}

.status-bloqueado {
    background: #f8d7da;
    color: #721c24;
}

.status-expirado {
    background: #e2e3e5;
    color: #6c757d;
}

/* ---------- PAGE HEADER ---------- */
.page-header {
    background: var(--tdl-dark);
    padding: 2.5rem 0;
    margin-bottom: 2rem;
}

.page-header h1 {
    color: var(--tdl-white);
    font-weight: 800;
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
}

.page-header p {
    color: #aaa;
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* ---------- ADMIN SIDEBAR ---------- */
.admin-sidebar {
    background: var(--tdl-dark);
    min-height: 100vh;
    padding: 1.5rem 0;
}

.admin-sidebar .admin-logo {
    padding: 0.5rem 1.5rem 1.5rem;
    border-bottom: 1px solid #2a2a2a;
    margin-bottom: 1rem;
}

.admin-sidebar .nav-link {
    color: #aaa;
    padding: 0.65rem 1.5rem;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: var(--tdl-white);
    background: rgba(212, 84, 26, 0.15);
    border-left-color: var(--tdl-primary);
}

.admin-sidebar .nav-link i {
    font-size: 1rem;
    width: 18px;
    text-align: center;
}

.admin-sidebar .sidebar-section-title {
    color: #555;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1rem 1.5rem 0.25rem;
}

/* ---------- STATS CARDS ---------- */
.stat-card {
    background: var(--tdl-white);
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid var(--tdl-primary);
    box-shadow: var(--tdl-shadow);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--tdl-dark);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--tdl-gray);
    font-size: 0.85rem;
    font-weight: 500;
}

.stat-card.green { border-left-color: #1a6e3c; }
.stat-card.blue  { border-left-color: #1a3d6e; }
.stat-card.yellow { border-left-color: #856404; }
.stat-card.red   { border-left-color: #721c24; }

/* ---------- USER PANEL SIDEBAR ---------- */
.painel-sidebar {
    background: var(--tdl-white);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--tdl-border);
}

.painel-sidebar .user-info {
    padding: 0.75rem;
    border-bottom: 1px solid var(--tdl-border);
    margin-bottom: 0.75rem;
}

.painel-sidebar .user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--tdl-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.painel-sidebar .nav-link {
    color: var(--tdl-dark);
    padding: 0.65rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.painel-sidebar .nav-link:hover {
    background: rgba(212, 84, 26, 0.07);
    color: var(--tdl-primary);
}

.painel-sidebar .nav-link.active {
    background: rgba(212, 84, 26, 0.1);
    color: var(--tdl-primary);
    font-weight: 600;
}

.painel-sidebar .nav-link i {
    font-size: 1rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* ---------- TYPE SELECTOR ---------- */
.type-selector {
    display: flex;
    gap: 1rem;
}

.type-btn {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--tdl-border);
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    background: var(--tdl-white);
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--tdl-dark);
}

.type-btn:hover {
    border-color: var(--tdl-gray);
    background: var(--tdl-light);
}

.type-btn i {
    display: block;
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
}

.type-btn.type-selected {
    border-color: #28a745;
    border-width: 2px;
    background: #f0fff4;
    box-shadow: 0 0 0 3px #28a74522;
}

/* ---------- PHOTO UPLOAD ---------- */
.photo-upload-area {
    border: 2px dashed var(--tdl-border);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    background: var(--tdl-white);
}

.photo-upload-area:hover,
.photo-upload-area.dragover {
    border-color: var(--tdl-primary);
    background: rgba(212, 84, 26, 0.04);
}

.photo-upload-area i {
    font-size: 2.5rem;
    color: var(--tdl-gray);
    display: block;
    margin-bottom: 0.75rem;
}

.photo-upload-area p {
    color: var(--tdl-gray);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.photo-upload-area small {
    color: #aaa;
    font-size: 0.8rem;
}

.photo-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.photo-preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--tdl-light);
    border: 1px solid var(--tdl-border);
}

.photo-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0,0,0,0.7);
    color: var(--tdl-white);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0;
    line-height: 1;
    transition: background 0.2s ease;
}

.photo-remove-btn:hover {
    background: rgba(220, 53, 69, 0.9);
}

.photo-main-badge {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: var(--tdl-primary);
    color: white;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
}

/* ---------- FAVORITE BUTTON ---------- */
.btn-favoritar {
    background: transparent;
    border: none;
    color: #ccc;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    line-height: 1;
    transition: color 0.2s ease, transform 0.15s ease;
}

.btn-favoritar.ativo,
.btn-favoritar:hover {
    color: #e74c3c;
}

.btn-favoritar.ativo {
    transform: scale(1.1);
}

/* ---------- ALERTS ---------- */
.alert-tdl-success {
    background: #d4edda;
    border: none;
    border-left: 4px solid #28a745;
    border-radius: 8px;
    color: #155724;
}

.alert-tdl-error {
    background: #f8d7da;
    border: none;
    border-left: 4px solid #dc3545;
    border-radius: 8px;
    color: #721c24;
}

.alert-tdl-info {
    background: #d1ecf1;
    border: none;
    border-left: 4px solid #17a2b8;
    border-radius: 8px;
    color: #0c5460;
}

.alert-tdl-warning {
    background: #fff3cd;
    border: none;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
    color: #856404;
}

/* ---------- PAGINATION ---------- */
.pagination .page-link {
    color: var(--tdl-primary);
    border-color: var(--tdl-border);
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background: rgba(212, 84, 26, 0.08);
    border-color: var(--tdl-primary);
    color: var(--tdl-primary);
}

.pagination .page-item.active .page-link {
    background: var(--tdl-primary);
    border-color: var(--tdl-primary);
    color: var(--tdl-white);
}

.pagination .page-item.disabled .page-link {
    color: #ccc;
    border-color: var(--tdl-border);
}

/* ---------- MISC ---------- */
.tdl-loading {
    display: none;
    text-align: center;
    padding: 2rem;
    color: var(--tdl-gray);
}

.tdl-loading.active {
    display: block;
}

.no-image {
    background: linear-gradient(135deg, #f0eeeb 0%, #e8e5e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.tdl-divider {
    border-color: var(--tdl-border);
}

.text-primary-tdl {
    color: var(--tdl-primary) !important;
}

.bg-primary-tdl {
    background: var(--tdl-primary) !important;
}

/* Filtros de busca */
.filter-card {
    background: var(--tdl-white);
    border-radius: 12px;
    border: 1px solid var(--tdl-border);
    padding: 1.5rem;
    position: sticky;
    top: 80px;
}

.filter-card h6 {
    font-weight: 700;
    color: var(--tdl-dark);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--tdl-border);
}

/* Anúncio detalhe */
.ad-detail-images .main-image {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--tdl-light);
}

.ad-detail-images .thumb-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.ad-detail-images .thumb-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.ad-detail-images .thumb-item.active {
    border-color: var(--tdl-primary);
}

.ad-detail-images .thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Anuncio info card */
.ad-info-card {
    background: var(--tdl-white);
    border-radius: 12px;
    border: 1px solid var(--tdl-border);
    padding: 1.5rem;
    position: sticky;
    top: 80px;
}

.ad-info-card .price-display {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--tdl-primary);
    margin-bottom: 1rem;
}

/* Table styles */
.table-tdl th {
    background: var(--tdl-light);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--tdl-gray);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid var(--tdl-border);
}

.table-tdl td {
    vertical-align: middle;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--tdl-border);
}

.table-tdl tr:hover td {
    background: rgba(212, 84, 26, 0.03);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 3.5rem;
    color: #ddd;
    display: block;
    margin-bottom: 1rem;
}

.empty-state h4 {
    font-weight: 700;
    color: var(--tdl-dark);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--tdl-gray);
    font-size: 0.9rem;
}

/* Input group custom */
.input-group-tdl {
    position: relative;
}

.input-group-tdl .form-control {
    padding-left: 2.5rem;
}

.input-group-tdl .input-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tdl-gray);
    z-index: 5;
    pointer-events: none;
}

/* Character counter */
.char-counter {
    font-size: 0.78rem;
    color: var(--tdl-gray);
    text-align: right;
    margin-top: 0.25rem;
}

.char-counter.warning {
    color: #856404;
}

.char-counter.danger {
    color: #721c24;
}

/* Spinner override */
.spinner-tdl {
    color: var(--tdl-primary);
}

/* Skip link acessibilidade */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--tdl-primary);
    color: white;
    padding: 8px 16px;
    z-index: 9999;
    border-radius: 0 0 4px 0;
    font-weight: 700;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
    color: white;
}

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 992px) {
    .admin-sidebar {
        min-height: auto;
    }

    .filter-card {
        position: static;
    }

    .ad-info-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-section {
        padding: 50px 0 40px;
    }

    .hero-tabs {
        flex-direction: column;
    }

    .hero-tab {
        flex: none;
        width: 100%;
    }

    .hero-stats {
        gap: 1.25rem;
    }

    .type-btn {
        padding: .75rem .5rem;
        font-size: .85rem;
    }

    .page-header h1 {
        font-size: 1.4rem;
    }

    .page-header {
        padding: 1.75rem 0;
    }

    .cta-section h2 {
        font-size: 1.6rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .how-it-works {
        padding: 45px 0;
    }

    .how-step {
        padding: 1.25rem 0.5rem;
    }

    .tdl-card {
        padding: 1.25rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .ad-detail-images .main-image {
        height: 260px;
    }

    .footer-brand {
        font-size: 1.1rem;
    }

    .d-none-mobile {
        display: none !important;
    }

    .photo-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.7rem;
    }

    .btn-tdl-primary,
    .btn-tdl-outline {
        font-size: 0.85rem;
        padding: 0.4rem 0.85rem;
    }

    .ad-card-img,
    .ad-card-img-placeholder {
        height: 175px;
    }

    .navbar-tdl .navbar-brand img {
        height: 51px;
    }
    .navbar-tdl.scrolled .navbar-brand img {
        height: 31px;
    }
}

/* ================================================================
   SPONSOR FLOATING TABS — desktop (xl+)
   ================================================================ */
@media (max-width: 1199.98px) {
    .sponsor-tab { display: none !important; }
}

.sponsor-tab {
    position: fixed;
    z-index: 1020;
    display: flex;
    align-items: stretch;
    background: #fff;
    box-shadow: 0 6px 28px rgba(0,0,0,.16), 0 1px 6px rgba(0,0,0,.08);
    transition: transform .32s cubic-bezier(.22,.68,0,1.1);
    overflow: hidden;
}

.sponsor-tab-left {
    left: 0;
    border-radius: 0 16px 16px 0;
    border-right: 4px solid #D4541A;
    flex-direction: row;
    transform: translateX(calc(-100% + 72px));
}

.sponsor-tab-right {
    right: 0;
    border-radius: 16px 0 0 16px;
    border-left: 4px solid #D4541A;
    flex-direction: row-reverse;
    transform: translateX(calc(100% - 72px));
}

.sponsor-tab-left:hover  { transform: translateX(0); }
.sponsor-tab-right:hover { transform: translateX(0); }

.sponsor-tab-logo {
    width: 72px;
    min-width: 72px;
    height: 112px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 8px;
    background: #fafafa;
}

.sponsor-tab-logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid #ebebeb;
    background: #fff;
    padding: 3px;
}

.sponsor-tab-logo .bi {
    font-size: 1.6rem;
    color: #D4541A;
}

.sponsor-tab-logo .sp-tab-label {
    font-size: .5rem;
    font-weight: 800;
    color: #D4541A;
    letter-spacing: .08em;
    text-transform: uppercase;
    line-height: 1;
    text-align: center;
}

.sponsor-tab-panel {
    width: 260px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: #fff;
}

.sponsor-tab-banner {
    width: 100%;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2px;
}

.sponsor-tab-info strong {
    display: block;
    font-size: .84rem;
    font-weight: 700;
    color: #111;
    line-height: 1.2;
}

.sponsor-tab-info p {
    margin: 3px 0 0;
    font-size: .72rem;
    color: #555;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.sponsor-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 5px;
    padding: 5px 12px;
    font-size: .7rem;
    color: #fff;
    font-weight: 700;
    background: #D4541A;
    border-radius: 20px;
    text-decoration: none;
    width: fit-content;
    transition: background .15s;
    letter-spacing: .01em;
}

.sponsor-tab-btn:hover { background: #b33d10; color: #fff; text-decoration: none; }

/* ================================================================
   SPONSOR MOBILE GRID
   ================================================================ */
.sponsor-grid-mobile {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (min-width: 480px) {
    .sponsor-grid-mobile { grid-template-columns: repeat(6, 1fr); }
}

.sponsor-mobile-card {
    border: 1px solid #ebebeb;
    border-top: 3px solid #D4541A;
    border-radius: 0 0 12px 12px;
    background: #fff;
    padding: 14px 8px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    transition: box-shadow .2s, transform .2s;
    min-height: 100px;
}

.sponsor-mobile-card:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,.1);
    transform: translateY(-3px);
    border-top-color: #b33d10;
}

.sponsor-mobile-card img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    background: #fafafa;
    padding: 2px;
}

.sponsor-mobile-card .sp-placeholder {
    width: 52px;
    height: 52px;
    background: #D4541A15;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sponsor-mobile-card .sp-name {
    margin-top: 8px;
    font-size: .7rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.25;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.sponsor-mobile-card .sp-cta {
    margin-top: 5px;
    font-size: .62rem;
    color: #D4541A;
    font-weight: 600;
}
