/* Marigram V6 Final Elite - Marketplace Design */

:root {
    --primary-color: #ffe600;
    --primary-dark: #e6cf00;
    --secondary-color: #ff441f;
    --secondary-dark: #d32f2f;
    --accent-color: #3483fa;
    --text-color: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --bg-body: #f5f5f5;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #00a650;
    --whatsapp-color: #25d366;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius: 8px;
}

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

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

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

.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* --- HEADER --- */
.header { 
    background-color: var(--primary-color); 
    padding: 12px 0; 
    position: relative; 
    z-index: 1000; 
    box-shadow: var(--shadow-sm);
    margin: 0 !important;
}
.header-content { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { font-size: 28px; font-weight: 900; color: #000; text-decoration: none; letter-spacing: -1.5px; }
.logo span { color: var(--secondary-color); }

.search-bar { flex: 1; max-width: 600px; position: relative; }
.search-input { width: 100%; padding: 12px 16px; border: none; border-radius: 4px; font-size: 15px; box-shadow: var(--shadow-sm); outline: none; }
.search-btn { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 18px; }

.header-actions { display: flex; align-items: center; gap: 20px; }
.header-actions a { text-decoration: none; color: #333; font-weight: 500; font-size: 14px; }
.btn-publish { background: var(--secondary-color); color: #fff !important; padding: 10px 20px; border-radius: var(--radius); font-weight: 700; transition: 0.3s; border: none; cursor: pointer; }
.btn-publish:hover { background: var(--secondary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* --- SLIDESHOW FULL WIDTH --- */
.slideshow-container {
    position: relative;
    width: 100%;
    height: 480px;
    margin-top: 0 !important;
    padding-top: 0 !important;
    overflow: hidden;
    background: #000;
}

.slide {
    display: none;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    animation: fade 1s;
}

@keyframes fade { from {opacity: .6} to {opacity: 1} }

.slide-content {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    color: #fff;
    max-width: 600px;
    z-index: 2;
}

.slide-content h2 { font-size: 48px; font-weight: 900; margin-bottom: 15px; line-height: 1.1; }
.slide-content h2 span { color: var(--primary-color); }
.slide-content p { font-size: 20px; margin-bottom: 25px; opacity: 0.9; }

.slide-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 100%);
}

.slide-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 3;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.dot.active { background: var(--primary-color); width: 30px; border-radius: 10px; }

/* --- BENEFICIOS BAR (HORIZONTAL) --- */
.benefits-bar {
    background: var(--white);
    padding: 25px 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.benefits-grid {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 15px !important;
    flex-wrap: nowrap !important;
    width: 100%;
}

.benefit-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    flex: 1 !important;
    min-width: 0;
}

.benefit-icon {
    font-size: 22px;
    background: #fffbe6;
    width: 45px;
    height: 45px;
    min-width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--secondary-color);
    border: 1px solid var(--primary-color);
}

.benefit-text h4 { font-size: 14px; font-weight: 700; margin: 0; color: #222; white-space: nowrap; }
.benefit-text p { font-size: 12px; color: var(--text-light); margin: 0; white-space: nowrap; }

/* --- ADS GRID --- */
.section-header { display: flex; justify-content: space-between; align-items: center; margin: 40px 0 20px; }
.section-title { font-size: 26px; font-weight: 800; color: #222; }

.ads-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 25px; }
.ad-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    transition: 0.4s;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    position: relative;
}

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

.ad-img-box { width: 100%; height: 220px; position: relative; overflow: hidden; }
.ad-img { width: 100%; height: 100%; object-fit: cover; }
.ad-badge { position: absolute; top: 12px; left: 12px; background: var(--secondary-color); color: #fff; padding: 5px 10px; font-size: 11px; font-weight: 800; border-radius: 4px; text-transform: uppercase; z-index: 2; }

.ad-body { padding: 18px; }
.ad-price { font-size: 24px; font-weight: 800; color: #111; margin-bottom: 8px; }
.ad-title { font-size: 15px; color: #444; margin-bottom: 12px; height: 45px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; }
.ad-footer { font-size: 12px; color: var(--text-muted); display: flex; justify-content: space-between; border-top: 1px solid #f0f0f0; padding-top: 12px; }

/* --- FOOTER V6 ULTIMATE --- */
.footer {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 70px 0 30px;
    margin-top: 80px;
    border-top: 5px solid var(--primary-color);
}

.footer-grid {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    gap: 30px !important;
    flex-wrap: wrap !important;
}

.footer-column {
    flex: 1;
    min-width: 200px;
}

.footer-about {
    flex: 1.5;
}

.footer-about .logo { color: #fff; margin-bottom: 20px; display: block; text-decoration: none; }
.footer-about p { font-size: 14px; color: #aaa; margin-bottom: 25px; line-height: 1.6; }

.footer-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--primary-color);
}

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: #aaa; text-decoration: none; font-size: 14px; transition: 0.3s; }
.footer-links a:hover { color: #fff; padding-left: 5px; }

.payment-methods { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; align-items: center; }
.payment-methods img { height: 25px; filter: grayscale(100%); transition: 0.3s; opacity: 0.7; }
.payment-methods img:hover { filter: grayscale(0%); opacity: 1; }
.payment-badge {
    background: #333;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    border: 1px solid #444;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 30px;
    margin-top: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #777;
}

.social-links a { color: #777; text-decoration: none; margin-left: 20px; transition: 0.3s; font-weight: 600; }
.social-links a:hover { color: var(--primary-color); }

/* --- WHATSAPP FLOATING BUTTON --- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #128c7e;
    color: #FFF;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .benefits-grid { flex-wrap: wrap; justify-content: center; }
    .benefit-item { flex: 0 0 45%; }
}

@media (max-width: 768px) {
    .footer-grid { flex-direction: column !important; }
    .footer-column { min-width: 100%; margin-bottom: 30px; }
    .benefits-grid { flex-wrap: wrap; }
    .benefit-item { flex: 0 0 100%; }
    .whatsapp-float { width: 50px; height: 50px; bottom: 20px; right: 20px; font-size: 25px; }
}

/* Ajuste para miniaturas sem cortes (V6.1) */
.ad-thumb-container {
    width: 80px;
    height: 80px;
    background-color: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ad-thumb-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Garante que a foto apareça inteira */
}

/* Estilo para a tabela de Meus Anúncios */
.my-ads-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.my-ads-table tr {
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.my-ads-table td {
    padding: 15px;
    vertical-align: middle;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-approved { background: #d4edda; color: #155724; }
.status-rejected { background: #f8d7da; color: #721c24; }
