/* ============================================
   aha.lt - Skelbimų portalas
   Minimalistinis dizainas, line ikonos
   ============================================ */

/* === RESET & BASE === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f2f2f2;
    color: #333;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: #333; text-decoration: none; }
a:hover { color: #ff6600; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* === TOP HEADER === */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-inner {
    display: flex;
    align-items: center;
    height: 60px;
    gap: 20px;
}
.logo a {
    font-size: 26px;
    font-weight: 800;
    color: #ff6600;
    letter-spacing: -0.5px;
}
.logo a:hover { color: #e55b00; }

/* Header search */
.header-search {
    flex: 1;
    max-width: 480px;
    display: flex;
}
.header-search input {
    flex: 1;
    padding: 9px 14px;
    border: 2px solid #e0e0e0;
    border-right: none;
    border-radius: 6px 0 0 6px;
    outline: none;
    font-size: 14px;
}
.header-search input:focus { border-color: #ff6600; }
.header-search button {
    padding: 9px 18px;
    background: #ff6600;
    color: #fff;
    border: 2px solid #ff6600;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-size: 15px;
}
.header-search button:hover { background: #e55b00; border-color: #e55b00; }

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    white-space: nowrap;
}
.btn-create {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    background: #ff6600;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}
.btn-create:hover { background: #e55b00; color: #fff; }
.header-auth { display: flex; align-items: center; gap: 6px; }
.header-auth a {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}
.btn-login { color: #555; }
.btn-login:hover { color: #ff6600; }
.btn-register { background: #ff6600; color: #fff !important; }
.btn-register:hover { background: #e55b00; }

/* User dropdown */
.user-dropdown { position: relative; }
.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}
.user-dropdown-btn:hover { border-color: #ff6600; }
.user-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 6px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    min-width: 220px;
    z-index: 1001;
    padding: 8px 0;
}
.user-dropdown:hover .user-dropdown-menu,
.user-dropdown.open .user-dropdown-menu { display: block; }
.user-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    color: #444;
    font-size: 14px;
    font-weight: 400;
}
.user-dropdown-menu a:hover { background: #f8f8f8; color: #ff6600; }
.user-dropdown-menu a i { width: 18px; text-align: center; color: #999; font-size: 15px; }
.user-dropdown-menu a:hover i { color: #ff6600; }
.user-dropdown-menu hr { border: none; border-top: 1px solid #f0f0f0; margin: 6px 0; }
.badge-count {
    background: #dc3545;
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: auto;
}

/* === CATEGORIES NAV BAR === */
.categories-bar {
    background: #fff;
    border-bottom: 1px solid #eee;
}
.categories-bar-inner {
    display: flex;
    align-items: center;
    height: 44px;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.categories-bar-inner::-webkit-scrollbar { display: none; }
.cat-nav-item { position: relative; }
.cat-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 11px 14px;
    color: #555;
    font-size: 13px;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}
.cat-nav-link:hover { color: #ff6600; border-bottom-color: #ff6600; }
.cat-nav-link i { font-size: 15px; color: #bbb; }
.cat-nav-link:hover i { color: #ff6600; }

/* Submenu dropdown */
.cat-submenu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    min-width: 240px;
    padding: 8px 0;
    z-index: 999;
}
.cat-nav-item:hover .cat-submenu { display: block; }
.cat-submenu a {
    display: block;
    padding: 8px 18px;
    color: #555;
    font-size: 13px;
}
.cat-submenu a:hover { background: #fff8f0; color: #ff6600; }

/* === HERO SEARCH === */
.hero {
    background: linear-gradient(135deg, #ff6600 0%, #ff8533 100%);
    padding: 44px 0;
    text-align: center;
    color: #fff;
}
.hero h1 { font-size: 28px; font-weight: 700; margin-bottom: 22px; }
.hero-search {
    display: flex;
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
}
.hero-search input,
.hero-search select {
    padding: 15px 18px;
    border: none;
    outline: none;
    font-size: 14px;
    background: #fff;
    color: #333;
}
.hero-search input { flex: 1; min-width: 0; }
.hero-search select {
    border-left: 1px solid #f0f0f0;
    cursor: pointer;
    max-width: 170px;
    -webkit-appearance: auto;
    color: #666;
}
.hero-search button {
    padding: 15px 30px;
    background: #ff6600;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
}
.hero-search button:hover { background: #e55b00; }

/* === CATEGORIES GRID (line icon style) === */
.section { padding: 30px 0; }
.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #222;
}
.categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}
.category-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border-radius: 10px;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.category-card:hover {
    border-color: #ff6600;
    box-shadow: 0 2px 12px rgba(255,102,0,0.1);
}
.category-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff6600;
    font-size: 20px;
}
.category-card h3 {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
}
.category-card:hover h3 { color: #ff6600; }

/* === LISTINGS GRID === */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.listing-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s;
    border: 1px solid #e8e8e8;
}
.listing-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.listing-card-img {
    position: relative;
    width: 100%;
    padding-top: 70%;
    background: #f5f5f5;
    overflow: hidden;
}
.listing-card-img img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.listing-card-img .no-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 13px;
    flex-direction: column;
    gap: 6px;
}
.listing-card-img .no-image i { font-size: 28px; }
.featured-badge {
    position: absolute;
    top: 8px; left: 8px;
    background: #ff6600;
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}
.listing-card-body { padding: 14px; }
.listing-card-body h3 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.listing-card-body h3 a { color: #333; }
.listing-card-body h3 a:hover { color: #ff6600; }
.listing-price {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin-bottom: 8px;
}
.listing-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #aaa;
}
.listing-meta i { font-size: 11px; margin-right: 2px; }
.listing-card.featured { border-color: #ffe0c0; background: #fffbf5; }

/* === SINGLE LISTING PAGE === */
.listing-page { padding: 20px 0; }
.listing-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
}
.listing-main {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e8e8e8;
    overflow: hidden;
}
.gallery-main {
    width: 100%;
    padding-top: 60%;
    position: relative;
    background: #f8f8f8;
}
.gallery-main img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: contain;
}
.gallery-thumbs {
    display: flex;
    gap: 6px;
    padding: 10px 15px;
    overflow-x: auto;
}
.gallery-thumbs img {
    width: 64px; height: 48px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.15s;
}
.gallery-thumbs img:hover,
.gallery-thumbs img.active { border-color: #ff6600; opacity: 1; }
.listing-info { padding: 24px; }
.listing-info h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #222;
}
.listing-info .price-big {
    font-size: 30px;
    font-weight: 700;
    color: #ff6600;
    margin-bottom: 20px;
}
.listing-attrs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 20px;
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
}
.listing-attr {
    font-size: 13px;
    display: flex;
    gap: 6px;
}
.listing-attr .label { color: #999; }
.listing-attr .value { color: #333; font-weight: 500; }
.listing-info .description {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
    white-space: pre-wrap;
}

/* Seller card */
.seller-card {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    border: 1px solid #e8e8e8;
    position: sticky;
    top: 80px;
    height: fit-content;
}
.seller-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #222;
}
.seller-info p {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.seller-info p i { color: #bbb; width: 16px; text-align: center; }
.btn-phone {
    display: block;
    width: 100%;
    padding: 13px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
    margin-top: 16px;
}
.btn-phone:hover { background: #218838; color: #fff; }
.btn-message {
    display: block;
    width: 100%;
    padding: 13px;
    background: #fff;
    color: #ff6600;
    border: 2px solid #ff6600;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}
.btn-message:hover { background: #ff6600; color: #fff; }

/* === SIDEBAR LAYOUT === */
.page-with-sidebar {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    padding: 20px 0;
}
.filter-card {
    background: #fff;
    border-radius: 10px;
    padding: 18px;
    border: 1px solid #e8e8e8;
    margin-bottom: 12px;
}
.filter-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}
.filter-card label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: #555;
}
.filter-card input[type="text"],
.filter-card input[type="number"],
.filter-card select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 8px;
}
.filter-card input:focus,
.filter-card select:focus { border-color: #ff6600; outline: none; }
.price-range { display: flex; gap: 8px; align-items: center; }
.price-range input { flex: 1; }
.price-range span { color: #aaa; }

/* === FORMS === */
.form-page {
    max-width: 560px;
    margin: 30px auto;
    padding: 0 15px;
}
.form-card {
    background: #fff;
    border-radius: 12px;
    padding: 36px;
    border: 1px solid #e8e8e8;
}
.form-card h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
    color: #222;
}
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}
.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.15s;
}
.form-control:focus {
    border-color: #ff6600;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,102,0,0.08);
}
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { -webkit-appearance: auto; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.form-hint { font-size: 12px; color: #aaa; margin-top: 4px; }

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s;
}
.btn-primary { background: #ff6600; color: #fff; }
.btn-primary:hover { background: #e55b00; color: #fff; }
.btn-secondary { background: #eee; color: #555; }
.btn-secondary:hover { background: #ddd; }
.btn-outline { background: #fff; color: #ff6600; border: 1px solid #ff6600; }
.btn-outline:hover { background: #ff6600; color: #fff; }
.btn-success { background: #28a745; color: #fff; }
.btn-danger { background: #dc3545; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* === ALERTS === */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}
.alert-success { background: #d4edda; color: #155724; }
.alert-error, .alert-danger { background: #f8d7da; color: #721c24; }
.alert-warning { background: #fff3cd; color: #856404; }
.alert-info { background: #d1ecf1; color: #0c5460; }
.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.5;
}
.alert-close:hover { opacity: 1; }

/* === BREADCRUMBS === */
.breadcrumbs {
    padding: 14px 0;
    font-size: 13px;
    color: #aaa;
}
.breadcrumbs a { color: #888; }
.breadcrumbs a:hover { color: #ff6600; }
.breadcrumbs span { margin: 0 6px; }

/* === PAGINATION === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 24px 0;
}
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #333;
    font-size: 13px;
    background: #fff;
}
.page-link:hover { border-color: #ff6600; color: #ff6600; }
.page-link.active { background: #ff6600; border-color: #ff6600; color: #fff; }

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #bbb;
}
.empty-state i { font-size: 48px; margin-bottom: 16px; display: block; }
.empty-state h3 { font-size: 18px; color: #888; margin-bottom: 8px; }
.empty-state a { color: #ff6600; }

/* === FOOTER === */
.site-footer {
    background: #292929;
    color: #bbb;
    padding: 40px 0 0;
    margin-top: auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding-bottom: 30px;
}
.footer-col h4 {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}
.footer-col a {
    display: block;
    color: #999;
    font-size: 13px;
    padding: 4px 0;
}
.footer-col a:hover { color: #ff6600; }
.footer-col p { font-size: 13px; color: #888; line-height: 1.6; }
.footer-bottom {
    border-top: 1px solid #3a3a3a;
    padding: 16px 0;
    text-align: center;
    font-size: 12px;
    color: #777;
}

/* === TOOLBAR === */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}
.toolbar .results-count { font-size: 14px; color: #888; }
.toolbar-right { display: flex; align-items: center; gap: 10px; }
.sort-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
}

/* === ADMIN === */
.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 100vh;
}
.admin-sidebar {
    background: #1e1e1e;
    padding: 20px 0;
}
.admin-sidebar h3 {
    color: #ff6600;
    font-size: 18px;
    padding: 0 16px 16px;
    border-bottom: 1px solid #333;
}
.admin-sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    color: #aaa;
    font-size: 13px;
}
.admin-sidebar a:hover, .admin-sidebar a.active { background: #ff6600; color: #fff; }
.admin-content { padding: 24px; background: #f5f5f5; }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 24px;
}
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e8e8e8;
    text-align: center;
}
.stat-card .number { font-size: 32px; font-weight: 700; color: #ff6600; }
.stat-card .label { font-size: 13px; color: #999; }
.table-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e8e8e8;
    overflow: hidden;
}
table { width: 100%; border-collapse: collapse; }
th, td {
    padding: 10px 14px;
    text-align: left;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
}
th { background: #fafafa; font-weight: 600; color: #888; }

/* === UPLOAD === */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
}
.upload-area:hover { border-color: #ff6600; background: #fffaf5; }
.upload-area i { font-size: 32px; color: #ccc; display: block; margin-bottom: 8px; }
.upload-area p { font-size: 13px; color: #aaa; }

/* === MOBILE TOGGLE === */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 8px;
    color: #333;
}

/* === RESPONSIVE === */
@media (max-width: 992px) {
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
    .listings-grid { grid-template-columns: repeat(3, 1fr); }
    .listing-layout { grid-template-columns: 1fr; }
    .seller-card { position: static; }
    .page-with-sidebar { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .listings-grid { grid-template-columns: repeat(2, 1fr); }
    .header-search { display: none; }
    .mobile-toggle { display: block; }
    .categories-bar { display: none; }
    .categories-bar.mobile-open { display: block; }
    .hero-search { flex-direction: column; border-radius: 10px; }
    .hero-search select { max-width: none; border-left: none; border-top: 1px solid #f0f0f0; }
    .hero h1 { font-size: 22px; }
    .form-row { flex-direction: column; gap: 0; }
    .btn-create span { display: none; }
}

@media (max-width: 480px) {
    .categories-grid { grid-template-columns: 1fr; }
    .listings-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}

/* === UTILS === */
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hidden { display: none; }
.content-wrapper { flex: 1; }
