/* ==========================================================================
   COLLECTIONS PAGE STYLES - TIỆM MAY ĐỎ
   Header (Deep Burgundy), Sticky Filter Bar, Cards Grid, Modal, Magazine
   ========================================================================== */

/* 1. COLLECTIONS HERO (NỀN ĐỎ TRẦM SÂU BURGUNDY VELVET - CĂN GIỮA HOÀN TOÀN) */
.collections-hero {
    padding: 170px 0 65px;
    background: radial-gradient(circle at 50% 15%, #3d090a 0%, #1a0304 85%, #0d0102 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* Họa tiết hạt mờ dệt vải chìm */
.collections-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 0);
    background-size: 20px 20px;
    pointer-events: none;
}

.collections-hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.page-tag {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: #e5b2b4;
    display: block;
    text-align: center;
    margin: 0 auto 16px;
    width: 100%;
}

.page-title {
    font-family: var(--font-serif);
    font-size: 3.4rem;
    font-style: normal;
    font-weight: 400;
    color: #ffffff;
    margin: 0 auto 22px;
    line-height: 1.25;
    text-align: center;
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
    max-width: 900px;
}

.page-desc {
    max-width: 680px;
    margin: 0 auto 42px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.05rem;
    line-height: 1.8;
    font-weight: 300;
    text-align: center;
}

/* ==========================================================================
   2. BỘ LỌC ĐA CHIỀU SARTORIAL (CHUẨN KHOẢNG CÁCH STICKY & NÂNG CẤP UI ATELIER)
   ========================================================================== */
.sartorial-filter-wrapper {
    position: -webkit-sticky;
    position: sticky;
    top: 84px; /* Khớp sát mép đáy Navbar khi cuộn trang trên Desktop */
    z-index: 99;
    padding: 16px 24px;
    background: rgba(18, 4, 5, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    width: 100%;
    display: flex;
    justify-content: center;
    transition: top 0.25s ease;
}

.filter-dropdown-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    max-width: 1200px;
    width: 100%;
}

.custom-select-box {
    position: relative;
    flex-shrink: 0;
}

/* Nâng cấp hộp Dropdown thanh lịch */
.custom-select-box select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f5f2eb;
    padding: 11px 40px 11px 18px;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.6px;
    border-radius: 2px;
    cursor: pointer;
    outline: none;
    white-space: nowrap;
    /* Mũi tên Chevron vàng hồng mảnh, cách lề phải 16px */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23e5b2b4' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 10px;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.custom-select-box select:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(229, 178, 180, 0.5);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.custom-select-box select:focus {
    border-color: var(--primary);
    background-color: rgba(10, 2, 3, 0.9);
    box-shadow: 0 0 0 2px rgba(139, 29, 36, 0.35);
}

/* Bảng chọn Option khi click mở */
.custom-select-box select option {
    background-color: #1a080a;
    color: #f5f2eb;
    padding: 12px;
    font-size: 0.85rem;
}

/* Nút đặt lại */
.btn-reset-filters {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.7);
    padding: 11px 20px;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border-radius: 2px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.btn-reset-filters:hover {
    color: #ffffff;
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 4px 16px rgba(139, 29, 36, 0.4);
}

/* 3. COLLECTIONS GRID */
.collections-section {
    padding: 70px 0 120px;
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 45px 30px;
}

/* 4. COLLECTION CARD */
.collection-card {
    display: flex;
    flex-direction: column;
    background: transparent;
    cursor: pointer;
    border-radius: 2px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.collection-card:hover {
    transform: translateY(-6px);
}

.card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background-color: #1a1816;
    border-radius: 2px;
    margin-bottom: 20px;
}

.card-img-default,
.card-img-hover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform, opacity;
    transition: opacity 0.5s ease, transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.card-img-default {
    opacity: 1;
    z-index: 1;
}

.card-img-hover {
    opacity: 0;
    z-index: 2;
    transform: scale(1.06);
}

.collection-card:hover .card-img-default {
    opacity: 1;
    transform: scale(1.04);
}

.collection-card:hover .card-img-hover {
    opacity: 1;
    transform: scale(1);
}

