/* ==========================================================
   COLLECTION PAGE — istyle
   Product category archive with editorial hero
   ========================================================== */


/* ---- Utility ---- */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.istyle-collection {
    width: 100%;
    background: var(--ivory);
}


/* ==========================================================
   HERO BANNER
   ========================================================== */

.collection-hero {
    position: relative;
    width: 100%;
    min-height: 48vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--burgundy);
}

.collection-hero__image {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--burgundy);
    border: 2px dashed rgba(243, 236, 226, 0.22);
    margin: 14px;
    border-radius: 8px;
}

.collection-hero__image span {
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(243, 236, 226, 0.35);
}

.collection-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(90, 28, 45, 0.5);
    pointer-events: none;
    z-index: 1;
}

.collection-hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--ivory);
    padding: 40px 24px;
    max-width: 600px;
}

.collection-hero__content h1 {
    font-family: serif;
    font-size: clamp(2.6rem, 5vw, 4rem);
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin: 0 0 18px;
    line-height: 1.05;
}

.collection-hero__content p {
    font-size: 15px;
    letter-spacing: 0.04em;
    line-height: 1.8;
    color: rgba(243, 236, 226, 0.8);
    margin: 0 auto;
    max-width: 460px;
}


/* ==========================================================
   PRODUCTS SECTION
   ========================================================== */

.collection-products {
    padding: 60px 60px 120px;
}

.collection-products__inner {
    max-width: 1400px;
    margin: 0 auto;
}


/* ---- Breadcrumb ---- */

.collection-breadcrumb {
    margin-bottom: 36px;
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.collection-breadcrumb a {
    color: var(--text-muted);
    transition: color 0.25s ease;
}

.collection-breadcrumb a:hover {
    color: var(--burgundy);
}

.collection-breadcrumb__sep {
    margin: 0 10px;
    opacity: 0.4;
}

.collection-breadcrumb [aria-current="page"] {
    color: var(--burgundy);
    font-weight: 500;
}


/* ---- Toolbar ---- */

.collection-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.collection-toolbar__count {
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.collection-toolbar__sort {
    appearance: none;
    -webkit-appearance: none;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 38px 10px 16px;
    font-size: 13px;
    font-family: inherit;
    color: var(--burgundy);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235A1C2D' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: border-color 0.25s ease;
}

.collection-toolbar__sort:focus {
    outline: none;
    border-color: var(--burgundy);
}


/* ---- Product Grid ---- */

.collection-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
}


/* ---- Product Card ---- */

.collection-product-card {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 12px rgba(90, 28, 45, 0.04);
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.collection-product-card:hover {
    box-shadow: 0 8px 36px rgba(90, 28, 45, 0.1);
    transform: translateY(-4px);
}

.collection-product-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.collection-product-card__image-wrap {
    position: relative;
    overflow: hidden;
}

.collection-product-card__image {
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ece5dc;
    border-bottom: 1px solid var(--border);
    transition: background 0.5s ease;
}

.collection-product-card:hover .collection-product-card__image {
    background: #e4ddd4;
}

.collection-product-card__image span {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    border: 1px dashed var(--border);
    padding: 8px 16px;
    border-radius: 4px;
}


/* Card content */

.collection-product-card__content {
    padding: 22px 22px 26px;
}

.collection-product-card__name {
    font-family: serif;
    font-weight: 400;
    font-size: 17px;
    margin: 0 0 6px;
    color: var(--burgundy);
    line-height: 1.3;
}

.collection-product-card__price {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 18px;
    letter-spacing: 0.03em;
}

.collection-product-card__add-to-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    padding: 11px 20px;
    background: var(--burgundy);
    color: var(--ivory);
    border: 1px solid var(--burgundy);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.collection-product-card__add-to-cart:hover {
    background: var(--ivory);
    color: var(--burgundy);
    transform: translateY(-1px);
}


/* Real product image (when featured image exists) */

.collection-product-card__image--real {
    padding: 0;
    background: #ece5dc;
}

.collection-product-card__img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.collection-product-card:hover .collection-product-card__img {
    transform: scale(1.05);
}

/* Product name link */

.collection-product-card__name a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.collection-product-card__name a:hover {
    opacity: 0.7;
}

/* WooCommerce price element */

.collection-product-card__price .woocommerce-Price-amount,
.collection-product-card__price .price {
    font-size: 14px;
    color: var(--text-muted);
}

/* Add to cart as link */

a.collection-product-card__add-to-cart {
    text-align: center;
    text-decoration: none;
}

/* ==========================================================
   EMPTY STATE
   ========================================================== */

.collection-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 100px 20px;
}

.collection-empty__icon {
    color: rgba(90, 28, 45, 0.2);
    margin-bottom: 28px;
}

.collection-empty h3 {
    font-family: serif;
    font-weight: 400;
    font-size: 32px;
    color: var(--burgundy);
    margin: 0 0 14px;
}

.collection-empty p {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text-muted);
    margin: 0 0 36px;
}

