* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #f26522;
    --primary-dark: #d45500;
    --primary-light: #fff3ec;
    --secondary: #0d1f4e;
    --bg: #f5f5f5;
    --white: #ffffff;
    --gray-100: #f9f9f9;
    --gray-200: #e8e8e8;
    --gray-300: #d1d1d1;
    --gray-400: #a0a0a0;
    --gray-500: #6b6b6b;
    --gray-600: #4a4a4a;
    --green: #00a651;
    --red: #e74c3c;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--secondary);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 16px;
}

/* ==================== HEADER ==================== */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow: visible;
}

.header-top .container {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    position: relative;
    overflow: visible;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
}

.logo-icon { font-size: 1.6rem; }

.logo-text {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-center { flex: 1; position: relative; }

.search-bar {
    display: flex;
    background: var(--gray-100);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,103,0,0.15);
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 16px;
    font-size: 0.95rem;
    outline: none;
}

.search-btn {
    background: var(--primary);
    border: none;
    color: var(--white);
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.search-btn:hover { background: var(--primary-dark); }

.filter-icon-btn {
    background: var(--gray-100);
    border: none;
    border-left: 2px solid var(--gray-200);
    color: var(--gray-500);
    padding: 10px 14px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.filter-icon-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.filter-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 9999;
    padding: 16px;
    pointer-events: auto;
}

.filter-dropdown.open {
    display: block;
}

.filter-dropdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.filter-dropdown-grid .field-half {
    display: contents;
}

.filter-dropdown-grid .filter-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.filter-dropdown-grid input,
.filter-dropdown-grid select {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: 6px;
    font-size: 0.85rem;
    background: var(--gray-100);
    box-sizing: border-box;
}

.filter-dropdown-grid input:focus,
.filter-dropdown-grid select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
}

.filter-dropdown-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

/* User Menu Dropdown */
.user-menu { position: relative; }

.user-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--gray-100);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-600);
    transition: var(--transition);
}

.user-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    overflow: hidden;
    z-index: 100;
}

.user-dropdown.active { display: block; }

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 0.9rem;
    color: var(--gray-600);
    transition: var(--transition);
}

.user-dropdown a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.user-dropdown .logout-link {
    border-top: 1px solid var(--gray-200);
    color: var(--red);
}

/* Buttons */
.btn-outline {
    padding: 8px 20px;
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-outline:hover { background: var(--primary-light); }

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: var(--primary);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: var(--red);
    border: 2px solid var(--red);
    border-radius: var(--radius);
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-danger:hover { background: #c0392b; border-color: #c0392b; }

.btn-large { padding: 14px 32px; font-size: 1.05rem; border-radius: var(--radius-lg); }
.btn-full { width: 100%; justify-content: center; padding: 12px; }
.btn-secondary { background: var(--gray-200); color: var(--secondary); border: 1px solid var(--gray-300); }
.btn-secondary:hover { background: var(--gray-300); }

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: var(--radius);
}

/* ==================== NAV CATEGORIES ==================== */
.header-nav {
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: visible;
}

.nav-categories {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0;
    flex: 1;
}

.nav-categories::-webkit-scrollbar { display: none; }

.nav-cats-wrap {
    display: flex;
    align-items: center;
    position: relative;
    padding: 0 16px;
}

.nav-scroll-btn {
    flex-shrink: 0;
    width: 32px;
    height: 100%;
    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2;
    position: relative;
    min-height: 44px;
}

.nav-scroll-btn:hover {
    color: var(--primary);
    background: var(--white);
}

.nav-scroll-left {
    margin-left: -16px;
    margin-right: 4px;
}

.nav-scroll-right {
    margin-right: -16px;
    margin-left: 4px;
}

.nav-categories li {
    list-style: none;
    flex-shrink: 0;
}

.nav-categories li a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 18px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--gray-600);
    white-space: nowrap;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    text-decoration: none;
}

.nav-categories li a:hover,
.nav-categories li a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: var(--primary-light);
}

