/* ============================================================
   GLENDORA DOG WALKING — shop-pages.css  v2
   Improvements:
     • Product card layout: pricing/CTA pinned to bottom,
       extra row height pools cleanly above price block
     • Partner logo strip: static centered on desktop,
       edge-masked marquee on mobile/tablet
     • Staggered card entrance animation
     • Refined hover states, badges, and typography polish
     • Comprehensive responsive breakpoints
   ============================================================ */

/* ── Variables ───────────────────────────────────────────── */
:root {
    --green-dark:  #2d6338;
    --green-main:  #3a7d44;
    --green-mid:   #4e9259;
    --green-light: #a8d5b0;
    --green-bg:    #f0f7f1;
    --green-pale:  #e8f5ea;
    --gold:        #d4a847;
    --gold-light:  #f5e6bc;
    --red-sale:    #c0392b;
    --text-dark:   #1a2e1d;
    --text-body:   #3b4a3d;
    --text-muted:  #6b7d6e;
    --border:      #dce8de;
    --white:       #ffffff;

    --radius-card:   14px;
    --shadow-card:   0 2px 16px rgba(42, 90, 50, 0.10);
    --shadow-hover:  0 10px 36px rgba(42, 90, 50, 0.20);
    --transition:    0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Accessibility ───────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--green-dark);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0 0 6px 6px;
    font-size: 0.9rem;
    z-index: 9999;
    transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── Base ────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html { scroll-behavior: smooth; }
body {
    font-family: 'DM Sans', sans-serif;
    color: var(--text-body);
    background: var(--white);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* ── Layout ──────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2rem);
}

/* ── Nav ─────────────────────────────────────────────────── */
.main-nav { margin-left: auto; }
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 0.25rem;
}
.main-nav a {
    display: block;
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-body);
    text-decoration: none;
    border-radius: 6px;
    transition: background var(--transition), color var(--transition);
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
    background: var(--green-pale);
    color: var(--green-dark);
}
.main-nav a.active-page {
    color: var(--green-main);
    font-weight: 600;
}
.header-ctas {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
}
.btn-book {
    background: var(--green-main);
    color: var(--white);
    padding: 0.5rem 1.1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition);
    white-space: nowrap;
}
.btn-book:hover { background: var(--green-dark); }
.nav-toggle { display: none; }

@media (max-width: 820px) {
    .main-nav { display: none; }
    .header-ctas { margin-left: auto; }
    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 40px;
        height: 40px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.25rem;
        margin-left: 0.5rem;
    }
    .nav-toggle span {
        display: block;
        height: 2px;
        background: var(--green-dark);
        border-radius: 2px;
        transition: var(--transition);
    }
}

/* ── Breadcrumb ──────────────────────────────────────────── */
.shop-breadcrumb {
    background: var(--green-pale);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 0;
}
.shop-breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.shop-breadcrumb li + li::before {
    content: '›';
    margin-right: 0.25rem;
    color: var(--green-light);
}
.shop-breadcrumb a {
    color: var(--green-mid);
    text-decoration: none;
    font-weight: 500;
}
.shop-breadcrumb a:hover { text-decoration: underline; }
.shop-breadcrumb [aria-current="page"] {
    color: var(--text-body);
    font-weight: 600;
}

/* ── Hero ────────────────────────────────────────────────── */
.shop-hero {
    position: relative;
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 60%, #5fab6a 100%);
    padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4.5rem);
    overflow: hidden;
    text-align: center;
}
.shop-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 20% 50%, rgba(255,255,255,0.06) 0%, transparent 70%),
        radial-gradient(ellipse 40% 60% at 80% 20%, rgba(255,255,255,0.04) 0%, transparent 70%);
    pointer-events: none;
}
.shop-hero::after {
    content: '🐾 🐾 🐾 🐾 🐾';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.6rem;
    opacity: 0.12;
    letter-spacing: 1.5rem;
    white-space: nowrap;
    pointer-events: none;
}
.shop-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin-inline: auto;
}
.shop-hero-eyebrow {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.92);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50px;
    padding: 0.3rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}
