/* ============================================================================
 * DS BRAND Theme — assets/css/homepage.css
 *
 * Batch 4: Homepage refinement pass.
 *
 * This stylesheet replaces the previous Section 14 (HOMEPAGE SECTIONS) of
 * theme.css. It is enqueued AFTER theme.css so its rules win the cascade
 * for any selector that overlaps.
 *
 * Integrated into the complete ds-brand theme package.
 * theme.css now carries the site-wide Plus Jakarta Sans --font-base token;
 * homepage.css stays scoped to homepage refinements only.
 *
 * Typography: Plus Jakarta Sans (enqueued in inc/enqueue.php).
 * Icons:      ds_brand_icon() — see inc/icons.php.
 * ========================================================================== */


/* ── New design tokens layered onto :root ───────────────────────────────── */

:root {
    /* Brand-typed type stack */
    --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body:    'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:    ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    /* Refined neutrals — sit alongside the existing --clr-text /-muted/-light */
    --clr-ink:           #0e1410;
    --clr-text-soft:     #8a948f;

    /* Subtle brand-tint used in hero + WhatsApp + accents */
    --clr-brand-tint:    #f4faf6;
    --clr-brand-deep:    #0e4d27;

    /* Badge differentiation — three distinct meanings, three colours */
    --clr-amber:         #b8741a;
}

/* ============================================================================
 *  BUTTON VARIANT — outline
 * ========================================================================== */

.btn--outline {
    background: transparent;
    color: var(--clr-ink);
    border-color: var(--clr-border-dark);
}

.btn--outline:hover,
.btn--outline:focus-visible {
    background: var(--clr-brand-tint);
    color: var(--clr-brand-dark);
    border-color: var(--clr-brand);
    text-decoration: none;
}

.btn--outline:active {
    background: var(--clr-brand-light);
}

.btn--outline .ds-icon {
    color: currentColor;
}

/* ============================================================================
 *  HOMEPAGE WRAPPER

 * ========================================================================== */

.site-main--homepage {
    padding-top: 0;
    padding-bottom: 0;
}


/* ============================================================================
 *  SHARED SECTION CHROME — eyebrows, titles, headers
 * ========================================================================== */

.hp-section-eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--clr-brand-dark);
    margin: 0 0 8px;
    line-height: 1;
}

.hp-section-title {
    font-family: var(--font-display);
    font-size: clamp(1.625rem, 1.2vw + 1.25rem, 2.375rem);  /* 26 → 38 */
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: var(--clr-ink);
    margin: 0 0 8px;
}

.hp-section-sub {
    font-size: var(--font-size-base);
    color: var(--clr-text-muted);
    max-width: 520px;
    margin: 0;
    line-height: 1.55;
}

.hp-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-bottom: var(--space-10);
}

.hp-section-header--products {
    margin-bottom: var(--space-12);
    align-items: flex-end;
}

.hp-section-viewall {
    flex-shrink: 0;
}

.hp-section-viewall--mobile {
    display: none;
}

.hp-section-viewall .ds-icon {
    transition: transform var(--transition);
}

.hp-section-viewall:hover .ds-icon {
    transform: translateX(3px);
}

/* Inline icon defaults — currentColor + vertical centring */
.ds-icon {
    flex-shrink: 0;
    color: currentColor;
}


/* ============================================================================
 *  1. HERO — signature product
 * ========================================================================== */

.hp-hero {
    position: relative;
    overflow: hidden;
    background: #fff;
    padding: var(--space-20) 0 var(--space-20);
}

/* Soft brand-tinted radial in the top-right corner — restrained, not gaudy. */
.hp-hero__bg {
    position: absolute;
    top: -180px;
    right: -180px;
    width: 720px;
    height: 720px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        rgba(26, 134, 72, 0.18),
        rgba(26, 134, 72, 0) 60%);
    pointer-events: none;
    z-index: 0;
}

.hp-hero .container {
    position: relative;
    z-index: 1;
}

.hp-hero__grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: var(--space-16);
    align-items: center;
}

.hp-hero__content {
    max-width: 560px;
}

.hp-hero__eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--clr-brand-dark);
    margin: 0 0 18px;
    line-height: 1;
}

.hp-hero__headline {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 3.4vw + 1rem, 4rem);   /* 36 → 64 */
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.03em;
    color: var(--clr-ink);
    margin: 0 0 var(--space-6);
}

