/* ============================================================
   Curated collection pages (products/collections.php) only.
   1. Hero with a designed cover card (.wt-collection-hero--art): the card
      already prints the collection name, so it is shown whole at its own
      4:5 shape instead of being cropped as a background.
   2. Fact chips under the intro.
   Loaded after custom.css, so these rules win without !important.
   ============================================================ */

/* 1. Designed cover card ------------------------------------ */

.wt-collection-hero--art .wt-collection-hero__scene {
    background: #efe6da;
}

.wt-collection-hero--art .wt-collection-hero__scene img {
    object-fit: contain;
    object-position: center;
}

/* Desktop and tablet: 280px tall strip, card width = 280 x 4/5. */
.wt-collection-hero--pairs.wt-collection-hero--art {
    grid-template-columns: 224px minmax(0, 1fr);
}

/* No product photos to sit beside it: centre the card on the cream band. */
.wt-collection-hero--art:not(.wt-collection-hero--pairs) .wt-collection-hero__scene {
    justify-self: center;
    width: 224px;
}

@media (max-width: 1099px) {
    .wt-collection-hero--pairs.wt-collection-hero--art {
        grid-template-columns: 224px minmax(0, 1fr);
    }
}

/* Phones: card in the first column at 4:5, two product photos beside it.
   No title row under the strip (the H1 follows straight after), so the
   products start higher up the page. */
@media (max-width: 767px) {
    .wt-collection-hero--pairs.wt-collection-hero--art {
        grid-template-columns: 30vw minmax(0, 1fr) minmax(0, 1fr);
        grid-template-rows: calc(30vw * 1.25);
    }

    .wt-collection-hero--art .wt-collection-hero__scene,
    .wt-collection-hero--pairs.wt-collection-hero--art .wt-collection-hero__pairs {
        min-height: 0;
    }

    .wt-collection-hero--art:not(.wt-collection-hero--pairs) {
        height: 240px;
        max-height: 240px;
    }

    .wt-collection-hero--art:not(.wt-collection-hero--pairs) .wt-collection-hero__scene {
        width: 192px;
    }
}

/* 2. Fact chips ----------------------------------------------- */

.wt-collection-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.wt-collection-facts li {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    margin: 0;
    padding: 4px 12px;
    border: 1px solid #e6dccf;
    border-radius: 999px;
    background: #faf6f1;
    color: #4a3f37;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .wt-collection-facts {
        gap: 6px;
        margin-top: 10px;
    }

    .wt-collection-facts li {
        min-height: 28px;
        padding: 3px 10px;
        font-size: 12px;
    }
}

/* ============================================================
   3. Below-the-grid sections (includes/partials/collection-seo-content.php)
   Same visual language as the homepage "Before you order" block
   (assets/css/home-cro.css .wt-cro-faq), re-scoped to .wt-cx so the
   two pages never share or override each other.
   ============================================================ */

.wt-cx {
    --cx-ink: #2a221c;
    --cx-ink-soft: #5c4f44;
    --cx-accent: #b8860b;
    --cx-gold: #d9b45a;
    --cx-cream: #f4eee6;
    --cx-ivory: #fbf7f1;
    --cx-line: #e7dfd4;
    --cx-display: "Cormorant Garamond", Georgia, serif;
    --cx-gutter: 20px;
    display: grid;
    /* minmax(0, 1fr): the scrolling rails must never widen the column. */
    grid-template-columns: minmax(0, 1fr);
    gap: 64px;
    margin: 56px 0 8px;
    padding-top: 28px;
    border-top: 1px solid var(--cx-line);
    color: var(--cx-ink);
}

.wt-cx ul,
.wt-cx li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wt-cx ul li::before {
    content: none;
}

/* Back to the products */
.wt-cx-back {
    margin: -8px 0 -40px;
}

.wt-cx-back a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 16px;
    border: 1px solid var(--cx-line);
    border-radius: 999px;
    background: #fff;
    color: var(--cx-ink);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.wt-cx-back a:hover {
    border-color: var(--cx-accent);
    color: var(--cx-accent);
}

/* Shared heading: gold kicker with a short stitched rule, serif title */
.wt-cx-head {
    margin: 0 0 22px;
}

.wt-cx-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cx-accent);
}

