/* =========================================================
   CASTLE IMPEX — TILES PAGE
   ========================================================= */

/* =========================================================
   TILES HERO — IMAGE SLIDESHOW
   ========================================================= */

.tiles-hero {
    min-height: 760px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    /* background: var(--dark); */
    background: transparent;

}


/* =========================================================
   SLIDESHOW
   ========================================================= */

.tiles-hero-slideshow {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.tiles-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 1.2s ease,
        visibility 1.2s ease;
}

.tiles-slide.active {
    opacity: 1;
    visibility: visible;
}

.tiles-slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;

    transform: scale(1.04);

    transition:
        transform 6s ease;
}

.tiles-slide.active img {
    transform: scale(1);
}


/* =========================================================
   HERO OVERLAY
   ========================================================= */

.tiles-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;

     background:
        linear-gradient(
            90deg,
            rgba(69, 75, 54, 0.48) 0%,
            rgba(69, 75, 54, 0.22) 40%,
            rgba(69, 75, 54, 0.04) 75%,
            rgba(69, 75, 54, 0.12) 100%
        ),
        linear-gradient(
            0deg,
            rgba(69, 75, 54, 0.32) 0%,
            rgba(69, 75, 54, 0.02) 70%
        );
}


/* =========================================================
   HERO CONTENT
   ========================================================= */

.tiles-hero-inner {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;

    padding: 150px 60px 95px;

    position: relative;
    z-index: 2;
}

.tiles-breadcrumb {
    /* color: var(--gold); */
    color: var(--white);

    font-family: var(--display);
    font-size: 9px;
    font-weight: 600;

    letter-spacing: 0.16em;
    text-transform: uppercase;

    margin-bottom: 75px;
}


.tiles-hero-content {
    max-width: 850px;
}


.tiles-hero-content .section-number {
    /* color: var(--gold); */
    color: var(--white);
    margin-bottom: 22px;
}


.tiles-hero-content h1 {
    margin: 0;

    color: #fff;

    font-family: var(--display);
    font-size: clamp(55px, 7vw, 105px);

    font-weight: 400;
    line-height: 0.96;

    letter-spacing: -0.045em;
}


.tiles-hero-content h1 em {
    display: block;

    color: var(--gold);

    font-family: var(--serif);
    font-weight: 400;
}


.tiles-hero-content p {
    max-width: 560px;

    margin: 38px 0 0;

    color: #fff;

    font-family: var(--display);
    font-size: 13px;

    line-height: 1.9;

    opacity: 0.82;
}


/* =========================================================
   HERO BUTTON
   ========================================================= */

.tiles-hero-button {
    display: inline-flex;
    align-items: center;
    gap: 30px;

    margin-top: 35px;

    padding: 15px 18px;

    border: 1px solid rgba(255, 255, 255, 0.8);

    color: #fff;

    font-family: var(--display);
    font-size: 9px;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 0.1em;

    text-decoration: none;

    transition:
        background 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease;
}


.tiles-hero-button span {
    font-size: 15px;

    transition:
        transform 0.3s ease;
}


.tiles-hero-button:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
}


.tiles-hero-button:hover span {
    transform: translate(3px, 3px);
}


/* =========================================================
   HERO NUMBER
   ========================================================= */

.tiles-hero-number {
    position: absolute;

    right: 60px;
    bottom: 90px;

    color: #fff;

    font-family: var(--display);
    font-size: 10px;

    letter-spacing: 0.16em;
}
/* =========================================================
   INTRO
   ========================================================= */

.tiles-intro {
    background: var(--white);
}

.tiles-intro-grid {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    gap: 100px;
    align-items: start;
}

