/* ========== COLLECTION PAGE ========== */

/* Page header spacer */
.collection-hero {
    padding-top: 120px;
    padding-bottom: 16px;
    text-align: center;
}

.collection-hero h1 {
    font-size: 2.2rem;
    font-weight: 300;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: #222;
    margin-bottom: 10px;
}

.collection-hero p {
    font-size: 0.9rem;
    color: #888;
    letter-spacing: 1px;
}

/* ========== TAB BAR ========== */
.tab-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0 40px 16px;
}

.tab-btn {
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 10px 30px;
    background: transparent;
    border: 1px solid #ddd;
    color: #888;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    border-color: #999;
    color: #333;
}

.tab-btn.active {
    background: #222;
    border-color: #222;
    color: #fff;
}

.tab-btn__accent {
    color: inherit;
    transition: color 0.3s ease;
}

.tab-btn.active .tab-btn__accent {
    color: #e74c3c;
}

/* ========== TAB DESCRIPTION ========== */
.tab-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 40px 16px;
    display: grid;
}

.tab-description__text {
    grid-row: 1;
    grid-column: 1;
    font-size: 0.8rem;
    font-weight: 300;
    color: #888;
    letter-spacing: 0.5px;
    line-height: 1.7;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.tab-description__text.active {
    opacity: 1;
    pointer-events: auto;
}

/* ========== BANNERS GRID ========== */
.banners-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px 80px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ========== INDIVIDUAL BANNER ========== */
.stone-banner {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.4s ease, opacity 0.15s ease, max-height 0.35s ease 0.1s, margin 0.35s ease 0.1s;
    opacity: 1;
    max-height: 300px;
}

.stone-banner:hover {
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.25), 0 0 60px rgba(0, 0, 0, 0.08);
}

/* Colour name */
.stone-banner__name {
    position: absolute;
    top: 24px;
    left: 28px;
    z-index: 10;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 14px;
}

/* Lifestyle image - left side */
.stone-banner__lifestyle {
    position: absolute;
    top: 0;
    left: 0;
    width: 58%;
    height: 100%;
    overflow: hidden;
}

.stone-banner__lifestyle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.stone-banner:hover .stone-banner__lifestyle img {
    transform: scale(1.03);
}

/* Slab image - right side */
.stone-banner__slab {
    position: absolute;
    top: 0;
    right: 0;
    width: 46%;
    height: 100%;
    overflow: hidden;
}

.stone-banner__slab img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.stone-banner:hover .stone-banner__slab img {
    transform: scale(1.03);
}

/* Diagonal clip on lifestyle (cuts the right edge diagonally) */
.stone-banner__lifestyle {
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
}

/* Diagonal clip on slab (cuts the left edge diagonally) */
.stone-banner__slab {
    clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
}

/* ========== MISSING PLACEHOLDER ========== */
.stone-banner__missing {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #c0392b;
    background: #e8e6e3;
}

/* ========== ACCENT LINE ========== */
.stone-banner__accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.stone-banner__accent svg {
    width: 100%;
    height: 100%;
}

.stone-banner__accent line {
    stroke-width: 2;
    transition: stroke-width 0.3s ease;
}

.stone-banner:hover .stone-banner__accent line {
    stroke-width: 3;
}

/* ========== RANGE LABEL ========== */
.stone-banner__range {
    position: absolute;
    bottom: 20px;
    right: 24px;
    z-index: 10;
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7), 0 2px 16px rgba(0, 0, 0, 0.5);
}

.stone-banner__range .range-number {
    color: #e53935;
    font-weight: 600;
}

/* ========== HIDDEN STATE ========== */
.stone-banner.hidden {
    opacity: 0;
    max-height: 0;
    margin-top: -20px;
    pointer-events: none;
    overflow: hidden;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .stone-banner {
        height: 240px;
    }

    .stone-banner__name {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .tab-bar {
        padding: 0 20px 10px;
        gap: 4px;
    }

    .tab-btn {
        padding: 8px 16px;
        font-size: 0.65rem;
        letter-spacing: 1px;
    }

    .tab-description {
        padding: 0 20px 10px;
    }

    .tab-description__text {
        left: 20px;
        right: 20px;
    }

    .banners-container {
        padding: 0 20px 60px;
        gap: 14px;
    }

    .stone-banner {
        height: 200px;
    }

    .stone-banner.hidden {
        margin-top: -14px;
    }

    .stone-banner__name {
        font-size: 0.8rem;
        top: 16px;
        left: 18px;
        padding: 5px 10px;
    }

    .collection-hero {
        padding-top: 100px;
        padding-bottom: 30px;
    }

    .collection-hero h1 {
        font-size: 1.5rem;
        letter-spacing: 4px;
    }
}

@media (max-width: 480px) {
    .stone-banner {
        height: auto;
        max-height: 500px;
        display: flex;
        flex-direction: column;
    }

    .stone-banner__lifestyle {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        height: 160px;
        clip-path: none;
        overflow: hidden;
    }

    .stone-banner__lifestyle img {
        position: relative !important;
        width: 100% !important;
        height: 160px !important;
        max-height: 160px !important;
        object-fit: cover !important;
    }

    .stone-banner__slab {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        height: 80px;
        min-height: 80px;
        max-height: 80px;
        clip-path: none;
        border-top: 1px solid #fff;
        overflow: hidden;
    }

    .stone-banner__slab img {
        position: relative !important;
        width: 100% !important;
        height: 80px !important;
        max-height: 80px !important;
        object-fit: cover !important;
        object-position: center center !important;
    }

    .stone-banner__accent {
        display: none;
    }
}

/* ========== STONE POPUP ========== */
.stone-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.stone-popup-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.stone-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 85vh;
    background: #fff;
    z-index: 2001;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    overflow-y: auto;
    box-shadow: 0 -10px 60px rgba(0, 0, 0, 0.2);
}