.wt-cx-kicker::before {
    content: "";
    width: 22px;
    border-top: 1.5px dashed var(--cx-accent);
}

.wt-cx-title {
    margin: 0;
    font-family: var(--cx-display);
    font-size: clamp(30px, 3.2vw, 42px);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.01em;
    color: var(--cx-ink);
}

/* ---------- Shop by craft: photo cards ---------- */
.wt-cx-crafts__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.wt-cx-craft {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    background: var(--cx-cream);
    color: #fff;
    text-decoration: none;
    isolation: isolate;
}

.wt-cx-craft__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.wt-cx-craft__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 14, 12, 0) 35%, rgba(20, 14, 12, 0.78) 100%);
}

.wt-cx-craft__body {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wt-cx-craft__count {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--cx-gold);
}

.wt-cx-craft__name {
    font-family: var(--cx-display);
    font-size: 30px;
    font-weight: 600;
    line-height: 1.1;
    color: #fff;
}

.wt-cx-craft__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}

.wt-cx-craft__cta i {
    transition: transform 0.25s ease;
}

.wt-cx-craft:hover .wt-cx-craft__img {
    transform: scale(1.05);
}

.wt-cx-craft:hover .wt-cx-craft__cta i {
    transform: translateX(4px);
}

/* ---------- About this edit: editorial band ---------- */
.wt-cx-story {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 48px;
    padding: 44px 48px;
    background:
        radial-gradient(90% 80% at 0% 0%, rgba(184, 134, 11, 0.07) 0%, rgba(184, 134, 11, 0) 60%),
        var(--cx-ivory);
    border: 1px solid var(--cx-line);
}

.wt-cx-story__aside {
    align-self: start;
}

.wt-cx-stitch {
    display: block;
    width: 64px;
    margin: 18px 0;
    border-top: 2px dashed var(--cx-gold);
}

.wt-cx-story__sign {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--cx-ink-soft);
}

.wt-cx-story__sign i {
    color: var(--cx-accent);
}

.wt-cx-story__body p {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--cx-ink-soft);
}

.wt-cx-story__body p:last-child {
    margin-bottom: 0;
}

/* Lead paragraph in the display serif */
.wt-cx-story__body p:first-child {
    font-family: var(--cx-display);
    font-size: 22px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--cx-ink);
}

/* ---------- Before you order: homepage FAQ design ---------- */
.wt-cx-faq {
    /* The theme pads every <section> by 110px top and bottom (style.css). */
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "intro list"
        "help  list";
    column-gap: 48px;
    row-gap: 16px;
    align-items: start;
}

.wt-cx-faq__intro {
    grid-area: intro;
    position: relative;
    overflow: hidden;
    padding: 34px 30px 28px;
    background: var(--cx-ink);
    color: #f6f1ea;
}

/* A faint dashed gold ring, like the hand stitching on a jutti edge */
.wt-cx-faq__intro::before {
    content: "";
    position: absolute;
    right: -70px;
    top: -70px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 1.5px dashed rgba(212, 175, 55, 0.35);
    pointer-events: none;
}

.wt-cx-faq__intro::after {
    content: "?";
    position: absolute;
    right: 18px;
    top: 4px;
    font-family: var(--cx-display);
    font-size: 120px;
    line-height: 1;
    color: rgba(246, 241, 234, 0.07);
    pointer-events: none;
}

.wt-cx-faq__kicker {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--cx-gold);
}

.wt-cx-faq__kicker i {
    font-size: 14px;
}

.wt-cx-faq__title {
    position: relative;
    margin: 0;
    font-family: var(--cx-display);
    font-weight: 500;
    font-size: clamp(30px, 3.4vw, 44px);
    line-height: 1.08;
    letter-spacing: -0.01em;
    color: #fff;
}

.wt-cx-faq__lede {
    position: relative;
    margin: 10px 0 0;
    max-width: 36ch;
    font-size: 14px;
    line-height: 1.55;
    color: rgba(246, 241, 234, 0.72);
}

.wt-cx .wt-cx-faq__facts {
    position: relative;
    margin: 20px 0 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.wt-cx .wt-cx-faq__facts li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 10px;
    border: 1px solid rgba(217, 180, 90, 0.35);
    background: rgba(255, 255, 255, 0.04);
}

