/* Top Cards Page – stat.css v4 */

/* ─── Page Shell ───────────────────────────────────────── */
.tc-page {
    background: #bababa;          /* matches site body background */
    min-height: 100vh;
    font-family: 'Myriad Pro', 'Poppins', sans-serif;
}

/* ─── Hero ─────────────────────────────────────────────── */
.tc-hero {
    background: #bababa;
    border-bottom: 3px solid #c88a31;
    padding: 52px 20px 44px;
}
.tc-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}
.tc-hero-title {
    color: #1e1e1e;
    font-size: 40px;
    font-weight: bold;
    margin: 0 0 12px;
    line-height: 1.2;
    letter-spacing: 1px;
}
.tc-hero-sub {
    color: #444;
    font-size: 17px;
    margin: 0;
    font-style: italic;
}

/* ─── Sticky Tab Bar ────────────────────────────────────── */
.tc-tabs-outer {
    background: #1e1e1e;
    border-bottom: 2px solid #333;
    position: sticky;
    top: 0;
    z-index: 100;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    display: flex;
    justify-content: center;
}
.tc-tabs-outer::-webkit-scrollbar { display: none; }
.tc-tabs {
    display: flex;
    padding: 0 16px;
}
.tc-tab-btn {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #888;
    font-family: 'Myriad Pro', 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    padding: 15px 20px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
    line-height: 1;
    outline: none;
}
.tc-tab-btn:hover { color: #fff; }
.tc-tab-btn.active {
    color: #fff;
    border-bottom-color: #c88a31;
}

/* ─── Body / Content Panel ──────────────────────────────── */
.tc-body {
    max-width: 1440px;
    margin: 20px auto;
    padding: 24px 20px 50px;
    background: #414040;
    border-radius: 10px;
}

/* ─── Card Grid ─────────────────────────────────────────── */
.tc-section {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

/* ─── Individual Card ───────────────────────────────────── */
.tc-card {
    background: #575656;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}
.tc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.45);
}

/* Rank badge */
.tc-rank-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #c88a31;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 9px 2px;
    border-radius: 6px;
    z-index: 2;
    line-height: 1.5;
    letter-spacing: 0.3px;
}

/* Card image */
.tc-img-wrap {
    width: 100%;
    aspect-ratio: 5 / 7;
    overflow: hidden;
    background: #2a2a2a;
    flex-shrink: 0;
    cursor: pointer;
}
.tc-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.tc-img-wrap:hover .tc-img {
    transform: scale(1.05);
}

/* Card body */
.tc-card-body {
    padding: 10px 11px 12px;
    background: #656464;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tc-card-name {
    font-size: 15px;
    font-weight: 600;
    color: #ffeadb;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* Stats row */
.tc-pct-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.tc-pct-label {
    font-size: 13px;
    color: #c88a31;
    font-weight: 700;
    white-space: nowrap;
}
.tc-qty-label {
    font-size: 13px;
    color: #ccc;
    font-weight: 500;
    white-space: nowrap;
}

/* Add to order button */
.tc-add-btn {
    display: block;
    width: 100%;
    background: #c88a31;
    color: #fff;
    text-align: center;
    font-family: 'Myriad Pro', 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    padding: 7px 8px 5px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease;
    letter-spacing: 0.5px;
    margin-top: auto;
}
.tc-add-btn:hover,
.tc-add-btn:focus {
    background: #e39a32;
    color: #fff;
    text-decoration: none;
}

/* ─── Lightbox ───────────────────────────────────────────── */
.tc-lb-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tc-lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    cursor: pointer;
}
.tc-lb-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
#tc-lb-img {
    max-width: min(480px, 90vw);
    max-height: 90vh;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.9);
    display: block;
    pointer-events: none;
    animation: tc-lb-in 0.18s ease;
}
@keyframes tc-lb-in {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}
.tc-lb-close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: #c88a31;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
    font-family: sans-serif;
}
.tc-lb-close:hover {
    background: #e39a32;
    transform: scale(1.1);
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 1300px) {
    .tc-section { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1000px) {
    .tc-section { grid-template-columns: repeat(3, 1fr); }
    .tc-hero-title { font-size: 30px; }
    .tc-tab-btn { font-size: 14px; padding: 13px 16px; }
}
@media (max-width: 640px) {
    .tc-section { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .tc-hero-title { font-size: 22px; }
    .tc-hero-sub { font-size: 15px; }
    .tc-hero { padding: 36px 16px 30px; }
    .tc-body { margin: 12px; padding: 14px 12px 36px; }
    .tc-tab-btn { font-size: 13px; padding: 12px 14px; }
}
@media (max-width: 380px) {
    .tc-section { grid-template-columns: 1fr; }
}
