/* ACM Marketplace - Custom Styles */

/* Star rating component */
.star-rating {
    display: inline-flex;
    gap: 2px;
}

.star-rating .star {
    cursor: pointer;
    transition: color 0.15s;
}

.star-rating .star.filled {
    color: #D4A017;
}

.star-rating .star.empty {
    color: #D1D5DB;
}

/* Wishlist heart */
.wishlist-heart {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    transition: transform 0.2s ease;
}

.wishlist-heart svg {
    fill: none;
    transition: fill 0.2s ease, color 0.2s ease;
}

.wishlist-heart:hover {
    transform: scale(1.15);
}

.wishlist-heart:hover svg {
    color: #D4A017;
}

.wishlist-heart.active svg {
    fill: #D4A017;
    color: #D4A017;
}

/* Bounce when toggled */
.wishlist-heart.bounce {
    animation: heart-bounce 0.4s ease;
}

@keyframes heart-bounce {
    0% { transform: scale(1); }
    30% { transform: scale(1.35); }
    60% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* Contact icon buttons (compact, no background) */
.contact-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: transform 0.15s, opacity 0.15s;
    opacity: 0.75;
}

.contact-icon-btn:hover {
    transform: scale(1.15);
    opacity: 1;
}

/* Card title - 2 lines with ellipsis */
.card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
}