/* ==================== HERO BANNER ==================== */
.hero-banner {
    background: linear-gradient(135deg, var(--primary) 0%, #ff8533 50%, #ffa366 100%);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.hero-banner h1 { font-size: 2.4rem; font-weight: 800; margin-bottom: 12px; }
.hero-banner p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 32px; }

.hero-search {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-search input {
    flex: 1;
    border: none;
    padding: 16px 24px;
    font-size: 1rem;
    outline: none;
}

.hero-search .btn-primary { padding: 16px 32px; font-size: 1rem; border-radius: 0; }

/* ==================== CATEGORIES (removed - now in nav bar) ==================== */
.section-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 24px; }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.total-count {
    font-size: 0.85rem;
    color: #888;
    font-weight: 500;
}

.filter-bar select {
    padding: 8px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.9rem;
    background: var(--white);
    cursor: pointer;
    outline: none;
}

.filter-bar select:focus { border-color: var(--primary); }

/* ==================== PRODUCTS ==================== */
.products-section { padding: 32px 0 48px; }

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.product-image {
    width: 100%;
    height: 200px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-300);
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.product-image img { width: 100%; height: 100%; object-fit: cover; }

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--green);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-info { padding: 16px; }

.product-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--gray-400);
}

.product-date { font-size: 0.75rem; color: var(--gray-400); margin-top: 8px; }

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-400);
}

.empty-state i { font-size: 3rem; margin-bottom: 16px; display: block; }
.empty-state h3 { font-size: 1.2rem; color: var(--gray-500); margin-bottom: 8px; }
.empty-state p { margin-bottom: 20px; }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 32px 0;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.page-dots {
    color: var(--gray-400);
    padding: 0 4px;
}

/* ==================== CTA ==================== */
.cta-section {
    background: linear-gradient(135deg, var(--secondary), #091538);
    color: var(--white);
    padding: 64px 0;
    text-align: center;
}

.cta-content h2 { font-size: 2rem; margin-bottom: 12px; }
.cta-content p { font-size: 1.1rem; opacity: 0.8; margin-bottom: 28px; max-width: 500px; margin-left: auto; margin-right: auto; }

/* ==================== AUTH PAGES ==================== */
.auth-section { padding: 48px 0; }

.auth-card {
    max-width: 420px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
}

.auth-card h2 {
    font-size: 1.4rem;
    margin-bottom: 24px;
    text-align: center;
}

.auth-card h2 i {
    color: var(--primary);
    margin-right: 8px;
}

.auth-link {
    text-align: center;
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--gray-500);
}

.auth-link a { color: var(--primary); font-weight: 600; }

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.alert-error {
    background: #fde8e8;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* ==================== AD DETAIL ==================== */
.ad-detail-section { padding: 24px 0 48px; }

.breadcrumb {
    font-size: 0.85rem;
    color: var(--gray-400);
    margin-bottom: 24px;
}

.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }

.ad-detail-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
}

.ad-image-container {
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.ad-main-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    display: block;
}

.ad-image-placeholder {
    width: 100%;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--gray-300);
}

.ad-info-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.ad-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

.ad-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.ad-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--gray-400);
}

.ad-meta i { margin-right: 4px; }

.ad-description {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--gray-600);
}

.seller-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.seller-avatar { font-size: 3rem; color: var(--primary); }
.seller-info strong { display: block; margin-bottom: 4px; }
.seller-info p { font-size: 0.9rem; color: var(--gray-500); }

.ad-actions-owner {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

/* ==================== MY ADS ==================== */
.my-ads-list { display: flex; flex-direction: column; gap: 16px; }

.my-ad-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.my-ad-item:hover { box-shadow: var(--shadow-lg); }

.my-ad-image {
    width: 120px;
    height: 90px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-300);
    font-size: 2rem;
    flex-shrink: 0;
    position: relative;
}

.my-ad-image img { width: 100%; height: 100%; object-fit: cover; }