.stone-popup.active {
    transform: translateY(0);
}

.stone-popup__close {
    position: absolute;
    top: 24px;
    right: 28px;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid #ddd;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease;
    z-index: 10;
}

.stone-popup__close:hover {
    border-color: #333;
}

/* Nav arrows */
.stone-popup__nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: #fff;
    border: 1px solid #ddd;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2002;
}

.stone-popup__nav:hover {
    border-color: #e53935;
    background: #e53935;
}

.stone-popup__nav:hover svg {
    stroke: #fff;
}

.stone-popup__nav svg {
    width: 20px;
    height: 20px;
    stroke: #666;
    transition: stroke 0.3s ease;
}

.stone-popup__nav--prev {
    left: 20px;
}

.stone-popup__nav--next {
    right: 20px;
}

.stone-popup__nav.hidden {
    display: none;
}

.stone-popup__close svg {
    width: 18px;
    height: 18px;
    stroke: #666;
}

.stone-popup__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 50px 40px 60px;
}

.stone-popup__header {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 16px;
}

.stone-popup__title {
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #222;
}

.stone-popup__range {
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #aaa;
}

.stone-popup__range .range-number {
    color: #e53935;
    font-weight: 600;
}

.stone-popup__desc {
    font-size: 0.92rem;
    font-weight: 300;
    line-height: 1.9;
    color: #666;
    max-width: 700px;
    margin-bottom: 36px;
}

.stone-popup__main-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin-bottom: 12px;
    background: #fff;
    container-type: size;
}

.stone-popup__main-img-wrap.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.2s ease-in-out infinite;
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.stone-popup__main-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.stone-popup__main-img.rotated {
    transform: translate(-50%, -50%) rotate(-90deg);
    max-width: 100cqh;
    max-height: 100cqw;
}

.stone-popup__thumbs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.stone-popup__thumb {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
    opacity: 0.6;
}

.stone-popup__thumb:hover {
    opacity: 0.9;
}

.stone-popup__thumb.active {
    border-color: #e53935;
    opacity: 1;
}

.stone-popup__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stone-popup__actions {
    display: flex;
    gap: 16px;
}

.stone-popup__actions .btn {
    padding: 16px 36px;
}

/* ========== SLAB LIGHTBOX ========== */
.slab-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.slab-lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.slab-lightbox__close {
    position: absolute;
    top: 24px;
    right: 28px;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease;
    z-index: 10;
}

.slab-lightbox__close:hover {
    border-color: #fff;
}

.slab-lightbox__close svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
}

.slab-lightbox__img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

.slab-lightbox__img.rotated {
    max-height: 90vw;
    max-width: 90vh;
    transform: rotate(-90deg);
}

/* ========== POPUP RESPONSIVE ========== */
@media (max-width: 768px) {
    .stone-popup__inner {
        padding: 40px 20px 50px;
    }

    .stone-popup__title {
        font-size: 1.3rem;
        letter-spacing: 3px;
    }

    .stone-popup__header {
        flex-direction: column;
        gap: 6px;
    }

    .stone-popup__actions {
        flex-direction: column;
    }

    .stone-popup__actions .btn {
        text-align: center;
    }

    .stone-popup__main-img-wrap {
        overflow: hidden;
        margin-top: 20px;
    }

    .stone-popup__thumb {
        width: 56px;
        height: 56px;
    }

    .stone-popup__nav {
        position: fixed;
        top: auto;
        bottom: 50%;
        transform: none;
        width: 40px;
        height: 40px;
        z-index: 2002;
    }

    .stone-popup__nav--prev {
        left: 6px;
    }

    .stone-popup__nav--next {
        right: 6px;
    }
}
