/* =========================================
   CLASSIFICADOS Seu Guia Web
   Estilo 100% baseado em recreiobarra.com.br
   ========================================= */

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

body {
    font-family: Arial, sans-serif;
    background-color: #FFD700;
    color: #333;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ---------- Header (preto) ---------- */
header {
    background-color: #000;
    color: white;
    text-align: center;
    padding: 20px 10px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.5em;
    margin: 0.1em 0;
    font-weight: bold;
}

.logo-img {
    height: 100px;
    width: auto;
}

header h2 {
    font-size: 1.5em;
    margin: 10px 0;
}

.contact-info {
    margin: 10px 0;
    font-size: 1em;
}

.contact-info a {
    color: #25D366;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-info a:hover {
    text-decoration: underline;
    opacity: 0.9;
}

/* ---------- Busca ---------- */
.search-form {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 20px auto;
    padding: 0 15px;
}

.search-form input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-yellow {
    background-color: #FFD700;
    color: #000;
}

.btn-black {
    background-color: #000;
    color: #fff;
}

.btn-black:hover {
    background-color: #222;
}

.btn-yellow:hover {
    background-color: #e6c200;
}

.btn-ghost {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn-ghost:hover {
    background: #fff;
    color: #000;
}

/* ---------- Main ---------- */
main.container {
    margin: 20px auto;
}

main h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2em;
}

/* ---------- Grid de Serviços (cards pretos) ---------- */
.services {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.service {
    background: #000;
    border: 1px solid #444;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    text-align: center;
    padding: 20px;
    transition: transform 0.2s ease;
    display: block;
    color: #f4f4f4;
}

.service:hover {
    transform: translateY(-5px);
}

.service-icon {
    font-size: 60px;
    margin-bottom: 10px;
}

.service h3 {
    font-size: 1.8em;
    margin: 10px 0;
    color: #00aaff;
}

.service p {
    color: #ccc;
    font-size: 0.95em;
}

/* ---------- Anúncios (cards pretos com foto) ---------- */
.listing-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
    background: #000;
    padding: 20px;
    border-radius: 5px;
    color: #fff;
}

.listing-toolbar h2 {
    font-size: 1.8em;
    margin: 0;
    color: #fff;
}

.muted-light {
    color: #ccc;
    font-size: 14px;
    margin: 5px 0 0 0;
}

.toolbar-actions {
    display: flex;
    gap: 10px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.card {
    background: #000;
    border: 1px solid #444;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: transform 0.2s ease;
    display: block;
    color: #f4f4f4;
}

.card:hover {
    transform: translateY(-5px);
}

.card-image {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #1a1a1a;
}

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

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    background: #1a1a1a;
    font-size: 14px;
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.badge.product {
    background: #00aaff;
}

.badge.service {
    background: #25D366;
}

.card-body {
    padding: 14px;
}

.card-title {
    font-size: 16px;
    font-weight: bold;
    color: #00aaff;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 46px;
}

.price {
    color: #FFD700;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}

.meta {
    color: #ccc;
    font-size: 13px;
}

/* ---------- Seção "Como funciona" ---------- */
.how-section {
    background: #000;
    padding: 40px 20px;
    margin: 40px auto;
    border-radius: 5px;
    color: #fff;
}

.how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 20px auto 0;
}

.step-card {
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 5px;
    padding: 30px 20px;
    text-align: center;
}

.step-num {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #FFD700;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    margin: 0 auto 15px;
}

.step-card h3 {
    color: #00aaff;
    font-size: 1.3em;
    margin-bottom: 10px;
}

.step-card p {
    color: #ccc;
    font-size: 14px;
}

/* ---------- Estado vazio ---------- */
.empty {
    background: #000;
    border: 1px solid #444;
    border-radius: 5px;
    padding: 40px 20px;
    text-align: center;
    color: #ccc;
}

.empty h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.5em;
}

/* ---------- Paginação ---------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 10px 14px;
    border-radius: 5px;
    background: #000;
    border: 1px solid #444;
    color: #fff;
}

.pagination .current {
    background: #FFD700;
    border-color: #FFD700;
    color: #000;
}

/* ---------- Footer ---------- */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 15px 0;
    margin-top: 30px;
}

footer p {
    margin: 5px 0;
}

footer a {
    color: #fff;
    text-decoration: underline;
}

/* =========================================
   PÁGINA DE DETALHES (anuncio.php)
   ========================================= */
.detail-container {
    padding: 20px;
}

.breadcrumb {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #0078D7;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
    background: #000;
    padding: 20px;
    border-radius: 5px;
    color: #fff;
}

.main-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #1a1a1a;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.no-image-large {
    color: #777;
    font-size: 18px;
}

.thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.2s;
}

.thumb:hover,
.thumb.active {
    opacity: 1;
    border-color: #FFD700;
}

.info-card-detail {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #444;
}

.badge-detail {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 12px;
}

.badge-detail.product {
    background: #00aaff;
}

.badge-detail.service {
    background: #25D366;
}

.detail-title {
    font-size: 1.8em;
    line-height: 1.2;
    margin-bottom: 12px;
    color: #00aaff;
}

.detail-price {
    font-size: 2em;
    font-weight: bold;
    color: #FFD700;
    margin-bottom: 20px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: #ccc;
    margin-bottom: 20px;
}

.divider {
    border: 0;
    border-top: 1px solid #444;
    margin: 20px 0;
}

.info-card-detail h2 {
    font-size: 1.3em;
    margin-bottom: 12px;
    color: #FFD700;
}

