/* ===== Screen Reader Only ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0f1117;
    --bg-secondary: #161822;
    --bg-card: #1c1f2e;
    --bg-card-hover: #242840;
    --bg-input: #1c1f2e;
    --bg-sidebar: #161822;
    --border: #2a2d3e;
    --border-hover: #3a3d5e;
    --text-primary: #e8eaf0;
    --text-secondary: #9499b3;
    --text-muted: #7a7f9e;
    --accent: #f7c948;
    --accent-hover: #f5d76e;
    --accent-dim: rgba(247, 201, 72, 0.1);
    --green: #34d399;
    --orange: #fb923c;
    --red: #f87171;
    --blue: #60a5fa;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --transition: 0.2s ease;
    --sidebar-width: 280px;
    --header-height: 74px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* ===== Header — loaded from header.css ===== */
/* Homepage-specific search overrides */
#searchInput {
    width: 100%;
    height: 42px;
    padding: 0 44px 0 42px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

#searchInput::placeholder {
    color: var(--text-muted);
}

#searchInput:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-shortcut {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 12px;
    color: var(--text-muted);
    font-family: inherit;
    pointer-events: none;
}

.header-stats {
    flex-shrink: 0;
}

.result-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ===== Layout ===== */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 20px 16px;
    z-index: 50;
    transition: transform 0.3s ease;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.sidebar-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.clear-filters-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 12px;
    font-family: inherit;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition);
}

.clear-filters-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Filter Groups */
.filter-group {
    margin-bottom: 8px;
}

.filter-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
    user-select: none;
}

.filter-title:hover {
    background: rgba(255, 255, 255, 0.03);
}

.filter-title .chevron {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.filter-title.collapsed .chevron {
    transform: rotate(-90deg);
}

.filter-options {
    padding: 4px 0;
    max-height: 400px;
    overflow-y: auto;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.filter-options.collapsed {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background var(--transition);
    font-size: 13px;
    color: var(--text-primary);
}

.filter-option:hover {
    background: rgba(255, 255, 255, 0.04);
}

.filter-option input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-hover);
    border-radius: 4px;
    flex-shrink: 0;
    position: relative;
    transition: all var(--transition);
}

.filter-option input:checked + .checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.filter-option input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid var(--bg-primary);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* See more / See less toggle */
.see-more-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.see-more-btn:hover {
    text-decoration: underline;
}

/* Range Sliders */
.slider-filter {
    padding: 8px 8px 4px;
}

.slider-values {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 10px;
}

.range-slider {
    position: relative;
    height: 30px;
}

.range-slider input[type="range"] {
    position: absolute;
    width: 100%;
    height: 30px;
    top: 0;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    z-index: 2;
    margin: 0;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
    pointer-events: all;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-primary);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    position: relative;
    z-index: 3;
}

.range-slider input[type="range"]::-moz-range-thumb {
    pointer-events: all;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-primary);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.slider-track {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    right: 0;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    z-index: 1;
}

.slider-track::after {
    content: '';
    position: absolute;
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    left: var(--slider-left, 0%);
    right: var(--slider-right, 0%);
}

.filter-label {
    flex: 1;
}

.filter-count {
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-primary);
    padding: 1px 7px;
    border-radius: 10px;
    min-width: 24px;
    text-align: center;
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    margin-top: 26px;
    padding: 16px 16px 20px;
    transition: margin-left 0.3s ease;
    min-width: 0;
}

.sidebar.collapsed ~ .main-content,
.main-content.expanded {
    margin-left: 0;
}

body.sidebar-collapsed .site-footer {
    margin-left: 0;
}

/* Welcome Banner */
.welcome-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.welcome-content {
    flex: 1;
    min-width: 0;
}

.welcome-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.welcome-content p + p {
    margin-top: 8px;
}

.welcome-content strong {
    color: var(--accent);
}

.welcome-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.welcome-close:hover {
    opacity: 1;
    color: var(--text);
}

/* Contact Overlay */
.contact-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
}

.contact-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 480px;
    width: 100%;
    position: relative;
}

.contact-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.contact-close:hover {
    color: var(--text);
}

.contact-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.contact-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.contact-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(247,201,72,0.1);
}

.contact-input::placeholder {
    color: var(--text-muted);
}

.contact-textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-submit {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: #0f1117;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s;
}

.contact-submit:hover {
    opacity: 0.9;
}

.contact-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Sort Bar */
.sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 16px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.sort-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-sidebar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.toggle-sidebar-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.toggle-sidebar-btn svg {
    width: 18px;
    height: 18px;
}

.view-toggles {
    display: flex;
    gap: 4px;
    padding: 3px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
}

.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}

.view-btn svg {
    width: 16px;
    height: 16px;
}

.view-btn.active {
    background: var(--bg-card);
    color: var(--text-primary);
}