.collection-empty__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 32px;
    background: var(--burgundy);
    color: var(--ivory);
    border: 1px solid var(--burgundy);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
}

.collection-empty__btn:hover {
    background: var(--ivory);
    color: var(--burgundy);
}




@media (max-width: 1100px) {
    .collection-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .collection-hero {
        min-height: 38vh;
    }

    .collection-products {
        padding: 50px 30px 80px;
    }

    .collection-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .collection-product-card__image {
        height: 320px;
    }
}

@media (max-width: 600px) {
    .collection-hero {
        min-height: 32vh;
    }

    .collection-hero__content h1 {
        letter-spacing: 0.12em;
    }

    .collection-products {
        padding: 40px 20px 60px;
    }

    .collection-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .collection-product-card__image {
        height: 360px;
    }

    .collection-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .collection-toolbar__sort {
        width: 100%;
    }
}
/* =========================================================
   ISTYLE SHOP — MOBILE 2-COLUMN PRODUCT GRID
   ========================================================= */

@media (max-width: 767px) {

    /* WooCommerce product grid */
    .woocommerce ul.products,
    .woocommerce-page ul.products {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 28px 14px !important;

        width: 100% !important;
        margin: 0 !important;
        padding: 0 16px !important;
    }

    /* Individual product */
    .woocommerce ul.products li.product,
    .woocommerce-page ul.products li.product {
        width: 100% !important;
        max-width: none !important;
        float: none !important;
        clear: none !important;

        margin: 0 !important;
        padding: 0 !important;

        text-align: center;
    }

    /* Product image */
    .woocommerce ul.products li.product a img,
    .woocommerce-page ul.products li.product a img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 4 / 5;
        object-fit: cover;

        display: block;
        margin: 0 0 12px !important;
    }

    /* Product title */
    .woocommerce ul.products li.product .woocommerce-loop-product__title,
    .woocommerce-page ul.products li.product .woocommerce-loop-product__title {
        font-size: 16px !important;
        line-height: 1.25 !important;
        font-weight: 400 !important;

        margin: 0 4px 5px !important;
        padding: 0 !important;

        text-align: center;
    }

    /* Price */
    .woocommerce ul.products li.product .price,
    .woocommerce-page ul.products li.product .price {
        display: block !important;

        font-size: 14px !important;
        line-height: 1.3 !important;
        font-weight: 400 !important;

        margin: 0 !important;

        text-align: center;
    }

    /* Remove default WooCommerce button from grid
       if your current shop shows Add to Cart buttons */
    .woocommerce ul.products li.product .button,
    .woocommerce-page ul.products li.product .button {
        display: none !important;
    }

    /* Sale badge */
    .woocommerce span.onsale {
        min-width: auto !important;
        min-height: auto !important;

        padding: 6px 10px !important;

        font-size: 12px !important;
        line-height: 1 !important;

        border-radius: 20px !important;
    }
}


