/* FlowersStore — product-grid component */

/* ── Section shell ─────────────────────────────────────────── */
.pto-pg {
    padding: var(--theme-section-spacing, 80px) 0;
}

/* ── Section header ────────────────────────────────────────── */
.pto-pg__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    max-width: none;
    flex-wrap: wrap;
}

.pto-pg__eyebrow {
    display: block;
    font-family: var(--theme-font-family);
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--theme-text-muted);
    margin-bottom: 0.45rem;
}

.pto-pg__title {
font-family: var(--theme-font-display);
    font-size: clamp(2rem, 4.4vw, 3.3rem);
    font-weight: 500;
    color: var(--theme-text);
    margin: 0;
    line-height: 1.1;
}

.pto-pg__view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--theme-font-family);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--theme-text);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.55rem 1.1rem;
    border: 1px solid var(--theme-border);
    border-radius: 100px;
    transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.pto-pg__view-all:hover {
    background: var(--theme-text);
    color: var(--theme-surface);
    border-color: var(--theme-text);
}

/* ── Grid ──────────────────────────────────────────────────── */
.pto-pg__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (min-width: 600px) {
    .pto-pg__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .pto-pg__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.8rem;
    }
}

/* ── Card shell ─────────────────────────────────────────────── */
.pto-pg__card {
    display: flex;
    flex-direction: column;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    position: relative;
    container-type: inline-size;
}

.pto-pg__card::before {
    display: none;
}

/* ── Inner link (image + body) ──────────────────────────────── */
.pto-pg__card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

/* ── Image area ─────────────────────────────────────────────── */
.pto-pg__art {
    position: relative;
    aspect-ratio: 4 / 4;
    background: var(--theme-surface);
    overflow: hidden;
    flex-shrink: 0;
    border-radius: var(--theme-radius-lg, 20px);
    isolation: isolate;
}

/* Hover scrim */
.pto-pg__art::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:linear-gradient(180deg, transparent 35%, color-mix(in srgb, #2a232000 48%, transparent) 100%);
    opacity: 0;
    transition: opacity 0.6s var(--ease-out);
    pointer-events: none;
}

.pto-pg__card:hover .pto-pg__art::before {
    opacity: 1;
}

.pto-pg__art img[data-pg-img] {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    padding: 0;
    box-sizing: border-box;
    transition: transform 0.75s var(--ease-out);
    will-change: transform;
}

.pto-pg__card:hover .pto-pg__art img[data-pg-img] {
    transform: scale(1.1);
}

/* ── Body (name + price + category) ─────────────────────────── */
.pto-pg__body {
    padding: 0.75rem 0 0;
    transition: color 0.3s var(--ease);
}

.pto-pg__name-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.pto-pg__name {
    font-family: var(--theme-font-display);
    font-size: 1.12rem;
    font-weight: 600;
    margin: 0;
    color: var(--theme-text);
    line-height: 1.08;
    flex: 1;
    min-width: 0;
    transition: color 0.3s var(--ease);
}

.pto-pg__card:hover .pto-pg__name {
    color: var(--theme-coffee);
}

.pto-pg__meta {
    font-family: var(--theme-font-family);
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--theme-mocha-deep);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    white-space: normal;
}

.pto-pg__meta:empty {
    display: none;
}

/* ── Price row ───────────────────────────────────────────────── */
.pto-pg__price-row {
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
    flex-shrink: 0;
    font-weight: 600;
    font-size: 0.99rem;
    color: var(--theme-coffee);
    font-family: var(--theme-font-family);
}

.pto-pg__price-from {
    font-size: 0.82em;
    font-weight: 500;
    color: var(--theme-mocha-deep);
}

.pto-pg__price:empty,
.pto-pg__price[hidden] {
    display: none !important;
}

.pto-pg__price-row:has(.pto-pg__price:empty) {
    display: none;
}

/* ── Footer — Order Now overlay on image bottom ─────────────── */
.pto-pg__footer {
    position: absolute;
    left: 0.85rem;
    right: 0.85rem;
    top: calc(100cqw - 3.6rem);
    z-index: 2;
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0.5rem;
    width: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    pointer-events: none;
    transition:
        opacity 0.4s var(--ease-out),
        transform 0.45s var(--ease-out),
        visibility 0s linear 0.4s;
}