.view-btn:hover:not(.active) {
    color: var(--text-secondary);
}

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

.sort-label {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

.sort-select {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    padding: 6px 12px 6px 12px;
    width: auto;
    max-width: 100%;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239499b3' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
    outline: none;
    cursor: pointer;
    transition: border-color var(--transition);
}

.sort-select:hover {
    border-color: var(--border-hover);
}

.sort-select option {
    background: var(--bg-secondary);
}

/* ===== Set Grid ===== */
.set-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.set-grid.list-view {
    grid-template-columns: 1fr;
    gap: 8px;
}

/* ===== Set Card (Grid) ===== */
.set-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.set-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.set-card .card-image {
    position: relative;
    width: 100%;
    padding-top: 140%; /* Portrait aspect ratio for trading cards (~2.5:3.5) */
    background: #0d0f16;
    overflow: hidden;
}

.set-card .card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform 0.3s ease;
}

.set-card:hover .card-image img {
    transform: scale(1.05);
}

.card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(8px);
}

.badge-available {
    background: rgba(52, 211, 153, 0.15);
    color: var(--green);
    border: 1px solid rgba(52, 211, 153, 0.25);
}

.badge-retiring {
    background: rgba(251, 146, 60, 0.15);
    color: var(--orange);
    border: 1px solid rgba(251, 146, 60, 0.25);
}

.badge-retired {
    background: rgba(248, 113, 113, 0.15);
    color: var(--red);
    border: 1px solid rgba(248, 113, 113, 0.25);
}

.badge-new {
    background: rgba(96, 165, 250, 0.15);
    color: var(--blue);
    border: 1px solid rgba(96, 165, 250, 0.25);
}

.card-body {
    padding: 14px;
}

.card-theme {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
    margin-bottom: 4px;
}

.card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-set-number {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===== Favorites ===== */
.favorites-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
}

.favorites-toggle-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.favorites-toggle-btn.active {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}

.favorites-toggle-btn.active svg {
    fill: var(--accent);
}

.favorites-count {
    font-weight: 600;
}

.card-favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 17, 23, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition);
    padding: 0;
}

.card-favorite svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
    fill: none;
    transition: all var(--transition);
}

.card-favorite:hover svg {
    stroke: var(--accent);
}

.card-favorite.favorited svg {
    stroke: var(--accent);
    fill: var(--accent);
}

.card-favorite:hover {
    border-color: var(--accent);
    transform: scale(1.1);
}

.card-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 10px;
}

.price-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

.card-ppp {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 8px;
}

.card-status-row {
    margin-bottom: 4px;
}

.card-status {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
}

.card-status-new {
    background: rgba(96, 165, 250, 0.12);
    color: var(--blue);
    border: 1px solid rgba(96, 165, 250, 0.25);
}

.card-status-active {
    background: rgba(52, 211, 153, 0.12);
    color: var(--green);
    border: 1px solid rgba(52, 211, 153, 0.25);
}

.card-status-retiring {
    background: rgba(251, 146, 60, 0.12);
    color: var(--orange);
    border: 1px solid rgba(251, 146, 60, 0.25);
}

.card-status-retired {
    background: rgba(248, 113, 113, 0.12);
    color: var(--red);
    border: 1px solid rgba(248, 113, 113, 0.25);
}

.card-sub-theme {
    color: var(--text-muted);
    font-weight: 500;
    text-transform: none;
    margin-left: 4px;
}

/* ===== Retailer Buttons ===== */
.card-retailers {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.retailer-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    transition: all var(--transition);
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
}

.retailer-btn:hover {
    transform: translateY(-1px);
    border-color: var(--border-hover);
}

.retailer-lego {
    border-color: rgba(255, 208, 0, 0.3);
    color: #ffd000;
}
.retailer-lego:hover {
    background: rgba(255, 208, 0, 0.1);
    border-color: rgba(255, 208, 0, 0.5);
}

.retailer-amazon {
    border-color: rgba(255, 153, 0, 0.3);
    color: #ff9900;
}
.retailer-amazon:hover {
    background: rgba(255, 153, 0, 0.1);
    border-color: rgba(255, 153, 0, 0.5);
}

.retailer-walmart {
    border-color: rgba(52, 211, 153, 0.3);
    color: #34d399;
}
.retailer-walmart:hover {
    background: rgba(52, 211, 153, 0.1);
    border-color: rgba(52, 211, 153, 0.5);
}

.retailer-bestbuy {
    border-color: rgba(100, 160, 255, 0.3);
    color: #64a0ff;
}
.retailer-bestbuy:hover {
    background: rgba(100, 160, 255, 0.1);
    border-color: rgba(100, 160, 255, 0.5);
}