/* =========================================================
   EXTRA SMALL PHONES
   Still keep 2 products per row
   ========================================================= */

@media (max-width: 390px) {

    .woocommerce ul.products,
    .woocommerce-page ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 24px 10px !important;
        padding: 0 12px !important;
    }

    .woocommerce ul.products li.product .woocommerce-loop-product__title,
    .woocommerce-page ul.products li.product .woocommerce-loop-product__title {
        font-size: 14px !important;
    }

    .woocommerce ul.products li.product .price,
    .woocommerce-page ul.products li.product .price {
        font-size: 13px !important;
    }
}
/* ==========================================================
   ISTYLE COLLECTION — MOBILE TWO PRODUCT GRID
========================================================== */

@media (max-width: 600px) {

    .collection-products {
        padding:
            34px 12px
            70px !important;
    }


    .collection-products__inner {
        width: 100%;
        max-width: 100%;
    }


    /* TWO PRODUCTS SIDE BY SIDE */

    .collection-grid {
        display: grid !important;

        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;

        gap:
            26px 11px !important;

        width: 100%;
    }


    /* PRODUCT CARD */

    .collection-product-card {
        width: 100%;
        min-width: 0;

        border-radius: 0;

        background: transparent;

        box-shadow: none;
    }


    .collection-product-card:hover {
        transform: none;
        box-shadow: none;
    }


    /* PRODUCT IMAGE */

    .collection-product-card__image,
    .collection-product-card__image--real {
        width: 100%;

        height: auto !important;

        aspect-ratio: 3 / 4;

        background: #ece5dc;

        overflow: hidden;
    }


    .collection-product-card__img {
        width: 100%;
        height: 100% !important;

        aspect-ratio: 3 / 4;

        object-fit: cover;
        object-position: center top;

        display: block;
    }


    /* PRODUCT INFORMATION */

    .collection-product-card__content {
        padding:
            11px 3px
            0;

        text-align: center;
    }


    .collection-product-card__name {
        margin:
            0 0 4px;

        font-family: inherit;

        font-size: 15px;

        font-weight: 400;

        line-height: 1.25;
    }


    .collection-product-card__price {
        margin: 0;

        font-size: 13px;

        line-height: 1.3;
    }


    .collection-product-card__price
    .woocommerce-Price-amount,

    .collection-product-card__price
    .price {

        font-size: 13px;
    }


    /* Hide add-to-cart button in the product grid.
       Customer opens the product first. */

    .collection-product-card__add-to-cart {
        display: none !important;
    }


    /* TOOLBAR */

    .collection-toolbar {
        flex-direction: row;

        align-items: center;

        justify-content:
            space-between;

        gap: 10px;

        margin-bottom: 24px;

        padding-bottom: 14px;
    }


    .collection-toolbar__count {
        font-size: 11px;
    }


    .collection-toolbar__sort {
        width: auto;

        max-width: 160px;

        padding:
            9px 31px
            9px 10px;

        font-size: 11px;

        background-position:
            right 9px center;
    }

}


@media (max-width: 390px) {

    .collection-products {
        padding-left: 9px !important;
        padding-right: 9px !important;
    }


    .collection-grid {
        gap:
            23px 8px !important;
    }


    .collection-product-card__name {
        font-size: 14px;
    }


    .collection-product-card__price,
    .collection-product-card__price
    .woocommerce-Price-amount {

        font-size: 12px;
    }

}
/* ==========================================================
   ISTYLE PRODUCT IMAGE HOVER SWAP
========================================================== */

.collection-product-card__image--real {
    position: relative;
    overflow: hidden;
}

.collection-product-card__img,
.collection-product-card__img--hover {
    width: 100%;
    height: 380px;

    object-fit: cover;
    object-position: center top;

    display: block;

    transition:
        opacity 0.55s ease,
        transform 0.7s cubic-bezier(.22,.61,.36,1);
}