.hp-hero__headline-accent {
    display: block;
    color: var(--clr-brand-dark);
}

.hp-hero__subtext {
    font-size: clamp(1rem, 0.4vw + 0.95rem, 1.1875rem);   /* 16 → 19 */
    color: var(--clr-text-muted);
    line-height: 1.55;
    max-width: 460px;
    margin: 0 0 var(--space-8);
}

.hp-hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-bottom: var(--space-10);
}

.hp-hero__microtrust {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-6);
    list-style: none;
    margin: 0;
    padding: 0;
}

.hp-hero__microtrust li {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--clr-text-muted);
}

.hp-hero__microtrust .ds-icon {
    color: var(--clr-brand);
}

/* Media column */
.hp-hero__media {
    position: relative;
}

.hp-hero__image {
    display: block;
    width: 100%;
    aspect-ratio: 5 / 6;
    object-fit: cover;
    border-radius: var(--radius-xl);
    background: var(--clr-surface);
}

/* Tasteful neutral panel when no real product image is configured yet. */
.hp-hero__image--placeholder {
    background:
        radial-gradient(circle at 70% 30%, rgba(26, 134, 72, 0.10), rgba(26, 134, 72, 0) 65%),
        linear-gradient(160deg, #f1efe9 0%, #e6e3da 100%);
    border: 1px solid var(--clr-border);
    position: relative;
}

.hp-hero__image--placeholder::after {
    content: "DS BRAND";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 3vw, 3.5rem);
    letter-spacing: -0.02em;
    color: rgba(14, 20, 16, 0.18);
}

/* Floating product chip — only renders when configured (no fake claims). */
.hp-hero__chip {
    position: absolute;
    left: -32px;
    bottom: 32px;
    width: 184px;
    padding: 12px;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--clr-border);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: var(--clr-text);
    transition: transform var(--transition), box-shadow var(--transition);
    display: block;
}

.hp-hero__chip:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}

.hp-hero__chip-image {
    display: block;
    aspect-ratio: 1 / 1;
    background: var(--clr-surface);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 10px;
}

.hp-hero__chip-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hp-hero__chip-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hp-hero__chip-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--clr-ink);
    line-height: 1.35;
}

.hp-hero__chip-price {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--clr-brand-dark);
    letter-spacing: -0.01em;
}


/* ============================================================================
 *  2. TRUST STRIP
 * ========================================================================== */

.hp-trust {
    background: #fff;
    border-top: 1px solid var(--clr-border);
    border-bottom: 1px solid var(--clr-border);
    padding: 22px 0;
}

.hp-trust__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-2);
}

.hp-trust-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 6px var(--space-2);
}

.hp-trust-card__icon {
    color: var(--clr-brand);
    display: inline-flex;
    flex-shrink: 0;
}

.hp-trust-card__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.hp-trust-card__heading {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--clr-ink);
    line-height: 1.25;
}

.hp-trust-card__text {
    font-size: 12.5px;
    color: var(--clr-text-muted);
    line-height: 1.3;
}


/* ============================================================================
 *  3. CATEGORIES — image-led with graphic fallback
 * ========================================================================== */

.hp-categories {
    background: #fff;
    padding: var(--space-16) 0;
}

.hp-categories__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-4);
}

.hp-category-card {
    display: block;
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: var(--clr-ink);
    border: 1px solid var(--clr-border);
    transition: transform var(--transition-md), box-shadow var(--transition-md), border-color var(--transition);
    background: var(--clr-brand-tint);
}

.hp-category-card:hover,
.hp-category-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--clr-brand);
    text-decoration: none;
}

/* Image variant */
.hp-category-card__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-md);
}

.hp-category-card:hover .hp-category-card__image {
    transform: scale(1.04);
}

.hp-category-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(14, 20, 16, 0) 40%,
        rgba(14, 20, 16, 0.78) 100%);
    pointer-events: none;
}

/* Graphic fallback variant */
.hp-category-card--graphic {
    background:
        radial-gradient(circle at 70% 25%, rgba(26, 134, 72, 0.12), rgba(26, 134, 72, 0) 60%),
        var(--clr-brand-tint);
}

