/* ===================================
   DiskMarket — Dark Automotive Theme
   =================================== */

:root {
    --bg-primary: #0a0a0c;
    --bg-secondary: #111114;
    --bg-card: #16161a;
    --bg-elevated: #1c1c21;
    --bg-hover: #222228;

    --text-primary: #f0f0f2;
    --text-secondary: #9898a0;
    --text-muted: #5c5c66;

    --accent: #e8b931;
    --accent-hover: #f0c73f;
    --accent-glow: rgba(232, 185, 49, 0.15);

    --green: #2dd272;
    --red: #e8443a;

    --border: #2a2a30;
    --border-light: #35353c;

    --radius: 10px;
    --radius-lg: 16px;
    --radius-sm: 6px;

    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.5);

    --font-display: 'Bebas Neue', sans-serif;
    --font-body: 'Outfit', sans-serif;

    --container: 1280px;
    --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ===== HEADER ===== */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10,10,12,0.88);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
}

.nav-container {
    max-width: var(--container); margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; height: 100%; gap: 32px;
}

.logo {
    display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700;
    letter-spacing: 0.5px; flex-shrink: 0;
}
.logo-icon { color: var(--accent); font-size: 28px; }
.logo-accent { color: var(--accent); }

.nav-links { display: flex; gap: 8px; }
.nav-link {
    padding: 8px 16px; border-radius: var(--radius-sm); font-weight: 500;
    font-size: 15px; color: var(--text-secondary); transition: all 0.2s;
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-hover); }
.nav-link.active { color: var(--accent); background: var(--accent-glow); }

.nav-right { margin-left: auto; }

.mobile-toggle {
    display: none; background: none; border: none; padding: 8px;
    flex-direction: column; gap: 5px;
}
.mobile-toggle span {
    display: block; width: 24px; height: 2px; background: var(--text-primary);
    border-radius: 2px; transition: 0.3s;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: var(--radius); font-weight: 600;
    font-size: 15px; border: none; transition: all 0.25s; white-space: nowrap;
}
.btn-primary {
    background: var(--accent); color: #0a0a0c;
    box-shadow: 0 2px 12px rgba(232,185,49,0.25);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(232,185,49,0.35); }
.btn-outline { background: transparent; border: 1px solid var(--border-light); color: var(--text-primary); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-full { width: 100%; }

/* ===== CUSTOM SELECT ===== */
.cs-wrapper {
    position: relative;
    display: inline-block;
}
.cs-wrapper.cs-flex { flex: 1; min-width: 140px; }

.cs-trigger {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
    text-align: left;
}
.cs-trigger--qf { border-radius: var(--radius); }
.cs-trigger--placeholder .cs-trigger-text { color: var(--text-muted); }
.cs-trigger:hover { border-color: var(--border-light); }
.cs-wrapper.cs-open .cs-trigger {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.cs-trigger-text {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
}
.cs-arrow {
    flex-shrink: 0; display: flex; align-items: center;
    color: var(--text-muted); transition: transform 0.2s;
}
.cs-wrapper.cs-open .cs-arrow { transform: rotate(180deg); color: var(--accent); }

.cs-dropdown {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    z-index: 120;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04) inset;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    min-width: 100%;
}
.cs-dropdown--above { top: auto; bottom: calc(100% + 6px); transform: translateY(8px); }
.cs-wrapper.cs-open .cs-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }

.cs-options {
    max-height: 240px;
    overflow-y: auto;
    padding: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-light) transparent;
}
.cs-options::-webkit-scrollbar { width: 6px; }
.cs-options::-webkit-scrollbar-track { background: transparent; }
.cs-options::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

