/* ==========================================================================
   Home — product cards marquee.

   Replaces the slick ticker, which ran at autoplaySpeed:0 / speed:4000 and
   left cards sliced in half at both edges. Here the track is a plain flex row
   duplicated once and moved with a single GPU-composited transform: no
   carousel library, no per-frame JS, nothing that touches layout.

   Desktop (hover: hover) gets the auto-scrolling marquee, paused on hover or
   keyboard focus. Touch gets native horizontal scrolling with snap points,
   because a marquee you cannot swipe is worse than a list you can.
   ========================================================================== */

.pc-section {
    --pc-card-w: 290px;
    --pc-gap: 22px;
    --pc-radius: 20px;
    --pc-speed: 95s;
    --pc-ink: #1f2f37;
    --pc-green: var(--gf-green, #5eb346);
    --pc-green-deep: #3d7f31;

    position: relative;
    padding: 10px 0 90px;
}

/* Full-bleed: the marquee reads as a continuous band, not a boxed widget. */
.pc-viewport {
    width: 100vw;
    max-width: 100vw;
    margin-inline: calc(50% - 50vw);
    overflow: hidden;
    /* Feathered edges instead of hard-sliced cards. */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}

.pc-track {
    display: flex;
    gap: var(--pc-gap);
    width: max-content;
    margin: 0;
    padding: 14px 0;
    list-style: none;
    will-change: transform;
    animation: pcScroll var(--pc-speed) linear infinite;
}

/* Half the track is a duplicate, so one set's width is 50% of the whole plus
   half a gap — that extra half-gap is what makes the wrap seamless. */
@keyframes pcScroll {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(calc(-50% - (var(--pc-gap) / 2)), 0, 0); }
}

.pc-viewport:hover .pc-track,
.pc-track:focus-within {
    animation-play-state: paused;
}

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

.pc-card {
    position: relative;
    flex: 0 0 var(--pc-card-w);
    width: var(--pc-card-w);
    aspect-ratio: 3 / 4;
    border-radius: var(--pc-radius);
    overflow: hidden;
    background: #0d2017;
    box-shadow:
        0 10px 24px -14px rgba(31, 47, 55, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.45s ease;
}

.pc-card:hover,
.pc-card:focus-within {
    transform: translateY(-8px);
    box-shadow:
        0 26px 44px -20px rgba(31, 47, 55, 0.55),
        inset 0 0 0 1px rgba(94, 179, 70, 0.35);
}

.pc-card__link {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: block;
    border-radius: var(--pc-radius);
    /* The whole card is the hit area — no 125x27px "Read More" target. */
    text-indent: -9999px;
    overflow: hidden;
}

.pc-card__link:focus-visible {
    outline: 3px solid var(--pc-green);
    outline-offset: 3px;
}

.pc-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.pc-card:hover .pc-card__img,
.pc-card:focus-within .pc-card__img {
    transform: scale(1.07);
}

/* Scrim: light at rest so the photo reads, heavier on hover so the copy does. */
.pc-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to top,
        rgba(8, 24, 17, 0.94) 0%,
        rgba(8, 24, 17, 0.72) 32%,
        rgba(8, 24, 17, 0.12) 62%,
        rgba(8, 24, 17, 0.05) 100%
    );
    transition: opacity 0.45s ease;
}

.pc-card:hover::after,
.pc-card:focus-within::after {
    opacity: 1;
}

.pc-card__chip {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(94, 179, 70, 0.22);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: inset 0 0 0 1px rgba(216, 255, 216, 0.3);
    color: #e9ffd8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.pc-card__body {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    padding: 18px 16px 20px;
    color: #ffffff;
}

.pc-card__title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.32;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

/* 0fr -> 1fr animates to the content's real height, so nothing is clipped at
   an arbitrary max-height and nothing jumps. */
.pc-card__reveal {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.35s ease;
}

.pc-card:hover .pc-card__reveal,
.pc-card:focus-within .pc-card__reveal {
    grid-template-rows: 1fr;
    opacity: 1;
}

.pc-card__reveal > div {
    overflow: hidden;
}

.pc-card__desc {
    margin: 10px 0 0;
    color: rgba(233, 255, 216, 0.88);
    font-size: 0.86rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.pc-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 13px;
    color: #e9ffd8;
    font-size: 0.84rem;
    font-weight: 600;
}

