/* Formos konteineris */
.smart-market-form-wrapper {
    max-width: 600px;
    margin: 20px auto;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.form-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.form-section h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #333;
}

/* Įvesties laukai */
input[type="text"], input[type="number"], textarea, select, .smart-select {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px; /* Svarbu telefonams, kad nezoomintų */
    transition: border 0.3s;
}

input:focus, textarea:focus {
    border-color: #007bff; /* Tavo pagrindinė spalva */
    outline: none;
}

/* Nuotraukų peržiūra */
#image-preview-container {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    overflow-x: auto;
}

.preview-item {
    width: 80px;
    height: 80px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    flex-shrink: 0;
    position: relative;
    border: 1px solid #ddd;
}

.badge-main {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 10px;
    text-align: center;
    padding: 2px 0;
}

/* Mygtukas */
.btn-primary {
    background: #007bff;
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #0056b3;
}

.full-width { width: 100%; }

/* Grid sistema kainai */
.row { display: flex; gap: 15px; }
.col-half { flex: 1; }

/* Konteineris */
.smart-market-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Grid Layout */
.smart-ad-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 2 dalys turiniui, 1 dalis sidebarui */
    gap: 30px;
}

/* Galerija */
.main-image-frame {
    width: 100%;
    height: 450px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.main-image-frame img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.thumbs-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.thumb-item {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.2s;
}

.thumb-item:hover { opacity: 1; }
.thumb-item img { width: 100%; height: 100%; object-fit: cover; }

/* Content Box */
.ad-content-box {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    border: 1px solid #f0f0f0;
}

.ad-meta-table .meta-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

/* Sidebar */
.desktop-price-box h1 {
    font-size: 24px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.price-huge {
    font-size: 28px;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 20px;
}

.seller-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.seller-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.seller-header img {
    border-radius: 50%;
}

.verified-badge {
    color: #2ecc71;
    font-size: 12px;
    font-weight: bold;
}

.btn-action {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
}

.btn-phone {
    background: #27ae60; /* Žalia */
    color: white;
}

.btn-email {
    background: #fff;
    border: 2px solid #3498db;
    color: #3498db;
}

.sidebar-sticky {
    position: sticky;
    top: 20px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .smart-ad-grid {
        grid-template-columns: 1fr;
    }
    .main-image-frame {
        height: 300px;
    }
    .desktop-price-box {
        display: none; /* Mobiliame rodysime viršuje */
    }
}

/* --- HERO SEKCIJA --- */
.smart-hero {
    height: 450px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    /* Jei tavo tema turi container, išimame jį, kad būtų full-width */
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 2;
    padding: 20px;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 30px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-search-box {
    background: white;
    padding: 10px;
    border-radius: 50px;
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.hero-search-box input {
    border: none;
    background: transparent;
    padding: 15px 20px;
    font-size: 18px;
    flex-grow: 1;
    margin: 0;
}

.hero-search-box button {
    background: #e74c3c; /* Raudona/Oranžinė kaip Airbnb/Vinted */
    color: white;
    border: none;
    padding: 0 30px;
    border-radius: 40px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.hero-search-box button:hover {
    background: #c0392b;
}

/* --- PAGRINDINIS LAYOUT --- */
.main-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* --- ŠONINIS FILTRAS (SIDEBAR) --- */
.smart-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #f9f9f9;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #eee;
    position: sticky;
    top: 20px; /* Sticky efektas */
}

.filter-group {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.filter-group h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.price-range {
    display: flex;
    gap: 10px;
}

.checkbox-list label, .radio-list label {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

/* Geo mygtukas filtre */
.btn-small-icon {
    background: none;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    margin-left: 5px;
}

/* --- REZULTATŲ TINKLELIS --- */
.smart-results-area {
    flex-grow: 1;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
}

/* Kortelės stilius (Grid Item) */
.smart-grid-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: transform 0.2s, box-shadow 0.2s;
}

.smart-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.ad-image-container {
    height: 180px;
    background: #f0f0f0;
    position: relative;
}

.ad-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-details {
    padding: 15px;
}

.ad-price {
    font-weight: 800;
    font-size: 18px;
    color: #2c3e50;
    margin-top: 10px;
}

.badge-urgent {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e74c3c;
    color: white;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
}

/* --- LOAD MORE & LOADER --- */
.pagination-area { text-align: center; margin-top: 40px; }
.btn-secondary {
    background: transparent;
    border: 2px solid #333;
    padding: 10px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
}

.smart-loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- MOBILE STILIUS --- */
.mobile-only-btn { display: none; }

@media (max-width: 768px) {
    .main-layout { flex-direction: column; }
    
    .smart-sidebar {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        width: 100%;
        height: 100vh;
        z-index: 999;
        overflow-y: auto;
        transform: translateY(100%); /* Paslėpta apačioje */
        transition: transform 0.3s ease;
    }
    
    .smart-sidebar.active {
        transform: translateY(0);
    }
    
    .mobile-only-btn {
        display: block;
        width: 100%;
        padding: 15px;
        background: #333;
        color: white;
        border: none;
        margin-bottom: 20px;
        border-radius: 8px;
        font-size: 16px;
    }

    .hero-content h1 { font-size: 2rem; }
}

/* --- AUTH CONTAINER --- */
.smart-auth-container {
    max-width: 450px;
    margin: 50px auto;
    padding: 0 20px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.auth-box {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

/* Tabs */
.auth-tabs {
    display: flex;
    background: #f9fafb;
    border-bottom: 1px solid #eee;
}

.auth-tab {
    flex: 1;
    padding: 20px;
    border: none;
    background: none;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: 0.3s;
    font-size: 16px;
}

.auth-tab.active {
    color: #2c3e50;
    background: #fff;
    border-bottom: 3px solid #3498db; /* Tavo pagrindinė spalva */
}

/* Forms */
.auth-form {
    padding: 40px;
}

.auth-form h3 {
    margin-top: 0;
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.auth-desc {
    color: #777;
    margin-bottom: 30px;
}

/* Inputs */
.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 45px; /* Vieta ikonai */
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border 0.3s;
    background: #fcfcfc;
}

.input-group input:focus {
    border-color: #3498db;
    background: #fff;
    outline: none;
}

/* Actions */
.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
    color: #666;
}

.lost-pass-link {
    color: #3498db;
    text-decoration: none;
}

.btn-auth {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: #2c3e50;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.btn-auth:hover { background: #34495e; }
.btn-register { background: #3498db; }
.btn-register:hover { background: #2980b9; }

/* Social Login */
.social-login {
    margin-top: 30px;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.social-login span {
    display: block;
    margin-bottom: 15px;
    color: #999;
    font-size: 12px;
}

.social-btns {
    display: flex;
    gap: 10px;
}

.social-btns button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-google { background: #db4437; }
.btn-facebook { background: #4267B2; }

/* Errors */
.smart-auth-errors {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #ef9a9a;
}