.tiles-intro-grid h2 {
    margin: 20px 0 0;
    color: var(--dark);
    font-family: var(--display);
    font-size: clamp(42px, 5vw, 72px);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.tiles-intro-grid h2 em {
    display: block;
    color: var(--gold);
    font-family: var(--serif);
    font-weight: 400;
}

.tiles-intro-grid > div:last-child {
    padding-top: 30px;
}

.tiles-intro-grid p {
    margin: 0 0 20px;
    color: var(--dark);
    font-family: var(--display);
    font-size: 13px;
    line-height: 1.9;
    opacity: 0.68;
}


/* =========================================================
   COLLECTIONS
   ========================================================= */

.tile-collections {
    /* background: var(--cream); */
    background-color: var(--white);
    padding-top: 40px;
}

.tile-collection {
    max-width: 1250px;
    margin: 0 auto 120px;
}

.tile-collection:last-child {
    margin-bottom: 20px;
}

.collection-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 38px;
}

.collection-header h2 {
    margin: 17px 0 0;
    color: var(--dark);
    font-family: var(--display);
    font-size: clamp(30px, 3.5vw, 52px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.035em;
}

.collection-header h2 em {
    color: var(--gold);
    font-family: var(--serif);
    font-weight: 400;
}

.collection-header > p {
    margin: 0;
    flex-shrink: 0;
    color: var(--dark);
    font-family: var(--display);
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.collection-header > p span {
    margin-left: 12px;
    color: var(--gold);
    font-size: 14px;
}


/* =========================================================
   TILE ROW
   ========================================================= */

.tile-row {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--gold) transparent;
}

.tile-row::-webkit-scrollbar {
    height: 3px;
}

.tile-row::-webkit-scrollbar-track {
    background: rgba(69, 75, 54, 0.08);
}

.tile-row::-webkit-scrollbar-thumb {
    background: var(--gold);
}


/* =========================================================
   TILE CARD
   ========================================================= */

.tile-card {
    position: relative;
    flex: 0 0 280px;
    text-decoration: none;
    color: inherit;
}

.tile-image {
    position: relative;
    height: 360px;
    overflow: hidden;
    background: #ddd7c9;
}

.tile-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.2, 0.65, 0.25, 1);
}

.tile-image-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            to bottom,
            rgba(69, 75, 54, 0.08),
            rgba(69, 75, 54, 0.35)
        );
    opacity: 0;
    transition: opacity 0.4s ease;
}

.tile-card-number {
    position: absolute;
    top: 17px;
    left: 18px;
    color: #fff;
    font-family: var(--display);
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.12em;
}

.tile-card-arrow {
    position: absolute;
    right: 18px;
    bottom: 18px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: #fff;
    font-size: 14px;
    opacity: 0;
    transform: translateY(8px);
    transition:
        opacity 0.35s ease,
        transform 0.35s ease;
}

.tile-card:hover .tile-image img {
    transform: scale(1.06);
}

.tile-card:hover .tile-image-overlay {
    opacity: 1;
}

.tile-card:hover .tile-card-arrow {
    opacity: 1;
    transform: translateY(0);
}


/* =========================================================
   TILE CARD INFO
   ========================================================= */

.tile-card-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 17px 2px 0;
}