.detail-description {
    color: #ddd;
    line-height: 1.6;
    font-size: 15px;
    white-space: pre-wrap;
}

.attributes-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.attributes-list li {
    font-size: 14px;
    color: #ccc;
}

.attributes-list strong {
    color: #FFD700;
    display: block;
    font-size: 13px;
    margin-bottom: 2px;
}

.contact-card {
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 5px;
    padding: 20px;
    margin-top: 20px;
}

.contact-card h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin-bottom: 8px;
}

.contact-name {
    font-size: 1.5em;
    font-weight: bold;
    color: #fff;
    margin-bottom: 20px;
}

.btn-whatsapp {
    display: block;
    width: 100%;
    text-align: center;
    background: #25D366;
    color: #fff !important;
    padding: 14px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 12px;
}

.btn-whatsapp:hover {
    background: #1da851;
}

.btn-outline {
    display: block;
    width: 100%;
    text-align: center;
    background: transparent;
    color: #fff;
    border: 2px solid #444;
    padding: 12px;
    border-radius: 5px;
    font-weight: bold;
}

.btn-outline:hover {
    border-color: #FFD700;
    color: #FFD700;
}

/* ---------- Responsivo ---------- */
@media (max-width: 980px) {
    .services {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .services {
        grid-template-columns: 1fr;
    }
    
    .how-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .attributes-list {
        grid-template-columns: 1fr;
    }
}


/* =========================================
   FORMULÁRIOS (cadastro / login)
   ========================================= */
.form-container {
    padding: 40px 15px;
    max-width: 520px;
}

.form-card {
    background: #000;
    border: 1px solid #444;
    border-radius: 5px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.form-card h1 {
    color: #00aaff;
    font-size: 1.8em;
    margin-bottom: 6px;
}

.form-subtitle {
    color: #ccc;
    margin-bottom: 20px;
}

.form label {
    display: block;
    color: #fff;
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 14px;
}

.form input {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 12px;
    border: 1px solid #444;
    border-radius: 5px;
    background: #1a1a1a;
    color: #fff;
    font-size: 15px;
}

.form input:focus {
    outline: none;
    border-color: #FFD700;
}

.form small {
    display: block;
    color: #999;
    font-size: 12px;
    margin-top: 4px;
}

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

.req {
    color: #FFD700;
}

.btn-block {
    width: 100%;
    margin-top: 10px;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    color: #ccc;
    font-size: 14px;
}

.form-alert {
    padding: 14px 16px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
}

.form-alert.error {
    background: #3a1414;
    border: 1px solid #6b1e1e;
    color: #ffb4b4;
}

.form-alert.success {
    background: #143a1e;
    border: 1px solid #1e6b2e;
    color: #b4ffc8;
}

.form-alert ul {
    margin: 6px 0 0 18px;
}

@media (max-width: 520px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}
/* ---------- Formulario largo (anunciar) ---------- */
.form-container-wide {
    padding: 40px 15px;
    max-width: 760px;
}

.form textarea,
.form select {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 12px;
    border: 1px solid #444;
    border-radius: 5px;
    background: #1a1a1a;
    color: #fff;
    font-size: 15px;
    font-family: Arial, sans-serif;
}

.form textarea {
    min-height: 120px;
    resize: vertical;
}

.form select:focus,
.form textarea:focus {
    outline: none;
    border-color: #FFD700;
}

.form select option {
    background: #1a1a1a;
    color: #fff;
}

.photos-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.photos-preview img {
    width: 90px;
    height: 70px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid #444;
}
/* ---------- Campos profissionais (categoria e descricao) ---------- */
.field-group {
    margin-bottom: 18px;
}

.field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 8px;
}

.field-hint {
    color: #999;
    font-size: 12px;
    font-weight: normal;
}

.form select,
.form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #444;
    border-radius: 8px;
    background: #141414;
    color: #fff;
    font-size: 15px;
    font-family: Arial, sans-serif;
    transition: border-color .2s, box-shadow .2s;
}

.form select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'><path d='M1 1l6 6 6-6' stroke='%23FFD700' stroke-width='2' fill='none' stroke-linecap='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 46px;
    cursor: pointer;
}

.form select:hover,
.form textarea:hover {
    border-color: #777;
}

.form select:focus,
.form textarea:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}

.form select option {
    background: #141414;
    color: #fff;
    padding: 10px;
}

.form textarea {
    min-height: 170px;
    resize: vertical;
    line-height: 1.6;
}

.form ::placeholder {
    color: #777;
}

.char-count {
    text-align: right;
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}
/* ---------- Controles da pre-visualizacao de fotos ---------- */
.pv-item {
    text-align: center;
    background: #141414;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 8px;
    width: 112px;
}

.pv-item img {
    width: 92px;
    height: 70px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid #444;
}

.pv-item:first-child img {
    border-color: #FFD700;
}

.pv-cap {
    display: block;
    margin-top: 6px;
    color: #FFD700;
    font-weight: bold;
    font-size: 12px;
}

.pv-controls {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 6px;
}

.pv-btn {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
}

.pv-btn:hover {
    border-color: #FFD700;
    color: #FFD700;
}

.pv-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pv-btn-remove:hover {
    border-color: #ff5555;
    color: #ff5555;
}
/* ---------- Links na pagina de detalhes ---------- */
.detail-link {
    color: #FFD700;
    text-decoration: none;
    word-break: break-word;
    transition: color .2s, text-decoration .2s;
}

.detail-link:hover {
    color: #fff;
    text-decoration: underline;
}