/* =====================================================
   RenkDünyası — Ana CSS
   Stack: CSS Custom Properties + Bootstrap 5
   ===================================================== */

/* --- Google Fonts import yapılıyor --- */
:root {
    /* Renkler (Light Theme Focus) */
    --rd-primary:      #4F46E5;
    --rd-primary-dark: #3730A3;
    --rd-secondary:    #F59E0B;
    --rd-accent:       #0EA5E9;
    --rd-bg:           #F8FAFC;
    --rd-surface:      #FFFFFF;
    --rd-card:         #FFFFFF;
    --rd-border:       #E2E8F0;
    --rd-text:         #1E293B;
    --rd-text-dark:    #0F172A;
    --rd-muted:        #64748B;

    /* Fontlar */
    --font-base:  'Inter', system-ui, sans-serif;
    --font-brand: 'Outfit', 'Inter', sans-serif;

    /* Gölge (Softer for light theme) */
    --shadow-sm:  0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md:  0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg:  0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

    /* Geçiş */
    --transition: 0.2s cubic-bezier(.4,0,.2,1);

    /* Navbar yüksekliği */
    --navbar-h: 72px;
}

/* --- Genel --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-base);
    background: var(--rd-bg);
    color: var(--rd-text);
    min-height: 100vh;
    line-height: 1.6;
}

a { color: var(--rd-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #67E8F9; }

h1,h2,h3,h4,h5,h6 { font-family: var(--font-brand); font-weight: 700; color: var(--rd-text-dark); }

.fw-800 { font-weight: 800; }
.fw-700 { font-weight: 700; }
.fw-600 { font-weight: 600; }

.py-6 { padding-top: 5rem; padding-bottom: 5rem; }
.py-7 { padding-top: 7rem; padding-bottom: 7rem; }
.mt-6 { margin-top: 4rem; }

/* --- Top Bar --- */
.topbar {
    background: #FFFFFF;
    border-bottom: 1px solid var(--rd-border);
    font-size: 0.78rem;
    color: var(--rd-muted);
}

/* --- Navbar --- */
#mainNav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rd-border);
    height: var(--navbar-h);
    z-index: 1000;
}

/* Mobil menü düzeltmeleri */
@media (max-width: 991.98px) {
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #FFFFFF;
        border-bottom: 1px solid var(--rd-border);
        border-radius: 0 0 16px 16px;
        box-shadow: var(--shadow-lg);
        z-index: 1050;
        padding: 1rem;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .navbar-collapse.show {
        display: block;
    }
    
    /* Dropdown menüler mobilde düzgün görünsün */
    .navbar-collapse .dropdown-menu {
        position: static;
        float: none;
        width: auto;
        margin-top: 0;
        background: #FFFFFF;
        border: 1px solid var(--rd-border);
        box-shadow: none;
        padding-left: 1rem;
    }
}

/* Brand */
.brand-name {
    font-family: var(--font-brand);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--rd-text-dark);
    letter-spacing: -0.5px;
}
.brand-accent { color: var(--rd-primary); }

/* Nav Links */
.navbar-nav .nav-link {
    color: var(--rd-muted) !important;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.5rem 1rem !important;
    border-radius: 10px;
    transition: all var(--transition);
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--rd-primary) !important;
    background: #F1F5F9;
}

/* Dropdown */
.dropdown-menu {
    background: #FFFFFF;
    border: 1px solid var(--rd-border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 10px;
}
.dropdown-item {
    color: var(--rd-text);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
}
.dropdown-item:hover { background: #F8FAFC; color: var(--rd-primary); }

.menu-swatch {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.2);
}

/* --- Arama --- */
.search-wrapper { position: relative; min-width: 280px; }
.search-container { position: relative; }
.search-input {
    background: #F1F5F9;
    border: 1px solid var(--rd-border);
    color: var(--rd-text-dark);
    border-radius: 12px;
    padding: 0.6rem 1rem 0.6rem 2.8rem;
    font-size: 0.9rem;
    width: 100%;
    transition: all var(--transition);
}
.search-input::placeholder { color: var(--rd-muted); }
.search-input:focus {
    outline: none;
    border-color: var(--rd-primary);
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}
.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--rd-muted);
    font-size: 1rem;
    pointer-events: none;
}