.cs-option {
    padding: 9px 12px;
    font-size: 14px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.cs-option:hover { background: var(--bg-hover); color: var(--text-primary); }
.cs-option.selected { background: var(--accent-glow); color: var(--accent); font-weight: 500; }
.cs-option--placeholder { color: var(--text-muted); font-style: italic; }

/* Fallback: keep native selects styled for admin and noscript */
select {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    font-family: var(--font-body); font-size: 14px;
    color: var(--text-primary); background-color: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 10px 36px 10px 14px; cursor: pointer;
    transition: all 0.25s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239898a0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 12px;
}
select:hover { border-color: var(--border-light); }
select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

/* ===== HERO ===== */
.hero {
    position: relative; padding: 100px 24px 80px; text-align: center; overflow: hidden;
    min-height: 85vh; display: flex; align-items: center; justify-content: center;
}
.hero-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(232,185,49,0.08) 0%, transparent 60%),
        radial-gradient(circle at 20% 80%, rgba(232,185,49,0.04) 0%, transparent 40%),
        linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}
.hero-bg::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='%23ffffff' fill-opacity='0.02'%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");
}

.hero-content { position: relative; max-width: 720px; }
.hero-badge {
    display: inline-block; padding: 6px 16px; border-radius: 30px;
    background: var(--accent-glow); color: var(--accent); font-size: 14px; font-weight: 600;
    border: 1px solid rgba(232,185,49,0.2); margin-bottom: 24px;
    animation: fadeInUp 0.6s ease;
}
.hero-title {
    font-family: var(--font-display); font-size: clamp(48px, 8vw, 88px);
    line-height: 1; letter-spacing: 2px; margin-bottom: 20px;
    animation: fadeInUp 0.6s ease 0.1s both;
}
.accent-text { color: var(--accent); }
.hero-subtitle {
    font-size: 18px; color: var(--text-secondary); max-width: 520px; margin: 0 auto 32px;
    animation: fadeInUp 0.6s ease 0.2s both;
}
.hero-actions {
    display: flex; gap: 16px; justify-content: center; margin-bottom: 48px;
    animation: fadeInUp 0.6s ease 0.3s both;
}

/* Hero Quick Filter */
.hero-quick-filter {
    animation: fadeInUp 0.6s ease 0.4s both;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 20px; max-width: 640px; margin: 0 auto;
}
.quick-filter-row {
    display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center;
}
.qf-select { /* sizing handled by .cs-flex on wrapper */ }

/* ===== BRANDS TICKER ===== */
.brands-ticker {
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
    overflow: hidden; padding: 16px 0; background: var(--bg-secondary);
}
.ticker-track {
    display: flex; gap: 48px; animation: ticker 30s linear infinite; width: max-content;
}
.ticker-item {
    font-family: var(--font-display); font-size: 24px; letter-spacing: 2px;
    color: var(--text-muted); white-space: nowrap; transition: color 0.3s;
}
.ticker-item:hover { color: var(--accent); }

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== SECTIONS ===== */
.section { padding: 80px 0; }
.section-dark { background: var(--bg-secondary); }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.section-title {
    font-family: var(--font-display); font-size: 36px; letter-spacing: 1px;
}
.section-title.center { text-align: center; margin-bottom: 40px; }
.section-link { color: var(--accent); font-weight: 600; font-size: 15px; }

/* ===== DISK GRID & CARDS ===== */
.disk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 24px;
}