.tile-card-info h3 {
    margin: 0;
    color: var(--dark);
    font-family: var(--display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.tile-card-info span {
    flex-shrink: 0;
    color: var(--gold);
    font-family: var(--display);
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* =========================================================
   TILE PRODUCT FILTER PAGE
   ========================================================= */

.tile-products-section {
    background: var(--cream);
    padding: 120px 60px 130px;
}

.tile-products-wrapper {
    max-width: 1400px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 70px;
}


/* =========================================================
   FILTER SIDEBAR
   ========================================================= */

.tile-filters {
    position: sticky;
    top: 120px;
    align-self: start;
}

.filter-title {
    margin-bottom: 50px;
}

.filter-title > span {
    color: var(--gold);

    font-family: var(--display);
    font-size: 9px;
    font-weight: 600;

    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.filter-title h2 {
    margin: 16px 0 0;

    color: var(--dark);

    font-family: var(--display);
    font-size: 32px;
    font-weight: 400;

    line-height: 1;
    letter-spacing: -0.035em;
}

.filter-title h2 em {
    color: var(--gold);
    font-family: var(--serif);
    font-weight: 400;
}


/* FILTER GROUP */

.filter-group {
    margin-bottom: 38px;
}

.filter-group label {
    display: block;

    margin-bottom: 12px;

    color: var(--dark);

    font-family: var(--display);
    font-size: 11px;
    font-weight: 600;

    letter-spacing: 0.03em;
}

.filter-group select {
    width: 100%;
    height: 58px;

    padding: 0 16px;

    appearance: none;

    border: 1px solid rgba(69, 75, 54, 0.18);
    border-radius: 0;

    background-color: transparent;

    background-image:
        linear-gradient(
            45deg,
            transparent 50%,
            var(--dark) 50%
        ),
        linear-gradient(
            135deg,
            var(--dark) 50%,
            transparent 50%
        );

    background-position:
        calc(100% - 19px) 25px,
        calc(100% - 14px) 25px;

    background-size:
        6px 6px,
        6px 6px;

    background-repeat: no-repeat;

    color: var(--dark);

    font-family: var(--display);
    font-size: 11px;

    cursor: pointer;

    outline: none;

    transition:
        border-color 0.3s ease,
        background-color 0.3s ease;
}

.filter-group select:hover,
.filter-group select:focus {
    border-color: var(--gold);
    background-color: rgba(170, 135, 85, 0.05);
}


/* RESET */

.filter-reset {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;

    padding: 15px 0;

    border: 0;
    border-top: 1px solid rgba(69, 75, 54, 0.16);

    border-bottom: 1px solid rgba(69, 75, 54, 0.16);

    background: transparent;

    color: var(--dark);

    font-family: var(--display);
    font-size: 9px;
    font-weight: 600;

    letter-spacing: 0.1em;
    text-transform: uppercase;

    cursor: pointer;

    transition: color 0.3s ease;
}

.filter-reset span {
    color: var(--gold);
    font-size: 14px;
}

.filter-reset:hover {
    color: var(--gold);
}


/* =========================================================
   PRODUCTS CONTENT
   ========================================================= */

.tile-products-content {
    min-width: 0;
}

.products-topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 30px;

    margin-bottom: 45px;
}

.products-topbar h2 {
    margin: 16px 0 0;

    color: var(--dark);

    font-family: var(--display);
    font-size: clamp(38px, 4vw, 58px);

    font-weight: 400;

    line-height: 0.95;

    letter-spacing: -0.04em;
}

.products-topbar h2 em {
    color: var(--gold);
    font-family: var(--serif);
    font-weight: 400;
}

.product-count {
    flex-shrink: 0;

    color: var(--dark);

    font-family: var(--display);
    font-size: 9px;
    font-weight: 600;

    letter-spacing: 0.12em;
}

.product-count span {
    color: var(--gold);
    font-size: 15px;
    margin-right: 7px;
}


/* =========================================================
   PRODUCT GRID
   ========================================================= */

.tile-product-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 50px 18px;
}


/* =========================================================
   PRODUCT CARD
   ========================================================= */

.tile-product-card {
    position: relative;
    min-width: 0;

    text-decoration: none;

    transition:
        opacity 0.35s ease,
        transform 0.35s ease;
}

.tile-product-card.hidden {
    display: none;
}

.tile-product-image {
    position: relative;

    width: 100%;
    aspect-ratio: 0.78;

    overflow: hidden;

    background: #ddd7c9;
}

.tile-product-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform 0.8s cubic-bezier(0.2, 0.65, 0.25, 1);
}

.tile-product-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to bottom,
            rgba(69, 75, 54, 0.02),
            rgba(69, 75, 54, 0.30)
        );

    opacity: 0;

    transition:
        opacity 0.4s ease;
}

