/**
 * HW Collecting - Core Styles
 * Dark collector theme with Hot Wheels energy
 */

:root {
    --hwc-bg: #0d0d0d;
    --hwc-surface: #1a1a1a;
    --hwc-surface-2: #242424;
    --hwc-border: #333;
    --hwc-text: #e8e8e8;
    --hwc-text-muted: #888;
    --hwc-text-dim: #555;
    --hwc-primary: #e63946;
    --hwc-primary-dark: #b72d38;
    --hwc-accent: #f4a261;
    --hwc-accent-2: #2ec4b6;
    --hwc-gold: #ffd700;
    --hwc-link: #6bb5ff;
    --hwc-success: #4caf50;
    --hwc-radius: 6px;
    --hwc-radius-lg: 10px;
    --hwc-shadow: 0 2px 8px rgba(0,0,0,0.4);
    --hwc-font: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

.hwc-wrap, .hwc-catalog-wrap, .hwc-collection-wrap {
    max-width: 1280px; margin: 0 auto; padding: 24px 16px;
    color: var(--hwc-text); font-family: var(--hwc-font);
}

.hwc-filters {
    margin-bottom: 24px; padding: 16px;
    background: var(--hwc-surface); border: 1px solid var(--hwc-border);
    border-radius: var(--hwc-radius-lg);
}
.hwc-search-box { display: flex; gap: 8px; margin-bottom: 12px; }
.hwc-search-box .hwc-input { flex: 1; }
.hwc-filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.hwc-input, .hwc-select {
    padding: 8px 12px; background: var(--hwc-surface-2);
    border: 1px solid var(--hwc-border); border-radius: var(--hwc-radius);
    color: var(--hwc-text); font-size: 14px; font-family: var(--hwc-font);
}
.hwc-input:focus, .hwc-select:focus {
    border-color: var(--hwc-primary); outline: none;
    box-shadow: 0 0 0 2px rgba(230,57,70,0.2);
}
.hwc-select-sm { width: 80px; }

.hwc-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 16px; border: none; border-radius: var(--hwc-radius);
    font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
    transition: all 0.15s ease; font-family: var(--hwc-font); line-height: 1.4;
}
.hwc-btn-primary { background: var(--hwc-primary); color: #fff; }
.hwc-btn-primary:hover { background: var(--hwc-primary-dark); color: #fff; }
.hwc-btn-secondary { background: var(--hwc-surface-2); border: 1px solid var(--hwc-border); color: var(--hwc-text); }
.hwc-btn-secondary:hover { border-color: var(--hwc-text-muted); color: #fff; }
.hwc-btn-ghost { background: transparent; color: var(--hwc-text-muted); padding: 8px 12px; }
.hwc-btn-ghost:hover { color: var(--hwc-text); }
.hwc-btn-sm { padding: 4px 10px; font-size: 12px; }

.hwc-results-meta {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; font-size: 14px; color: var(--hwc-text-muted);
}

.hwc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.hwc-grid--sm { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }

.hwc-card {
    display: flex; flex-direction: column;
    background: var(--hwc-surface); border: 1px solid var(--hwc-border);
    border-radius: var(--hwc-radius-lg); overflow: hidden;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    text-decoration: none; color: var(--hwc-text);
}
.hwc-card:hover { transform: translateY(-2px); border-color: var(--hwc-primary); box-shadow: var(--hwc-shadow); color: var(--hwc-text); }
.hwc-card--sth { border-color: var(--hwc-gold); box-shadow: 0 0 12px rgba(255,215,0,0.15); }
.hwc-card--th { border-color: var(--hwc-accent-2); }

.hwc-card__image { position: relative; aspect-ratio: 4/3; background: var(--hwc-surface-2); overflow: hidden; }
.hwc-card__image img { width: 100%; height: 100%; object-fit: cover; }
.hwc-card__placeholder {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 100%; height: 100%; color: var(--hwc-text-dim); font-size: 13px; gap: 8px;
}
.hwc-card__placeholder--lg { min-height: 300px; }

.hwc-badge { position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.hwc-badge--sth { background: var(--hwc-gold); color: #1a1a1a; }
.hwc-badge--th { background: var(--hwc-accent-2); color: #1a1a1a; }

.hwc-card__info { padding: 12px; flex: 1; }
.hwc-card__name { margin: 0 0 6px; font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--hwc-text); }
.hwc-card__meta { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.hwc-tag { display: inline-block; padding: 2px 6px; background: var(--hwc-surface-2); border-radius: 3px; font-size: 11px; color: var(--hwc-text-muted); }
.hwc-card__color { margin: 4px 0 0; font-size: 12px; color: var(--hwc-text-muted); }

.hwc-card__link { display: flex; flex-direction: column; text-decoration: none; color: inherit; flex: 1; }
.hwc-card__collection-meta { padding: 8px 12px; border-top: 1px solid var(--hwc-border); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
.hwc-status-badge { padding: 2px 8px; border-radius: 3px; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.hwc-status-badge--owned { background: var(--hwc-success); color: #fff; }
.hwc-status-badge--wanted { background: var(--hwc-accent); color: #1a1a1a; }
.hwc-status-badge--for_trade { background: var(--hwc-link); color: #1a1a1a; }
.hwc-status-badge--duplicate { background: var(--hwc-text-dim); color: #fff; }
.hwc-status-badge--sold { background: var(--hwc-text-dim); color: #fff; }
.hwc-qty { font-weight: 600; color: var(--hwc-accent); }
.hwc-condition { color: var(--hwc-text-muted); font-style: italic; }
.hwc-item-note { width: 100%; margin: 4px 0 0; color: var(--hwc-text-dim); font-size: 11px; }
.hwc-card__actions { padding: 6px 12px; border-top: 1px solid var(--hwc-border); text-align: right; }

.hwc-variant-detail { max-width: 1100px; margin: 0 auto; }
.hwc-breadcrumb { font-size: 13px; color: var(--hwc-text-muted); margin-bottom: 24px; }
.hwc-breadcrumb a { color: var(--hwc-link); text-decoration: none; }
.hwc-breadcrumb a:hover { text-decoration: underline; }
.hwc-sep { margin: 0 6px; color: var(--hwc-text-dim); }

.hwc-variant-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.hwc-variant-main-image { border-radius: var(--hwc-radius-lg); overflow: hidden; background: var(--hwc-surface); border: 1px solid var(--hwc-border); }
.hwc-variant-main-image img { width: 100%; display: block; }
.hwc-variant-thumbs { display: flex; gap: 8px; margin-top: 8px; }
.hwc-thumb { width: 60px; height: 45px; object-fit: cover; border-radius: 4px; border: 2px solid var(--hwc-border); cursor: pointer; transition: border-color 0.15s; }
.hwc-thumb:hover { border-color: var(--hwc-primary); }

.hwc-variant-badge { display: inline-block; margin-top: 8px; padding: 4px 12px; border-radius: 4px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.hwc-variant-badge--sth { background: var(--hwc-gold); color: #1a1a1a; }
.hwc-variant-badge--th { background: var(--hwc-accent-2); color: #1a1a1a; }

.hwc-variant-title { margin: 0 0 8px; font-size: 28px; font-weight: 700; color: #fff; line-height: 1.2; }
.hwc-variant-casting { margin: 0 0 16px; font-size: 14px; color: var(--hwc-text-muted); }
.hwc-text-muted { color: var(--hwc-text-muted); }

.hwc-specs-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.hwc-specs-table th, .hwc-specs-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--hwc-border); font-size: 14px; }
.hwc-specs-table th { width: 140px; color: var(--hwc-text-muted); font-weight: 500; }
.hwc-specs-table td { color: var(--hwc-text); }
.hwc-series-num { margin-left: 6px; color: var(--hwc-text-muted); font-size: 12px; }

.hwc-variant-notes, .hwc-variant-features, .hwc-variant-rarity { margin-bottom: 16px; }
.hwc-variant-features h3, .hwc-variant-rarity h3 { font-size: 16px; margin: 0 0 6px; color: var(--hwc-text); }
.hwc-feature { margin: 4px 0; font-size: 13px; color: var(--hwc-text-muted); }

.hwc-collection-actions { display: flex; gap: 8px; margin: 20px 0; padding: 16px 0; border-top: 1px solid var(--hwc-border); }
.hwc-in-collection { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; background: rgba(76,175,80,0.15); border: 1px solid var(--hwc-success); border-radius: var(--hwc-radius); color: var(--hwc-success); font-weight: 600; font-size: 14px; }

.hwc-ebay-section { margin-top: 20px; padding: 16px; background: var(--hwc-surface); border: 1px solid var(--hwc-border); border-radius: var(--hwc-radius-lg); }
.hwc-ebay-section h3 { margin: 0 0 12px; font-size: 16px; color: var(--hwc-text); }
.hwc-ebay-loading { color: var(--hwc-text-muted); font-size: 13px; }

.hwc-related { margin-top: 40px; }
.hwc-related h2 { font-size: 20px; margin-bottom: 16px; color: var(--hwc-text); }

.hwc-collection-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 24px; }
.hwc-stat { display: flex; flex-direction: column; align-items: center; padding: 16px; background: var(--hwc-surface); border: 1px solid var(--hwc-border); border-radius: var(--hwc-radius-lg); }
.hwc-stat__num { font-size: 28px; font-weight: 700; color: #fff; line-height: 1; }
.hwc-stat__label { margin-top: 4px; font-size: 12px; color: var(--hwc-text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.hwc-collection-tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--hwc-border); padding-bottom: 0; }
.hwc-tab { padding: 8px 16px; font-size: 14px; font-weight: 500; color: var(--hwc-text-muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all 0.15s; }
.hwc-tab:hover { color: var(--hwc-text); }
.hwc-tab--active { color: var(--hwc-primary); border-bottom-color: var(--hwc-primary); }

.hwc-pagination { display: flex; gap: 4px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.hwc-page-num { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 8px; border-radius: var(--hwc-radius); font-size: 14px; color: var(--hwc-text-muted); text-decoration: none; transition: all 0.15s; }
.hwc-page-num:hover { background: var(--hwc-surface); color: var(--hwc-text); }
.hwc-page-num--active { background: var(--hwc-primary); color: #fff; font-weight: 600; }

.hwc-empty { padding: 48px 24px; text-align: center; color: var(--hwc-text-muted); }
.hwc-empty h2 { color: var(--hwc-text); margin-bottom: 8px; }
.hwc-login-prompt { padding: 32px; text-align: center; background: var(--hwc-surface); border: 1px solid var(--hwc-border); border-radius: var(--hwc-radius-lg); }
.hwc-login-prompt a { color: var(--hwc-primary); font-weight: 600; }

@media (max-width: 768px) {
    .hwc-variant-layout { grid-template-columns: 1fr; gap: 20px; }
    .hwc-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
    .hwc-filter-row { flex-direction: column; }
    .hwc-filter-row .hwc-select, .hwc-filter-row .hwc-btn { width: 100%; }
    .hwc-variant-title { font-size: 22px; }
    .hwc-collection-stats { grid-template-columns: repeat(2, 1fr); }
    .hwc-collection-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 480px) {
    .hwc-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .hwc-card__name { font-size: 13px; }
    .hwc-card__info { padding: 8px; }
}
