/* iSell Marketplace - Modern Clean Design */

/* === Page Loader === */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 9999;
}

.page-loader-bar {
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, #6366f1, #818cf8, #6366f1);
    background-size: 200% 100%;
    border-radius: 0 2px 2px 0;
    animation: pageLoaderSlide 1.2s ease-in-out infinite, pageLoaderGlow 1.2s ease-in-out infinite;
}

@keyframes pageLoaderSlide {
    0% { width: 0%; margin-left: 0%; }
    50% { width: 60%; margin-left: 20%; }
    100% { width: 0%; margin-left: 100%; }
}

@keyframes pageLoaderGlow {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

:root {
    --isell-primary: #6366f1;
    --isell-primary-hover: #4f46e5;
    --isell-primary-light: #eef2ff;
    --isell-secondary: #64748b;
    --isell-success: #10b981;
    --isell-success-hover: #059669;
    --isell-warning: #f59e0b;
    --isell-danger: #ef4444;
    --isell-dark: #1e293b;
    --isell-body-bg: #f8fafc;
    --isell-card-border: #e2e8f0;
    --isell-text: #334155;
    --isell-text-muted: #94a3b8;
    --isell-radius: 14px;
    --isell-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --isell-shadow-md: 0 4px 14px rgba(0,0,0,0.08);
}

/* === Dark Mode === */
[data-theme="dark"] {
    --isell-body-bg: #0f172a;
    --isell-text: #e2e8f0;
    --isell-text-muted: #94a3b8;
    --isell-card-border: #1e293b;
    --isell-dark: #0f172a;
    --isell-primary-light: rgba(99,102,241,0.15);
    --isell-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --isell-shadow-md: 0 4px 14px rgba(0,0,0,0.3);
}

[data-theme="dark"] .isell-navbar {
    background: #1e293b;
    border-bottom-color: #334155;
}

[data-theme="dark"] .card,
[data-theme="dark"] .listing-card,
[data-theme="dark"] .category-card,
[data-theme="dark"] .seller-card,
[data-theme="dark"] .stat-card {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .category-card {
    background: #1e293b;
    color: var(--isell-text);
}

[data-theme="dark"] .category-card:hover {
    border-color: var(--isell-primary);
}

[data-theme="dark"] .listing-card {
    background: #1e293b;
}

[data-theme="dark"] .listing-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}

[data-theme="dark"] .card-header {
    background: #1e293b;
    border-bottom-color: #334155;
    color: var(--isell-text);
}

[data-theme="dark"] .card-footer {
    background: #1e293b;
    border-top-color: #334155;
}

[data-theme="dark"] .list-group-item {
    background: #1e293b;
    border-color: #334155;
    color: var(--isell-text);
}

[data-theme="dark"] .table {
    --bs-table-bg: #1e293b;
    --bs-table-border-color: #334155;
    --bs-table-striped-bg: #172033;
    --bs-table-hover-bg: #1a2740;
    color: var(--isell-text);
}

[data-theme="dark"] .breadcrumb-item,
[data-theme="dark"] .breadcrumb-item a {
    color: #94a3b8;
}

[data-theme="dark"] .breadcrumb-item.active {
    color: var(--isell-text);
}

[data-theme="dark"] .page-link {
    background: #1e293b;
    border-color: #334155;
    color: var(--isell-text);
}

[data-theme="dark"] .btn-outline-primary {
    color: #818cf8;
    border-color: #818cf8;
}

[data-theme="dark"] .btn-outline-primary:hover {
    background: var(--isell-primary);
    color: #fff;
}

[data-theme="dark"] .mobile-bottom-nav {
    background: #1e293b;
    border-top-color: #334155;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
}

[data-theme="dark"] .offcanvas {
    background: #1e293b;
    color: var(--isell-text);
}

[data-theme="dark"] .offcanvas .btn-close {
    filter: invert(1);
}

[data-theme="dark"] .dropdown-menu {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .dropdown-item {
    color: var(--isell-text);
}

[data-theme="dark"] .dropdown-item:hover {
    background: rgba(99,102,241,0.15);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background: #0f172a;
    border-color: #334155;
    color: var(--isell-text);
}

[data-theme="dark"] .form-control::placeholder {
    color: #64748b;
}

[data-theme="dark"] .spec-item {
    background: #1e293b;
}

[data-theme="dark"] .chat-bubble.received {
    background: #334155;
    color: var(--isell-text);
}

[data-theme="dark"] .img-placeholder {
    background: #1e293b;
    color: #475569;
}

[data-theme="dark"] .image-upload-zone {
    background: #1e293b;
    border-color: #475569;
}

[data-theme="dark"] .card-attr-tag {
    background: #334155;
    color: #94a3b8;
}

[data-theme="dark"] .favorite-btn {
    background: rgba(30,41,59,0.9);
}

[data-theme="dark"] .favorite-btn:hover {
    background: #1e293b;
}

[data-theme="dark"] .table {
    color: var(--isell-text);
}

[data-theme="dark"] .table thead th {
    color: var(--isell-text);
    border-bottom-color: #334155;
}

[data-theme="dark"] .table-light {
    --bs-table-bg: #172033 !important;
    --bs-table-border-color: #334155;
    color: var(--isell-text) !important;
}

[data-theme="dark"] .table-light th {
    color: var(--isell-text) !important;
}

[data-theme="dark"] .table-hover > tbody > tr:hover > * {
    background-color: #1a2740;
    color: var(--isell-text);
}

[data-theme="dark"] .table td {
    border-bottom-color: #334155;
    color: var(--isell-text);
}

[data-theme="dark"] .shadow-sm {
    box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
}

[data-theme="dark"] .border-0 {
    border-color: #334155 !important;
}

[data-theme="dark"] .modal-content {
    background: #1e293b;
    border-color: #334155;
    color: var(--isell-text);
}

[data-theme="dark"] .btn-outline-secondary {
    color: #94a3b8;
    border-color: #475569;
}

[data-theme="dark"] .btn-close {
    filter: invert(1);
}

[data-theme="dark"] .points-balance-card {
    background: linear-gradient(135deg, #78350f, #92400e);
}

[data-theme="dark"] .isell-footer {
    background: #020617;
}

[data-theme="dark"] .card-carousel-icon {
    background: rgba(30,41,59,0.9);
    color: #e2e8f0;
}

[data-theme="dark"] .alert {
    color: #e2e8f0;
}

[data-theme="dark"] .alert-light {
    background: #334155;
    border-color: #475569 !important;
    color: #e2e8f0;
}

[data-theme="dark"] .alert-info {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.3);
    color: #7dd3fc;
}

[data-theme="dark"] .alert-warning {
    background: rgba(250, 204, 21, 0.15);
    border-color: rgba(250, 204, 21, 0.3);
    color: #fde047;
}

[data-theme="dark"] .alert-danger {
    background: rgba(248, 113, 113, 0.15);
    border-color: rgba(248, 113, 113, 0.3);
    color: #fca5a5;
}

[data-theme="dark"] .alert-success {
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.3);
    color: #86efac;
}

[data-theme="dark"] code {
    color: #f0abfc;
    background: #334155;
}

[data-theme="dark"] hr {
    border-color: #334155;
}

/* Dark mode: Bootstrap text utilities */
[data-theme="dark"] .text-muted {
    color: #94a3b8 !important;
}

[data-theme="dark"] .text-dark,
[data-theme="dark"] h1, [data-theme="dark"] h2,
[data-theme="dark"] h3, [data-theme="dark"] h4,
[data-theme="dark"] h5, [data-theme="dark"] h6 {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .card .text-muted,
[data-theme="dark"] .card .fa-times {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .card-body .position-absolute .fa-times {
    color: #e2e8f0 !important;
}

[data-theme="dark"] p,
[data-theme="dark"] label,
[data-theme="dark"] .form-label,
[data-theme="dark"] .form-check-label {
    color: #e2e8f0;
}

[data-theme="dark"] a:not(.btn):not(.nav-link):not(.dropdown-item):not(.navbar-brand) {
    color: #818cf8;
}

[data-theme="dark"] .card .listing-price {
    color: var(--isell-primary) !important;
}

[data-theme="dark"] .badge.bg-warning {
    color: #1e293b !important;
}

[data-theme="dark"] .card-body {
    color: var(--isell-text);
}

.section-bg {
    background: #fff;
}

[data-theme="dark"] .section-bg {
    background: #1e293b;
}

[data-theme="dark"] .bg-white {
    background: #1e293b !important;
}

[data-theme="dark"] .bg-light {
    background: #0f172a !important;
}

/* === Bootstrap overrides === */
.bg-primary { background-color: var(--isell-primary) !important; }
.text-primary { color: var(--isell-primary) !important; }
.btn-primary { background: var(--isell-primary); border-color: var(--isell-primary); }
.btn-primary:hover { background: var(--isell-primary-hover); border-color: var(--isell-primary-hover); }
.btn-outline-primary { color: var(--isell-primary); border-color: var(--isell-primary); }
.btn-outline-primary:hover { background: var(--isell-primary); border-color: var(--isell-primary); }
.btn-success { background: var(--isell-success); border-color: var(--isell-success); }
.btn-success:hover { background: var(--isell-success-hover); border-color: var(--isell-success-hover); }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--isell-body-bg);
    color: var(--isell-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main.flex-grow-1 { flex: 1 0 auto; }
footer { flex-shrink: 0; }

/* === Navbar === */
.isell-navbar {
    background: #fff;
    border-bottom: 1px solid var(--isell-card-border);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

@media (max-width: 991px) {
    .isell-navbar > .container { overflow: visible; }
    .isell-navbar { padding-top: 0.25rem; padding-bottom: 0.25rem; }
    .isell-navbar .search-bar { min-width: 0 !important; }
    .isell-navbar .search-bar .form-control { font-size: 16px; padding: 0.375rem 0.6rem; }
}

.isell-navbar .navbar-brand {
    font-size: 1.4rem;
    letter-spacing: -0.5px;
    color: var(--isell-primary);
    display: flex;
    align-items: center;
    font-weight: 700;
}

.isell-navbar .navbar-brand:hover { color: var(--isell-primary-hover); }

.isell-navbar .nav-link {
    color: var(--isell-text);
    font-weight: 500;
    font-size: 1.05rem;
}

.isell-navbar .nav-link:hover { color: var(--isell-primary); }

.isell-navbar .nav-link i.fas,
.isell-navbar .nav-link i.far {
    font-size: 1.15rem;
    vertical-align: middle;
}

#navbarOffcanvas .nav-link { color: var(--isell-text); }
#navbarOffcanvas .nav-link:hover { color: var(--isell-primary); }
#navbarOffcanvas .nav-link.text-danger { color: var(--bs-danger) !important; }

.isell-navbar .search-bar .form-control {
    border-radius: 10px 0 0 10px;
    border: 1px solid var(--isell-card-border);
    background: var(--isell-body-bg);
    padding: 0.5rem 1rem;
}

.isell-navbar .search-bar .form-control:focus {
    border-color: var(--isell-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.isell-navbar .search-bar .btn {
    border-radius: 0 10px 10px 0;
    background: var(--isell-primary);
    border-color: var(--isell-primary);
    color: #fff;
}

.isell-navbar .search-bar .btn:hover {
    background: var(--isell-primary-hover);
}

.isell-navbar .nav-icon-link {
    position: relative;
    font-size: 1.2rem;
    padding: 0.4rem 0.5rem;
    transition: all 0.2s ease;
    opacity: 0.85;
}

.isell-navbar .nav-icon-link:hover {
    opacity: 1;
    transform: scale(1.1);
}

.isell-navbar .btn-categories {
    background: var(--isell-primary-light);
    color: var(--isell-primary);
    border: none;
    border-radius: 10px;
    font-weight: 500;
    padding: 0.45rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.isell-navbar .btn-categories:hover,
.isell-navbar .btn-categories.show {
    background: var(--isell-primary);
    color: #fff;
}

.btn-login {
    background: var(--isell-primary);
    border-color: var(--isell-primary);
    color: #fff;
    border-radius: 10px;
    font-weight: 500;
    padding: 0.4rem 1rem;
}

.btn-login:hover {
    background: var(--isell-primary-hover);
    border-color: var(--isell-primary-hover);
    color: #fff;
}

.btn-post-ad {
    background: var(--isell-success);
    border-color: var(--isell-success);
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    padding: 0.4rem 1rem;
}

.btn-post-ad:hover {
    background: var(--isell-success-hover);
    border-color: var(--isell-success-hover);
    color: #fff;
}

.isell-navbar .navbar-toggler {
    border: none;
    background: var(--isell-primary);
    color: #fff;
    box-shadow: none;
    outline: none;
    border-radius: 8px;
    padding: 0.35rem 0.5rem;
}

.isell-navbar .navbar-toggler:focus,
.isell-navbar .navbar-toggler:active {
    border: none;
    box-shadow: none;
    outline: none;
}

.isell-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.btn-theme-toggle {
    background: none;
    border: none;
    color: var(--isell-text);
    font-size: 1.2rem;
    padding: 0.3rem 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-theme-toggle:hover {
    background: var(--isell-primary-light);
    color: var(--isell-primary);
}

[data-theme="dark"] .btn-theme-toggle {
    color: #fbbf24;
}

[data-theme="dark"] .btn-theme-toggle:hover {
    background: rgba(251,191,36,0.15);
    color: #fbbf24;
}

.offcanvas-backdrop {
    transition: opacity 0.2s ease;
}

.offcanvas-backdrop.hiding,
.offcanvas-backdrop.hide {
    opacity: 0 !important;
}

.isell-navbar .dropdown-menu {
    border: 1px solid var(--isell-card-border);
    border-radius: 12px;
    box-shadow: var(--isell-shadow-md);
    padding: 0.5rem;
    font-size: 1rem;
}

.isell-navbar .dropdown-item {
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.isell-navbar .dropdown-item i {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--isell-primary-light);
    color: var(--isell-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    transition: all 0.2s ease;
}

.isell-navbar .dropdown-item:hover {
    background: var(--isell-primary-light);
    color: var(--isell-primary);
}

.isell-navbar .dropdown-item:hover i {
    background: var(--isell-primary);
    color: #fff;
}

/* Mobile offcanvas category icons */
#navbarOffcanvas .nav-link i {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--isell-primary-light);
    color: var(--isell-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    transition: all 0.2s ease;
}

#navbarOffcanvas .nav-link {
    border-radius: 8px;
    padding: 0.5rem 0.5rem;
    font-size: 1.05rem;
    transition: all 0.2s ease;
}

#navbarOffcanvas .nav-link:hover {
    background: var(--isell-primary-light);
    color: var(--isell-primary);
}

#navbarOffcanvas .nav-link:hover i {
    background: var(--isell-primary);
    color: #fff;
}

#navbarOffcanvas .nav-link.text-danger {
    color: var(--isell-primary) !important;
}

#navbarOffcanvas .nav-link.text-danger:hover {
    background: var(--isell-primary-light);
    color: var(--isell-primary) !important;
}

/* === Hero Section === */
.hero-section {
    background: linear-gradient(135deg, var(--isell-primary) 0%, #818cf8 50%, #a78bfa 100%);
    color: white;
    padding: 3.5rem 0;
}

.hero-section h1 { font-weight: 700; }
.hero-search { max-width: 600px; margin: 0 auto; }

.hero-search .form-control {
    border: none;
    border-radius: 12px 0 0 12px;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
}

.hero-search .btn {
    border-radius: 0 12px 12px 0;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

/* === Cards (general) === */
.card {
    border: 1px solid var(--isell-card-border);
    border-radius: var(--isell-radius);
}

/* === Category Cards === */
.category-card {
    text-align: center;
    padding: 1.5rem 1rem;
    border-radius: var(--isell-radius);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--isell-text);
    background: white;
    border: 1px solid var(--isell-card-border);
    height: 100%;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
    color: var(--isell-primary);
    border-color: var(--isell-primary);
}

.category-card .category-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--isell-primary-light), rgba(99, 102, 241, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.5rem;
    color: var(--isell-primary);
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    background: linear-gradient(135deg, var(--isell-primary), var(--isell-primary-hover));
    color: #fff;
    transform: scale(1.1);
}

.category-card .category-name { font-size: 0.85rem; font-weight: 600; line-height: 1.3; }

/* === Listing Cards === */
.listing-card {
    border: 1px solid var(--isell-card-border);
    border-radius: var(--isell-radius);
    overflow: hidden;
    transition: all 0.2s ease;
    background: white;
    height: 100%;
}

.listing-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--isell-shadow-md);
}

.listing-card .card-img-top { height: 200px; object-fit: cover; }
.listing-card .card-body { padding: 1rem; }
.listing-card .listing-price { font-size: 1.2rem; font-weight: 700; color: var(--isell-primary); }
.listing-card .listing-location { font-size: 0.8rem; color: var(--isell-text-muted); }
.listing-card .listing-date { font-size: 0.75rem; color: var(--isell-text-muted); }

.favorite-btn {
    background: rgba(255,255,255,0.9); border: none;
    border-radius: 50%; width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s;
    backdrop-filter: blur(4px);
    z-index: 10;
    padding: 0;
}

.favorite-btn:hover { background: white; transform: scale(1.1); }
.favorite-btn .fa-heart { color: #cbd5e1; }
.favorite-btn.active .fa-heart { color: var(--isell-danger); }

.listing-card .favorite-btn {
    position: absolute; top: 10px; right: 10px;
}
.listing-card .badge-featured { position: absolute; top: 10px; left: 10px; }

/* === Image placeholder === */
.img-placeholder {
    background: #f1f5f9;
    display: flex; align-items: center; justify-content: center;
    color: #cbd5e1; height: 200px;
}

/* === Listing Gallery (show page) === */
.listing-gallery .carousel-inner img { border-radius: 10px; }

.listing-gallery .thumbnail {
    width: 80px; height: 60px; object-fit: cover;
    border-radius: 6px; cursor: pointer; border: 2px solid transparent;
    transition: border-color 0.15s; opacity: 0.6;
}

.listing-gallery .thumbnail:hover { opacity: 0.9; }
.listing-gallery .thumbnail.active { border-color: var(--isell-primary); opacity: 1; }

.gallery-nav-icon {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(0,0,0,0.5); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; backdrop-filter: blur(4px);
}

.gallery-counter {
    position: absolute; bottom: 12px; right: 12px;
    background: rgba(0,0,0,0.6); color: #fff;
    padding: 2px 10px; border-radius: 20px;
    font-size: 0.8rem; backdrop-filter: blur(4px);
}

/* === Card Carousel (listing cards) === */
.card-carousel .carousel-inner img { height: 200px; object-fit: cover; }

.card-carousel-btn {
    opacity: 0; transition: opacity 0.2s; width: 30%;
}

.listing-card:hover .card-carousel-btn { opacity: 1; }

.card-carousel-icon {
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(255,255,255,0.9); color: #333;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.card-carousel-counter {
    position: absolute; bottom: 8px; right: 8px;
    background: rgba(0,0,0,0.55); color: #fff;
    padding: 1px 8px; border-radius: 12px;
    font-size: 0.7rem; backdrop-filter: blur(4px);
}

/* === Specs Grid (listing show page) === */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1px;
    background: var(--isell-card-border);
    border: 1px solid var(--isell-card-border);
    border-radius: 10px;
    overflow: hidden;
}

.spec-item {
    display: flex; flex-direction: column;
    padding: 10px 14px; background: #fff;
}

.spec-label { font-size: 0.75rem; color: var(--isell-text-muted); font-weight: 500; }
.spec-value { font-size: 0.9rem; font-weight: 600; color: var(--isell-text); }

/* === Card Attribute Tags === */
.card-attrs { display: flex; flex-wrap: wrap; gap: 4px; }

.card-attr-tag {
    display: inline-block;
    background: var(--isell-body-bg);
    color: var(--isell-secondary);
    font-size: 0.7rem; font-weight: 500;
    padding: 1px 7px; border-radius: 6px;
    white-space: nowrap;
}

/* === Seller Card === */
.seller-card {
    border-radius: var(--isell-radius);
    border: 1px solid var(--isell-card-border);
}

/* === Messages === */
.message-list .message-item {
    border-bottom: 1px solid var(--isell-card-border); padding: 1rem; transition: background 0.2s;
}

.message-list .message-item:hover { background: var(--isell-body-bg); }
.message-list .message-item.unread { background: var(--isell-primary-light); border-left: 3px solid var(--isell-primary); }

.message-list .message-item .flex-grow-1 { min-width: 0; overflow: hidden; }
.message-list .message-item .text-truncate { display: block; }

.chat-messages { max-height: 500px; overflow-y: auto; }

.chat-bubble {
    max-width: 70%; padding: 0.75rem 1rem;
    border-radius: 16px; margin-bottom: 0.5rem;
    font-size: 0.95rem; line-height: 1.5;
}

.chat-bubble.sent {
    background: var(--isell-primary); color: white;
    margin-left: auto; border-bottom-right-radius: 4px;
}

.chat-bubble.received {
    background: #f1f5f9; color: var(--isell-text);
    border-bottom-left-radius: 4px;
}

/* === Star Rating === */
.star-rating { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.star-rating input { display: none; }

.star-rating label {
    cursor: pointer; font-size: 1.5rem; color: #cbd5e1; transition: color 0.2s;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label { color: var(--isell-warning); }

/* === Filter Sidebar === */
.filter-sidebar .form-label { font-weight: 500; font-size: 0.9rem; }

@media (max-width: 767.98px) {
    .filter-sidebar input[type="number"],
    .filter-sidebar select,
    .filter-sidebar .form-control,
    .filter-sidebar .form-select {
        font-size: 16px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="search"],
    input[type="tel"],
    input[type="url"],
    textarea,
    select,
    .form-control,
    .form-select {
        font-size: 16px !important;
    }
}

/* === Admin Sidebar === */
.admin-sidebar {
    min-height: calc(100vh - 56px);
    background: var(--isell-dark);
}

.admin-sidebar .nav-link {
    color: var(--isell-text-muted); padding: 0.75rem 1.25rem;
    border-radius: 0; transition: all 0.2s;
    font-size: 0.9rem;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active { color: white; background: rgba(255,255,255,0.08); }

.admin-sidebar .nav-link i { width: 20px; text-align: center; margin-right: 10px; }

/* === Stat Cards === */
.stat-card {
    border-radius: var(--isell-radius);
    border: 1px solid var(--isell-card-border);
    box-shadow: var(--isell-shadow);
    background: #fff;
}

.stat-card .stat-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}

/* === Breadcrumbs === */
.breadcrumb-item a {
    color: var(--isell-primary);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--isell-primary-hover);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--isell-text);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--isell-text-muted);
}

/* === Pagination === */
.pagination .page-link {
    border-radius: 8px; margin: 0 2px; border: none;
    color: var(--isell-primary);
}

.pagination .page-item.active .page-link {
    background: var(--isell-primary); color: white;
}

/* === Avatar === */
.avatar-large { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }

.avatar-placeholder {
    width: 120px; height: 120px; border-radius: 50%;
    background: linear-gradient(135deg, var(--isell-primary), #818cf8);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; font-weight: 600;
}

/* === Badges === */
.badge-promoted { background: linear-gradient(135deg, #f59e0b, #d97706); }
.badge-top { background: linear-gradient(135deg, #ef4444, #dc2626); }

/* === Image Upload === */
.image-upload-zone {
    border: 2px dashed #cbd5e1; border-radius: var(--isell-radius);
    padding: 2rem; text-align: center; cursor: pointer;
    transition: all 0.2s; background: #fafbfc;
}

.image-upload-zone:hover,
.image-upload-zone.dragover { border-color: var(--isell-primary); background: var(--isell-primary-light); }

.image-preview { position: relative; display: inline-block; margin: 5px; }

.image-preview img { width: 100px; height: 100px; object-fit: cover; border-radius: 10px; }

.image-preview .remove-btn {
    position: absolute; top: -5px; right: -5px;
    width: 24px; height: 24px; background: var(--isell-danger);
    color: white; border: none; border-radius: 50%;
    font-size: 12px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

/* === Footer === */
.isell-footer {
    background: var(--isell-dark);
    color: #e2e8f0;
}

.isell-footer h5,
.isell-footer h6 { color: #fff; }

.isell-footer a {
    color: var(--isell-text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.isell-footer a:hover { color: #fff; }

.isell-footer hr { border-color: rgba(255,255,255,0.1); }

/* === Searchable Select === */
.required-asterisk {
    color: #dc3545;
    font-size: 0.85rem;
    margin-left: 1px;
    cursor: help;
}

.required-label {
    cursor: help;
}

.price-range-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.375rem 0.75rem;
    background: var(--isell-body-bg);
    border: 1px solid var(--isell-card-border);
    border-radius: var(--isell-radius);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.price-range-wrapper:focus-within {
    border-color: var(--isell-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.price-range-wrapper input {
    border: none;
    outline: none;
    background: transparent;
    color: var(--isell-text);
    font-size: 0.85rem;
    line-height: 1.5;
    width: 100%;
    padding: 0;
    -moz-appearance: textfield;
}

.price-range-wrapper input::-webkit-outer-spin-button,
.price-range-wrapper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.price-range-wrapper input::placeholder {
    color: var(--isell-text-muted);
    font-size: 0.8rem;
}

.price-range-wrapper .price-separator {
    color: var(--isell-text-muted);
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* === Sort Bar === */
.sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
    background: var(--isell-body-bg);
    border: 1px solid var(--isell-card-border);
    border-radius: var(--isell-radius);
}

.sort-bar-count {
    font-size: 0.85rem;
    color: var(--isell-text-muted);
    font-weight: 500;
}

.sort-bar-select {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-bar-icon {
    color: var(--isell-primary);
    font-size: 0.85rem;
}

.sort-bar select {
    border: none;
    background: transparent;
    color: var(--isell-text);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.25rem 2rem 0.25rem 0.5rem;
    cursor: pointer;
    outline: none;
}

.sort-bar select:focus {
    box-shadow: none;
}

@media (max-width: 575.98px) {
    .sort-bar {
        padding: 0.5rem 0.75rem;
    }
    .sort-bar-count {
        font-size: 0.75rem;
    }
    .sort-bar select {
        font-size: 0.8rem;
    }
}

.ss-input {
    padding: 0.375rem 0.75rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--isell-text);
    background: var(--isell-body-bg);
    border: 1px solid var(--isell-card-border);
    border-radius: var(--isell-radius);
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    outline: none;
}

.ss-input:hover {
    border-color: var(--isell-primary);
}

.ss-input:focus {
    border-color: var(--isell-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.ss-input::placeholder {
    color: var(--isell-text-muted);
    font-size: 0.8rem;
}

.ss-input::-webkit-outer-spin-button,
.ss-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ss-input[type="number"] {
    -moz-appearance: textfield;
}

.searchable-select-wrapper {
    position: relative;
}

.searchable-select-wrapper .ss-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.375rem 0.75rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--isell-text);
    background: var(--isell-body-bg);
    border: 1px solid var(--isell-card-border);
    border-radius: var(--isell-radius);
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.searchable-select-wrapper .ss-display:hover {
    border-color: var(--isell-primary);
}

.searchable-select-wrapper.ss-open .ss-display {
    border-color: var(--isell-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.searchable-select-wrapper .ss-display-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.searchable-select-wrapper .ss-display-text.ss-placeholder {
    color: var(--isell-text-muted);
    font-size: 0.8rem;
}

.searchable-select-wrapper .ss-arrow {
    margin-left: 8px;
    font-size: 0.7rem;
    color: var(--isell-text-muted);
    transition: transform 0.2s;
}

.searchable-select-wrapper.ss-open .ss-arrow {
    transform: rotate(180deg);
}

.searchable-select-wrapper .ss-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    margin-top: 4px;
    background: var(--isell-body-bg);
    border: 1px solid var(--isell-card-border);
    border-radius: 12px;
    box-shadow: var(--isell-shadow-md);
    overflow: hidden;
}

.searchable-select-wrapper.ss-open .ss-dropdown {
    display: block;
}

.searchable-select-wrapper .ss-search-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: none;
    border-bottom: 1px solid var(--isell-card-border);
    font-size: 0.9rem;
    outline: none;
    background: transparent;
    color: var(--isell-text);
}

.searchable-select-wrapper .ss-search-input::placeholder {
    color: var(--isell-text-muted);
}

.searchable-select-wrapper .ss-options {
    max-height: 200px;
    overflow-y: auto;
    padding: 4px;
}

.searchable-select-wrapper .ss-option {
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: background 0.15s;
}

.searchable-select-wrapper .ss-option:hover,
.searchable-select-wrapper .ss-option.ss-highlighted {
    background: var(--isell-primary-light);
    color: var(--isell-primary);
}

.searchable-select-wrapper .ss-option.ss-selected {
    background: var(--isell-primary);
    color: #fff;
}

.searchable-select-wrapper .ss-option.ss-hidden,
.searchable-select-wrapper .ss-no-results.ss-hidden {
    display: none;
}

.searchable-select-wrapper .ss-no-results {
    padding: 0.5rem 0.75rem;
    color: var(--isell-text-muted);
    font-size: 0.85rem;
    text-align: center;
}

.searchable-select-wrapper .ss-option.ss-clear {
    color: #dc3545;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--isell-card-border);
    margin-bottom: 2px;
}

.searchable-select-wrapper .ss-option.ss-clear:hover {
    background: rgba(220, 53, 69, 0.08);
    color: #dc3545;
}

.searchable-select-wrapper.ss-disabled .ss-display {
    opacity: 0.6;
    pointer-events: none;
    background: var(--isell-card-border);
}

.searchable-select-wrapper.is-invalid .ss-display {
    border-color: #dc3545;
}

.searchable-select-wrapper.is-valid .ss-display {
    border-color: #198754;
}

/* === Forms === */
.form-control:focus {
    border-color: var(--isell-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

/* === Buttons (global radius) === */
.btn { border-radius: 10px; font-weight: 500; }
.btn-sm { border-radius: 8px; }

/* === Tables === */
.table { font-size: 0.9rem; }
.table thead th { font-weight: 600; color: var(--isell-text); border-bottom-width: 1px; }

/* === Alerts === */
.alert { border-radius: 12px; border: none; }

/* === Form Validation === */
.form-control.is-valid, .form-select.is-valid {
    border-color: var(--isell-success);
    box-shadow: none;
}

.form-control.is-valid:focus, .form-select.is-valid:focus {
    border-color: var(--isell-success);
    box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
}

.form-control.is-invalid, .form-select.is-invalid {
    border-color: var(--isell-danger);
    box-shadow: none;
}

.form-control.is-invalid:focus, .form-select.is-invalid:focus {
    border-color: var(--isell-danger);
    box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}

.invalid-feedback { font-size: 0.82rem; }

/* Symfony form_errors() output styling */
li[id*="_error"] {
    color: var(--isell-danger);
    font-size: 0.85rem;
    font-weight: 500;
    list-style: none;
}

li[id*="_error"]::before {
    content: "\f06a\00a0";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

ul:has(> li[id*="_error"]) {
    padding-left: 0;
    margin: 0.25rem 0 0;
}

/* === Points === */
.points-nav-link {
    display: flex;
    align-items: center;
    gap: 2px;
}

.points-nav-link .badge {
    font-size: 0.7rem;
    font-weight: 600;
}

.points-balance-card {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: none;
}

.points-balance-card h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--isell-dark);
}

/* === Mobile Bottom Navigation === */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--isell-card-border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 4px 0;
    padding-bottom: env(safe-area-inset-bottom, 4px);
    z-index: 1050;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
}

.mobile-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--isell-text-muted);
    font-size: 0.65rem;
    padding: 4px 8px;
    position: relative;
    transition: color 0.15s;
    gap: 1px;
}

.mobile-bottom-nav-item i { font-size: 1.45rem; }

.mobile-bottom-nav-item.active,
.mobile-bottom-nav-item:hover { color: var(--isell-primary); }

.mobile-bottom-nav-add {
    background: var(--isell-primary);
    color: #fff !important;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    margin-top: -18px;
    box-shadow: 0 2px 10px rgba(99,102,241,0.35);
}

.mobile-bottom-nav-add i { font-size: 1.55rem; }

.mobile-bottom-nav-add:hover {
    background: var(--isell-primary-hover);
    color: #fff !important;
}

.mobile-bottom-nav-badge {
    position: absolute;
    top: 0;
    right: 2px;
    background: var(--isell-danger);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* === Forgot Password Tabs === */
.forgot-pw-tabs .nav-link {
    color: #6c757d;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
}
.forgot-pw-tabs .nav-link:hover:not(.active) {
    color: var(--isell-primary);
    background: var(--isell-primary-light);
}
.forgot-pw-tabs .nav-link.active {
    background: var(--isell-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

/* === Responsive === */
@media (max-width: 991px) {
    body { padding-bottom: 0; }
    .isell-footer { margin-bottom: 0 !important; padding-bottom: 64px !important; }
    #navbarOffcanvas .offcanvas-body { padding-bottom: 80px; }
}

@media (max-width: 768px) {
    .listing-card .card-img-top { height: 150px; }
    .card-carousel .carousel-inner img { height: 150px; }
    .card-carousel-btn { opacity: 1; }
    .chat-bubble { max-width: 85%; }
}