.shop-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 1rem;
}
.shop-hero h1 em {
    font-style: italic;
    color: var(--gold-light);
}
.shop-hero-sub {
    font-size: clamp(0.95rem, 2vw, 1.12rem);
    color: rgba(255,255,255,0.85);
    max-width: 580px;
    margin-inline: auto;
    line-height: 1.7;
    margin-bottom: 2rem;
}
.shop-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}
.hero-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 50px;
    padding: 0.4rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255,255,255,0.92);
}
.hero-badge-icon { font-size: 1rem; }

/* ── Affiliate Disclosure ────────────────────────────────── */
.shop-disclosure {
    background: var(--gold-light);
    border-bottom: 1px solid #e0cfa0;
    padding: 0.7rem 0;
}
.shop-disclosure p {
    font-size: 0.78rem;
    color: #6b5a2a;
    text-align: center;
    line-height: 1.5;
}
.shop-disclosure strong { color: #5a4a20; }

/* ═══════════════════════════════════════════════════════════
   PARTNER LOGO STRIP
   — Mobile / Tablet (<768px): animated marquee w/ edge fades
   — Desktop (≥768px): static centered row, no animation
   ═══════════════════════════════════════════════════════════ */
.shop-partner-strip {
    background: #f7f9f7;
    border-bottom: 1px solid var(--border);
    padding: 2.25rem 0;
    text-align: center;
    overflow: hidden;
}

.partner-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ── Mobile/Tablet: scrolling marquee ── */
.partner-scroll {
    width: 100%;
    overflow: hidden;
    position: relative;
    /* Soft edge fades mask the logos scrolling in/out */
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 14%,
        black 86%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 14%,
        black 86%,
        transparent 100%
    );
}

.partner-track {
    display: flex;
    gap: 4rem;
    width: max-content;
    animation: scrollBrands 22s linear infinite;
    align-items: center;
}

/* Pause on hover so users can read/click a brand */
.partner-scroll:hover .partner-track {
    animation-play-state: paused;
}

.partner-logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.partner-logo img {
    height: 54px;
    width: auto;
    display: block;
    filter: grayscale(100%);
    opacity: 0.62;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.partner-logo:hover { transform: scale(1.06); }
.partner-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

@keyframes scrollBrands {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ── Desktop (≥768px): static, centered, no animation ── */
@media (min-width: 768px) {
    .shop-partner-strip {
        padding: 2.5rem 0 2.25rem;
        overflow: visible;
    }

    /* Remove the mask - no scrolling to hide */
    .partner-scroll {
        overflow: visible;
        -webkit-mask-image: none;
        mask-image: none;
    }

    /* Stop animation, center the logos in a flex row */
    .partner-track {
        animation: none;
        width: auto;
        justify-content: center;
        flex-wrap: wrap;
        gap: 4.5rem;
    }
    
    .secondary-logo {
        display: none;
    }

    /* Larger, slightly more visible logos on big screens */
    .partner-logo img {
        height: 64px;
        opacity: 0.55;
    }
    .partner-logo:hover img {
        opacity: 1;
    }
}

/* ── Shop Intro ──────────────────────────────────────────── */
.shop-intro {
    padding: 3rem 0 0;
    text-align: center;
    max-width: 700px;
    margin-inline: auto;
}
.shop-intro h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.25;
}
.shop-intro p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
}
.section-divider {
    width: 52px;
    height: 3px;
    background: linear-gradient(90deg, var(--green-main), var(--green-light));
    border-radius: 4px;
    margin: 1rem auto 0;
}

.shop-product-group {
    padding: 1em;
}

.shop-product-group-title {
    color: var(--green-dark);
    margin-bottom: 0.68rem;
    font-size: 1.6rem;
    font-weight: 300;
}

/* ── Count / Filter Bar ──────────────────────────────────── */
.shop-count-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 2rem 0 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}
.shop-count-bar p {
    font-size: 0.88rem;
    color: var(--text-muted);
}
.shop-count-bar strong { color: var(--text-dark); }
.shop-fresh-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--green-mid);
    font-weight: 600;
    transform: scale(0.8);
    background: var(--green-pale);
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    border: 1px solid rgba(78, 146, 89, 0.18);
}
.shop-fresh-badge::before {
    content: '🔄';
    font-size: 0.9rem;
}