.my-ad-fotos-count {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0,0,0,0.7);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.my-ad-info { flex: 1; min-width: 0; }
.my-ad-info h3 { font-size: 1rem; margin-bottom: 4px; }
.my-ad-info h3 a:hover { color: var(--primary); }
.my-ad-price { font-weight: 800; color: var(--primary); margin-bottom: 6px; }

.my-ad-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--gray-400);
}

.my-ad-meta i { margin-right: 3px; }

.my-ad-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ==================== FOOTER ==================== */
.footer {
    background: #1a1a1a;
    color: #ccc;
    padding: 48px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid #333;
}

.footer-col h3 { color: var(--white); font-size: 1rem; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #999; font-size: 0.9rem; transition: var(--transition); }
.footer-col ul li a:hover { color: var(--primary); }

.social-links { display: flex; gap: 12px; }

.social-links a {
    width: 40px;
    height: 40px;
    background: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 1rem;
    transition: var(--transition);
}

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

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    font-size: 0.85rem;
    color: #666;
}

/* ==================== TOAST ==================== */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--green);
    color: var(--white);
    padding: 14px 28px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 3000;
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.toast.show { transform: translateX(-50%) translateY(0); }

/* ==================== FOTOS UPLOAD ==================== */
.fotos-upload-area { margin-bottom: 8px; }

.fotos-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.fotos-preview-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 1;
    border: 2px solid var(--gray-200);
}

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

.fotos-preview-num {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.6);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== EDITAR FOTOS ==================== */
.editar-fotos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.editar-foto-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid var(--gray-200);
    background: var(--gray-100);
}

.editar-foto-item img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    display: block;
}

.editar-foto-check {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    font-size: 0.75rem;
    color: var(--red);
    cursor: pointer;
    background: var(--white);
}

.editar-foto-check input[type="checkbox"] {
    width: auto;
    accent-color: var(--red);
}

/* ==================== PRODUCT CAROUSEL (miniaturas) ==================== */
.product-carousel {
    width: 100%;
    height: 100%;
    position: relative;
}

.product-carousel-track {
    width: 100%;
    height: 100%;
    position: relative;
}

.product-carousel-slide {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-carousel-slide.active {
    opacity: 1;
    position: relative;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--secondary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    z-index: 5;
    transition: var(--transition);
    opacity: 0;
}

.product-card:hover .carousel-btn { opacity: 1; }

.carousel-btn:hover { background: var(--primary); color: var(--white); }

.carousel-prev { left: 6px; }
.carousel-next { right: 6px; }

.carousel-counter {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.6);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    z-index: 5;
}

/* ==================== AD GALLERY (detalhe) ==================== */
.ad-gallery {
    position: relative;
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.ad-gallery-track {
    position: relative;
    width: 100%;
    height: 450px;
}

.ad-gallery-slide {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.ad-gallery-slide.active {
    opacity: 1;
    position: relative;
}

.ad-gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--secondary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 5;
    transition: var(--transition);
}

.ad-gallery-btn:hover { background: var(--primary); color: var(--white); }

.ad-gallery-prev { left: 12px; }
.ad-gallery-next { right: 12px; }

.ad-gallery-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.65);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 14px;
    z-index: 5;
}

.gallery-slider {
    position: relative;
    width: 100%;
    max-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    overflow: hidden;
}

.gallery-slide {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.35s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-slide img {
    max-width: 100%;
    max-height: 600px;
    display: block;
}

.gallery-slide.active {
    opacity: 1;
    position: relative;
}

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--secondary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 5;
    transition: var(--transition);
}

.gallery-btn:hover { background: var(--primary); color: var(--white); }

.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }

.gallery-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.65);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 14px;
    z-index: 5;
}

.gallery-thumbs {
    display: flex;
    gap: 6px;
    padding: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.gallery-thumbs::-webkit-scrollbar { height: 4px; }
.gallery-thumbs::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }

.gallery-thumb {
    width: 64px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: var(--transition);
}