.tile-product-number {
    position: absolute;

    top: 16px;
    left: 17px;

    color: #fff;

    font-family: var(--display);
    font-size: 8px;
    font-weight: 600;

    letter-spacing: 0.12em;
}

.tile-product-arrow {
    position: absolute;

    right: 17px;
    bottom: 17px;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255, 255, 255, 0.7);

    color: #fff;

    font-size: 14px;

    opacity: 0;

    transform: translateY(8px);

    transition:
        opacity 0.35s ease,
        transform 0.35s ease;
}

.tile-product-card:hover .tile-product-image img {
    transform: scale(1.06);
}

.tile-product-card:hover .tile-product-overlay {
    opacity: 1;
}

.tile-product-card:hover .tile-product-arrow {
    opacity: 1;
    transform: translateY(0);
}


/* =========================================================
   PRODUCT INFORMATION
   ========================================================= */

/* =====================================================
   PRODUCT INFORMATION
===================================================== */

.tile-product-info {

    display: flex;

    align-items: center;

    justify-content: center;

    text-align: center;

    padding: 18px 5px 0;

}


/* PRODUCT NAME */

.tile-product-info h3 {

    margin: 0;

    color: var(--dark);

    font-family: var(--display);

    font-size: 16px;

    font-weight: 600;

    line-height: 1.4;

    text-align: center;

}


/* HIDE SIZE TEXT IF ANY OLD CARD STILL HAS IT */

.tile-product-info span {

    display: none;

}

/* =========================================================
   NO PRODUCTS
   ========================================================= */

.no-products {
    display: none;

    padding: 80px 20px;

    text-align: center;

    color: var(--dark);

    font-family: var(--display);
    font-size: 13px;
}

.no-products button {
    display: block;

    margin: 20px auto 0;

    border: 0;
    background: transparent;

    color: var(--gold);

    font-family: var(--display);
    font-size: 9px;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 0.1em;

    cursor: pointer;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {

    .tile-products-section {
        padding: 90px 35px 100px;
    }

    .tile-products-wrapper {
        grid-template-columns: 210px 1fr;
        gap: 45px;
    }

    .tile-product-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 40px 15px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .tile-products-section {
        padding: 75px 24px 85px;
    }

    .tile-products-wrapper {
        display: block;
    }

    .tile-filters {
        position: static;

        margin-bottom: 65px;
    }

    .filter-title {
        margin-bottom: 35px;
    }

    .filter-title h2 {
        font-size: 30px;
    }

    .filter-group {
        margin-bottom: 20px;
    }

    .products-topbar {
        display: block;

        margin-bottom: 35px;
    }

    .product-count {
        margin-top: 20px;
    }

    .tile-product-grid {
        grid-template-columns: 1fr 1fr;

        gap: 35px 10px;
    }

    .tile-product-info {
        display: block;
    }

    .tile-product-info h3 {
        font-size: 11px;
    }

    .tile-product-info span {
        display: block;

        margin-top: 7px;

        font-size: 8px;
    }

}


@media (max-width: 450px) {

    .tile-product-grid {
        grid-template-columns: 1fr;
    }

    .tile-product-info {
        display: flex;
    }

}
/* =========================================================
   CTA
   ========================================================= */

.tiles-cta {
    /* background: var(--dark); */
    background-color: var(--cream);
    color: var(--dark);
    text-align: center;
    padding: 130px 30px;
}

.tiles-cta-inner {
    max-width: 850px;
    margin: auto;
}

.tiles-cta .section-number {
    color: var(--dark);
}

.tiles-cta h2 {
    margin: 22px 0 25px;
    color: var(--dark);
    font-family: var(--display);
    font-size: clamp(45px, 6vw, 78px);
    font-weight: 500;
    line-height: 0.96;
    letter-spacing: -0.04em;
}

.tiles-cta h2 em {
    display: block;
    color: var(--dark);
    font-family: var(--serif);
    font-weight: 400;
}

.tiles-cta p {
    max-width: 500px;
    margin: 0 auto;
    color: var(--dark);
    font-family: var(--display);
    font-size: 13px;
    line-height: 1.8;
    opacity: 0.65;
}

.tiles-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 30px;
    margin-top: 35px;
    padding: 15px 20px;
    border: 1px solid var(--gold);
    color: var(--dark);
    font-family: var(--display);
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition:
        background 0.3s ease,
        color 0.3s ease;
}