/* Listing card hover + uniform height */
.listing-card {
    height: 100%;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.listing-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Auction card hover + uniform height */
.auction-card {
    height: 100%;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.auction-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Image fade-in on load */
.img-lazy {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.img-lazy.loaded {
    opacity: 1;
}

/* Auction countdown urgency */
.auction-countdown.urgent {
    color: #DC2626 !important;
    animation: countdown-pulse 1s ease-in-out infinite;
}

@keyframes countdown-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.countdown-progress {
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.countdown-progress-bar {
    height: 100%;
    transition: width 1s linear;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #1E3A5F;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
    z-index: 40;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: #D4A017;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Green button CSS hover (replaces inline onmouseover) */
.btn-green {
    background-color: #2E7D32;
    color: white;
    transition: background-color 0.2s ease;
}

.btn-green:hover {
    background-color: #1B5E20;
}

/* Dark green button */
.btn-navy {
    background-color: #1E3A5F;
    color: white;
    transition: background-color 0.2s ease;
}

.btn-navy:hover {
    background-color: #163350;
}

/* Gold outline button */
.btn-gold-outline {
    border: 1px solid #D4A017;
    color: #D4A017;
    background: transparent;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-gold-outline:hover {
    background-color: #D4A017;
    color: white;
}

/* Aspect ratio fallback */
.aspect-\[4\/3\] {
    aspect-ratio: 4 / 3;
}

/* Line clamp for card titles */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Search panel on homepage */
.search-panel {
    background-color: #FFFFFF;
    border-top: 1px solid #E5E7EB;
    border-bottom: 1px solid #E5E7EB;
}

/* Modal overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay.hidden {
    display: none;
}

/* Phone number mask */
.phone-masked .phone-full {
    display: none;
}

.phone-masked.revealed .phone-partial {
    display: none;
}

.phone-masked.revealed .phone-full {
    display: inline;
}

/* Badge styles */
.badge-sponsored {
    background-color: #D4A017;
    color: white;
}

.badge-dealer {
    background-color: #1E3A5F;
    color: white;
}

.badge-sold {
    background-color: #DC2626;
    color: white;
}

/* Listing type toggle */
.type-toggle-option {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6B7280;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
    user-select: none;
    border-right: 1px solid #D1D5DB;
}

.type-toggle-option:last-child {
    border-right: none;
}

.type-toggle-option:hover {
    background-color: #F9FAFB;
}

.type-toggle-option.selected {
    background-color: #2E7D32;
    color: white;
    border-color: #2E7D32;
}

/* Condition pill selector */
.condition-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6B7280;
    border: 1px solid #D1D5DB;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.condition-pill:hover {
    border-color: #2E7D32;
    color: #2E7D32;
}

.condition-pill.selected {
    background-color: #2E7D32;
    border-color: #2E7D32;
    color: white;
}

/* Custom searchable select */
.acm-select {
    position: relative;
}

.acm-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #374151;
    background: #fff;
    border: 1px solid #D1D5DB;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    user-select: none;
}

.acm-select-trigger:hover {
    border-color: #9CA3AF;
}

.acm-select-trigger:focus,
.acm-select.open .acm-select-trigger {
    outline: none;
    border-color: #D4A017;
    box-shadow: 0 0 0 2px rgba(212, 160, 23, 0.2);
}

.acm-select-trigger .acm-select-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.acm-select-trigger .acm-select-text.placeholder {
    color: #9CA3AF;
}

.acm-select-trigger .acm-select-arrow {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    color: #9CA3AF;
    transition: transform 0.2s;
}

.acm-select.open .acm-select-arrow {
    transform: rotate(180deg);
}

.acm-select-dropdown {
    display: none;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 40;
    background: #fff;
    border: 1px solid #D1D5DB;
    border-radius: 0.375rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    max-height: 280px;
    overflow: hidden;
}

.acm-select.open .acm-select-dropdown {
    display: flex;
}

.acm-select-search {
    padding: 0.5rem;
    border-bottom: 1px solid #E5E7EB;
    flex-shrink: 0;
}

.acm-select-search input {
    width: 100%;
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
    border: 1px solid #E5E7EB;
    border-radius: 0.25rem;
    outline: none;
    background: #F9FAFB;
}

.acm-select-search input:focus {
    border-color: #D4A017;
    background: #fff;
}

.acm-select-options {
    overflow-y: auto;
    flex: 1;
    padding: 0.25rem 0;
}

.acm-select-option {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    color: #374151;
    cursor: pointer;
    transition: background 0.1s;
}

.acm-select-option:hover {
    background: #F3F4F6;
}

.acm-select-option.selected {
    background: #FEF9E7;
    color: #92700C;
    font-weight: 500;
}

.acm-select-option.hidden {
    display: none;
}

.acm-select-option.type-hidden {
    display: none !important;
}

.acm-select-empty {
    padding: 1rem 0.75rem;
    font-size: 0.8125rem;
    color: #9CA3AF;
    text-align: center;
    display: none;
}

.acm-select-empty.visible {
    display: block;
}

/* Hide scrollbar on category strip */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* ==========================================
   Toast Notifications
   ========================================== */
.toast-container {
    position: fixed;
    top: 84px;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: white;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    border-left: 4px solid;
    min-width: 280px;
    max-width: 420px;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
    overflow: hidden;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(120%);
    opacity: 0;
}

.toast-success { border-left-color: #2E7D32; }
.toast-error { border-left-color: #DC2626; }
.toast-warning { border-left-color: #D4A017; }
.toast-info { border-left-color: #1E3A5F; }

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.toast-success .toast-icon { color: #2E7D32; }
.toast-error .toast-icon { color: #DC2626; }
.toast-warning .toast-icon { color: #D4A017; }
.toast-info .toast-icon { color: #1E3A5F; }

.toast-message {
    flex: 1;
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.4;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #9CA3AF;
    padding: 2px;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.toast-close:hover {
    color: #374151;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 4px;
    right: 0;
    height: 3px;
    border-radius: 0 0 0.5rem 0;
    opacity: 0.3;
}

.toast-success .toast-progress { background-color: #2E7D32; }
.toast-error .toast-progress { background-color: #DC2626; }
.toast-warning .toast-progress { background-color: #D4A017; }
.toast-info .toast-progress { background-color: #1E3A5F; }

@keyframes toast-progress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* ==========================================
   Skeleton Loading
   ========================================== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 0.375rem;
}
/* CSS fallback: stop shimmer when child image has loaded */
.skeleton:has(.img-lazy.loaded) {
    animation: none;
    background: transparent;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==========================================
   Form Input Focus Transitions
   ========================================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="datetime-local"],
textarea,
select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* ==========================================
   Quick-View Overlay on Cards
   ========================================== */
.listing-card .quick-view-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 5;
}

.listing-card:hover .quick-view-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* ==========================================
   Quick-View Modal
   ========================================== */
.qv-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 1rem;
    backdrop-filter: blur(4px);
}
.qv-overlay.active {
    opacity: 1;
    visibility: visible;
}
.qv-panel {
    position: relative;
    background: #fff;
    border-radius: 0.75rem;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s ease;
}
.qv-overlay.active .qv-panel {
    transform: scale(1) translateY(0);
}
.qv-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.2s, background 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.qv-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

/* Loading */
.qv-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}
.qv-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid #e5e7eb;
    border-top-color: #1E3A5F;
    border-radius: 50%;
    animation: qv-spin 0.7s linear infinite;
}
@keyframes qv-spin {
    to { transform: rotate(360deg); }
}

/* Grid layout */
.qv-content { padding: 1.5rem; }
.qv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
@media (max-width: 639px) {
    .qv-grid { grid-template-columns: 1fr; }
}

/* Image column */
.qv-image-col { min-width: 0; }
.qv-image-wrap {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #f3f4f6;
    aspect-ratio: 4 / 3;
}
.qv-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.qv-img-count {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 0.25rem;
}
.qv-thumbs {
    display: flex;
    gap: 0.375rem;
    margin-top: 0.5rem;
    overflow-x: auto;
}
.qv-thumb {
    flex-shrink: 0;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.375rem;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    background: none;
    transition: border-color 0.15s;
}
.qv-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.qv-thumb.active,
.qv-thumb:hover {
    border-color: #1E3A5F;
}

/* Details column */
.qv-details-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.qv-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1E3A5F;
    line-height: 1.3;
    margin-bottom: 0.375rem;
}
.qv-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}
.qv-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}
.qv-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 0.25rem;
    text-transform: capitalize;
}
.qv-badge-outline {
    background: #f9fafb;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}
.qv-price { margin-bottom: 0.75rem; }
.qv-price-tag {
    display: inline-block;
    background: #2E7D32;
    color: #fff;
    font-size: 1.125rem;
    font-weight: 700;
    padding: 0.375rem 0.875rem;
    border-radius: 0.375rem;
}
.qv-contact-price {
    color: #D4A017;
    font-weight: 600;
    font-size: 0.9375rem;
}

/* Specs grid */
.qv-specs { margin-bottom: 0.75rem; }
.qv-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.375rem 0.75rem;
}
.qv-spec {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid #f3f4f6;
}
.qv-spec-label { color: #6b7280; }
.qv-spec-value { font-weight: 600; color: #1f2937; }

/* Description */
.qv-desc {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta */
.qv-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.qv-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: #6b7280;
}

/* Contact buttons */
.qv-contact {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.qv-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: opacity 0.2s;
}
.qv-contact-btn:hover { opacity: 0.85; }
.qv-wa-btn { background: #25D366; color: #fff; }
.qv-call-btn { background: #1E3A5F; color: #fff; }
.qv-login-btn { background: #6b7280; color: #fff; }

/* View full listing button */
.qv-view-btn {
    display: block;
    text-align: center;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    margin-top: auto;
}

/* ==========================================
   Password Toggle Button
   ========================================== */
.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9CA3AF;
    padding: 2px;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.password-toggle:hover {
    color: #374151;
}

/* ==========================================
   Gold Button CSS Hover
   ========================================== */
.btn-gold {
    background-color: #D4A017;
    color: white;
    transition: background-color 0.2s ease;
}

.btn-gold:hover {
    background-color: #B8860B;
}

/* Hero outline button */
.btn-hero-outline {
    border-color: rgba(255,255,255,0.7);
    background-color: rgba(255,255,255,0.1);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-hero-outline:hover {
    background-color: rgba(255,255,255,0.2);
    border-color: #ffffff;
}

/* Keep Leaflet maps behind the fixed navbar */
.leaflet-container {
    z-index: 0;
}

/* ==========================================
   Dark Mode Styles
   ========================================== */

/* Body background */
html.dark body {
    background-color: #1C1C2E;
    color: #E5E7EB;
}

/* Main content area */
html.dark main {
    background-color: #1C1C2E;
}

/* Cards and white containers */
html.dark .bg-white,
html.dark .bg-gray-50 {
    background-color: #2D2D3F !important;
    color: #E5E7EB;
}

/* Text overrides */
html.dark .text-gray-700,
html.dark .text-gray-600,
html.dark .text-gray-500 {
    color: #9CA3AF !important;
}

html.dark .text-gray-400 {
    color: #6B7280 !important;
}

html.dark .text-gray-800,
html.dark .text-gray-900 {
    color: #E5E7EB !important;
}

html.dark .text-\[\#1E3A5F\] {
    color: #93C5FD !important;
}

/* Borders */
html.dark .border-gray-200,
html.dark .border-gray-100,
html.dark .border-gray-300 {
    border-color: #3D3D50 !important;
}

/* Input fields */
html.dark input[type="text"],
html.dark input[type="email"],
html.dark input[type="password"],
html.dark input[type="number"],
html.dark input[type="tel"],
html.dark input[type="url"],
html.dark input[type="search"],
html.dark textarea,
html.dark select {
    background-color: #1C1C2E;
    border-color: #3D3D50;
    color: #E5E7EB;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
    color: #6B7280;
}

/* Table overrides */
html.dark table thead {
    background-color: #252538 !important;
}

html.dark table tbody tr {
    border-color: #3D3D50;
}

html.dark table tbody tr:hover {
    background-color: #353548 !important;
}

/* Listing card */
html.dark .listing-card {
    background-color: #2D2D3F;
    border-color: #3D3D50;
}

/* Shadow overrides */
html.dark .shadow-md,
html.dark .shadow-lg,
html.dark .shadow-xl {
    box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.4) !important;
}

/* Footer stays as-is (already dark) */

/* Dividers */
html.dark .divide-gray-200 > :not([hidden]) ~ :not([hidden]) {
    border-color: #3D3D50;
}

/* Category strip */
html.dark [style*="background-color: #F9FAFB"],
html.dark [style*="background-color: #f9fafb"] {
    background-color: #252538 !important;
}

/* Hover states for dropdown */
html.dark .hover\:bg-gray-50:hover {
    background-color: #353548 !important;
}

html.dark .hover\:bg-gray-100:hover {
    background-color: #3D3D50 !important;
}

/* Badges keep their colors */
html.dark .bg-green-100 { background-color: rgba(34, 197, 94, 0.15) !important; }
html.dark .bg-yellow-100 { background-color: rgba(234, 179, 8, 0.15) !important; }
html.dark .bg-red-100 { background-color: rgba(239, 68, 68, 0.15) !important; }
html.dark .bg-blue-100 { background-color: rgba(59, 130, 246, 0.15) !important; }

/* Custom searchable select in dark mode */
html.dark .acm-select-trigger {
    background-color: #1C1C2E;
    border-color: #3D3D50;
    color: #E5E7EB;
}

html.dark .acm-select-dropdown {
    background-color: #2D2D3F;
    border-color: #3D3D50;
}

html.dark .acm-select-search input {
    background-color: #1C1C2E;
    border-color: #3D3D50;
    color: #E5E7EB;
}

html.dark .acm-select-option {
    color: #E5E7EB;
}

html.dark .acm-select-option:hover {
    background-color: #353548;
}

html.dark .acm-select-option.selected {
    background-color: rgba(212, 160, 23, 0.15);
    color: #D4A017;
}

/* Modal in dark mode */
html.dark #review-modal .bg-white {
    background-color: #2D2D3F !important;
}

/* Compare bar stays dark already */

/* Scrollbar in dark mode */
html.dark ::-webkit-scrollbar {
    width: 8px;
}

html.dark ::-webkit-scrollbar-track {
    background: #1C1C2E;
}

html.dark ::-webkit-scrollbar-thumb {
    background: #3D3D50;
    border-radius: 4px;
}

html.dark ::-webkit-scrollbar-thumb:hover {
    background: #4D4D60;
}

/* Toast in dark mode */
html.dark .toast {
    background-color: #2D2D3F;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3);
}

html.dark .toast-message {
    color: #E5E7EB;
}

html.dark .toast-close {
    color: #6B7280;
}

html.dark .toast-close:hover {
    color: #E5E7EB;
}

/* Skeleton in dark mode */
html.dark .skeleton {
    background: linear-gradient(90deg, #2D2D3F 25%, #353548 50%, #2D2D3F 75%);
    background-size: 200% 100%;
}
html.dark .skeleton:has(.img-lazy.loaded) {
    animation: none;
    background: transparent;
}

/* Password toggle in dark mode */
html.dark .password-toggle {
    color: #6B7280;
}

html.dark .password-toggle:hover {
    color: #E5E7EB;
}

/* Quick-View modal in dark mode */
html.dark .qv-panel {
    background: #1C1C2E;
    border: 1px solid #2D2D3F;
}
html.dark .qv-close {
    background: #2D2D3F;
    border-color: #3D3D4F;
    color: #9CA3AF;
}
html.dark .qv-close:hover {
    background: #3D3D4F;
    color: #E5E7EB;
}
html.dark .qv-spinner {
    border-color: #3D3D4F;
    border-top-color: #D4A017;
}
html.dark .qv-title { color: #E5E7EB; }
html.dark .qv-image-wrap { background: #2D2D3F; }
html.dark .qv-thumb { border-color: transparent; }
html.dark .qv-thumb.active,
html.dark .qv-thumb:hover { border-color: #D4A017; }
html.dark .qv-badge-outline {
    background: #2D2D3F;
    color: #D1D5DB;
    border-color: #3D3D4F;
}
html.dark .qv-spec { border-bottom-color: #2D2D3F; }
html.dark .qv-spec-label { color: #9CA3AF; }
html.dark .qv-spec-value { color: #E5E7EB; }
html.dark .qv-desc { color: #9CA3AF; }
html.dark .qv-meta-item { color: #9CA3AF; }

/* ── Filter Panel (slide-out) ─────────────────────── */
.filter-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.filter-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}
.filter-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 100vw;
    height: 100%;
    background: #fff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}
.filter-panel.active {
    transform: translateX(0);
}