.gallery-thumb.active {
    border-color: var(--primary);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-thumbs {
    display: flex;
    gap: 8px;
    padding: 12px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.ad-thumbs::-webkit-scrollbar { height: 4px; }
.ad-thumbs::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }

.ad-thumb {
    width: 64px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: var(--transition);
    opacity: 0.6;
}

.ad-thumb.active {
    border-color: var(--primary);
    opacity: 1;
}

.ad-thumb:hover { opacity: 1; }

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

/* ==================== SEARCH AUTOCOMPLETE ==================== */
.search-wrapper { position: relative; }
.header-center { position: relative; }

.search-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 360px;
    overflow-y: auto;
    z-index: 100;
    border: 1px solid var(--gray-200);
    border-top: none;
}

.search-suggestions.active { display: block; }

.search-suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.search-suggestion-item:hover { background: var(--primary-light); }

.search-suggestion-img {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--gray-100);
    flex-shrink: 0;
}

.search-suggestion-info { flex: 1; min-width: 0; }
.search-suggestion-info strong { display: block; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-suggestion-info small { color: var(--gray-400); font-size: 0.75rem; }
.search-suggestion-price { font-weight: 800; color: var(--primary); font-size: 0.85rem; white-space: nowrap; }

/* ==================== BANNERS ==================== */
.banners-section { padding: 16px 0 0; }

.banners-slider {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--gray-100);
}

.banner-slide {
    display: none;
}

.banner-slide.active {
    display: block;
}

.banner-slide img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.banner-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--secondary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 5;
    transition: var(--transition);
}

.banner-btn:hover { background: var(--primary); color: var(--white); }

.banner-prev { left: 16px; }
.banner-next { right: 16px; }

.banner-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: var(--transition);
}

.banner-dot.active { background: var(--white); width: 24px; border-radius: 5px; }

/* ==================== SOCIAL BUTTONS ==================== */
.ad-actions-social {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.ad-social-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-500);
    transition: var(--transition);
    flex: 1;
    justify-content: center;
}

.ad-social-btn:hover { border-color: var(--gray-300); }

.ad-social-btn.active-fav {
    border-color: var(--red);
    color: var(--red);
    background: #fff5f5;
}

.ad-social-btn.active-like {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.ad-social-btn small {
    background: var(--gray-100);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
}

.ad-social-btn.active-fav small { background: #ffe0e0; }
.ad-social-btn.active-like small { background: #ffe8d6; }

/* ==================== FORMS (global) ==================== */
.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--gray-600);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,103,0,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
    .ad-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-top .container { flex-wrap: wrap; }
    .header-center { order: 3; width: 100%; }

    .banner-slide img { height: 160px; }
    .banner-btn { width: 30px; height: 30px; font-size: 0.75rem; }
    .banner-prev { left: 8px; }
    .banner-next { right: 8px; }

    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

    .my-ad-item { flex-wrap: wrap; }
    .my-ad-actions { width: 100%; justify-content: flex-end; }

    .form-row { grid-template-columns: 1fr; }

    .ad-actions-social { flex-direction: column; }
    .ad-social-btn { padding: 12px; }
}

.search-page-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    padding: 24px 0;
}

.search-filters {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
    align-self: start;
}

.search-filters h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.filter-group {
    margin-bottom: 16px;
}

.filter-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 4px;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.search-results {
    flex: 1;
    min-width: 0;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.search-header h2 {
    font-size: 1.2rem;
    color: var(--secondary);
}

.search-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--gray-500);
}

.search-meta select {
    padding: 6px 10px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.85rem;
}

    .btn-outline, .btn-primary, .btn-danger { padding: 8px 14px; font-size: 0.8rem; }
}

.anuncio-page {
    padding: 24px 0;
}

.breadcrumb {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 20px;
}

.breadcrumb a { color: var(--primary); }
.breadcrumb span { color: var(--secondary); font-weight: 600; }

.anuncio-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.anuncio-gallery {
    position: relative;
}

.gallery-main {
    position: relative;
    background: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
    max-width: 100%;
}

