:root {
    --bg-primary: #FFFFFF;
    --bg-secondary: #f4f7f6;
    --brand-primary: #00A859;
    --brand-primary-hover: #008a48;
    --brand-light: #EAFAF1;
    --brand-accent: #00A859;
    --text-dark: #1a1a1a;
    --text-muted: #555555;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --radius: 8px;
    --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-main); background-color: var(--bg-secondary); color: var(--text-dark); line-height: 1.6; }
a { text-decoration: none; color: var(--brand-primary); }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.top-display { background: var(--brand-light); border-bottom: 1px solid var(--border-color); text-align: center; padding: 5px 10px; font-size: 0.85rem; height: 30px; overflow: hidden; }
.brand-tagline { display: flex; align-items: center; justify-content: center; min-height: 1.2em; position: relative; overflow: hidden; font-weight: 500; color: var(--text-muted); }
.tagline-slide { display: inline-block; transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out; opacity: 0; transform: translateY(8px); position: absolute; white-space: nowrap; }
.tagline-slide.active { opacity: 1; transform: translateY(0); position: relative; }

.main-header { background: var(--bg-primary); box-shadow: var(--shadow-sm); padding: 15px 0; position: sticky; top: 0; z-index: 999; }
.header-container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px; }
.logo-area { display: flex; flex-direction: column; }
.animated-title { font-size: 1.8rem; font-weight: 800; background: linear-gradient(90deg, #00A859, #00d2ff, #00A859); background-size: 200% auto; color: transparent; -webkit-background-clip: text; background-clip: text; animation: shine 3s linear infinite; }
@keyframes shine { to { background-position: 200% center; } }
.logo-subtitle { font-size: 0.8rem; color: var(--text-muted); letter-spacing: 0.5px; }

.search-form { display: flex; border: 1px solid var(--border-color); border-radius: 50px; overflow: hidden; background: var(--bg-secondary); }
.search-form input { border: none; padding: 10px 20px; width: 300px; background: transparent; outline: none; font-size: 0.95rem; }
.search-form button { border: none; background: transparent; padding: 0 15px; cursor: pointer; color: var(--brand-primary); font-size: 1.1rem; }
.actions-area { display: flex; gap: 10px; align-items: center; }

.btn { display: inline-block; padding: 10px 20px; border-radius: 50px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; text-align: center; border: 2px solid transparent; }
.btn-primary { background-color: var(--brand-primary); color: #fff; }
.btn-primary:hover { background-color: var(--brand-primary-hover); color: #fff; }
.btn-outline { border-color: var(--brand-primary); color: var(--brand-primary); background: transparent; }
.btn-outline:hover { background-color: var(--brand-light); }
.btn-text { color: var(--text-muted); font-size: 0.9rem; }
.btn-text:hover { color: #ff3333; }
.btn-full { width: 100%; }

.auth-wrapper { display: flex; justify-content: center; align-items: center; min-height: 70vh; padding: 40px 20px; }
.auth-box { background: var(--bg-primary); padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; max-width: 450px; }
.auth-box h2 { text-align: center; color: var(--brand-primary); margin-bottom: 20px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 0.9rem; }
.form-group input { width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: var(--radius); font-size: 1rem; transition: border 0.2s; }
.form-group input:focus { border-color: var(--brand-primary); outline: none; }
.alert { padding: 12px; border-radius: var(--radius); margin-bottom: 20px; font-size: 0.9rem; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #f87171; }
.alert-success { background: var(--brand-light); color: var(--brand-primary-hover); border: 1px solid var(--brand-primary); }
.auth-link { display: block; text-align: center; margin-top: 15px; font-size: 0.9rem; }

.floating-btn { position: fixed; bottom: 25px; right: 25px; width: 60px; height: 60px; border-radius: 50%; box-shadow: 0 4px 20px rgba(0,0,0,0.4); z-index: 9999; display: flex; align-items: center; justify-content: center; background: #000; overflow: hidden; animation: floatPulse 3s infinite ease-in-out; border: 2px solid var(--brand-accent); text-decoration: none; }
.floating-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
@keyframes floatPulse { 0% { transform: translateY(0) scale(1); box-shadow: 0 4px 15px rgba(0,0,0,0.4); } 50% { transform: translateY(-8px) scale(1.05); box-shadow: 0 8px 25px rgba(0,168,89,0.6); } 100% { transform: translateY(0) scale(1); box-shadow: 0 4px 15px rgba(0,0,0,0.4); } }

.main-footer { background: var(--bg-primary); padding: 30px 0; border-top: 1px solid var(--border-color); margin-top: 50px; text-align: center; }
.footer-links { margin-bottom: 15px; }
.footer-links a { color: var(--text-muted); margin: 0 10px; font-size: 0.9rem; }
.footer-links a:hover { color: var(--brand-primary); }

@media (max-width: 768px) {
    .header-container { flex-direction: column; text-align: center; }
    .search-form input { width: 100%; }
    .search-area { width: 100%; order: 3; margin-top: 10px; }
    .actions-area { width: 100%; justify-content: center; }
    .floating-btn { width: 50px; height: 50px; bottom: 15px; right: 15px; }
}

.feed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; padding: 20px 0; }
.ad-card { background: var(--bg-primary); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s, box-shadow 0.2s; border: 1px solid var(--border-color); }
.ad-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.ad-carousel { position: relative; width: 100%; height: 220px; overflow: hidden; background: #e2e8f0; }
.ad-carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; width: 100%; height: 100%; scrollbar-width: none; -ms-overflow-style: none; }
.ad-carousel-track::-webkit-scrollbar { display: none; }
.ad-carousel-slide { flex: 0 0 100%; width: 100%; height: 100%; scroll-snap-align: start; }
.ad-carousel-slide img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.ad-controls { position: absolute; top: 50%; left: 0; right: 0; display: flex; justify-content: space-between; transform: translateY(-50%); pointer-events: none; padding: 0 5px; }
.ad-btn-nav { background: rgba(0, 0, 0, 0.4); color: #fff; border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; pointer-events: auto; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.ad-btn-nav:hover { background: var(--brand-primary); }
.ad-indicators { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.ad-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.5); }
.ad-dot.active { background: #fff; }

.ad-info { padding: 15px; display: flex; flex-direction: column; flex-grow: 1; }
.ad-price { font-size: 1.3rem; font-weight: 700; color: var(--brand-primary); margin-bottom: 5px; }
.ad-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 10px; color: var(--text-dark); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ad-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 15px; display: flex; flex-direction: column; gap: 4px; }
.ad-meta i { width: 16px; color: var(--brand-primary); }
.ad-actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.btn-whatsapp { background-color: #25D366; color: #fff; border-color: #25D366; }
.btn-whatsapp:hover { background-color: #128C7E; }

.img-modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.9); z-index: 100000; align-items: center; justify-content: center; flex-direction: column; }
.img-modal.active { display: flex; }
.img-modal img { max-width: 90%; max-height: 85vh; object-fit: contain; border-radius: 4px; }
.modal-close { position: absolute; top: 20px; right: 20px; background: transparent; border: none; color: #fff; font-size: 2rem; cursor: pointer; }