.wt-cx-faq__facts strong {
    font-family: var(--cx-display);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.1;
    color: var(--cx-gold);
}

.wt-cx-faq__facts span {
    font-size: 11.5px;
    line-height: 1.3;
    color: rgba(246, 241, 234, 0.75);
}

.wt-cx-faq__list {
    grid-area: list;
    display: grid;
    gap: 10px;
}

.wt-cx-faq__item {
    position: relative;
    margin: 0;
    background: #fff;
    border: 1px solid var(--cx-line);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

/* Gold edge that grows in when a card opens */
.wt-cx-faq__item::before {
    content: "";
    position: absolute;
    left: -1px;
    top: -1px;
    bottom: -1px;
    width: 3px;
    background: var(--cx-accent);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s ease;
}

.wt-cx-faq__item:hover {
    border-color: #d8ccbb;
}

.wt-cx-faq__item[open] {
    border-color: #e2d3bb;
    box-shadow: 0 14px 30px -18px rgba(42, 34, 28, 0.35);
}

.wt-cx-faq__item[open]::before {
    transform: scaleY(1);
}

.wt-cx-faq__item summary {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
}

.wt-cx-faq__item summary::-webkit-details-marker {
    display: none;
}

/* The theme draws its own +/- on every <summary>; the round toggle replaces it. */
.wt-cx-faq__item summary::after,
.wt-cx-faq__item summary::before {
    content: none !important;
    display: none !important;
}

.wt-cx-faq__icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--cx-cream);
    color: var(--cx-ink);
    font-size: 17px;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.wt-cx-faq__item[open] .wt-cx-faq__icon,
.wt-cx-faq__item summary:hover .wt-cx-faq__icon {
    background: var(--cx-ink);
    color: var(--cx-gold);
}

.wt-cx-faq__q {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--cx-ink);
}

.wt-cx-faq__num {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.16em;
    color: var(--cx-accent);
}

/* Round +/x toggle */
.wt-cx-faq__toggle {
    position: relative;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--cx-line);
    transition: transform 0.3s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.wt-cx-faq__toggle::before,
.wt-cx-faq__toggle::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 11px;
    height: 1.5px;
    background: var(--cx-ink);
    transform: translate(-50%, -50%);
    transition: background-color 0.25s ease;
}

.wt-cx-faq__toggle::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.wt-cx-faq__item[open] .wt-cx-faq__toggle {
    transform: rotate(45deg);
    background: var(--cx-accent);
    border-color: var(--cx-accent);
}

.wt-cx-faq__item[open] .wt-cx-faq__toggle::before,
.wt-cx-faq__item[open] .wt-cx-faq__toggle::after {
    background: #fff;
}

.wt-cx-faq__answer {
    padding: 0 22px 20px 74px;
}

.wt-cx-faq__item[open] .wt-cx-faq__answer {
    animation: wt-cx-faq-in 0.3s ease;
}

@keyframes wt-cx-faq-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.wt-cx-faq__answer p {
    margin: 0;
    padding-top: 12px;
    border-top: 1px dashed var(--cx-line);
    font-size: 14px;
    line-height: 1.65;
    color: var(--cx-ink-soft);
}

.wt-cx-faq__answer a {
    color: var(--cx-ink);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--cx-accent);
    text-underline-offset: 3px;
}

/* Help card */
.wt-cx-faq__help {
    grid-area: help;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 20px;
    background: var(--cx-cream);
    border: 1px dashed #d8c7ab;
}

.wt-cx-faq__help-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    color: var(--cx-accent);
    font-size: 18px;
}

.wt-cx-faq__help-title {
    margin: 0;
    font-family: var(--cx-display);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--cx-ink);
}

.wt-cx-faq__help-text {
    margin: 4px 0 12px;
    font-size: 13.5px;
    color: var(--cx-ink-soft);
}

.wt-cx-faq__help-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.wt-cx-faq__help-btn {
    min-height: 40px;
    padding: 0 18px;
    border: 1px solid var(--cx-ink);
    background: var(--cx-ink);
    color: #fff;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
}

.wt-cx-faq__help-btn:hover {
    background: #000;
}

.wt-cx-faq__help-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cx-ink);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 2px;
}

.wt-cx-faq__help-link:hover {
    color: var(--cx-accent);
}