.pc-card__cta i {
    transition: transform 0.3s ease;
}

.pc-card:hover .pc-card__cta i {
    transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Touch: swipeable list rather than a marquee
   -------------------------------------------------------------------------- */

@media (hover: none) {
    .pc-viewport {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-inline: 16px;
        /* Feathering would hide the first and last card's edge while scrolling. */
        -webkit-mask-image: none;
        mask-image: none;
    }

    .pc-viewport::-webkit-scrollbar {
        display: none;
    }

    .pc-track {
        animation: none;
        will-change: auto;
        padding-inline: 0;
    }

    .pc-card {
        scroll-snap-align: center;
    }

    /* The duplicate set only exists to make the marquee wrap. */
    .pc-card--clone {
        display: none;
    }

    /* No hover on touch, so the copy is simply always shown. */
    .pc-card__reveal {
        grid-template-rows: 1fr;
        opacity: 1;
    }
}

@media (max-width: 575px) {
    .pc-section {
        --pc-card-w: 240px;
        --pc-gap: 14px;
        padding-bottom: 64px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pc-viewport {
        overflow-x: auto;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .pc-track {
        animation: none;
    }

    .pc-card,
    .pc-card__img,
    .pc-card__reveal,
    .pc-card__cta i {
        transition: none;
    }
}

/* ==========================================================================
   Products band — the header that introduces the marquee above.

   Replaces a photographic JPEG band that ran dark navy-to-green and left ~150px
   of empty space under its paragraph. Light surface (green / white / grey), and
   the background ramps white -> cream -> mint so it flows into the marquee
   instead of cutting against it.
   ========================================================================== */

.pr-band {
    position: relative;
    z-index: 1;
    isolation: isolate;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: clamp(3rem, 6vw, 5rem) 1.5rem clamp(2rem, 4vw, 3rem);
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, var(--gf-cream) 55%, #f1f6f7 100%);
}

.pr-band-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.pr-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
}

.pr-glow--a {
    top: -30%;
    left: 6%;
    width: 30rem;
    height: 30rem;
    background: rgba(94, 179, 70, 0.16);
    animation: prDriftA 26s ease-in-out infinite alternate;
}

.pr-glow--b {
    top: -10%;
    right: -4%;
    width: 26rem;
    height: 26rem;
    background: rgba(90, 196, 180, 0.14);
    animation: prDriftB 31s ease-in-out infinite alternate;
}

@keyframes prDriftA {
    to { transform: translate3d(5rem, 3rem, 0) scale(1.1); }
}

@keyframes prDriftB {
    to { transform: translate3d(-4rem, 2rem, 0) scale(0.92); }
}

/* Logo hexagon motif, very faint. */
.pr-lattice {
    position: absolute;
    inset: 0;
    opacity: 0.4;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 1L54 16v32L28 63 2 48V16z M28 63l26 15v18M28 63L2 78v18' fill='none' stroke='%235eb346' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 56px 97px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 5%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 5%, transparent 75%);
}

/* ---------- copy ---------- */
.pr-head {
    max-width: 44rem;
    margin: 0 auto clamp(2rem, 4vw, 3rem);
    text-align: center;
}

.pr-eyebrow {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.38rem 1rem;
    border-radius: 100px;
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gf-green-dark, #78b945);
    background: rgba(94, 179, 70, 0.1);
    border: 1px solid rgba(94, 179, 70, 0.24);
}

.pr-heading {
    margin: 0 0 1rem;
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 3.6vw, 2.8rem);
    line-height: 1.16;
    letter-spacing: -0.03em;
    color: var(--pc-ink);
}

.pr-lead {
    max-width: 38rem;
    margin: 0 auto;
    font-family: "Poppins", sans-serif;
    font-size: 1.02rem;
    line-height: 1.75;
    color: rgba(48, 68, 79, 0.76);
}

/* ---------- figures ---------- */
.pr-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
    max-width: 58rem;
    margin: 0 auto clamp(1.8rem, 3vw, 2.4rem);
    padding: 0;
    list-style: none;
}

.pr-stat {
    display: grid;
    gap: 0.3rem;
    padding: 1.6rem 1.4rem;
    text-align: center;
    background: #ffffff;
    border: 1px solid rgba(94, 179, 70, 0.2);
    border-radius: 20px;
    box-shadow: var(--gf-shadow-card, 0 10px 25px rgba(48, 68, 79, 0.08));
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease,
        border-color 0.35s ease;
}