/* Arama Drop */
.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: #FFFFFF;
    border: 1px solid var(--rd-border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    max-height: 480px;
    overflow-y: auto;
    display: none;
    z-index: 2000;
    padding: 8px;
}
.search-results.show { display: block; }
.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    border-radius: 8px;
    margin: 3px;
    transition: background var(--transition);
}
.search-result-item:hover { background: #F8FAFC; }
.search-swatch {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid var(--rd-border);
}
.search-result-name { font-weight: 500; font-size: 0.875rem; line-height: 1.3; color: var(--rd-text-dark); }
.search-result-meta { font-size: 0.76rem; color: var(--rd-muted); }
.search-result-system {
    font-size: 0.7rem;
    background: #EEF2FF;
    color: var(--rd-primary);
    padding: 2px 8px;
    border-radius: 100px;
}
.search-empty { text-align: center; padding: 24px; color: var(--rd-muted); font-size: 0.875rem; }
.search-loading { text-align: center; padding: 16px; color: var(--rd-muted); }

/* --- Butonlar --- */
.btn-primary {
    background: var(--rd-primary);
    border-color: var(--rd-primary);
    font-weight: 700;
    border-radius: 12px;
    padding: 0.6rem 1.5rem;
    transition: all var(--transition);
}
.btn-primary:hover {
    background: var(--rd-primary-dark);
    border-color: var(--rd-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
}
.btn-white {
    background: #FFFFFF;
    color: var(--rd-text-dark);
    font-weight: 700;
    border-radius: 12px;
    transition: all var(--transition);
}
.btn-white:hover {
    background: #F8FAFC;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn-accent {
    background: var(--rd-accent);
    border-color: var(--rd-accent);
    color: #fff;
    font-weight: 700;
    border-radius: 12px;
    transition: all var(--transition);
}
.btn-accent:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.4);
}

/* --- Kartlar --- */
.rd-card {
    background: var(--rd-card);
    border: 1px solid var(--rd-border);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}
.rd-card:hover {
    box-shadow: 0 20px 25px -5px rgba(79, 70, 229, 0.1), 0 10px 10px -5px rgba(79, 70, 229, 0.04);
    transform: translateY(-4px);
    border-color: var(--rd-primary);
}

.hover-lift {
    transition: transform var(--transition), box-shadow var(--transition);
}
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md) !important;
}

/* Scroll to Top Button */
#scrollToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--rd-primary);
    color: #fff;
    border: none;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}
#scrollToTop.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#scrollToTop:hover {
    background: var(--rd-primary-dark);
    transform: translateY(-4px) scale(1.1);
}

.hero-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(20, 1fr);
    width: 100%;
    margin: 0 auto;
}

/* --- Ana Sayfa Araç Kutuları --- */
.home-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    max-width: 980px;
    margin: 0 auto;
}
.home-tool-card {
    min-height: 140px;
    transition: all var(--transition);
}
.home-tool-icon {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}
.home-tool-card h6 {
    font-size: 1rem;
}
.home-tool-card small {
    font-size: 0.8rem;
}

@media (max-width: 1400px) {
    .hero-grid { grid-template-columns: repeat(15, 1fr); }
}
@media (max-width: 1200px) {
    .hero-grid { grid-template-columns: repeat(12, 1fr); }
}
@media (max-width: 991.98px) {
    .hero-grid { grid-template-columns: repeat(10, 1fr); }
    .home-tools-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
    .hero-grid { grid-template-columns: repeat(6, 1fr); }
    .home-tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
    .hero-grid { grid-template-columns: repeat(4, 1fr); gap: 4px; }
    .home-tools-grid { gap: 10px; }
    .home-tool-card { min-height: 128px; }
}