/* ── Section Wrapper ─────────────────────────────────────── */
.shop-section { padding: 0 0 5rem; }

/* ═══════════════════════════════════════════════════════════
   PRODUCT GRID
   ═══════════════════════════════════════════════════════════ */
.product-grid {
    display: grid;
    /*
     * 3-column base, collapsing gracefully.
     * align-items: stretch (default) keeps all cards in a row
     * the same height — we control where the extra space lands
     * inside each card (see card-pricing below).
     */
    grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
    gap: 1.5rem;
    list-style: none;
}

/* ── Product Card ────────────────────────────────────────── */
.product-card {
    position: relative;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition);

    /* Staggered entrance — nth-child delays spread the reveal */
    animation: cardFadeIn 0.45s ease both;
}

/* Stagger: first 9 cards each offset by ~60 ms */
.product-card:nth-child(1)  { animation-delay: 0.00s; }
.product-card:nth-child(2)  { animation-delay: 0.06s; }
.product-card:nth-child(3)  { animation-delay: 0.12s; }
.product-card:nth-child(4)  { animation-delay: 0.18s; }
.product-card:nth-child(5)  { animation-delay: 0.24s; }
.product-card:nth-child(6)  { animation-delay: 0.30s; }
.product-card:nth-child(7)  { animation-delay: 0.36s; }
.product-card:nth-child(8)  { animation-delay: 0.40s; }
.product-card:nth-child(9)  { animation-delay: 0.44s; }

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--green-light);
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Discount Badge ──────────────────────────────────────── */
.discount-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--red-sale);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.28rem 0.65rem;
    border-radius: 6px;
    z-index: 2;
    line-height: 1;
    text-transform: uppercase;
    /* subtle shadow for lift off the image */
    box-shadow: 0 2px 8px rgba(192, 57, 43, 0.35);
}

/* ── Card Image ──────────────────────────────────────────── */
.card-image-wrap {
    position: relative;
    background: var(--green-bg);
    aspect-ratio: 4 / 3;
    overflow: hidden;
    flex-shrink: 0;
}
.card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: transform 0.4s ease;
}
/* Subtle green vignette overlay on hover */
.card-image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 80% 80% at 50% 60%,
        transparent 55%,
        rgba(45, 99, 56, 0.07) 100%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}
.product-card:hover .card-image-wrap::after { opacity: 1; }
.product-card:hover .card-image-wrap img { transform: scale(1.04); }

/* ═══════════════════════════════════════════════════════════
   CARD BODY
   Layout principle:
     • Content (headline, title, optional variant) sits at top.
     • margin-top: auto on .card-pricing pins the pricing+CTA
       group to the bottom of every card.
     • When a row stretches due to a variant card, the extra
       space pools cleanly *above* the price block — never
       between pricing and the CTA button.
   ═══════════════════════════════════════════════════════════ */

.card-body {
    padding: 1.1rem 1.1rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    /* min-height keeps very short cards from looking cramped */
    min-height: 0;
}

.card-headline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}
.card-brand {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--green-mid);
}
.card-source-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.16rem 0.55rem;
    background: var(--green-pale);
    color: var(--green-dark);
    border: 1px solid rgba(45, 99, 56, 0.14);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    /* smooth highlight on card hover */
    transition: background var(--transition), border-color var(--transition);
}
.product-card:hover .card-source-badge {
    background: #d4edda;
    border-color: rgba(45, 99, 56, 0.25);
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.03rem;
    font-weight: 700;
    line-height: 1.35;
    min-height: calc(2 * 1.35em);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    color: var(--text-dark);
    text-overflow: ellipsis;
    margin-bottom: 0.6rem;
}