.disk-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    overflow: hidden; transition: all 0.3s; display: flex; flex-direction: column;
}
.disk-card:hover {
    border-color: var(--border-light); transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.disk-card-img {
    position: relative; aspect-ratio: 1; background: var(--bg-elevated);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.disk-card-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s;
}
.disk-card:hover .disk-card-img img { transform: scale(1.05); }

.disk-placeholder { color: var(--text-muted); }
.disk-placeholder.large { padding: 60px; }

.badge {
    position: absolute; padding: 4px 10px; border-radius: var(--radius-sm);
    font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-material { top: 12px; left: 12px; background: rgba(10,10,12,0.8); color: var(--text-secondary); backdrop-filter: blur(8px); }
.badge-out { top: 12px; right: 12px; background: rgba(232,68,58,0.9); color: #fff; }

.disk-card-info { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.disk-card-brand { font-size: 12px; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.disk-card-name { font-size: 16px; font-weight: 600; margin: 6px 0 8px; line-height: 1.3; }
.disk-card-size { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.disk-card-bottom {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border);
}
.disk-card-price { font-family: var(--font-display); font-size: 24px; letter-spacing: 0.5px; }
.disk-card-stock { font-size: 12px; font-weight: 500; }
.in-stock { color: var(--green); }
.no-stock { color: var(--red); }

/* ===== USP GRID ===== */
.usp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.usp-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 32px; text-align: center; transition: all 0.3s;
}
.usp-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.usp-icon { font-size: 40px; margin-bottom: 16px; }
.usp-card h3 { font-size: 18px; margin-bottom: 8px; }
.usp-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* ===== SEO CONTENT ===== */
.seo-content { background: var(--bg-primary); border-top: 1px solid var(--border); }
.seo-content h2 { font-size: 24px; margin-bottom: 16px; }
.seo-content h3 { font-size: 18px; margin: 24px 0 8px; color: var(--text-primary); }
.seo-content p { color: var(--text-secondary); font-size: 15px; line-height: 1.7; margin-bottom: 12px; }

/* ===== CATALOG PAGE ===== */
.catalog-page { padding-top: 32px; padding-bottom: 80px; }
.catalog-title {
    font-family: var(--font-display); font-size: 36px; letter-spacing: 1px; margin-bottom: 8px;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.catalog-filter-tag {
    font-family: var(--font-body); font-size: 14px; padding: 4px 12px;
    background: var(--accent-glow); color: var(--accent); border-radius: 20px;
    border: 1px solid rgba(232,185,49,0.2);
}
.catalog-count { color: var(--text-muted); margin-bottom: 32px; }

.catalog-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }

/* Breadcrumbs */
.breadcrumbs { margin-bottom: 24px; }
.breadcrumbs ol { display: flex; gap: 8px; list-style: none; font-size: 13px; }
.breadcrumbs li { display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.breadcrumbs li a { color: var(--text-secondary); }
.breadcrumbs li a:hover { color: var(--accent); }
.breadcrumbs li:not(:last-child)::after { content: '/'; color: var(--text-muted); }

/* Filters */
.filters-sidebar {
    position: sticky; top: calc(var(--header-h) + 16px);
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 24px; max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto;
}
.filters-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.filters-header h2 { font-size: 18px; }
.filters-reset { font-size: 13px; color: var(--accent); }

.filter-group { border-bottom: 1px solid var(--border); padding-bottom: 16px; margin-bottom: 16px; }
.filter-group:last-child { border: none; margin: 0; padding: 0; }
.filter-title {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 14px; font-weight: 600; cursor: pointer; margin-bottom: 12px;
    color: var(--text-secondary); user-select: none;
}
.filter-arrow { font-size: 12px; transition: transform 0.2s; }
.filter-group.collapsed .filter-options { display: none; }
.filter-group.collapsed .filter-arrow { transform: rotate(-90deg); }

.filter-options { display: flex; flex-direction: column; gap: 6px; }
.filter-option {
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    font-size: 14px; padding: 4px 0; color: var(--text-secondary); transition: color 0.2s;
}
.filter-option:hover { color: var(--text-primary); }
.filter-option input[type="radio"] {
    appearance: none; width: 16px; height: 16px; border: 2px solid var(--border-light);
    border-radius: 50%; flex-shrink: 0; transition: all 0.2s;
}
.filter-option input[type="radio"]:checked {
    border-color: var(--accent); background: var(--accent);
    box-shadow: inset 0 0 0 3px var(--bg-card);
}

/* Catalog Controls */
.catalog-controls {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px;
}
.sort-controls { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-secondary); }
.sort-controls .cs-wrapper { min-width: 160px; }
.sort-controls .cs-trigger { padding: 8px 14px; font-size: 13px; }
.mobile-filter-btn { display: none; }

/* Pagination */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 48px; flex-wrap: wrap; }
.page-btn {
    display: flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; background: var(--bg-card); border: 1px solid var(--border);
    transition: all 0.2s;
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); color: #0a0a0c; border-color: var(--accent); }
.page-dots { display: flex; align-items: center; color: var(--text-muted); }

/* Empty State */
.empty-state {
    text-align: center; padding: 60px 24px; color: var(--text-secondary);
}
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; margin-bottom: 8px; color: var(--text-primary); }
.empty-state a { color: var(--accent); }

/* ===== DISK DETAIL ===== */
.disk-detail-page { padding: 32px 0 80px; }
.detail-layout {
    display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start;
}

.gallery-main {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    overflow: hidden; aspect-ratio: 1;
    display: flex; align-items: center; justify-content: center;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 12px; margin-top: 16px; }
.thumb {
    width: 80px; height: 80px; border-radius: var(--radius); overflow: hidden;
    border: 2px solid var(--border); background: var(--bg-card); cursor: pointer;
    transition: border-color 0.2s; padding: 0;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active, .thumb:hover { border-color: var(--accent); }

.detail-brand {
    font-size: 13px; color: var(--accent); font-weight: 600; text-transform: uppercase;
    letter-spacing: 1px; display: block; margin-bottom: 8px;
}
.detail-title { font-family: var(--font-display); font-size: 36px; letter-spacing: 1px; margin-bottom: 20px; }

.detail-price-row {
    display: flex; align-items: center; gap: 16px; margin-bottom: 32px;
    padding-bottom: 24px; border-bottom: 1px solid var(--border);
}
.detail-price { font-family: var(--font-display); font-size: 40px; letter-spacing: 1px; }
.detail-stock { font-size: 14px; font-weight: 500; }

.detail-specs { margin-bottom: 32px; }
.specs-title { font-size: 18px; margin-bottom: 16px; }
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table tr { border-bottom: 1px solid var(--border); }
.specs-table td { padding: 12px 0; font-size: 14px; }
.specs-table td:first-child { color: var(--text-secondary); width: 50%; }
.specs-table td:last-child { text-align: right; }

.detail-actions { margin-bottom: 32px; }
.detail-description h2 { font-size: 18px; margin-bottom: 12px; }
.detail-description p { color: var(--text-secondary); line-height: 1.7; }

.similar-section { margin-top: 80px; padding-top: 48px; border-top: 1px solid var(--border); }

/* ===== FOOTER ===== */
.site-footer { background: var(--bg-secondary); border-top: 1px solid var(--border); padding: 64px 0 32px; }
.footer-container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.footer-desc { color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.footer-col h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; color: var(--text-secondary); }
.footer-col a { display: block; font-size: 14px; color: var(--text-muted); padding: 4px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-col p { font-size: 14px; color: var(--text-muted); padding: 4px 0; }
.footer-bottom { text-align: center; padding-top: 32px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 13px; }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .catalog-layout { grid-template-columns: 1fr; }
    .filters-sidebar {
        position: fixed; top: 0; left: -100%; width: 300px; height: 100vh;
        z-index: 200; border-radius: 0; max-height: 100vh; transition: left 0.3s;
    }
    .filters-sidebar.open { left: 0; }
    .mobile-filter-btn { display: inline-flex; }
    .detail-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--bg-primary); border-bottom: 1px solid var(--border); flex-direction: column; padding: 16px; }
    .nav-links.open { display: flex; }
    .mobile-toggle { display: flex; }
    .hero { min-height: 70vh; padding: 60px 16px; }
    .hero-title { font-size: clamp(36px, 10vw, 56px); }
    .hero-actions { flex-direction: column; align-items: center; }
    .quick-filter-row { flex-direction: column; }
    .qf-select { width: 100%; }
    .cs-wrapper.cs-flex { width: 100%; min-width: 0; flex: none; }
    .disk-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .detail-layout { gap: 24px; }
    .detail-title { font-size: 28px; }
    .detail-price { font-size: 32px; }
}
