/* ============================================================
   LYLA JEWELRY - CATALOG PAGE
   High-end catalog with image carousels
   ============================================================ */

/* ==================== MEDIA QUERY BREAKPOINTS ====================
   Large Desktop: 1440px+
   Desktop:       1025px - 1439px (default base styles)
   Tablet:        768px - 1024px
   Large Mobile:  481px - 767px  
   Mobile:        max-width: 480px
   ============================================================ */

/* ==================== BASE STYLES (Desktop 1025px-1439px) ==================== */

/* Catalog Section */
.catalog-section {
    background-color: white;
    color: black;
    width: 100%;
    font-family: 'Avenir', sans-serif;
    overflow-x: hidden;
}

/* Catalog Header with Hero Image */
.catalog-header {
    position: relative;
    width: 100%;
    height: 60vh;
    margin-top: 90px;
    display: flex;
    align-items: flex-end;
}

.hero-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mask-image: linear-gradient(to bottom, black 40%, transparent 80%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 80%);
}

.header-catalog-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 0 3% 20px 3%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.catalog-title {
    font-size: 35px;
    font-weight: 300;
    margin: 0;
    line-height: 1;
    padding-left: 50px;
    text-transform: uppercase;
}

/* Catalog Container */
.catalog-container {
    display: flex;
    padding: 50px 5% 50px 5%;
    gap: 40px;
}

/* Sidebar */
.catalog-sidebar {
    width: 180px;
    flex-shrink: 0;
}

.catalog-sidebar h3 {
    font-size: 16px;
    margin-top: 10px;
    margin-bottom: 15px;
    margin-left: 10px;
    opacity: 0.9;
    font-weight: 600;
}

.catalog-sidebar li {
    font-size: 16px;
    margin-bottom: 15px;
    margin-left: 10px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.catalog-sidebar li:hover,
.catalog-sidebar li.active {
    opacity: 1;
}

/* Collection Gallery — single continuous grid, 4 columns on desktop */
.collection-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Collection Item with Carousel */
.collection-item {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    cursor: pointer;
}

/* Visual Box with Carousel */
.item-visual-box {
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    background-color: #ffffff;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.item-visual-box:hover {
    background-color: #e8e8e8;
}

/* Carousel Container */
.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    min-width: 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Carousel Navigation (Show on Hover) */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.2s ease;
    z-index: 10;
    font-size: 20px;
    color: #000;
}

.item-visual-box:hover .carousel-nav {
    background-color: rgba(255, 255, 255, 0.5);
    opacity: 1;
    
}
.item-visual-box img{
    object-fit: contain;
}
.carousel-nav:hover {
    background-color: rgba(255, 255, 255, 1);
}

.carousel-nav.prev {
    left: 10px;
}

.carousel-nav.next {
    right: 10px;
}

.carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.item-visual-box:hover .carousel-indicators {
    opacity: 1;
}

.carousel-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-indicator.active {
    background: rgba(0, 0, 0, 0.8);
}

/* Item Info Stack */
.item-info-stack {
    text-align: center;
}

.item-label {
    font-size: 0.9rem;
    display: block;
    margin-bottom: 3px;
    font-weight: 400;
}

.item-value {
    font-size: 0.85rem;
    opacity: 0.6;
    display: block;
}

/* Sort Container (Mobile Only) */
.sort-container {
    display: none;
}

/* ==================== LARGE DESKTOP: 1440px+ ==================== */
@media (min-width: 1440px) {
    .catalog-title {
        font-size: 35px;
    }

    .catalog-container {
        padding: 60px 5% 60px 5%;
    }

    .catalog-sidebar {
        width: 220px;
    }

    .catalog-sidebar h3 {
        font-size: 18px;
    }

    .catalog-sidebar li {
        font-size: 17px;
    }

    .collection-gallery {
        gap: 24px;
    }

    .carousel-nav {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

/* ==================== TABLET: 768px - 1024px ==================== */
@media (min-width: 768px) and (max-width: 1024px) {
    .catalog-header {
        height: 50vh;
    }

    .catalog-title {
        font-size: 30px;
    }

    .catalog-container {
        padding: 40px 3% 40px 3%;
    }

    .catalog-sidebar {
        display: none;
    }

    .hero-img {
        mask-image: linear-gradient(to bottom, black 40%, transparent 70%);
        -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 70%);
    }

    .header-catalog-wrapper {
        padding: 0 30px 20px 30px;
    }

    .collection-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .item-label {
        font-size: 14px;
        margin-top: 8px;
    }

    .item-value {
        font-size: 13px;
    }
}

/* ==================== LARGE MOBILE: 481px - 767px ==================== */
@media (min-width: 481px) and (max-width: 767px) {
    .catalog-header {
        height: 40vh;
    }

    .catalog-title {
        font-size: 30px;
    }

    .catalog-sidebar {
        display: none;
    }

    .hero-img {
        mask-image: linear-gradient(to bottom, black 40%, transparent 70%);
        -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 70%);
    }

    .header-catalog-wrapper {
        padding: 0 30px 20px 30px;
        justify-content: space-between;
    }

    .catalog-container {
        padding: 20px 15px 20px 15px;
    }

    .collection-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .collection-item {
        margin-bottom: 20px;
    }

    .item-label {
        font-size: 13px;
    }

    .item-value {
        font-size: 12px;
    }

    .carousel-nav {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
}

/* ==================== MOBILE: ≤480px ==================== */
@media (max-width: 480px) {
    .catalog-header {
        height: 35vh;
    }

    .catalog-title {
        font-size: 25px;
        padding-left: 0;
    }

    .catalog-sidebar {
        display: none;
    }

    .hero-img {
        mask-image: linear-gradient(to bottom, black 40%, transparent 70%);
        -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 70%);
    }

    .header-catalog-wrapper {
        position: relative;
        z-index: 2;
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        width: 100%;
        padding: 0 20px 20px 20px;
    }

    .catalog-container {
        padding: 10px 10px 20px 10px;
    }

    .sort-container {
        display: flex;
        flex-direction: column;
        border: 1.5px solid #000;
        border-radius: 3px;
        padding: 4px 8px;
        background: white;
    }

    .sort-container label {
        color: #000;
        padding-left: 3px;
        font-size: 0.6rem;
    }

    .sort-dropdown {
        background: transparent;
        color: black;
        border: none;
        font-size: 0.9rem;
        outline: none;
        cursor: pointer;
    }

    .collection-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .collection-item {
        margin-bottom: 15px;
    }

    .item-label {
        font-size: 12px;
        margin-top: 8px;
    }

    .item-value {
        font-size: 11px;
    }

    .carousel-nav {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .carousel-nav.prev {
        left: 5px;
    }

    .carousel-nav.next {
        right: 5px;
    }

    .carousel-indicators {
        bottom: 5px;
    }

    .carousel-indicator {
        width: 5px;
        height: 5px;
    }
}
