
/* =========================================
   CARDVAULT 2.0 — BROWSE TCG
========================================= */

.cv-browse {
    --browse-gold: #e9b548;
    --browse-bg: #0e1116;

    padding: 55px 0 65px;
    background: var(--browse-bg);
    color: #fff;
}

/* Header */

.cv-browse__header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 25px;
}

.cv-browse .cv-section-title {
    flex: 0 0 auto;
    margin: 0;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(25px, 2.5vw, 34px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: #fff;
}

.cv-browse__header-line {
    display: block;
    flex: 1;
    height: 1px;
    background: rgba(233, 181, 72, 0.7);
}

.cv-browse__view-all {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    flex: 0 0 auto;

    color: var(--browse-gold);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;

    transition: color 0.25s ease;
}

.cv-browse__view-all:hover {
    color: #ffdc83;
}

/* Grid */

.cv-browse-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

/* Card */

.cv-tcg-card {
    position: relative;
    display: block;
    min-width: 0;
    aspect-ratio: 2.85 / 1;

    overflow: hidden;
    isolation: isolate;

    border: 1px solid rgba(233, 181, 72, 0.45);
    border-radius: 8px;

    background: #171c26;
    color: #fff;
    text-decoration: none;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.cv-tcg-card:hover {
    transform: translateY(-3px);
    border-color: var(--browse-gold);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.cv-tcg-card:focus-visible {
    outline: 2px solid var(--browse-gold);
    outline-offset: 3px;
}

/* Image */

.cv-tcg-card__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.cv-tcg-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;

    transition: transform 0.45s ease;
}

.cv-tcg-card:hover .cv-tcg-card__media img {
    transform: scale(1.06);
}

/* Gradient */

.cv-tcg-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;

    background: linear-gradient(
        0deg,
        rgba(5, 8, 14, 0.96) 0%,
        rgba(5, 8, 14, 0.65) 24%,
        rgba(5, 8, 14, 0.05) 75%
    );

    pointer-events: none;
}

/* Content */

.cv-tcg-card__content {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;

    padding: 14px;
}

.cv-tcg-card__info {
    min-width: 0;
    text-align: left;
}

.cv-tcg-card__info h3 {
    margin: 0 0 3px;

    color: #fff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.cv-tcg-card__info p {
    margin: 0;

    color: #e4e6eb;
    font-size: 12px;
    line-height: 1.35;
}

/* Arrow */

.cv-tcg-card__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;

    width: 32px;
    height: 32px;

    border: 1px solid var(--browse-gold);
    border-radius: 50%;

    background: rgba(5, 8, 14, 0.7);
    color: var(--browse-gold);

    font-size: 19px;
    line-height: 1;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}

.cv-tcg-card:hover .cv-tcg-card__arrow {
    background: var(--browse-gold);
    color: #101216;
    transform: translateX(2px);
}

/* TCG accent colors */

.cv-tcg-card--yugioh {
    border-color: rgba(215, 65, 54, 0.65);
}

.cv-tcg-card--pokemon {
    border-color: rgba(64, 141, 255, 0.65);
}

.cv-tcg-card--riftbound {
    border-color: rgba(70, 174, 222, 0.65);
}

.cv-tcg-card--lorcana {
    border-color: rgba(186, 86, 234, 0.65);
}

.cv-tcg-card--magic {
    border-color: rgba(102, 132, 198, 0.65);
}

.cv-tcg-card--one-piece {
    border-color: rgba(220, 65, 65, 0.65);
}

/* Tablet */

@media (max-width: 1024px) {
    .cv-browse-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cv-tcg-card {
        aspect-ratio: 2.7 / 1;
    }
}

/* Mobile */

@media (max-width: 767px) {
    .cv-browse {
        padding: 38px 0 45px;
    }

    .cv-browse__header {
        gap: 10px;
        margin-bottom: 20px;
    }

    .cv-browse .cv-section-title {
        font-size: 25px;
    }

    .cv-browse__view-all {
        font-size: 11px;
    }

    .cv-browse-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .cv-tcg-card {
        aspect-ratio: 2.6 / 1;
        border-radius: 8px;
    }

    .cv-tcg-card__content {
        padding: 13px;
    }

    .cv-tcg-card__info h3 {
        font-size: 15px;
    }

    .cv-tcg-card__arrow {
        flex-basis: 30px;
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 380px) {
    .cv-browse .cv-section-title {
        font-size: 22px;
    }

    .cv-tcg-card {
        aspect-ratio: 2.4 / 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cv-tcg-card,
    .cv-tcg-card__media img,
    .cv-tcg-card__arrow {
        transition: none;
    }
}