/* MAIN IMAGE */

.collection-product-card__img {
    position: relative;
    z-index: 1;

    opacity: 1;
}


/* SECOND IMAGE */

.collection-product-card__img--hover {
    position: absolute;

    inset: 0;

    z-index: 2;

    opacity: 0;

    transform: scale(1.02);
}


/* HOVER */

@media (hover: hover) and (pointer: fine) {

    .collection-product-card:hover
    .collection-product-card__img {
        opacity: 0;

        transform: scale(1.02);
    }


    .collection-product-card:hover
    .collection-product-card__img--hover {
        opacity: 1;

        transform: scale(1);
    }

}


/* MOBILE */

@media (max-width: 600px) {

    .collection-product-card__img,
    .collection-product-card__img--hover {
        height: 100% !important;

        aspect-ratio: 3 / 4;
    }

}
/* ==========================================================
   ISTYLE — PRODUCT SECOND IMAGE ON HOVER
========================================================== */

.collection-product-card__image--real {
    position: relative;
    overflow: hidden;
}


/* BOTH IMAGES */

.collection-product-card__img--main,
.collection-product-card__img--hover {
    width: 100%;
    height: 380px;

    object-fit: cover;
    object-position: center top;

    display: block;

    transition:
        opacity 0.5s ease,
        transform 0.7s
        cubic-bezier(.22,.61,.36,1);
}


/* MAIN IMAGE */

.collection-product-card__img--main {
    position: relative;

    z-index: 1;

    opacity: 1;

    transform: scale(1);
}


/* SECOND IMAGE */

.collection-product-card__img--hover {
    position: absolute;

    inset: 0;

    z-index: 2;

    opacity: 0;

    transform: scale(1.025);
}


/* DESKTOP HOVER */

@media (hover: hover) and (pointer: fine) {

    .collection-product-card__image--real.has-hover-image:hover
    .collection-product-card__img--main {

        opacity: 0;

        transform: scale(1.02);
    }


    .collection-product-card__image--real.has-hover-image:hover
    .collection-product-card__img--hover {

        opacity: 1;

        transform: scale(1);
    }

}


/* MOBILE — KEEP FIRST IMAGE */

@media (max-width: 600px) {

    .collection-product-card__img--main,
    .collection-product-card__img--hover {

        width: 100%;

        height: 100% !important;

        aspect-ratio: 3 / 4;

        object-fit: cover;
    }


    .collection-product-card__img--hover {
        display: none;
    }

}
/* ==========================================================
   ISTYLE CATEGORY NAV — EDITORIAL STYLE
========================================================== */

.istyle-category-nav {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 48px;

    padding: 24px 36px;

    background: #fff;

    border-bottom: 1px solid rgba(20, 20, 20, 0.08);

    overflow-x: auto;

    scrollbar-width: none;
}

.istyle-category-nav::-webkit-scrollbar {
    display: none;
}

.istyle-category-nav a {
    position: relative;

    flex: 0 0 auto;

    color: #2b2b2b;

    font-size: 14px;
    font-weight: 400;

    letter-spacing: 0.18em;

    text-transform: uppercase;

    text-decoration: none;

    white-space: nowrap;

    padding-bottom: 7px;
}

.istyle-category-nav a::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 1px;

    background: #2b2b2b;

    transform: scaleX(0);

    transform-origin: center;

    transition: transform 0.25s ease;
}

.istyle-category-nav a:hover::after,
.istyle-category-nav a.is-active::after {
    transform: scaleX(1);
}

.istyle-category-nav a.is-active {
    color: #2b2b2b;
}


/* MOBILE */

@media (max-width: 767px) {

    .istyle-category-nav {
        justify-content: flex-start;

        gap: 28px;

        padding: 17px 18px;

        overflow-x: auto;
    }

    .istyle-category-nav a {
        font-size: 11px;

        letter-spacing: 0.15em;

        padding-bottom: 6px;
    }

}