.retailer-tcgplayer {
    border-color: rgba(247, 201, 72, 0.3);
    color: var(--accent);
    font-weight: 700;
}
.retailer-tcgplayer:hover {
    background: rgba(247, 201, 72, 0.1);
    border-color: rgba(247, 201, 72, 0.5);
}

.sale-tag {
    font-size: 9px;
    font-weight: 700;
    background: var(--green);
    color: #0f1117;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 4px;
}

.retailer-btn.on-sale {
    border-color: rgba(52, 211, 153, 0.4);
}

/* ===== List View ===== */
.set-grid.list-view .set-card {
    display: flex;
    flex-direction: row;
}

.set-grid.list-view .card-image {
    width: 140px;
    min-width: 140px;
    padding-top: 0;
    height: 140px;
}

.set-grid.list-view .card-image img {
    padding: 10px;
}

.set-grid.list-view .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.set-grid.list-view .card-footer {
    border-top: none;
    padding-top: 0;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 20px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 20px;
}

/* ===== Load More ===== */
.load-more {
    text-align: center;
    padding: 32px 0;
}

.load-more-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    padding: 12px 32px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
}

.load-more-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ===== Mobile Filter Button ===== */
.mobile-filter-btn {
    display: none;
    position: fixed;
    bottom: 12px;
    right: 16px;
    z-index: 90;
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    border-radius: 25px;
    padding: 0 20px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    align-items: center;
    gap: 8px;
    height: 48px;
    transition: all var(--transition);
}
/* Match Ko-fi button to align with filter btn */
.floatingchat-container-wrap{left:16px !important;bottom:16px !important}
.floatingchat-container-wrap .floating-chat-kofi-popup-btn{height:48px !important;border-radius:25px !important;font-size:16px !important}

.mobile-filter-btn:hover {
    background: var(--accent-hover);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 55;
}

/* Mobile nav hamburger */
/* Share button */
.share-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s;
    font-size: 12px;
}

.share-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* Mobile nav styles loaded from header.css */

