/* Tendlio - storefront (Experimental).
   Deliberately tiny: the recommended products render through the active theme's
   own product-card template (ul.products), so the theme owns the look. We only
   add spacing + a heading so the section sits cleanly on the product page. */

.tendlio-bt {
    margin: 2.5em 0;
    clear: both;
}
.tendlio-bt__title {
    margin: 0 0 1em;
}
/* Let the theme's ul.products grid do the layout; just neutralise stray margins. */
.tendlio-bt__list.products {
    margin-bottom: 0;
}

/* Recommendation slider: a horizontal scroll-snap row. Card width follows the
   desktop / mobile column counts (CSS vars set inline). On desktop the cards divide
   evenly (no peek) - the arrows are the cue there's more (Alex). On mobile, where
   there are no arrows, cards sit a touch under an even division so the NEXT card
   peeks, which is the swipe cue. No JS lib (§5): native scroll + scroll-snap;
   storefront.js only wires the desktop arrows. */
.tendlio-bt__slider { position: relative; }
.tendlio-bt__list.tendlio-bt--slider {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 1em;
    margin: 0 !important;
    padding: 0 0 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.tendlio-bt__list.tendlio-bt--slider > li.product {
    flex: 0 0 calc(100% / var(--tendlio-cols, 4)) !important; /* desktop: even, no peek (arrows are the cue) */
    max-width: none !important;
    width: auto !important;
    margin: 0 !important;
    scroll-snap-align: start;
}
@media (max-width: 768px) {
    .tendlio-bt__list.tendlio-bt--slider > li.product {
        flex-basis: calc(100% / (var(--tendlio-cols-m, 2) + 0.3)) !important;
    }
}

/* Desktop prev/next arrows. Hidden by default; storefront.js shows them only when
   the row overflows and toggles [hidden] at each end. Mobile uses swipe, no arrows. */
.tendlio-bt__arrow {
    position: absolute; top: 38%; z-index: 2;
    width: 36px; height: 36px; padding: 0; border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.12); background: #fff; color: #111;
    font-size: 20px; line-height: 34px; text-align: center; cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15); display: none;
}
.tendlio-bt__slider.tendlio-bt--has-overflow .tendlio-bt__arrow:not([hidden]) { display: block; }
.tendlio-bt__arrow--prev { left: -6px; }
.tendlio-bt__arrow--next { right: -6px; }
@media (max-width: 768px) {
    .tendlio-bt__arrow { display: none !important; }
}

/* In-stock alternatives: the out-of-stock prompt near the (greyed-out) cart area.
   Theme-inherit: currentColor picks up the theme's own text colour. */
.tendlio-alt-oos { margin: 12px 0; }
.tendlio-alt-oos a {
    display: inline-block; font-weight: 600; text-decoration: none;
    padding: 8px 14px; border: 1px solid currentColor; border-radius: 6px;
}
.tendlio-alt-oos a:hover { text-decoration: underline; }

/* Deals page [tendlio_deals]: the grid is the theme's own ul.products; we only
   centre the Load more button. */
.tendlio-deals__more { text-align: center; margin: 22px 0; }
.tendlio-deals-empty { padding: 20px 0; }

/* Smart 404 suggestions block. */
.tendlio-404-suggest { margin: 28px auto; max-width: 1200px; }

/* "Claim your free gift" on the cart. A distinct REWARD band (not a recommendation
   row): a tinted, bordered box at the top of the cart with smaller cards, so it
   reads as "you've earned a gift", not a third "shop more" slider. Reuses the slider
   shell so the scroll-snap + arrows still work; cards are custom (free + Claim). */
.tendlio-giftslider {
    margin: 0 0 1.8em;
    padding: 14px 18px 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    background: rgba(255, 196, 0, 0.07); /* faint gift tint, subtle on most themes */
}
.tendlio-giftslider .tendlio-bt__title { margin: 0 0 0.6em; font-size: 1.05em; }
.tendlio-bt__list.tendlio-bt--slider > li.tendlio-gift-card {
    flex: 0 0 calc(100% / var(--tendlio-cols, 6));
    max-width: none; width: auto; margin: 0;
    scroll-snap-align: start; list-style: none;
    text-align: center; padding: 4px;
}
@media (max-width: 768px) {
    .tendlio-bt__list.tendlio-bt--slider > li.tendlio-gift-card {
        flex-basis: calc(100% / (var(--tendlio-cols-m, 2) + 0.3));
    }
}
.tendlio-gift-card__img img { width: 100%; height: auto; border-radius: 6px; display: block; }
.tendlio-gift-card__name { font-size: 0.82em; margin: 5px 0 2px; line-height: 1.2; }
.tendlio-gift-card__free { font-size: 0.8em; font-weight: 700; letter-spacing: .05em; opacity: .85; margin-bottom: 5px; }
.tendlio-gift-claim { width: 100%; padding: 4px 6px; font-size: 0.85em; }
.tendlio-cartrec-note {
    margin: 16px 0;
    padding: 10px 12px;
    border-left: 3px solid #4a90d9;
    background: #f4f8fc;
    color: #3c434a;
    font-size: 14px;
}