/* ── Variant Panel ───────────────────────────────────────── */
.card-variant-panel {
    border: 1px solid var(--border);
    background: #fbfdfb;
    border-radius: 10px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    transition: border-color var(--transition);
}
.card-variant-panel:focus-within {
    border-color: var(--green-main);
    box-shadow: 0 0 0 3px rgba(58, 125, 68, 0.10);
}
.variant-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}
.variant-select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    background: #fff;
    color: var(--text-dark);
    font: inherit;
    font-size: 0.88rem;
    outline: none;
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.variant-select:focus {
    border-color: var(--green-main);
    box-shadow: 0 0 0 3px rgba(78, 146, 89, 0.16);
}
.variant-hint {
    margin-top: 0.45rem;
    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.45;
}

/* ── Pricing ─────────────────────────────────────────────── */
/*
 * KEY FIX: margin-top: auto here (and ONLY here) is what
 * creates the elastic spacer between the card's content
 * section and the pricing/CTA group. Any extra row height
 * flows into this gap — which looks intentional — keeping
 * prices and the Shop Now button anchored together at the
 * bottom of every card regardless of variant panels.
 */
.card-pricing {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: auto;      /* ← the elastic spacer */
    padding-top: 0.6rem;   /* minimum breathing room on short cards */
    margin-bottom: 0.65rem;
}
.price-current {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--green-dark);
}
.price-was {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: line-through;
}
.price-save {
    font-size: 0.73rem;
    font-weight: 700;
    color: var(--red-sale);
    background: #fdecea;
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
}
.price-note,
.subscription-note {
    display: block;
    width: 100%;
    color: var(--text-muted);
    font-size: 0.79rem;
    line-height: 1.45;
    margin-top: 0.2rem;
}
.subscription-note {
    color: var(--green-dark);
    font-weight: 600;
}

/* ── CTA Button ──────────────────────────────────────────── */
/*
 * margin-top: 0 (was auto) — now the CTA sits directly below
 * pricing with only a natural gap, no second elastic spacer.
 */
.card-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    background: var(--green-main);
    color: var(--white);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.72rem 1rem;
    border-radius: 9px;
    transition:
        background var(--transition),
        box-shadow var(--transition);
    text-align: center;
    /* No margin-top: auto here — that's handled by .card-pricing above */
    margin-top: 0;
    /* Subtle shadow on the button for depth */
    box-shadow: 0 2px 8px rgba(58, 125, 68, 0.22);
}
.card-cta:hover {
    background: var(--green-dark);
    box-shadow: 0 4px 16px rgba(42, 90, 50, 0.30);
}
.card-cta:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}
.cta-arrow {
    display: inline-block;
    transition: transform var(--transition);
}
.product-card:hover .cta-arrow { transform: translateX(4px); }

/* ── External Note ───────────────────────────────────────── */
.card-external-note {
    font-size: 0.69rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.55rem;
    letter-spacing: 0.01em;
}

/* ── Trust Section ───────────────────────────────────────── */
.shop-trust {
    background: var(--green-pale);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin: 3.5rem 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    text-align: center;
}
.trust-item-shop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
}
.trust-item-shop .t-icon { font-size: 1.75rem; }
.trust-item-shop h3 {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
}
.trust-item-shop p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* ── Empty State ─────────────────────────────────────────── */
.shop-empty {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-muted);
}
.shop-empty p { font-size: 1.1rem; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════════ */

/* ── Tablet (~820px) ── */
@media (max-width: 820px) {
    .shop-hero h1 { font-size: clamp(1.8rem, 7vw, 3rem); }

    .shop-trust {
        grid-template-columns: 1fr 1fr;
    }

    .product-grid {
        /* 2 columns on tablet, never go below 220px */
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.25rem;
    }
}

/* ── Mobile (~580px) ── */
@media (max-width: 580px) {
    /* Single column on small mobile */
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /*
     * On a single-column layout all cards fill full width and
     * height is entirely content-driven, so no stretching issue.
     * Keep the pinned-bottom behaviour for consistency.
     */
    .card-image-wrap { aspect-ratio: 16 / 9; }

    .shop-trust {
        grid-template-columns: 1fr;
    }

    .shop-count-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.65rem;
    }
}

/* ── Small mobile (~400px) ── */
@media (max-width: 400px) {
    .card-body { padding: 0.9rem 0.9rem 0.85rem; }
    .card-title { font-size: 0.97rem; }
    .price-current { font-size: 1.15rem; }
}