/* ===== Set Detail Modal ===== */
.set-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.set-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.set-modal-container {
    position: relative;
    width: 100%;
    max-width: 960px;
    max-height: 90vh;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.25s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.set-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 40px;
    height: 40px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.set-modal-close:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.set-modal-content {
    padding: 32px;
}

.modal-top {
    display: flex;
    gap: 32px;
    align-items: center;
    margin-bottom: 24px;
}

.modal-image {
    flex-shrink: 0;
    width: 260px;
    height: 363px;
    background: #0d0f16;
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 20px;
}

.modal-info {
    flex: 1;
    min-width: 0;
}

.modal-theme {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
    margin-bottom: 8px;
}

.modal-name {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 4px;
}

.modal-set-number {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 16px;
}

.modal-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.modal-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.modal-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-ppp {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    padding: 8px 12px;
    background: var(--bg-tertiary, #1c1f2e);
    border-radius: var(--radius-sm);
    display: inline-block;
}

.modal-retailers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modal-retailers .retailer-btn {
    padding: 10px 16px;
    font-size: 13px;
}

.modal-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
    margin-bottom: 0;
}

/* Modal responsive */
@media (max-width: 768px) {
    .set-modal {
        padding: 0;
        align-items: flex-start;
    }

    .set-modal-container {
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        max-width: 100%;
    }

    .set-modal-content {
        padding: 16px;
    }

    .modal-top {
        flex-direction: column;
        gap: 16px;
    }

    .modal-image {
        width: 200px;
        height: 280px;
        margin: 0 auto;
        border-radius: var(--radius);
    }

    .modal-name {
        font-size: 20px;
    }

    .modal-price {
        font-size: 22px;
    }

    .modal-stats {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* ===== Footer ===== */
.site-footer {
    margin-top: 40px;
    margin-left: var(--sidebar-width);
    padding: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-inner {
    max-width: 700px;
    margin: 0 auto;
}

.affiliate-disclaimer {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 8px;
}

.footer-copy {
    font-size: 13px;
    color: var(--text-muted);
    opacity: 0.7;
}

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

.set-card {
    animation: fadeInUp 0.3s ease both;
}

/* Stagger animation */
.set-card:nth-child(1) { animation-delay: 0.02s; }
.set-card:nth-child(2) { animation-delay: 0.04s; }
.set-card:nth-child(3) { animation-delay: 0.06s; }
.set-card:nth-child(4) { animation-delay: 0.08s; }
.set-card:nth-child(5) { animation-delay: 0.10s; }
.set-card:nth-child(6) { animation-delay: 0.12s; }
.set-card:nth-child(7) { animation-delay: 0.14s; }
.set-card:nth-child(8) { animation-delay: 0.16s; }
.set-card:nth-child(9) { animation-delay: 0.18s; }
.set-card:nth-child(10) { animation-delay: 0.20s; }
.set-card:nth-child(11) { animation-delay: 0.22s; }
.set-card:nth-child(12) { animation-delay: 0.24s; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .set-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .sort-bar {
        flex-wrap: wrap;
        gap: 8px;
    }

    .sort-label {
        display: none;
    }

    .view-toggles {
        display: none;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 300px;
        z-index: 60;
        top: 0;
        padding-top: calc(var(--header-height) + 16px);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-left: 0;
        margin-top: calc(var(--header-height) + 16px);
        padding: 0 16px 16px;
    }

    .site-footer {
        margin-left: 0;
    }

    .mobile-filter-btn {
        display: flex;
    }

    /* header-nav, mobile-nav-btn, mobile-nav-drawer handled by header.css */

    .toggle-sidebar-btn {
        display: none;
    }

    /* header-inner, logo-text handled by header.css */


    .header-stats {
        display: none;
    }

    .search-container {
        flex: 0;
        max-width: none;
        margin-left: auto;
        display: flex;
        align-items: center;
    }

    .search-input,
    #searchInput {
        display: none;
    }

    .search-icon {
        position: static;
        transform: none;
        width: 22px;
        height: 22px;
        pointer-events: auto;
        cursor: pointer;
        color: var(--text-primary, #e8eaf0);
        stroke-width: 2.5;
    }

    .mobile-nav-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-nav-btn svg {
        width: 22px;
        height: 22px;
        stroke-width: 2.5;
    }

    .mobile-search-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15, 17, 23, 0.95);
        z-index: 200;
        padding: 20px;
        flex-direction: column;
        align-items: center;
        padding-top: 80px;
    }

    .mobile-search-overlay.active {
        display: flex;
    }

    .mobile-search-overlay input {
        width: 100%;
        max-width: 500px;
        height: 52px;
        padding: 0 16px 0 48px;
        background: var(--bg-card, #1c1f2e);
        border: 2px solid var(--accent, #f7c948);
        border-radius: 12px;
        color: var(--text-primary, #e8eaf0);
        font-size: 16px;
        font-family: inherit;
        outline: none;
    }

    .mobile-search-overlay .search-close {
        position: absolute;
        top: 20px;
        right: 20px;
        background: none;
        border: none;
        color: var(--text-secondary, #9499b3);
        font-size: 28px;
        cursor: pointer;
    }

    .search-shortcut {
        display: none;
    }

    .set-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }

    .card-body {
        padding: 10px;
    }

    .card-name {
        font-size: 13px;
    }

    .card-price {
        font-size: 16px;
    }

    .sort-bar {
        padding: 8px 12px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .sort-label {
        display: none;
    }

    .sort-select {
        font-size: 12px;
    }

    .set-grid.list-view .card-image {
        width: 100px;
        min-width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .set-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .card-meta {
        flex-wrap: wrap;
        gap: 6px;
    }

    .retailer-btn {
        padding: 8px 10px;
        font-size: 12px;
    }

    .retailer-label {
        display: inline;
    }

    .view-toggles {
        display: none;
    }
}

/* Back to top button */
.back-to-top{display:none;position:fixed;bottom:16px;right:16px;z-index:90;width:44px;height:44px;border-radius:50%;background:var(--bg-tertiary,#1c1f2e);border:1px solid var(--border,#2a2d3e);color:var(--text-secondary,#9499b3);cursor:pointer;align-items:center;justify-content:center;transition:all 0.2s;box-shadow:0 2px 8px rgba(0,0,0,0.3)}
.back-to-top:hover{background:var(--bg-secondary,#161822);color:var(--accent,#f7c948);border-color:var(--accent,#f7c948)}
.back-to-top.visible{display:flex}
.back-to-top svg{width:20px;height:20px}
@media(max-width:768px){.back-to-top{bottom:72px;right:16px}}

/* Error state */
.error-state{text-align:center;padding:60px 24px;color:var(--text-secondary);grid-column:1/-1}
.error-state p{font-size:16px;margin-bottom:16px}
.error-retry{padding:10px 24px;background:var(--accent);color:var(--bg-primary);border:none;border-radius:8px;font-size:14px;font-weight:700;font-family:inherit;cursor:pointer}
.error-retry:hover{opacity:0.9}

/* Skeleton loading cards */
.set-card.skeleton{pointer-events:none}
.set-card.skeleton .skeleton-img{width:100%;aspect-ratio:1;background:var(--bg-tertiary,#1c1f2e);border-radius:8px}
.set-card.skeleton .card-body{padding:12px}
.skeleton-line{height:14px;border-radius:4px;background:var(--bg-tertiary,#1c1f2e);margin-bottom:10px;animation:shimmer 1.5s infinite}
.skeleton-line.w80{width:80%}
.skeleton-line.w60{width:60%}
.skeleton-line.w40{width:40%}
@keyframes shimmer{0%{opacity:0.4}50%{opacity:0.7}100%{opacity:0.4}}