/* --- Renk Swatch Kartları --- */
.color-card {
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
    position: relative;
}
.color-card:hover {
    border-color: var(--rd-primary);
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
    z-index: 10;
}
.color-swatch {
    width: 100%;
    aspect-ratio: 1;
    display: block;
    border-bottom: 1px solid var(--rd-border);
}
.color-info {
    background: #FFFFFF;
    padding: 10px 12px;
}
.color-code {
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    color: var(--rd-text);
    line-height: 1.2;
}
.color-name {
    font-size: 0.7rem;
    color: var(--rd-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.color-hex {
    font-size: 0.68rem;
    color: var(--rd-muted);
    opacity: 0.7;
    font-family: monospace;
}

/* --- Katalog Grid --- */
.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}
@media (max-width: 576px) {
    .color-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
    .menu-swatch { width: 12px; height: 12px; border-radius: 3px; }
    .search-swatch { width: 28px; height: 28px; border-radius: 6px; }
}

/* --- Page Header --- */
.page-header {
    background: linear-gradient(135deg, #EEF2FF 0%, #F0F9FF 100%);
    border-bottom: 1px solid var(--rd-border);
    padding: 4rem 0 3rem;
}
.page-header h1 { font-size: 2.25rem; font-weight: 800; color: var(--rd-text-dark); margin-bottom: 0.5rem; }

/* --- Hero --- */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(91,79,216,0.2) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 80% 80%, rgba(6,182,212,0.1) 0%, transparent 60%),
        var(--rd-dark);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%235B4FD8' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.2rem;
}
.hero-title .highlight {
    background: linear-gradient(135deg, var(--rd-primary), var(--rd-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle { font-size: 1.1rem; color: var(--rd-muted); max-width: 540px; }

/* Hero renk bandı */
.hero-palette {
    display: flex;
    gap: 4px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    height: 300px;
}
.hero-palette-swatch {
    flex: 1;
    position: relative;
    transition: flex var(--transition);
    cursor: pointer;
}
.hero-palette-swatch:hover { flex: 2.5; }
.hero-palette-label {
    position: absolute;
    bottom: 8px; left: 50%;
    transform: translateX(-50%) rotate(-90deg);
    font-size: 0.65rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    transition: opacity var(--transition);
}
.hero-palette-swatch:hover .hero-palette-label { opacity: 1; }

/* --- İstatistik Kartları --- */
.stat-card {
    background: var(--rd-card);
    border: 1px solid var(--rd-border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}
.stat-card:hover {
    border-color: rgba(91,79,216,0.4);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.stat-number {
    font-family: var(--font-brand);
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--rd-primary), var(--rd-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}
.stat-label { color: var(--rd-muted); font-size: 0.85rem; margin-top: 6px; }

/* --- Filtre Paneli --- */
.filter-bar {
    background: var(--rd-surface);
    border: 1px solid var(--rd-border);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}
.filter-chip {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--rd-border);
    color: var(--rd-muted);
    background: transparent;
    transition: all var(--transition);
    white-space: nowrap;
}
.filter-chip:hover,
.filter-chip.active {
    background: var(--rd-primary);
    border-color: var(--rd-primary);
    color: #fff;
}

/* Renk ailesi chip renk göstergesi */
.filter-chip-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

/* --- Delta-E Rozet --- */
.badge-perfect  { background: #DCFCE7; color: #166534; border: 1px solid #BBF7D0; }
.badge-close    { background: #DBEAFE; color: #1E40AF; border: 1px solid #BFDBFE; }
.badge-similar  { background: #FEF9C3; color: #854D0E; border: 1px solid #FEF08A; }
.badge-distant  { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }

/* --- Sayfalama --- */
.pagination .page-link {
    background: var(--rd-card);
    border-color: var(--rd-border);
    color: var(--rd-muted);
    border-radius: 8px !important;
    margin: 0 2px;
    transition: all var(--transition);
}
.pagination .page-link:hover {
    background: var(--rd-primary);
    border-color: var(--rd-primary);
    color: #fff;
}
.pagination .page-item.active .page-link {
    background: var(--rd-primary);
    border-color: var(--rd-primary);
    color: #fff;
}

/* --- Footer --- */
.site-footer {
    background: #FFFFFF;
    border-top: 1px solid var(--rd-border);
    padding: 5rem 0 2rem;
}
.site-footer a { color: var(--rd-muted); font-size: 0.875rem; transition: color var(--transition); }
.site-footer a:hover { color: var(--rd-primary); }
.site-footer h6 { color: var(--rd-text-dark); font-size: 0.95rem; font-weight: 700; margin-bottom: 1.25rem; }

/* --- Renk Detay Sayfası --- */
.color-detail-swatch {
    width: 100%;
    aspect-ratio: 8/9;
    border-radius: 20px;
    border: 1px solid var(--rd-border);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.swatch-label {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 10px 16px;
}

.room-selector-btn {
    background: #FFFFFF;
    border: 1px solid var(--rd-border);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--rd-muted);
    transition: all var(--transition);
}
.room-selector-btn:hover { background: #F8FAFC; color: var(--rd-text-dark); }
.room-selector-btn.active {
    background: var(--rd-primary);
    border-color: var(--rd-primary);
    color: #FFFFFF;
}

.preview-badge {
    position: absolute;
    bottom: 16px;
    left: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--rd-text-dark);
    z-index: 10;
    border: 1px solid var(--rd-border);
}

.color-detail-info dt { color: var(--rd-muted); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
.color-detail-info dd { color: var(--rd-text-dark); font-weight: 700; font-size: 1rem; }

/* --- Upload / Simülatör --- */
.upload-zone {
    border: 2px dashed rgba(91,79,216,0.5);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: rgba(91,79,216,0.04);
}
.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--rd-primary);
    background: rgba(91,79,216,0.1);
}
.upload-icon { font-size: 3rem; color: var(--rd-primary); margin-bottom: 1rem; }

/* Simülasyon Canvas */
#simCanvas { border-radius: 12px; cursor: crosshair; max-width: 100%; }
.sim-controls { background: var(--rd-surface); border: 1px solid var(--rd-border); border-radius: 14px; padding: 1.25rem; }

/* --- Güçlü Arama Sayfası --- */
.search-page-results .color-card { cursor: pointer; }
.search-hero {
    background: linear-gradient(135deg, rgba(91,79,216,0.12), transparent);
    border-bottom: 1px solid var(--rd-border);
    padding: 2rem 0;
}
.search-big-input {
    background: var(--rd-card);
    border: 2px solid var(--rd-border);
    border-radius: 14px;
    color: var(--rd-text);
    font-size: 1.1rem;
    padding: 0.85rem 1.25rem 0.85rem 3rem;
    width: 100%;
    transition: all var(--transition);
}
.search-big-input:focus {
    outline: none;
    border-color: var(--rd-primary);
    box-shadow: 0 0 0 4px rgba(91,79,216,0.2);
}

/* --- Katalog karşılaştır hızlı butonu --- */
.color-swatch { position: relative; }
.compare-quick-btn {
    position: absolute;
    top: 7px; right: 7px;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(91,79,216,0.85);
    border: 1.5px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.18s, transform 0.18s, background 0.18s;
    padding: 0;
    z-index: 5;
    backdrop-filter: blur(4px);
}
.color-card:hover .compare-quick-btn {
    opacity: 1;
    transform: translateY(0);
}
.compare-quick-btn:hover {
    background: rgba(91,79,216,1);
    transform: scale(1.12);
}
/* Sepette olan renk için yeşil tik */
.compare-quick-btn.in-basket {
    background: rgba(34,197,94,0.85);
    opacity: 1;
    transform: translateY(0);
}
.compare-quick-btn.in-basket .bi-plus-lg::before { content: "\F26C"; } /* bi-check-lg */

/* --- Karşılaştırma --- */
.compare-side {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--rd-border);
}
.compare-top {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.compare-delta {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--font-brand);
}

/* --- Animasyonlar --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { 
    opacity: 0; 
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; 
}

@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position:  200% center; }
}
.skeleton {
    background: linear-gradient(90deg, var(--rd-card) 25%, rgba(255,255,255,0.05) 50%, var(--rd-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 8px;
}

/* --- Responsive --- */
@media(max-width: 991px) {
    .search-wrapper { min-width: 100%; margin: 0.75rem 0; }
    .hero-palette { height: 180px; }
    .hero { min-height: 60vh; }
}
@media(max-width: 767px) {
    .page-header h1 { font-size: 1.5rem; }
    .hero-palette { display: none; }
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--rd-dark); }
::-webkit-scrollbar-thumb { background: rgba(91,79,216,0.4); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--rd-primary); }

/* --- Karşılaştırma Floating Bar --- */
#compareBar {
    position: fixed;
    bottom: -120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9000;
    transition: bottom 0.35s cubic-bezier(.4,0,.2,1);
    min-width: 320px;
    max-width: 700px;
    width: calc(100vw - 32px);
}
#compareBar.visible { bottom: 20px; }

.cbar-inner {
    background: rgba(20, 28, 48, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(91,79,216,0.45);
    border-radius: 18px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(91,79,216,0.2);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.cbar-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #A78BFA;
    white-space: nowrap;
    flex-shrink: 0;
}

.cbar-swatches {
    display: flex;
    gap: 10px;
    flex: 1;
    align-items: center;
}

.cbar-swatch-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.cbar-swatch {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.18);
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    transition: transform 0.18s;
}
.cbar-swatch-wrap:hover .cbar-swatch { transform: scale(1.08); }

.cbar-code {
    font-size: 0.6rem;
    color: var(--rd-muted);
    font-family: monospace;
    max-width: 48px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.cbar-remove {
    position: absolute;
    top: -6px; right: -6px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: rgba(239,68,68,0.9);
    border: none;
    color: #fff;
    font-size: 0.65rem;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    display: none;
    transition: background 0.15s;
}
.cbar-swatch-wrap:hover .cbar-remove { display: block; }
.cbar-remove:hover { background: #DC2626; }

.cbar-placeholder {
    width: 42px; height: 42px;
    border-radius: 10px;
    border: 2px dashed rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.25);
}

.cbar-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.cbar-btn {
    border: none;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 14px;
    transition: all 0.18s;
}
.cbar-btn-compare {
    background: var(--rd-primary);
    color: #fff;
}
.cbar-btn-compare:hover {
    background: var(--rd-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(91,79,216,0.5);
}
.cbar-btn-clear {
    background: rgba(255,255,255,0.07);
    color: var(--rd-muted);
    padding: 8px 10px;
}
.cbar-btn-clear:hover { background: rgba(239,68,68,0.2); color: #F87171; }

/* --- Toast Bildirim --- */
#compareToast {
    position: fixed;
    bottom: 88px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: rgba(20,28,48,0.96);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 9px 18px;
    font-size: 0.82rem;
    color: var(--rd-text);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    z-index: 9001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    white-space: nowrap;
}
#compareToast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.ctoast-success { border-color: rgba(34,197,94,0.4) !important; }
.ctoast-warn    { border-color: rgba(234,179,8,0.4) !important; }
.ctoast-info    { border-color: rgba(91,79,216,0.4) !important; }

/* Katalog'daki "in-basket" buton durumu */
.cbar-in-basket,
[data-compare-id].in-basket {
    background: #22C55E !important; /* Daha canlı yeşil */
    color: #ffffff !important;
    border-color: #16A34A !important;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(34,197,94,0.4);
}
[data-compare-id].in-basket i::before {
    content: "\F272"; /* Check ikonu (bootstrap-icons) */
}

@media (max-width: 576px) {
    .cbar-label { display: none; }
    .cbar-btn-compare { padding: 8px 10px; }
    .cbar-btn-compare i { display: none; }
}

/* --- Oda Önizleme (Room Preview) --- */
.room-preview-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #fff; /* Beyaz zemin şart */
    aspect-ratio: 16 / 9;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid var(--rd-border);
}

.room-preview-container.preview-lg {
    aspect-ratio: 16 / 9;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

.room-base-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.room-paint-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    mix-blend-mode: multiply; /* En gerçekçi gölge koruma modu */
    background-size: cover;
    background-position: center;
    pointer-events: none;
    z-index: 2;
    /* Duvarların rengi kusursuz emmesi için filtreleri agresifleştiriyoruz */
    filter: brightness(1.1) contrast(1.1); 
    transition: background-image 0.4s ease;
}

.room-selector-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--rd-border);
    color: var(--rd-text);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.room-selector-btn:hover, .room-selector-btn.active {
    background: var(--rd-primary);
    color: #fff;
    border-color: var(--rd-primary);
}

.color-card:hover .swatch-actions {
    opacity: 1 !important;
}
