.texture-body {
    color: #2b2222;
    background: #f6f4ef;
}

.texture-hero {
    position: relative;
    min-height: 460px;
    overflow: hidden;
    color: #f7f5f1;
    background: #28070f;
}

.texture-hero-media {
    position: absolute;
    inset: 0;
    margin: 0;
}

.texture-hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(34, 5, 11, 0.96), rgba(34, 5, 11, 0.68) 48%, rgba(34, 5, 11, 0.18));
}

.texture-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 58%;
}

.texture-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(200px, 0.42fr);
    gap: 60px;
    align-items: end;
    min-height: 460px;
    padding-top: calc(var(--header-height) + 54px);
    padding-bottom: 58px;
}

.texture-hero-copy {
    max-width: 700px;
}

.texture-hero h1 {
    max-width: 15ch;
    margin-top: 18px;
    font-family: var(--font-body);
    font-size: clamp(38px, 4.4vw, 64px);
    font-weight: 600;
    line-height: 1.03;
    letter-spacing: -0.04em;
}

.texture-hero-copy p {
    max-width: 56ch;
    margin-top: 20px;
    color: rgba(247, 245, 241, 0.74);
    font-size: 15px;
    line-height: 1.7;
}

.texture-hero-note {
    display: grid;
    justify-self: end;
    width: min(100%, 280px);
    border-top: 1px solid rgba(247, 245, 241, 0.3);
}

.texture-hero-note span {
    padding: 12px 0;
    border-bottom: 1px solid rgba(247, 245, 241, 0.18);
    color: rgba(247, 245, 241, 0.78);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.texture-showroom {
    padding: clamp(56px, 6vw, 84px) 0 clamp(82px, 8vw, 120px);
    background: #f6f4ef;
}

.texture-showroom-intro {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(280px, 0.62fr);
    gap: 50px;
    align-items: end;
    margin-bottom: 30px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(74, 16, 29, 0.15);
}

.texture-showroom-intro .section-label {
    margin-bottom: 14px;
}

.texture-showroom-intro h2 {
    max-width: 25ch;
    font-size: clamp(28px, 2.7vw, 42px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.texture-showroom-intro > p {
    max-width: 51ch;
    color: rgba(43, 34, 34, 0.64);
    font-size: 14px;
    line-height: 1.7;
}

.texture-studio {
    display: grid;
    grid-template-columns: minmax(270px, 0.36fr) minmax(0, 1fr);
    height: min(690px, calc(100svh - var(--header-height) - 44px));
    min-height: 590px;
    overflow: hidden;
    border: 1px solid rgba(74, 16, 29, 0.14);
    background: #fff;
    box-shadow: 0 24px 70px rgba(40, 15, 20, 0.08);
}

.texture-library {
    position: relative;
    z-index: 2;
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 24px;
    overflow: hidden;
    border-right: 1px solid rgba(74, 16, 29, 0.14);
    background: #f9f7f3;
}

.texture-library-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex: 0 0 auto;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(74, 16, 29, 0.14);
}

.texture-library-heading span {
    color: #4a101d;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.texture-library-heading small {
    color: rgba(43, 34, 34, 0.48);
    font-size: 10px;
}

.texture-sample-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 12px;
    min-height: 0;
    padding-right: 5px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 16, 29, 0.28) transparent;
}

.texture-sample-grid::-webkit-scrollbar {
    width: 4px;
}

.texture-sample-grid::-webkit-scrollbar-thumb {
    background: rgba(74, 16, 29, 0.28);
}

.texture-sample {
    position: relative;
    display: grid;
    min-width: 0;
    padding: 0;
    text-align: left;
}

.texture-sample-image {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid rgba(74, 16, 29, 0.1);
    background: #ddd7cf;
}

.texture-sample-image::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    transition: border-color 180ms ease;
}

.texture-sample img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 340ms ease;
}

.texture-sample:hover img,
.texture-sample:focus-visible img {
    transform: scale(1.045);
}

.texture-sample.is-active .texture-sample-image::after {
    border-color: #aa8759;
}

.texture-sample.is-active::after {
    content: "";
    position: absolute;
    top: 7px;
    right: 7px;
    width: 7px;
    height: 7px;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(74, 16, 29, 0.78);
}

.texture-sample-name {
    margin-top: 6px;
    overflow: hidden;
    color: #2b2222;
    font-size: 9px;
    font-weight: 650;
    letter-spacing: 0.035em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.texture-preview {
    position: relative;
    min-width: 0;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: #d6d0c8;
}

.texture-preview > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 180ms ease, transform 560ms cubic-bezier(0.16, 1, 0.3, 1);
}