.wt-cx-faq__help-link--wa svg {
    color: #25d366;
}

/* ---------- Explore more collections: cover-art rail ---------- */
.wt-cx .wt-cx-more__rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 210px;
    gap: 16px;
    margin: 0 calc(-1 * var(--cx-gutter));
    padding: 4px var(--cx-gutter) 14px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--cx-gutter);
    scrollbar-width: thin;
    scrollbar-color: #d8ccbb transparent;
}

.wt-cx-more__rail li {
    scroll-snap-align: start;
}

.wt-cx-card {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border-radius: 6px;
    background: var(--cx-cream);
    box-shadow: 0 1px 0 var(--cx-line);
    color: var(--cx-ink);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wt-cx-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wt-cx-card__name {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 36px 14px 14px;
    background: linear-gradient(180deg, rgba(20, 14, 12, 0) 0%, rgba(20, 14, 12, 0.72) 100%);
    font-family: var(--cx-display);
    font-size: 21px;
    font-weight: 600;
    line-height: 1.15;
    color: #fff;
}

.wt-cx-card--plain .wt-cx-card__name {
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: none;
    color: var(--cx-ink);
    text-align: center;
}

.wt-cx-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px -18px rgba(42, 34, 28, 0.45);
}

/* ---------- Tablet ---------- */
@media (max-width: 991px) {
    .wt-cx-story {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        padding: 32px 28px;
    }

    .wt-cx-faq {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        grid-template-areas:
            "intro"
            "list"
            "help";
        row-gap: 14px;
    }
}

/* ---------- Phones ---------- */
@media (max-width: 767px) {
    .wt-cx {
        --cx-gutter: 16px;
        gap: 44px;
        margin-top: 40px;
        padding-top: 22px;
    }

    .wt-cx-back {
        margin-bottom: -28px;
    }

    .wt-cx-head {
        margin-bottom: 16px;
    }

    .wt-cx-title {
        font-size: 30px;
    }

    /* Crafts become a swipeable row of tall cards */
    .wt-cx .wt-cx-crafts__list {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 72%;
        gap: 12px;
        margin: 0 calc(-1 * var(--cx-gutter));
        padding: 0 var(--cx-gutter) 6px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: var(--cx-gutter);
        scrollbar-width: none;
    }

    .wt-cx-crafts__list::-webkit-scrollbar {
        display: none;
    }

    .wt-cx-crafts__list li {
        scroll-snap-align: start;
    }

    .wt-cx-craft {
        aspect-ratio: 4 / 5;
    }

    .wt-cx-craft__name {
        font-size: 28px;
    }

    .wt-cx-story {
        margin: 0 calc(-1 * var(--cx-gutter));
        padding: 30px var(--cx-gutter);
        border-left: 0;
        border-right: 0;
    }

    .wt-cx-story__body p {
        font-size: 14.5px;
        line-height: 1.75;
    }

    .wt-cx-story__body p:first-child {
        font-size: 20px;
    }

    .wt-cx-faq__intro {
        padding: 26px 22px 22px;
    }

    .wt-cx-faq__item summary {
        gap: 14px;
        padding: 14px;
    }

    .wt-cx-faq__q {
        font-size: 15px;
    }

    .wt-cx-faq__answer {
        padding: 0 16px 16px 68px;
    }

    .wt-cx-faq__help {
        padding: 18px;
    }

    .wt-cx .wt-cx-more__rail {
        grid-auto-columns: 44%;
        gap: 12px;
        scrollbar-width: none;
    }

    .wt-cx-more__rail::-webkit-scrollbar {
        display: none;
    }
}

@media (min-width: 1100px) {
    .wt-cx-faq {
        column-gap: 56px;
    }

    .wt-cx-faq__item:hover {
        transform: translateX(3px);
    }

    .wt-cx-faq__item[open]:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wt-cx-faq__item,
    .wt-cx-faq__item::before,
    .wt-cx-faq__toggle,
    .wt-cx-craft__img,
    .wt-cx-card {
        transition: none;
    }

    .wt-cx-faq__item[open] .wt-cx-faq__answer {
        animation: none;
    }
}

/* "Shop the edit" jumps to the grid; keep it clear of the header. */
.wt-shop-collection #products {
    scroll-margin-top: 110px;
}