.card-badge-count {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(18, 16, 14, 0.7);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 1px;
    z-index: 3;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Chip Tags hiển thị trên ảnh góc dưới */
.card-chips {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
    z-index: 3;
}

.chip-item {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    background: rgba(18, 17, 15, 0.75);
    backdrop-filter: blur(4px);
    color: #ffffff;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.card-category {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
}

.card-fabric {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.card-title {
    font-family: var(--font-serif);
    font-size: 1.45rem;
    font-style: normal;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.35;
    transition: color 0.3s ease;
}

.collection-card:hover .card-title {
    color: var(--primary);
}

.card-summary {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    font-weight: 300;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.card-cta-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dark);
    transition: gap 0.3s ease, color 0.3s ease;
}

.collection-card:hover .card-cta-link {
    color: var(--primary);
    gap: 10px;
}

/* 5. GALLERY LIGHTBOX MODAL */
.gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.gallery-modal.is-open {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 10, 9, 0.88);
    backdrop-filter: blur(10px);
}

.modal-dialog {
    position: relative;
    z-index: 2;
    width: 92vw;
    max-width: 1200px;
    height: 88vh;
    background: var(--bg-cream);
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-color);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
}

.modal-tag {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--primary);
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}

.modal-title {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-style: normal;
    color: var(--text-dark);
    margin: 0;
}

.modal-close-btn {
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--text-dark);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.modal-close-btn:hover {
    transform: scale(1.2);
    color: var(--primary);
}

.modal-body {
    flex: 1;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 35px;
    padding: 30px;
    overflow-y: auto;
}

.modal-viewer {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
    background: #0f0e0d;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    overflow: hidden;
}

.modal-viewer img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(18, 16, 14, 0.6);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s ease;
}

.modal-nav:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.modal-nav.prev { left: 15px; }
.modal-nav.next { right: 15px; }

.modal-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.modal-description {
    font-size: 0.98rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.modal-specs {
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.spec-label {
    color: var(--text-muted);
}

.spec-value {
    color: var(--text-dark);
    font-weight: 500;
}

.modal-cta {
    width: 100%;
    text-align: center;
    padding: 16px 0;
}

.modal-thumbnails {
    display: flex;
    gap: 10px;
    padding: 15px 30px;
    border-top: 1px solid var(--border-color);
    overflow-x: auto;
    background: rgba(244, 241, 234, 0.5);
}

.modal-thumb-item {
    width: 65px;
    height: 65px;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 2px;
    overflow: hidden;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.modal-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-thumb-item:hover {
    opacity: 0.9;
}

.modal-thumb-item.active {
    border-color: var(--primary);
    opacity: 1;
}

/* ==========================================================================
   6. MAGAZINE SECTION TRÊN COLLECTIONS (ĐỊNH DẠNG ĐẦY ĐỦ CHO TẠP CHÍ)
   ========================================================================== */
#magazine {
    border-top: 1px solid var(--border-color);
    padding-top: 70px;
    padding-bottom: 100px;
}

.mosaic-header-sub {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 35px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.mosaic-header-text {
    text-align: left;
}

.mosaic-tag {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary);
    display: inline-block;
    margin-bottom: 6px;
}

.mosaic-header-sub .section-title {
    margin-bottom: 0;
    font-size: 2.2rem;
    font-style: normal;
}

.lookbook-link-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--primary);
    padding-bottom: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.lookbook-link-inline:hover {
    color: var(--text-dark);
}

.lookbook-link-inline:hover .link-arrow {
    transform: translateX(5px);
}

.magazine-editorial-grid { 
    display: grid; 
    grid-template-columns: 2fr 1.2fr 1fr; 
    gap: 40px; 
    align-items: stretch; 
}

.mag-col { 
    display: flex; 
    flex-direction: column; 
}

.mag-subs { 
    border-left: 1px solid var(--border-color); 
    padding-left: 40px; 
}

.mag-recents { 
    border-left: 1px solid var(--border-color); 
    padding-left: 40px; 
}

.mag-article-card { 
    display: flex; 
    flex-direction: column; 
    color: inherit;
    text-decoration: none;
}

.mag-img-wrapper { 
    width: 100%; 
    overflow: hidden; 
    margin-bottom: 20px; 
    background: var(--text-dark); 
}

.mag-img-wrapper img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease; 
}

.mag-article-card:hover .mag-img-wrapper img { 
    transform: scale(1.05); 
    opacity: 0.9; 
}

.mag-category { 
    font-family: var(--font-sans); 
    font-size: 0.75rem; 
    font-weight: 600; 
    letter-spacing: 2px; 
    color: var(--primary); 
    text-transform: uppercase; 
    margin-bottom: 15px; 
}