.anuncio-details h1 {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 8px;
}

.anuncio-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 20px;
}

.anuncio-meta i { margin-right: 4px; }

.anuncio-price-section {
    background: var(--primary-light);
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.anuncio-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

.anuncio-description {
    margin-bottom: 20px;
}

.anuncio-description h3,
.anuncio-location h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--secondary);
}

.anuncio-description p {
    line-height: 1.7;
    color: var(--gray-600);
}

.anuncio-location {
    margin-bottom: 20px;
}

.anuncio-location p {
    color: var(--gray-600);
}

.anuncio-source {
    margin-top: 8px;
}

.olx-link-destaque {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fff7f0, #fff0e6);
    border: 2px solid var(--primary);
    border-radius: 12px;
    text-decoration: none;
    color: var(--secondary);
    transition: all 0.3s ease;
    animation: olxPulse 2s ease-in-out infinite;
}

.olx-link-destaque:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(242, 101, 34, 0.3);
    background: linear-gradient(135deg, #fff0e6, #ffe4d1);
}

@keyframes olxPulse {
    0%, 100% { border-color: var(--primary); box-shadow: 0 0 0 0 rgba(242, 101, 34, 0.4); }
    50% { border-color: #ff8c42; box-shadow: 0 0 0 8px rgba(242, 101, 34, 0); }
}

.olx-link-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    animation: olxIconZoom 2s ease-in-out infinite;
}

@keyframes olxIconZoom {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.olx-link-text {
    flex: 1;
}

.olx-link-text strong {
    display: block;
    font-size: 1rem;
    color: var(--primary-dark);
    margin-bottom: 2px;
}

.olx-link-text small {
    font-size: 0.78rem;
    color: var(--gray-400);
}

.olx-link-arrow {
    color: var(--primary);
    font-size: 1.2rem;
    animation: olxArrow 1.5s ease-in-out infinite;
}

@keyframes olxArrow {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}

.related-section {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

@media (max-width: 768px) {
    .gallery-btn { width: 34px; height: 34px; font-size: 0.85rem; }
}

/* ==================== EXTRAS BADGES ==================== */
.anuncio-extras {
    margin-bottom: 20px;
}

.anuncio-extras h3 {
    font-size: 1.05rem;
    color: var(--secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.anuncio-extras h3 i {
    color: var(--primary);
}

.extras-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    line-height: 1.6;
}

.badge-detail {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid #90caf9;
    white-space: nowrap;
    animation: badgeFadeIn 0.3s ease-out both;
}

.badge-detail:nth-child(2n) {
    background: linear-gradient(135deg, #fce4ec, #f8bbd0);
    color: #c62828;
    border-color: #f48fb1;
}

.badge-detail:nth-child(3n) {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #2e7d32;
    border-color: #a5d6a7;
}

.badge-detail:nth-child(4n) {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    color: #e65100;
    border-color: #ffcc80;
}

.badge-detail:nth-child(5n) {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    color: #7b1fa2;
    border-color: #ce93d8;
}

.badge-detail:nth-child(6n) {
    background: linear-gradient(135deg, #e0f7fa, #b2ebf2);
    color: #00838f;
    border-color: #80deea;
}

.badge-option {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #2e7d32;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #a5d6a7;
    white-space: nowrap;
    animation: badgeFadeIn 0.3s ease-out both;
}

.badge-option::before {
    content: "\f00c";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 0.7rem;
}

@keyframes badgeFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 768px) {
    .extras-badges { gap: 6px; }
    .badge-detail, .badge-option { font-size: 0.78rem; padding: 5px 10px; }
}
    .gallery-prev { left: 8px; }
    .gallery-next { right: 8px; }
    .filter-dropdown-grid { grid-template-columns: 1fr; }
    .filter-dropdown { position: fixed; top: auto; left: 0; right: 0; bottom: 0; border-radius: var(--radius) var(--radius) 0 0; max-height: 80vh; overflow-y: auto; }
}