.pr-stat:hover {
    transform: translateY(-5px);
    border-color: rgba(94, 179, 70, 0.5);
    box-shadow: 0 22px 42px -20px rgba(94, 179, 70, 0.45);
}

.pr-stat-value {
    font-family: "Poppins", sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 700;
    line-height: 1;
    color: var(--pc-green);
    /* Stops the tile reflowing while the number rolls up. */
    font-variant-numeric: tabular-nums;
}

.pr-stat-label {
    font-family: "Poppins", sans-serif;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--pc-ink);
}

.pr-stat-note {
    font-family: "Poppins", sans-serif;
    font-size: 0.76rem;
    color: rgba(48, 68, 79, 0.55);
}

/* ---------- category filter ---------- */
.pr-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}

.pr-filter {
    padding: 0.55rem 1.2rem;
    border-radius: 100px;
    font-family: "Poppins", sans-serif;
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
    color: rgba(48, 68, 79, 0.76);
    background: #ffffff;
    border: 1px solid rgba(94, 179, 70, 0.26);
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease,
        transform 0.25s ease, box-shadow 0.25s ease;
}

.pr-filter:hover {
    transform: translateY(-2px);
    border-color: var(--pc-green);
}

/* Deeper greens than the brand mid-tone: white on #5eb346 is only ~2.6:1,
   which is not enough for label-size text. */
.pr-filter.is-active {
    color: #ffffff;
    background: linear-gradient(90deg, var(--pc-green-deep), #2f6b28);
    border-color: transparent;
    box-shadow: 0 10px 22px rgba(94, 179, 70, 0.3);
}

/* ==========================================================================
   Marquee additions — filtering, manual scrub, controls
   ========================================================================== */

/* A filtered-out card is hidden in BOTH passes, so each half of the track stays
   the same width and the -50% wrap still lands seamlessly. */
.pc-card[hidden] {
    display: none;
}

.pc-empty {
    margin: 1.5rem 0 0;
    text-align: center;
    font-family: "Poppins", sans-serif;
    font-size: 0.95rem;
    color: rgba(48, 68, 79, 0.76);
}

/* Manual mode: once the visitor uses an arrow they have taken control, so the
   auto-scroll stops and the viewport becomes a normal scroller — the same
   behaviour touch and reduced-motion already get. */
.pc-section.is-manual .pc-viewport {
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.pc-section.is-manual .pc-viewport::-webkit-scrollbar {
    display: none;
}

.pc-section.is-manual .pc-track {
    animation: none;
}

.pc-section.is-manual .pc-card {
    scroll-snap-align: center;
}

/* The duplicate exists only to make the auto-scroll wrap; scrolling past a
   second copy of every product would just look like a bug. */
.pc-section.is-manual .pc-card--clone {
    display: none;
}

.pc-nav {
    position: absolute;
    top: calc(50% - 45px);
    z-index: 5;
    display: grid;
    place-items: center;
    width: 2.9rem;
    height: 2.9rem;
    padding: 0;
    border-radius: 50%;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--pc-green-deep);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(94, 179, 70, 0.26);
    box-shadow: 0 10px 26px rgba(48, 68, 79, 0.18);
    transition: transform 0.25s ease, color 0.25s ease, border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.pc-nav:hover {
    transform: scale(1.08);
    color: #ffffff;
    background: var(--pc-green);
    border-color: transparent;
    box-shadow: 0 14px 30px rgba(94, 179, 70, 0.45);
}

.pc-nav:focus-visible {
    outline: 3px solid var(--pc-green);
    outline-offset: 3px;
}

.pc-nav--prev { left: clamp(0.5rem, 2vw, 1.6rem); }
.pc-nav--next { right: clamp(0.5rem, 2vw, 1.6rem); }

@media only screen and (max-width: 991px) {
    .pr-stats { grid-template-columns: 1fr; max-width: 24rem; }
}

@media (prefers-reduced-motion: reduce) {
    .pr-glow { animation: none; }
    .pr-stat,
    .pr-filter,
    .pc-nav { transition: none; }
    .pc-section.is-manual .pc-viewport { scroll-behavior: auto; }
}