.mag-title-lg { 
    font-family: var(--font-serif); 
    font-size: 2.2rem; 
    font-style: normal;
    line-height: 1.3; 
    color: var(--text-dark); 
    margin-bottom: 15px; 
    transition: color 0.3s ease; 
}

.mag-title-md { 
    font-family: var(--font-serif); 
    font-size: 1.35rem; 
    font-style: normal;
    line-height: 1.35; 
    color: var(--text-dark); 
    margin-bottom: 10px; 
    transition: color 0.3s ease; 
}

.mag-article-card:hover .mag-title-lg, 
.mag-article-card:hover .mag-title-md { 
    color: var(--primary); 
}

.mag-desc { 
    font-size: 0.98rem; 
    color: var(--text-muted); 
    line-height: 1.7; 
}

.sub-card:first-child { 
    margin-bottom: 40px; 
    padding-bottom: 40px; 
    border-bottom: 1px solid var(--border-color); 
}

.sub-card .mag-img-wrapper { 
    height: 200px; 
}

.recents-header { 
    font-family: var(--font-sans); 
    font-size: 0.85rem; 
    font-weight: 600; 
    letter-spacing: 2px; 
    text-transform: uppercase; 
    color: var(--text-dark); 
    border-top: 2px solid var(--text-dark); 
    border-bottom: 1px solid var(--text-dark); 
    padding: 12px 0; 
    margin-bottom: 25px; 
}

.recent-item { 
    display: block; 
    padding: 18px 0; 
    border-bottom: 1px solid var(--border-color); 
    transition: transform 0.3s ease; 
    text-decoration: none;
}

.recent-item:last-child { 
    border-bottom: none; 
}

.recent-item:hover { 
    transform: translateX(5px); 
}

.recent-title { 
    font-family: var(--font-serif); 
    font-size: 1.12rem; 
    font-style: normal;
    line-height: 1.4; 
    color: var(--text-dark); 
    margin-bottom: 8px; 
    font-weight: 400; 
    transition: color 0.3s ease; 
}

.recent-item:hover .recent-title { 
    color: var(--primary); 
}

.recent-date { 
    font-family: var(--font-sans); 
    font-size: 0.75rem; 
    color: var(--text-muted); 
    letter-spacing: 1px; 
}

/* 7. RESPONSIVE */
@media (max-width: 1024px) {
    .collections-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 20px;
    }
    .modal-body {
        grid-template-columns: 1fr;
    }
    .modal-viewer {
        height: 380px;
    }
    .magazine-editorial-grid { 
        grid-template-columns: 1fr; 
        gap: 40px; 
    }
    .mag-subs, .mag-recents { 
        border-left: none; 
        padding-left: 0; 
        border-top: 1px solid var(--border-color); 
        padding-top: 40px; 
    }
    .mag-subs { 
        display: grid; 
        grid-template-columns: 1fr 1fr; 
        gap: 30px; 
    }
    .sub-card:first-child { 
        margin-bottom: 0; 
        padding-bottom: 0; 
        border-bottom: none; 
    }
}

@media (max-width: 768px) {
    .collections-hero {
        padding: 130px 0 40px;
    }

    .page-title {
        font-size: 2.2rem;
    }
    
    /* Sticky trên Mobile bám sát chân Navbar điện thoại */
    .sartorial-filter-wrapper {
        top: 64px;
        padding: 12px 16px;
        justify-content: flex-start;
    }

    .filter-dropdown-group {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: center;
        width: 100%;
        gap: 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .filter-dropdown-group::-webkit-scrollbar {
        display: none;
    }

    .custom-select-box,
    .btn-reset-filters {
        width: auto;
        flex-shrink: 0;
    }

    .custom-select-box select {
        font-size: 0.76rem;
        padding: 9px 32px 9px 14px;
        background-position: right 12px center;
        border-radius: 2px;
    }

    .btn-reset-filters {
        font-size: 0.76rem;
        padding: 9px 16px;
        border-radius: 2px;
    }

    .collections-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .modal-dialog {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }
    .modal-body {
        padding: 15px;
    }
    .modal-viewer {
        height: 280px;
    }
    .mag-subs { 
        grid-template-columns: 1fr; 
    }
    .mag-title-lg { 
        font-size: 1.5rem; 
    }
    .sub-card:first-child { 
        margin-bottom: 40px; 
        padding-bottom: 40px; 
        border-bottom: 1px solid var(--border-color); 
    }
    .mosaic-header-sub { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 10px; 
    }
}