.hp-category-card__icon-large {
    position: absolute;
    top: var(--space-6);
    left: var(--space-5);
    width: 56px;
    height: 56px;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--clr-border);
    color: var(--clr-brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Label block (used by both variants) */
.hp-category-card__label {
    position: absolute;
    left: var(--space-4);
    right: var(--space-4);
    bottom: var(--space-4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    z-index: 1;
}

.hp-category-card__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--font-size-lg);
    line-height: 1.15;
    letter-spacing: -0.015em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.hp-category-card--image .hp-category-card__title {
    color: #fff;
}

.hp-category-card--graphic .hp-category-card__title {
    color: var(--clr-ink);
    text-shadow: none;
}

.hp-category-card__arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--clr-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform var(--transition);
}

.hp-category-card--graphic .hp-category-card__arrow {
    background: #fff;
    border: 1px solid var(--clr-border);
}

.hp-category-card:hover .hp-category-card__arrow {
    transform: translateX(3px);
}


/* ============================================================================
 *  4. PRODUCTS
 * ========================================================================== */

.hp-products {
    background: #fff;
    padding: var(--space-20) 0;
    scroll-margin-top: calc(var(--header-height) + 16px);
}

.hp-products__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

.hp-product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow var(--transition-md), transform var(--transition-md), border-color var(--transition);
}

.hp-product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: var(--clr-border-dark);
}

.hp-product-card--oos {
    opacity: 0.78;
}

.hp-product-card__image-wrap {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--clr-surface);
    text-decoration: none;
}

.hp-product-card__image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-md);
}

.hp-product-card:hover .hp-product-card__image-wrap img {
    transform: scale(1.04);
}

/* Differentiated badges — three meanings, three colours. */
.hp-product-card__badge {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    padding: 4px 8px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1;
    border-radius: 4px;
}

.hp-product-card__badge--sale {
    background: var(--clr-brand);
    color: #fff;
}

.hp-product-card__badge--oos {
    background: rgba(14, 20, 16, 0.78);
    color: #fff;
}

.hp-product-card__body {
    padding: var(--space-4) var(--space-4) var(--space-2);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hp-product-card__name {
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--clr-ink);
    line-height: 1.35;
    margin: 0;
    letter-spacing: -0.005em;
}

.hp-product-card__name a {
    color: inherit;
    text-decoration: none;
}

.hp-product-card__name a:hover {
    color: var(--clr-brand-dark);
    text-decoration: none;
}

/* Price is the visual anchor — larger, display font. */
.hp-product-card__price {
    font-family: var(--font-display);
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--clr-ink);
    letter-spacing: -0.01em;
    margin: 0;
    line-height: 1.2;
}

.hp-product-card__price del,
.hp-product-card__price .woocommerce-Price-amount.amount + del {
    font-weight: 500;
    color: var(--clr-text-soft);
    font-size: 13px;
    margin-left: 6px;
}

.hp-product-card__footer {
    padding: var(--space-3) var(--space-4) var(--space-4);
}

.hp-product-card__footer .btn {
    width: 100%;
    justify-content: center;
}

/* Disabled state for out-of-stock product CTA */
.hp-product-card__footer .btn[aria-disabled="true"] {
    opacity: 0.55;
    pointer-events: none;
    cursor: default;
}


/* ============================================================================
 *  5. ADVANCE SUPPLIES — slim utility strip
 * ========================================================================== */

.hp-referral {
    background: var(--clr-surface);
    border-top: 1px solid var(--clr-border);
    border-bottom: 1px solid var(--clr-border);
    padding: var(--space-6) 0;
}

.hp-referral__inner {
    display: flex;
    align-items: center;
    gap: var(--space-5);
}

.hp-referral__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--clr-border);
    color: var(--clr-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hp-referral__copy {
    flex: 1;
    min-width: 0;
}

.hp-referral__headline {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--clr-ink);
    margin: 0 0 2px;
    line-height: 1.35;
}

.hp-referral__body {
    font-size: 13px;
    color: var(--clr-text-muted);
    margin: 0;
    line-height: 1.4;
}

.hp-referral__cta {
    flex-shrink: 0;
}


/* ============================================================================
 *  6. WHATSAPP CTA
 * ========================================================================== */

.hp-whatsapp {
    background: var(--clr-brand-tint);
    border-top: 1px solid rgba(26, 134, 72, 0.10);
    padding: var(--space-16) 0;
    position: relative;
    overflow: hidden;
}

