.page-header {
    background: #020812 url("assets/fabric-studio-background.png") center / cover no-repeat !important;
}

.page-header .video-bg,
.page-header .overlays {
    display: none !important;
}

.left-side {
    z-index: 80 !important;
    background: rgba(4, 8, 16, 0.52) !important;
    backdrop-filter: blur(3px);
}

.all-cases-link {
    z-index: 90 !important;
}

.fabric-test-page {
    position: absolute;
    inset: 0 0 0 108px;
    z-index: 20;
    min-height: 590px;
    overflow: hidden;
    background: #020812 url("assets/fabric-studio-background.png") center / cover fixed no-repeat !important;
    color: #fff;
    isolation: isolate;
}

.fabric-test-page::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(0, 7, 18, 0.04);
    content: "";
    pointer-events: none;
}

.fabric-test-stage,
.fabric-test-stage canvas {
    width: 100%;
    height: 100%;
}

.fabric-test-stage canvas {
    display: block;
    cursor: grab;
    touch-action: none;
}

.fabric-test-stage canvas:active { cursor: grabbing; }

.fabric-test-heading {
    position: absolute;
    top: 76px;
    left: 50%;
    z-index: 4;
    width: min(780px, calc(100% - 80px));
    text-align: center;
    transform: translateX(-50%);
    pointer-events: none;
}

.fabric-test-heading h1 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 31px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: 0;
    text-transform: uppercase;
    text-shadow: 0 3px 20px rgba(0, 0, 0, 0.55);
}

.fabric-test-heading p {
    margin: 0;
    color: rgba(235, 241, 249, 0.86);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: 0;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}

.fabric-meta {
    position: absolute;
    top: 82% !important;
    left: 50%;
    z-index: 5;
    min-width: 220px;
    padding: 7px 14px;
    border: 0;
    background: transparent;
    text-align: center;
    transform: translate(-50%, 0);
    cursor: pointer;
}

.fabric-meta strong {
    display: block;
    max-width: min(540px, 76vw);
    color: #fff;
    font-size: 25px;
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: 0;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.9), 0 0 20px rgba(84, 164, 255, 0.42);
}

.fabric-meta small {
    display: block;
    margin-top: 5px;
    color: rgba(222, 233, 245, 0.82);
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 1.4px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
}

.fabric-meta:hover strong,
.fabric-meta:focus-visible strong {
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9), 0 0 25px rgba(147, 204, 255, 0.78);
}

.fabric-meta:focus-visible {
    outline: 1px solid rgba(255, 255, 255, 0.72);
    outline-offset: 3px;
}

.load-status {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 7;
    color: #d7d9d6;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: opacity 320ms ease;
}

.load-status.ready { opacity: 0; }

.kartela-gallery-section {
    position: relative;
    z-index: 5;
    width: 100%;
    min-height: 0;
    padding: 70px 42px 110px;
    box-sizing: border-box;
    background: #020812 url("assets/fabric-studio-background.png") center / cover fixed no-repeat;
}

.kartela-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.kartela-panel { display: none; }
.kartela-panel.active { display: block; }

.kartela-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.kartela-photo {
    display: block;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    background: #171c31;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.13);
    transition: transform 250ms ease, box-shadow 250ms ease;
}

.kartela-photo:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.kartela-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 991px) {
    .kartela-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .kartela-photo img { height: 100%; }
}

@media (max-width: 768px) {
    .page-header {
        min-height: 100svh;
        background-position: 52% center !important;
    }

    .left-side {
        background: rgba(4, 8, 16, 0.45) !important;
        backdrop-filter: blur(2px);
    }

    .fabric-test-page {
        inset: 0;
        width: 100%;
        height: 100svh;
        min-height: 540px;
        background-position: 52% center !important;
    }

    .fabric-test-heading {
        top: calc(env(safe-area-inset-top, 0px) + 122px);
        width: calc(100% - 86px);
        margin-left: 26px;
    }

    .fabric-test-heading h1 {
        margin-bottom: 8px;
        font-size: 20px;
    }

    .fabric-test-heading p {
        max-width: 310px;
        margin: 0 auto;
        font-size: 10px;
        line-height: 1.35;
    }

    .fabric-meta {
        top: 82% !important;
        min-width: 170px;
        padding: 5px 8px;
    }

    .fabric-meta strong {
        max-width: 68vw;
        font-size: 20px;
    }

    .fabric-meta small {
        margin-top: 4px;
        font-size: 9px;
        letter-spacing: 1px;
    }

    .kartela-gallery-section { padding: 36px 12px 100px; }

    .kartela-gallery {
        grid-template-columns: 1fr;
        gap: 14px;
        width: min(100%, 290px);
        margin: 0 auto;
    }

    .kartela-photo img {
        height: 100%;
        object-fit: cover;
    }
}

@media (max-width: 420px) {
    .fabric-test-heading {
        top: calc(env(safe-area-inset-top, 0px) + 116px);
        width: calc(100% - 82px);
        margin-left: 24px;
    }
    .fabric-test-heading h1 { font-size: 18px; }
    .fabric-test-heading p {
        max-width: 255px;
        font-size: 9px;
    }
}