.pto-pg__card:hover .pto-pg__footer {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition:
        opacity 0.55s var(--ease-out) 0.07s,
        transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.07s,
        visibility 0s linear 0s;
}

.pto-pg__footer:not(:has(.pto-pg__btn:not([hidden]))) {
    display: none;
}

.pto-pg__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    flex: 1;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.82rem 1.25rem;
    border-radius: 100px;
    font-family: var(--theme-font-family);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    text-decoration: none;
    border: none;
    white-space: nowrap;
    line-height: 1;
    transition: background 0.4s var(--ease-out), color 0.4s var(--ease-out);
}

.pto-pg__btn[hidden] {
    display: none !important;
}

.pto-pg__btn--view {
    background: #6f4f3a;
    color: var(--theme-surface);
    border: none;
}

.pto-pg__btn--view svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.pto-pg__btn--view:hover {
    background: #4a3a30;
}

.pto-pg__btn--add {
    background: #6f4f3a;
    color: var(--theme-surface);
}

.pto-pg__btn--add:hover {
    background: #4a3a30;
}

@media (prefers-reduced-motion: reduce) {
    .pto-pg__art img[data-pg-img],
    .pto-pg__art::before,
    .pto-pg__footer,
    .pto-pg__name,
    .pto-pg__view-all,
    .pto-pg__btn {
        transition: none;
    }

    .pto-pg__card:hover .pto-pg__art img[data-pg-img] {
        transform: none;
    }

    .pto-pg__card:hover .pto-pg__footer {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}
@media (max-width: 420px) {
    .pto-pg__grid {
        grid-template-columns: 1fr;
    }
}
.btn--ghost {
    border-color: rgba(74, 58, 48, 0.14) !important;
    color: #2a2320 !important;
    padding: 0.7em 1.4em !important;
    font-size: 0.72rem !important;
}
.btn--ghost:hover {
     color: var(--theme-surface) !important;
    background: var(--theme-coffee);
}
/* ── Items-mode scroll reveal ───────────────────────────────── */
/* Hidden until each element individually enters the viewport   */
[data-cs-scroll-reveal="items"].cs-items-armed .reveal:not(.cs-reveal-in) {
    opacity: 0;
    transform: translateY(20px);
    animation: none;
}
[data-cs-scroll-reveal="items"].cs-items-armed .reveal.cs-reveal-in {
    opacity: 0;
    transform: translateY(20px);
    animation: csScrollRevealFade 0.95s var(--ease) forwards;
}
/* Honour reveal--delay-* on header elements */
[data-cs-scroll-reveal="items"] .reveal--delay-1.cs-reveal-in { animation-delay: 0.12s; }
[data-cs-scroll-reveal="items"] .reveal--delay-2.cs-reveal-in { animation-delay: 0.24s; }
/* Editor always visible */
[data-cs-scroll-reveal="items"][data-cs-scroll-reveal-editor] .reveal,
.cs-builder-mode [data-cs-scroll-reveal="items"] .reveal {
    opacity: 1 !important; transform: none !important; animation: none !important;
}
@media (scripting: none) {
    [data-cs-scroll-reveal="items"] .reveal { opacity: 1; transform: none; animation: none; }
}
@media (prefers-reduced-motion: reduce) {
    [data-cs-scroll-reveal="items"] .reveal {
        animation: none !important; opacity: 1 !important; transform: none !important;
    }
}
/* Column stagger: left → right within each row of 3 */
.pto-pg__grid .pto-pg__card.cs-reveal-in:nth-child(3n + 1) { animation-delay: 0s; }
.pto-pg__grid .pto-pg__card.cs-reveal-in:nth-child(3n + 2) { animation-delay: 0.09s; }
.pto-pg__grid .pto-pg__card.cs-reveal-in:nth-child(3n)     { animation-delay: 0.18s; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    font-family: var(--theme-font-family);
    font-weight: 500;
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 1.05em 2.1em;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease);
    white-space: nowrap;
}

@media (max-width: 640px) {
    .section-head--row {
        align-items: flex-start;
    }
}