.tiles-cta-button span {
    color: var(--gold);
    font-size: 14px;
}

.tiles-cta-button:hover {
    background: var(--gold);
    color: #fff;
}

.tiles-cta-button:hover span {
    color: #fff;
}


/* =========================================================
   REVEAL ANIMATION
   ========================================================= */

/*
   Keep tiles visible by default.
   This prevents the page from appearing blank if
   main.js does not observe .reveal-tile.
*/

/* =========================================================
   SCROLL REVEAL — TILES PAGE
   ========================================================= */

.reveal-tile {
    opacity: 0;
    transform: translateY(45px);
    transition:
        opacity 0.9s ease,
        transform 0.9s cubic-bezier(0.2, 0.65, 0.25, 1);
}

.reveal-tile.visible {
    opacity: 1;
    transform: translateY(0);
}


/* Staggered reveal for tile cards */

.tile-card.reveal-tile:nth-child(1) {
    transition-delay: 0.05s;
}

.tile-card.reveal-tile:nth-child(2) {
    transition-delay: 0.12s;
}

.tile-card.reveal-tile:nth-child(3) {
    transition-delay: 0.19s;
}

.tile-card.reveal-tile:nth-child(4) {
    transition-delay: 0.26s;
}

.tile-card.reveal-tile:nth-child(5) {
    transition-delay: 0.33s;
}

.tile-card.reveal-tile:nth-child(6) {
    transition-delay: 0.40s;
}

.tile-card.reveal-tile:nth-child(7) {
    transition-delay: 0.47s;
}
/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 950px) {

    .tiles-hero {
        min-height: 680px;
    }

    .tiles-hero-inner {
        padding: 130px 35px 75px;
    }

    .tiles-hero-number {
        right: 35px;
        bottom: 70px;
    }

    .tiles-intro-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .tiles-intro-grid > div:last-child {
        padding-top: 0;
        max-width: 650px;
    }

    .tile-collection {
        margin-bottom: 90px;
    }

    .tile-card {
        flex-basis: 260px;
    }

    .tile-image {
        height: 340px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 650px) {

    .tiles-hero {
        min-height: 620px;
    }

    .tiles-hero-inner {
        /* padding: 0 24px 28px;         */
    }

    .tiles-breadcrumb {
        margin-bottom: 55px;
    }

    .tiles-hero-content h1 {
        font-size: 48px;
    }

    .tiles-hero-content p {
        font-size: 12px;
        line-height: 1.8;
    }

    .tiles-hero-number {
        right: 24px;
        bottom: 55px;
    }

    .tiles-intro {
        padding-left: 24px;
        padding-right: 24px;
    }

    .tiles-intro-grid h2 {
        font-size: 44px;
    }

    .tile-collections {
        padding-left: 24px;
        padding-right: 24px;
    }

    .tile-collection {
        margin-bottom: 75px;
    }

    .collection-header {
        display: block;
        margin-bottom: 28px;
    }

    .collection-header h2 {
        font-size: 34px;
        line-height: 1.05;
    }

    .collection-header > p {
        margin-top: 18px;
    }

    .tile-card {
        flex-basis: 245px;
    }

    .tile-image {
        height: 315px;
    }

    .tiles-cta {
        padding: 90px 24px;
    }

    .tiles-cta h2 {
        font-size: 45px;
    }
}