/* =============================================================================
   BT Product Discovery — Frontend
   Design language matches inc/product-accordions (same brand accent, same
   text colors) so this reads as native Yakulaas, not a bolted-on widget.
   ========================================================================== */

:root {
    --bt-disc-accent: #055B49;
    --bt-disc-accent-soft: #f0faf6;
    --bt-disc-text: #1a1a1a;
    --bt-disc-text-muted: #4b5563;
    --bt-disc-border: #e5e7eb;
    --bt-disc-cream: #f9f9f4;
}

/* ── SECTION HEADINGS (shared) ─────────────────────────────────────────── */

.bt-disc-home,
.bt-disc-product-section {
    margin: 40px 0;
}

.bt-disc-home-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--bt-disc-text);
    margin: 0 0 6px;
    text-align: center;
}

.bt-disc-home-sub {
    font-size: 15px;
    color: var(--bt-disc-text-muted);
    text-align: center;
    margin: 0 0 28px;
}

.bt-disc-product-section .bt-disc-home-title,
.bt-disc-product-section .bt-disc-home-sub {
    text-align: left;
}

/* ── HOMEPAGE TILES (4 tiles — 2x2 grid on mobile, one full-width row on
   desktop) ─────────────────────────────────────────────────────────────── */

.bt-disc-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bt-disc-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
    gap: 10px;
    padding: 20px 10px;
    background: var(--bt-disc-accent-soft);
    border: none;
    border-radius: 12px;
    text-decoration: none !important;
    text-align: center;
    font-family: inherit;
    font-size: inherit;
    line-height: normal;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.bt-disc-tile:hover {
    background: #e4f3ec;
    box-shadow: 0 4px 12px rgba(5, 91, 73, 0.12);
    transform: translateY(-2px);
}

.bt-disc-tile-icon {
    width: 42px;
    height: 42px;
    padding: 9px;
    box-sizing: border-box;
    background: var(--bt-disc-accent);
    border-radius: 50%;
    color: #fff;
    flex-shrink: 0;
}
.bt-disc-tile-icon svg { width: 100%; height: 100%; display: block; }

.bt-disc-tile-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.bt-disc-tile-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--bt-disc-text);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Repeats the label ("Shop Traditional Grains" vs "Traditional Grains") —
   dropped on mobile where the 2x2 tile is still fairly tight. Shown again
   on desktop below, where there's room for it. */
.bt-disc-tile-cta {
    display: none;
}

/* Desktop: one full-width row. No max-width cap — with only 4 tiles, a
   fixed cap left them bunched in a small cluster with dead space on either
   side on wide screens. Icon + stacked label/CTA instead of the label
   alone, since there's real room now. */
@media (min-width: 901px) {
    .bt-disc-tiles {
        display: flex;
        flex-wrap: nowrap;
        gap: 16px;
    }

    .bt-disc-tile {
        flex: 1 1 0;
        min-width: 0;
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 18px 20px;
        gap: 14px;
    }

    .bt-disc-tile-icon {
        width: 40px;
        height: 40px;
        padding: 9px;
    }

    .bt-disc-tile-text {
        min-width: 0;
        flex: 1;
    }

    .bt-disc-tile-label {
        font-size: 15px;
        -webkit-line-clamp: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .bt-disc-tile-cta {
        display: block;
        font-size: 12.5px;
        font-weight: 600;
        color: var(--bt-disc-accent);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* ── PRODUCT GRID / CARDS (shared everywhere) ─────────────────────────── */

.bt-disc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}

.bt-disc-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--bt-disc-border);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.15s;
}

.bt-disc-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.bt-disc-card-media img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.bt-disc-card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bt-disc-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--bt-disc-text);
    margin: 0;
    line-height: 1.35;
}

.bt-disc-card-blurb {
    font-size: 13px;
    color: var(--bt-disc-text-muted);
    line-height: 1.5;
    margin: 0;
}

.bt-disc-card-bestfor {
    font-size: 12.5px;
    color: var(--bt-disc-accent);
    background: var(--bt-disc-accent-soft);
    border-radius: 5px;
    padding: 5px 9px;
    margin: 2px 0 0;
    line-height: 1.4;
}
.bt-disc-card-bestfor span { font-weight: 700; }

.bt-disc-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--bt-disc-border);
}

.bt-disc-card-price {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    font-size: 14px;
    font-weight: 700;
    color: var(--bt-disc-accent);
    background: var(--bt-disc-accent-soft);
    padding: 4px 10px;
    border-radius: 20px;
}
.bt-disc-card-price del {
    font-size: 0.8em;
    font-weight: 400;
    color: var(--bt-disc-text-muted);
}
.bt-disc-card-price ins {
    text-decoration: none;
    color: var(--bt-disc-accent);
}

.bt-disc-card-cta {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--bt-disc-accent);
    /* Visible CTA text for accessibility; the text half hides on mobile
       (see below) so the card footer isn't cramped — the arrow stays. */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
}

/* Mobile: a normal 2-column grid that scrolls the page vertically like any
   other product grid, instead of a horizontal single-card-per-screen
   carousel. Card content is trimmed to fit — the blurb and the full CTA
   sentence are secondary copy that read fine on the product page itself. */
@media (max-width: 640px) {
    .bt-disc-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .bt-disc-card-body {
        padding: 10px 10px 12px;
        gap: 4px;
    }

    .bt-disc-card-title {
        font-size: 13px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .bt-disc-card-blurb {
        display: none;
    }

    .bt-disc-card-bestfor {
        font-size: 11px;
        padding: 4px 7px;
    }

    .bt-disc-card-footer {
        margin-top: 4px;
        padding-top: 8px;
    }

    .bt-disc-card-price {
        font-size: 13px;
    }

    .bt-disc-card-cta-text {
        display: none;
    }
}

.bt-disc-empty {
    font-size: 14px;
    color: var(--bt-disc-text-muted);
    text-align: center;
    padding: 20px;
}

/* ── PRODUCT PAGE SECTION ──────────────────────────────────────────────── */

.bt-disc-product-meta {
    background: var(--bt-disc-cream);
    border: 1px solid var(--bt-disc-border);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--bt-disc-text);
    line-height: 1.6;
}
.bt-disc-product-meta p { margin: 0 0 6px; }
.bt-disc-product-meta p:last-child { margin-bottom: 0; }

.bt-disc-product-related-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--bt-disc-text);
    margin: 0 0 12px;
}

/* ── RECIPE → PRODUCT CTA ──────────────────────────────────────────────── */

.bt-disc-recipe-cta {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bt-disc-cream);
    border: 1px solid var(--bt-disc-border);
    border-radius: 10px;
    padding: 16px;
    margin: 24px 0;
}

.bt-disc-recipe-cta-media img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.bt-disc-recipe-cta-heading {
    font-size: 13px;
    color: var(--bt-disc-text-muted);
    margin: 0 0 2px;
}

.bt-disc-recipe-cta-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--bt-disc-text);
    margin: 0 0 8px;
}

.bt-disc-recipe-cta-btn {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: #fff !important;
    background: var(--bt-disc-accent);
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none !important;
}

/* Very narrow phones (~360px and under) — stack instead of cramping a
   72px image next to text in a fixed row. */
@media (max-width: 380px) {
    .bt-disc-recipe-cta {
        flex-direction: column;
        align-items: flex-start;
    }
    .bt-disc-recipe-cta-media img {
        width: 56px;
        height: 56px;
    }
}