/* ==========================================================
   TAXONOMY COLLECTION DETAIL PAGE
   Trang chi tiết Bộ Sưu Tập — Luxury Art Gallery
   Tất cả giá trị động đều dùng CSS Variables từ Customizer
   ========================================================== */

/* ===== WRAPPER ===== */
.ls-tax-collection-wrapper {
    min-height: 100vh;
}

/* ===== HERO BANNER ===== */
.ls-tax-hero {
    position: relative;
    min-height: var(--ls-tax-hero-h, 55vh);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: var(--ls-tax-hero-pt, 120px) 40px 50px;
    background-image: var(--ls-hero-bg, none);
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
    overflow: hidden;
}

.ls-tax-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(15, 15, 15, 0.25) 0%,
        rgba(15, 15, 15, 0.55) 40%,
        rgba(15, 15, 15, 0.92) 85%,
        var(--ls-bg-primary) 100%
    );
    z-index: 1;
}

.ls-tax-hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at 50% 100%,
        rgba(201, 169, 110, 0.06) 0%,
        transparent 60%
    );
    z-index: 1;
}

.ls-tax-hero-content {
    position: relative;
    z-index: 2;
    width: min(960px, 90%);
    text-align: center;
    animation: lsTaxFadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes lsTaxFadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Breadcrumbs override for hero */
.ls-tax-hero .ls-breadcrumbs {
    justify-content: center;
    margin-bottom: 24px;
    opacity: 0.7;
    font-size: 0.88rem;
}

/* Title — kích thước động từ Customizer */
.ls-tax-title {
    font-family: var(--ls-font-heading);
    font-size: var(--ls-tax-title-size, 3.5rem);
    font-weight: 600;
    color: var(--ls-text-primary);
    margin: 0 0 16px 0;
    line-height: 1.2;
    letter-spacing: 1px;
}

/* Accent line under title */
.ls-tax-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--ls-accent), rgba(201, 169, 110, 0.3));
    margin: 20px auto 0;
    border-radius: 2px;
}

/* Description */
.ls-tax-desc {
    font-family: var(--ls-font-body);
    font-size: 1.05rem;
    color: var(--ls-text-secondary);
    line-height: 1.8;
    max-width: 680px;
    margin: 20px auto 0;
}

/* Meta */
.ls-tax-meta {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 24px;
}

.ls-tax-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--ls-font-body);
    font-size: 0.88rem;
    color: var(--ls-accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 8px 20px;
    border-radius: 999px;
    background: rgba(201, 169, 110, 0.08);
    border: 1px solid rgba(201, 169, 110, 0.15);
}

.ls-tax-count svg {
    opacity: 0.8;
    stroke: var(--ls-accent);
}

/* ===== ARTWORKS GRID BODY ===== */
.ls-tax-body {
    padding: 60px 0 80px;
}

.ls-tax-container {
    width: min(1400px, 92%);
    margin: 0 auto;
}

/* Grid — số cột và gap đều từ CSS variables */
.ls-tax-grid {
    display: grid;
    grid-template-columns: repeat(var(--ls-tax-cols, 3), 1fr);
    gap: var(--ls-tax-gap, 28px);
}

/* ===== ARTWORK CARD ===== */
.ls-tax-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 16px;
    overflow: hidden;
    background: var(--ls-bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.45s ease,
                border-color 0.4s ease;
    position: relative;
}

.ls-tax-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    border-color: rgba(201, 169, 110, 0.2);
}

/* Card Image — tỉ lệ từ Customizer */
.ls-tax-card-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: var(--ls-tax-ratio, 3 / 4);
    background: #111;
}

.ls-tax-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.ls-tax-card:hover .ls-tax-card-img img {
    transform: scale(1.06);
}

/* Mode Full: ảnh tự nhiên, không crop */
.ls-tax-grid-full .ls-tax-card-img {
    aspect-ratio: auto;
}

.ls-tax-grid-full .ls-tax-card-img img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.ls-tax-card-placeholder {
    width: 100%;
    height: 100%;
    min-height: 200px;
    background: linear-gradient(135deg, #1a1a1a 0%, #252525 50%, #1a1a1a 100%);
}

/* Badge (Sold) */
.ls-tax-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    font-family: var(--ls-font-body);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 5px 14px;
    border-radius: 999px;
    z-index: 3;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.ls-tax-badge.sold {
    background: rgba(255, 60, 60, 0.15);
    border: 1px solid rgba(255, 60, 60, 0.25);
    color: #ff5555;
}

/* Card Info */
.ls-tax-card-info {
    padding: 20px 22px 24px;
}

.ls-tax-card-title {
    font-family: var(--ls-font-heading);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--ls-text-primary);
    margin: 0 0 10px 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.ls-tax-card:hover .ls-tax-card-title {
    color: var(--ls-accent);
}

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

.ls-tax-card-meta span {
    font-family: var(--ls-font-body);
    font-size: 0.8rem;
    color: var(--ls-text-secondary);
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    line-height: 1.4;
}

/* ===== EMPTY STATE ===== */
.ls-tax-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--ls-text-secondary);
    font-family: var(--ls-font-body);
    font-size: 1rem;
}

/* ===== OTHER COLLECTIONS SECTION ===== */
.ls-tax-related-section {
    padding: 0 0 100px;
}

.ls-tax-related-section .ls-section-title {
    font-family: var(--ls-font-heading);
    font-size: 1.8rem;
    color: var(--ls-accent);
    margin-bottom: 32px;
}

.ls-tax-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.ls-tax-related-card {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--ls-bg-secondary);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s ease;
}

.ls-tax-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.ls-tax-related-img {
    position: absolute;
    inset: 0;
}

.ls-tax-related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.ls-tax-related-card:hover .ls-tax-related-img img {
    transform: scale(1.06);
}

.ls-tax-related-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 22px 20px;
    background: linear-gradient(
        to top,
        rgba(10, 10, 10, 0.92) 0%,
        rgba(10, 10, 10, 0.5) 60%,
        transparent 100%
    );
    z-index: 2;
}

.ls-tax-related-overlay h3 {
    font-family: var(--ls-font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--ls-text-primary);
    margin: 0 0 4px;
    transition: color 0.3s;
}

.ls-tax-related-card:hover .ls-tax-related-overlay h3 {
    color: var(--ls-accent);
}

.ls-tax-related-overlay span {
    font-family: var(--ls-font-body);
    font-size: 0.78rem;
    color: var(--ls-text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .ls-tax-grid {
        grid-template-columns: repeat(var(--ls-tax-cols-tablet, 2), 1fr);
    }

    .ls-tax-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .ls-tax-hero {
        padding-top: calc(var(--ls-tax-hero-pt, 120px) * 0.8);
        padding-left: 30px;
        padding-right: 30px;
    }
}

@media (max-width: 768px) {
    .ls-tax-hero {
        min-height: 40vh;
        padding: 80px 20px 35px;
    }

    .ls-tax-title {
        font-size: calc(var(--ls-tax-title-size, 3.5rem) * 0.6);
    }

    .ls-tax-desc {
        font-size: 0.95rem;
    }

    .ls-tax-grid {
        grid-template-columns: repeat(var(--ls-tax-cols-mobile, 1), 1fr);
    }

    .ls-tax-card-info {
        padding: 14px 16px 18px;
    }

    .ls-tax-card-title {
        font-size: 1.1rem;
    }

    .ls-tax-card-meta span {
        font-size: 0.72rem;
        padding: 3px 8px;
    }

    .ls-tax-body {
        padding: 40px 0 60px;
    }

    .ls-tax-related-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .ls-tax-related-section {
        padding: 0 0 60px;
    }
}
