/* Collections Page */
section.all-collections {
    padding: 150px 5% 100px;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    width: 100%;
}

section.all-collections .page-header {
    text-align: center;
    margin-bottom: 80px;
}

section.all-collections .page-header h1 {
    font-family: var(--font-primary);
    font-size: clamp(32px, 5vw, 60px);
    color: var(--text-color);
    font-weight: 800;
}

section.all-collections .page-header p {
    color: var(--primary-color);
    font-size: 18px;
    margin-top: 15px;
}

/* Category Sections */
section.all-collections .main-category {
    margin-bottom: 100px;
    width: 100%;
}

section.all-collections .category-title {
    font-family: var(--font-primary);
    font-size: clamp(28px, 4vw, 42px);
    color: var(--primary-color);
    margin-bottom: 40px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(160, 82, 45, 0.1);
    display: inline-block;
}

/* Subcategory Blocks */
section.all-collections .subcategory-block {
    margin-bottom: 60px;
    width: 100%;
}

section.all-collections .subcategory-block .title-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 25px;
}

section.all-collections .subcategory-block .title h3 {
    font-family: var(--font-primary);
    font-size: 24px;
    color: var(--text-color);
    font-weight: 600;
}

section.all-collections .subcategory-block .more {
    margin-top: 20px;
    justify-content: flex-end;
    /* Align "See more" to the right */
}

/* Reuse existing best-seller-content styles but ensure full width */
section.all-collections .best-seller-content {
    display: flex;
    align-items: flex-start;
    /* Changed from center to allow different heights if needed, but top algin is safer */
    flex-wrap: wrap;
    width: 100%;
    margin-top: 0;
    /* Reset generic margin */
    justify-content: flex-start;
    /* Align items to start */
    gap: 20px;
    /* Use gap for spacing instead of space-between */
}

section.all-collections .best-seller-content .sell-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: calc(25% - 15px);
    /* 4 items per row with gap */
}

/* Ensure images and content inside sell-content are styled correctly */
section.all-collections .img-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    /* Ensure square aspect ratio like homepage */
    border-radius: 25px;
    overflow: hidden;
}

section.all-collections .img-container .cart {
    position: absolute;
    z-index: 10;
    cursor: pointer;
    top: 15px;
    right: 15px;
    height: 45px;
    width: 45px;
    transition: transform 0.3s ease;
}

section.all-collections .img-container .cart:hover {
    transform: scale(1.1);
}

section.all-collections .img-container .arrow {
    opacity: 0;
    z-index: 10;
    cursor: pointer;
    position: absolute;
    bottom: 10px;
    right: 20px;
    transition: all 0.3s ease;
}

section.all-collections .img-container .arrow:hover {
    transform: scale(1.1);
}

section.all-collections .img-container:hover .arrow {
    opacity: 1;
}

section.all-collections .img-container .article-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    cursor: pointer;
}

section.all-collections .img-container:hover .article-img {
    transform: scale(1.1);
}

section.all-collections .sell-content h3 {
    font-family: var(--font-primary);
    font-size: 22px;
    font-weight: 600;
    margin-top: 10px;
    text-align: center;
}

section.all-collections .sell-content p {
    font-size: 15px;
    text-align: center;
}

.separator-line {
    width: 100%;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.05);
    margin-bottom: 100px;
}

/* Responsive */
@media (max-width: 1200px) {

    /* Enable horizontal scrolling for collections on smaller screens */
    section.all-collections .best-seller-content {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        gap: 20px;
        padding-bottom: 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE and Edge */
        justify-content: flex-start;
        /* Ensure items start from left */
    }

    section.all-collections .best-seller-content::-webkit-scrollbar {
        display: none;
        /* Chrome, Safari */
    }

    section.all-collections .best-seller-content .sell-content {
        flex: 0 0 calc(33.333% - 14px);
        min-width: calc(33.333% - 14px);
        scroll-snap-align: start;
        width: auto;
        /* Override fixed width */
    }
}

@media (max-width: 900px) {
    section.all-collections {
        padding-top: 120px;
    }

    section.all-collections .best-seller-content .sell-content {
        flex: 0 0 calc(50% - 10px);
        min-width: calc(50% - 10px);
    }

    section.all-collections .page-header {
        margin-bottom: 50px;
    }
}

@media (max-width: 600px) {
    section.all-collections .best-seller-content .sell-content {
        flex: 0 0 calc(100% - 20px);
        min-width: calc(100% - 20px);
    }

    section.all-collections .subcategory-block .title h3 {
        font-size: 20px;
    }

    section.all-collections .subcategory-block {
        margin-bottom: 40px;
    }
}

/* Carousel Styling */
section.all-collections .carousel-container {
    position: relative;
    width: 100%;
}

section.all-collections .carousel-track-container {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 10px 0;
    /* Add padding to avoid cutting shadows */
}

/* Override best-seller-content for carousel mode */
section.all-collections .best-seller-content.carousel-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    width: 100%;
    /* Important: let items dictate width but track moves */
    justify-content: flex-start;
    /* Ensure items start from left */
    overflow: visible;
    /* Let track overflow container visually if needed */
    margin-bottom: 0;
}

/* Ensure items are strictly sized */
section.all-collections .best-seller-content .sell-content {
    flex: 0 0 calc(25% - 15px);
    /* 4 items with gap */
    width: calc(25% - 15px);
    margin: 0;
}


/* Carousel Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    color: var(--primary-color);
}

.carousel-btn:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: -22px;
}

.carousel-btn.next {
    right: -22px;
}

.carousel-btn:disabled,
.carousel-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Adjust for responsiveness */
@media (max-width: 1200px) {
    .carousel-btn {
        display: none !important;
        /* Hide buttons on tablet/mobile */
    }

    section.all-collections .carousel-track-container {
        overflow: visible;
        /* Allow native scroll */
    }

    section.all-collections .best-seller-content.carousel-track {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 20px;
        /* Space for scrollbar if any */
        scrollbar-width: none;
    }

    /* Re-apply mobile sizing logic */
    section.all-collections .best-seller-content .sell-content {
        flex: 0 0 calc(33.333% - 14px);
        min-width: calc(33.333% - 14px);
        scroll-snap-align: start;
    }
}

@media (max-width: 900px) {
    section.all-collections .best-seller-content .sell-content {
        flex: 0 0 calc(50% - 10px);
        min-width: calc(50% - 10px);
    }
}

@media (max-width: 600px) {
    section.all-collections .best-seller-content .sell-content {
        flex: 0 0 85%;
        /* Show part of next slide to indicate scroll */
        min-width: 85%;
    }
}