.hp-whatsapp__bg {
    position: absolute;
    left: -160px;
    bottom: -160px;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(26, 134, 72, 0.12), rgba(26, 134, 72, 0) 65%);
    pointer-events: none;
}

.hp-whatsapp .container {
    position: relative;
    z-index: 1;
}

.hp-whatsapp__inner {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-5);
}

.hp-whatsapp__medallion {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--clr-brand);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 28px rgba(26, 134, 72, 0.32);
    margin-bottom: var(--space-1);
}

.hp-whatsapp__headline {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 1.6vw + 1.25rem, 2.5rem);   /* 28 → 40 */
    font-weight: 700;
    color: var(--clr-ink);
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin: 0;
}

.hp-whatsapp__headline-break {
    display: block;
}

.hp-whatsapp__sub {
    font-size: var(--font-size-md);
    color: var(--clr-text-muted);
    max-width: 460px;
    line-height: 1.55;
    margin: 0;
}

.hp-whatsapp__cta {
    margin-top: var(--space-2);
}

.hp-whatsapp__hours {
    font-size: var(--font-size-sm);
    color: var(--clr-text-muted);
    margin: 0;
}


/* ============================================================================
 *  RESPONSIVE
 * ========================================================================== */

@media (max-width: 1024px) {
    .hp-hero__grid {
        gap: var(--space-10);
    }
    .hp-trust__grid {
        grid-template-columns: repeat(5, 1fr);
        gap: var(--space-1);
    }
    .hp-categories__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .hp-products__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    /* HERO — stack, text first, media second */
    .hp-hero {
        padding: var(--space-12) 0;
    }
    .hp-hero__grid {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }
    .hp-hero__bg {
        width: 480px;
        height: 480px;
        top: -240px;
        right: -240px;
    }
    .hp-hero__ctas .btn {
        flex: 1;
        justify-content: center;
    }
    .hp-hero__microtrust {
        gap: var(--space-4);
    }
    .hp-hero__image {
        aspect-ratio: 4 / 3;
        max-width: 540px;
    }
    .hp-hero__chip {
        left: -8px;
        bottom: -8px;
        width: 160px;
    }

    /* TRUST — horizontal scroll snap, keeps the 5 items legible on mobile */
    .hp-trust {
        padding: 18px 0;
    }
    .hp-trust__grid {
        display: flex;
        grid-template-columns: none;
        overflow-x: auto;
        gap: var(--space-4);
        padding: 0 var(--container-px) 4px;
        margin: 0 calc(-1 * var(--container-px));
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .hp-trust__grid::-webkit-scrollbar { display: none; }
    .hp-trust-card {
        flex: 0 0 auto;
        width: 240px;
        scroll-snap-align: start;
        padding: 0;
    }

    /* CATEGORIES — 2-col, smaller tiles */
    .hp-categories {
        padding: var(--space-12) 0;
    }
    .hp-categories__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }
    .hp-category-card__icon-large {
        width: 44px;
        height: 44px;
    }
    .hp-category-card__title {
        font-size: var(--font-size-base);
    }

    /* PRODUCTS — 2-col, full-width "View all" at bottom */
    .hp-products {
        padding: var(--space-12) 0;
    }
    .hp-section-header--products .hp-section-viewall--desktop {
        display: none;
    }
    .hp-section-viewall--mobile {
        display: inline-flex;
        width: 100%;
        justify-content: center;
        margin-top: var(--space-6);
    }
    .hp-products__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    /* REFERRAL — stack */
    .hp-referral {
        padding: var(--space-5) 0;
    }
    .hp-referral__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
        text-align: left;
    }
    .hp-referral__icon {
        width: 36px;
        height: 36px;
    }
    .hp-referral__cta {
        width: 100%;
        justify-content: center;
    }

    /* WHATSAPP */
    .hp-whatsapp {
        padding: var(--space-12) 0;
    }
    .hp-whatsapp__medallion {
        width: 60px;
        height: 60px;
    }
    .hp-whatsapp__cta {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hp-hero__chip {
        position: static;
        width: auto;
        margin-top: var(--space-3);
        display: flex;
        align-items: center;
        gap: var(--space-3);
    }
    .hp-hero__chip-image {
        width: 56px;
        height: 56px;
        aspect-ratio: 1 / 1;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    .hp-hero__chip-body {
        flex: 1;
    }
}