.texture-preview.is-changing > img {
    opacity: 0.42;
    transform: scale(1.012);
}

.texture-preview::after {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 52%, rgba(27, 8, 12, 0.76));
}

.texture-detail-swatch {
    position: absolute;
    z-index: 4;
    top: 24px;
    right: 24px;
    width: clamp(96px, 10vw, 142px);
    aspect-ratio: 0.82;
    overflow: hidden;
    border: 7px solid rgba(247, 245, 241, 0.96);
    background: #d5d0c9;
    box-shadow: 0 18px 48px rgba(30, 8, 13, 0.2);
}

.texture-detail-swatch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.texture-preview figcaption {
    position: absolute;
    z-index: 3;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.65fr);
    gap: 8px 30px;
    align-items: end;
    padding: 30px 34px;
    color: #fff;
}

.texture-preview figcaption > span {
    grid-column: 1 / -1;
    color: #d8c19e;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.texture-preview figcaption strong {
    font-size: clamp(25px, 2.3vw, 36px);
    font-weight: 600;
    line-height: 1.08;
}

.texture-preview figcaption p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    line-height: 1.6;
}

.texture-consultation {
    padding: 0 0 clamp(88px, 9vw, 138px);
}

.texture-consultation-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
    min-height: 560px;
}

.texture-consultation figure {
    min-height: 500px;
    overflow: hidden;
}

.texture-consultation figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.texture-consultation-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(48px, 7vw, 96px);
    color: #f7f5f1;
    background: #3a0a14;
}

.texture-consultation-copy h2 {
    max-width: 17ch;
    margin-top: 18px;
    font-size: clamp(29px, 2.8vw, 43px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.texture-consultation-copy p {
    max-width: 48ch;
    margin-top: 22px;
    color: rgba(247, 245, 241, 0.72);
    font-size: 14px;
    line-height: 1.75;
}

.texture-consultation-copy .btn {
    margin-top: 32px;
}

@media (max-width: 1080px) {
    .texture-studio {
        grid-template-columns: minmax(245px, 0.4fr) minmax(0, 1fr);
    }

    .texture-library {
        padding: 20px;
    }

    .texture-sample-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .texture-hero-inner,
    .texture-showroom-intro,
    .texture-consultation-grid {
        grid-template-columns: 1fr;
    }

    .texture-hero-note {
        display: none;
    }

    .texture-showroom-intro {
        gap: 18px;
    }

    .texture-studio {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
        overflow: visible;
    }

    .texture-preview {
        order: -1;
        height: min(54svh, 480px);
        min-height: 350px;
    }

    .texture-library {
        display: block;
        padding: 18px;
        overflow: hidden;
        border-top: 1px solid rgba(74, 16, 29, 0.14);
        border-right: 0;
    }

    .texture-sample-grid {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 1px 1px 12px;
        scroll-snap-type: x proximity;
        scrollbar-width: thin;
    }

    .texture-sample {
        flex: 0 0 84px;
        scroll-snap-align: start;
    }
}

@media (max-width: 700px) {
    .texture-hero,
    .texture-hero-inner {
        min-height: 420px;
    }

    .texture-hero-inner {
        align-content: end;
        padding-top: calc(var(--header-height) + 36px);
        padding-bottom: 42px;
    }

    .texture-hero-media img {
        object-position: 68% center;
    }

    .texture-hero-media::after {
        background: linear-gradient(180deg, rgba(34, 5, 11, 0.12), rgba(34, 5, 11, 0.9) 68%, rgba(34, 5, 11, 0.98));
    }

    .texture-hero h1 {
        font-size: clamp(34px, 10vw, 46px);
    }

    .texture-showroom {
        padding-top: 48px;
    }

    .texture-showroom-intro {
        margin-bottom: 22px;
        padding-bottom: 22px;
    }

    .texture-showroom-intro h2 {
        font-size: clamp(27px, 7.6vw, 36px);
    }

    .texture-preview {
        height: 46svh;
        min-height: 330px;
    }

    .texture-detail-swatch {
        top: 14px;
        right: 14px;
        width: 78px;
        border-width: 5px;
    }

    .texture-preview figcaption {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 22px 20px;
    }

    .texture-preview figcaption > span {
        grid-column: 1;
    }

    .texture-preview figcaption p {
        max-width: 34ch;
        font-size: 11px;
    }

    .texture-consultation figure {
        min-height: 0;
        aspect-ratio: 4 / 3;
    }

    .texture-consultation-copy {
        padding: 50px 26px 58px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .texture-preview > img,
    .texture-sample img {
        transition: none;
    }
}
