/**
 * New Arrivals landing page (/product-category/new/).
 *
 * Rendered by woocommerce/taxonomy-product_cat-new.php +
 * template-parts/new-arrivals/{hero,trust,collection,cta}.php. Enqueued only on
 * that archive by inc/woo/WooNewArrivals.php, after the compiled theme CSS
 * ('peaks-styles'), so nothing here can leak onto other pages.
 *
 * Tokens (main.css :root): --violet #6057a6, --violet-bright #5246B8,
 * --violet-dark #292642, --bright-purple #8342fe, --violet-light-2 #c7c4e0,
 * --purple-light #f6f1fb, --grey-light #edf0f4,
 * --grey-light-80 rgba(234,238,241,.8), --font-family (Avenir stack).
 * Radii: 18px cards, 20px buttons, 999px pills. Card grid gap: 1.5rem.
 * Breakpoints follow the theme (desktop-first): 1200 / 991 / 767 / 576.
 * Fixed header (no global offset): ~124px desktop, ~68px <=991, ~64px <=576.
 * Mobile (<=767px): hero and trust strip are not rendered; the page opens on the
 * product collection (see the 767px block).
 * Reused theme components: .c-button / .c-button--violet, .section-title--small,
 * .cta / .cta__*, .woocommerce-breadcrumb, .peak-badge (product-badge.css).
 */

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */

.peak-new-arrivals__hero {
    position: relative;
    overflow: hidden;
    padding: 176px 0 88px;
    color: var(--white, #fff);
    background-color: var(--violet-bright, #5246B8);
    background-image:
        radial-gradient(48% 70% at 84% 18%, rgba(131, 66, 254, 0.55) 0%, rgba(131, 66, 254, 0) 72%),
        radial-gradient(40% 55% at 6% 96%, rgba(169, 161, 230, 0.32) 0%, rgba(169, 161, 230, 0) 70%),
        linear-gradient(140deg, #292642 0%, #4a3f9e 42%, var(--violet-bright, #5246B8) 70%, var(--violet, #6057a6) 100%);
}

/* Brand peak mark (assets/images/cta-bg.svg) as a faint watermark. */
.peak-new-arrivals__hero-mark {
    position: absolute;
    right: -6%;
    bottom: -16%;
    z-index: 0;
    width: min(52vw, 760px);
    opacity: 0.14;
    filter: brightness(0) invert(1);
    pointer-events: none;
}

.peak-new-arrivals__hero-mark img {
    display: block;
    width: 100%;
    height: auto;
}

.peak-new-arrivals__hero .container {
    position: relative;
    z-index: 1;
}

.peak-new-arrivals__hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}

.peak-new-arrivals__hero-copy {
    max-width: 660px;
}

.peak-new-arrivals__hero .peak-new-arrivals__breadcrumb {
    margin: 0 0 22px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.78);
}

.peak-new-arrivals__breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.peak-new-arrivals__hero .peak-new-arrivals__breadcrumb a:hover,
.peak-new-arrivals__hero .peak-new-arrivals__breadcrumb a:focus-visible {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.peak-new-arrivals__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 20px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    font-family: var(--font-family);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
}

.peak-new-arrivals__eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bright-purple, #8342fe);
    box-shadow: 0 0 0 3px rgba(131, 66, 254, 0.35);
}

.peak-new-arrivals__title {
    margin: 0 0 20px;
    font-family: var(--font-family);
    font-size: 64px;
    font-weight: 900;
    line-height: 1.04;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: #fff;
    overflow-wrap: break-word;
}

.peak-new-arrivals__title-accent {
    display: block;
    color: var(--violet-light-2, #c7c4e0);
}

.peak-new-arrivals__lead {
    max-width: 560px;
    margin: 0 0 32px;
    font-family: var(--font-family);
    font-size: 20px;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.92);
}

.peak-new-arrivals__lead p {
    margin: 0;
}

.peak-new-arrivals__lead p + p {
    margin-top: 12px;
}

.peak-new-arrivals__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 24px;
}

.peak-new-arrivals__hero .c-button {
    box-shadow: 0 10px 30px rgba(41, 38, 66, 0.28);
}

.peak-new-arrivals__hero .c-button:hover {
    background: var(--purple-light, #f6f1fb);
    color: var(--violet-bright, #5246B8);
    transform: translateY(-1px);
}

.peak-new-arrivals__hero .c-button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.peak-new-arrivals__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 4px;
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
    color: #fff;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: rgba(255, 255, 255, 0.45);
    text-underline-offset: 5px;
    transition: text-decoration-color 0.3s ease;
}

.peak-new-arrivals__link:hover {
    color: #fff;
    text-decoration-color: #fff;
}

.peak-new-arrivals__link:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
    border-radius: 6px;
}

.peak-new-arrivals__meta {
    margin: 20px 0 0;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.72);
}

/* Preview tiles: the first three products of the live collection (desktop only). */
.peak-new-arrivals__hero-visual {
    list-style: none;
    margin: 0;
    padding: 0 0 0 8px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.peak-new-arrivals__tile {
    margin: 0;
}

.peak-new-arrivals__tile--1 {
    margin-top: 56px;
}

.peak-new-arrivals__tile--3 {
    margin-top: 96px;
}

.peak-new-arrivals__tile-link {
    display: block;
    padding: 10px;
    border-radius: 18px;
    background: var(--grey-light, #edf0f4);
    box-shadow:
        0 24px 48px rgba(41, 38, 66, 0.38),
        0 2px 8px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.peak-new-arrivals__tile-link:hover {
    transform: translateY(-6px);
    box-shadow:
        0 30px 56px rgba(41, 38, 66, 0.42),
        0 2px 8px rgba(0, 0, 0, 0.12);
}

.peak-new-arrivals__tile-link:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 4px;
}

.peak-new-arrivals__tile-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
}

/* Lightweight CSS-only entrance (no JS dependency; content is visible if animations are unsupported). */
@keyframes peakNewArrivalsRise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.peak-new-arrivals__hero-copy > * {
    animation: peakNewArrivalsRise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.peak-new-arrivals__hero-copy > :nth-child(2) { animation-delay: 0.06s; }
.peak-new-arrivals__hero-copy > :nth-child(3) { animation-delay: 0.12s; }
.peak-new-arrivals__hero-copy > :nth-child(4) { animation-delay: 0.18s; }
.peak-new-arrivals__hero-copy > :nth-child(5) { animation-delay: 0.24s; }
.peak-new-arrivals__hero-copy > :nth-child(6) { animation-delay: 0.3s; }

.peak-new-arrivals__tile {
    animation: peakNewArrivalsRise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.peak-new-arrivals__tile--1 { animation-delay: 0.16s; }
.peak-new-arrivals__tile--2 { animation-delay: 0.26s; }
.peak-new-arrivals__tile--3 { animation-delay: 0.36s; }

/* ------------------------------------------------------------------ */
/* Value strip                                                         */
/* ------------------------------------------------------------------ */

.peak-new-arrivals__trust {
    padding: 36px 0 0;
    background: #fff;
}

.peak-new-arrivals__trust-list {
    list-style: none;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.peak-new-arrivals__trust-item {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 16px 20px;
    border-radius: 18px;
    border: 1px solid var(--grey-light-80, rgba(234, 238, 241, 0.8));
    background: var(--grey-light-80, rgba(234, 238, 241, 0.8));
}

.peak-new-arrivals__trust-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #fff;
    color: var(--violet-bright, #5246B8);
    box-shadow: 0 2px 8px rgba(96, 87, 166, 0.12);
}

.peak-new-arrivals__trust-icon svg {
    display: block;
    width: 22px;
    height: 22px;
}

.peak-new-arrivals__trust-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.peak-new-arrivals__trust-title {
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.3;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--violet, #6057a6);
}

.peak-new-arrivals__trust-text {
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--violet-dark, #292642);
}

/* ------------------------------------------------------------------ */
/* Collection                                                          */
/* ------------------------------------------------------------------ */

.peak-new-arrivals__collection {
    padding: 72px 0 48px;
    scroll-margin-top: 140px;
}

.peak-new-arrivals__collection:focus {
    outline: none;
}

.peak-new-arrivals__collection-header {
    max-width: 1180px;
    margin: 0 auto 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 24px;
}

.peak-new-arrivals__collection-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

/* .section-title--small supplies the 64px / 31px violet-50 heading style. */
.peak-new-arrivals__collection .peak-new-arrivals__collection-title {
    margin: 0;
    line-height: 1;
}

.peak-new-arrivals__count {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--purple-light, #f6f1fb);
    color: var(--violet-bright, #5246B8);
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.peak-new-arrivals__collection-lead {
    margin: 0;
    font-family: var(--font-family);
    font-size: 20px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--violet, #6057a6);
}

.peak-new-arrivals__collection .woocommerce-notices-wrapper {
    max-width: 1180px;
}

/* 3 columns capped at 1180px so cards stay close to the shop's card width. */
.peak-new-arrivals__collection .products.peak-new-arrivals__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 24px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0;
}

.peak-new-arrivals__grid > * {
    min-width: 0;
}

.peak-new-arrivals__grid .product-card {
    background: #fff;
}

@media (hover: hover) and (pointer: fine) {
    .peak-new-arrivals__grid .product-card {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .peak-new-arrivals__grid .product-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 14px 30px rgba(41, 38, 66, 0.14);
    }
}

.peak-new-arrivals__grid .product-card__link-cover:focus-visible {
    outline: 3px solid var(--violet-bright, #5246B8);
    outline-offset: -3px;
    border-radius: 18px;
}

/* Keep subscription pricing legible: no browser-default tiny <small>/underlined <ins>. */
.peak-new-arrivals__grid .product-card__price-value {
    font-size: 15px;
    line-height: 1.45;
}

.peak-new-arrivals__grid .product-card__price-value small {
    font-size: 0.92em;
}

.peak-new-arrivals__grid .product-card__price-value del {
    opacity: 0.7;
}

.peak-new-arrivals__grid .product-card__price-value ins {
    text-decoration: none;
    font-weight: 800;
}

.peak-new-arrivals__collection .woocommerce-pagination {
    max-width: 1180px;
    margin: 3rem auto 0;
}

/* Empty state (only when the category has no published products). */
.peak-new-arrivals__empty {
    max-width: 640px;
    margin: 0 auto;
    padding: 56px 28px;
    text-align: center;
    border-radius: 18px;
    background: var(--grey-light-80, rgba(234, 238, 241, 0.8));
}

.peak-new-arrivals__empty-badge {
    margin-bottom: 18px;
}

.peak-new-arrivals__empty-title {
    margin: 0 0 12px;
    font-family: var(--font-family);
    font-size: 26px;
    font-weight: 900;
    line-height: 1.15;
    text-transform: uppercase;
    color: var(--violet, #6057a6);
}

.peak-new-arrivals__empty-text {
    margin: 0 0 24px;
    font-family: var(--font-family);
    font-size: 18px;
    line-height: 1.45;
    color: var(--violet-dark, #292642);
}

/* ------------------------------------------------------------------ */
/* Closing CTA (theme .cta component)                                   */
/* ------------------------------------------------------------------ */

.cta--new-arrivals .cta__inner {
    align-items: center;
}

.cta--new-arrivals .cta__text {
    max-width: 640px;
    font-size: 18px;
}

.peak-new-arrivals__cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
}

.peak-new-arrivals__cta-actions .c-button {
    min-width: 220px;
}

/* ------------------------------------------------------------------ */
/* Page-level rhythm                                                   */
/* ------------------------------------------------------------------ */

/* Same reduced gap the shop archive uses before the testimonials. */
.peak-new-arrivals-page .testimonials {
    padding-top: 100px;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 1199px) {
    .peak-new-arrivals__hero-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .peak-new-arrivals__hero-visual {
        display: none;
    }

    .peak-new-arrivals__hero-copy {
        max-width: 720px;
    }

    .peak-new-arrivals__title {
        font-size: 56px;
    }
}

@media (max-width: 991px) {
    .peak-new-arrivals__hero {
        padding: 120px 0 64px;
    }

    .peak-new-arrivals__hero-mark {
        right: -20%;
        bottom: -10%;
        width: 70vw;
        opacity: 0.1;
    }

    .peak-new-arrivals__title {
        font-size: 44px;
    }

    .peak-new-arrivals__lead {
        font-size: 18px;
    }

    .peak-new-arrivals__trust-list {
        gap: 12px;
    }

    .peak-new-arrivals__trust-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px 16px;
    }

    .peak-new-arrivals__collection {
        padding: 56px 0 32px;
        scroll-margin-top: 90px;
    }

    .peak-new-arrivals__collection-header {
        margin-bottom: 28px;
    }

    .peak-new-arrivals__collection-lead {
        font-size: 16px;
    }

    .peak-new-arrivals__collection .products.peak-new-arrivals__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 20px;
    }

    .peak-new-arrivals-page .testimonials {
        padding-top: 80px;
    }
}

/*
 * Mobile (<= 767px, the theme's phone/small-tablet cut): the landing page
 * starts straight at the product collection. The hero (with its previews and
 * CTA) and the trust strip stay in the markup - a single source of truth that
 * is unchanged on tablet/desktop - and are simply not rendered here. The
 * collection self-pads to clear the fixed header (~68px, ~64px <= 576px) the
 * way the theme's first sections do, since the site has no global offset.
 */
@media (max-width: 767px) {
    .peak-new-arrivals__hero,
    .peak-new-arrivals__trust {
        display: none;
    }

    /* Mobile header measures ~85px (57px icon buttons + padding), ~89px at 767px. */
    .peak-new-arrivals__collection {
        padding-top: 124px;
    }

    .peak-new-arrivals__collection-header {
        margin-bottom: 24px;
        gap: 10px 16px;
    }

    .peak-new-arrivals__collection-heading {
        gap: 12px;
    }
}

@media (max-width: 576px) {
    .peak-new-arrivals__collection {
        padding: 124px 0 24px;
        scroll-margin-top: 80px;
    }

    .peak-new-arrivals__collection-heading {
        gap: 10px;
    }

    .peak-new-arrivals__collection .products.peak-new-arrivals__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .peak-new-arrivals__empty {
        padding: 40px 20px;
    }

    .peak-new-arrivals__empty-title {
        font-size: 22px;
    }

    .peak-new-arrivals__cta-actions {
        width: 100%;
    }

    .peak-new-arrivals__cta-actions .c-button {
        min-width: 0;
    }
}

/* ------------------------------------------------------------------ */
/* Reduced motion                                                      */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
    .peak-new-arrivals__hero-copy > *,
    .peak-new-arrivals__tile {
        animation: none;
    }

    .peak-new-arrivals__tile-link,
    .peak-new-arrivals__hero .c-button,
    .peak-new-arrivals__link,
    .peak-new-arrivals__grid .product-card {
        transition: none;
    }

    .peak-new-arrivals__tile-link:hover,
    .peak-new-arrivals__hero .c-button:hover,
    .peak-new-arrivals__grid .product-card:hover {
        transform: none;
    }
}
