.product-thumbnail img {
    max-width: 255px;
    height: 255px;
    object-fit: contain;
    filter: brightness(95%);
}
.middle-ribbon .product-thumbnail img {
    filter: brightness(98%);
}
.middle-ribbon .product-thumbnail {
    background: #fcfcfc;
}
.product-thumbnail {
    text-align: center;
    border-radius: 8px;
    background: #f2f2f2;
    height: 255px;
    position: relative;
}
/* Admin cart trigger sits inline next to the Exclude button. Square pill
   the same height as Exclude so they line up; tap to add/remove the ASIN
   from the floating cart. */
.cart-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 1px solid #c8c8c8;
    background: #fff;
    color: #333;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
    flex-shrink: 0;
}
.cart-toggle-btn:hover { background: #f5f5f5; }
.cart-toggle-btn.is-in-cart {
    background: var(--theme-bg-strong-color, #d98641);
    color: #fff;
    border-color: var(--theme-bg-strong-color, #d98641);
}
.cart-toggle-btn.is-in-cart:hover { background: var(--theme-bg-color-light, #bf711d); }
/* Floating admin cart (bottom-right). Sits *above* the back-to-top button
   so the two don't overlap when both are visible. FAB is always-on once
   items are added; the expandable panel pops above it. */
.admin-cart-wrap {
    position: fixed;
    right: 1.5rem;
    bottom: 5rem;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}
@media (max-width: 600px) {
    /* On phones .back-to-top is bigger and sits at bottom: 5rem, so push the
       cart further up to keep clear of it. */
    .admin-cart-wrap { bottom: 10rem; }
}
.admin-cart-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--theme-bg-strong-color, #d98641);
    color: #fff;
    font-size: 22px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.admin-cart-fab:hover { transform: translateY(-2px); }
.admin-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #fff;
    color: var(--theme-bg-strong-color, #d98641);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 7px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.admin-cart-panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
    width: min(360px, 90vw);
    max-height: 60vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.admin-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid #ececec;
    font-size: 14px;
}
.admin-cart-empty {
    padding: 18px 14px;
    text-align: center;
    color: #888;
    font-size: 13px;
}
.admin-cart-list {
    list-style: none;
    padding: 6px 0;
    margin: 0;
    overflow-y: auto;
    flex: 1;
}
.admin-cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-bottom: 1px solid #f4f4f4;
}
.admin-cart-item:last-child { border-bottom: none; }
.admin-cart-item img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    background: #fafafa;
    border-radius: 6px;
    flex-shrink: 0;
}
.admin-cart-meta { flex: 1; min-width: 0; }
.admin-cart-title {
    font-size: 13px;
    line-height: 1.3;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.admin-cart-asin { font-size: 11px; color: #888; margin-top: 2px; }
.admin-cart-remove {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(180, 30, 30, 0.1);
    color: #b41e1e;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.admin-cart-remove:hover { background: rgba(180, 30, 30, 0.2); }
.admin-cart-footer {
    padding: 10px 14px;
    font-size: 12px;
    color: #666;
    border-top: 1px solid #ececec;
    background: #fafafa;
}
.product {
    border: 1px solid #f2f2f2;
    border-radius: 8px;
    position: relative;
    max-width: 600px;
    background: #f8f8f8;
}
.product.sticky {
    border: 2px solid orange;
}
.product .badge-orange {
    background: orange !important;
    top: 0px !important;
}
.product-title {
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}
.product-title:hover,
.product-title:active {
    color: #bf711d;
}
.product .sick-deal-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #666;
    font-size: 9.5px;
    line-height: 1.1;
    pointer-events: none;
    /* Tuck into the card's top-right corner: match the card radius on the outer corner,
       round the inner (bottom-left) corner so it reads as a corner ribbon. */
    border-radius: 0 8px 0 6px;
    padding: 2px 6px;
}
.product .sick-deal-badge .bi { font-size: 0.9em; }
/* Tiny corner cue that a coupon exists. The discount value + Copy button live in the
   price area; this is just a glance-icon to flag the product even before the user
   reads the price row. Brand orange so the cue blends with the site theme. */
.coupon-marker {
    position: absolute;
    top: 1px;
    left: 8px;
    background: var(--theme-bg-color, #f29c55);
    color: #fff;
    font-size: 13px;
    pointer-events: none;
    border-radius: 0 0 6px 6px;
    padding: 3px 6px;
}

/* A "second chip" rendered in the price area beside the regular discount, so a coupon
   reads like a real discount instead of a side note. Theme orange. */
.product-price-discount.coupon-extra,
.scroll-discount.coupon-extra {
    background: var(--theme-bg-color, #f29c55);
    color: #fff;
}
.product-price-discount.coupon-extra .bi,
.scroll-discount.coupon-extra .bi {
    margin-right: 3px;
    font-size: 0.9em;
}

/* Copy-coupon button. Placed right under the price so the action is obviously
   connected to the chip above. Code-coupon variant shows the code inside a <code>
   pill; URL-coupon variant is a plain "Apply coupon" link button. */
.coupon-action {
    margin-top: 6px;
}
/* The card carries both coupon labels; only one is ever visible. See the phone override in
   the max-width:520px block, where the button collapses to icon + discount. */
.coupon-btn-short { display: none; }

/* ===== Product detail page ===== */
.pd-breadcrumb {
    margin: 15px 0 4px;
    font-size: 14px;
    color: #888;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.pd-breadcrumb a { color: #555; text-decoration: none; }
.pd-breadcrumb a:hover { color: var(--theme-bg-color, #bf711d); text-decoration: underline; }
.pd-breadcrumb a:first-child { font-weight: 600; }
.pd-crumb-sep { color: #ccc; }

.pd-top {
    display: flex;
    align-items: stretch;   /* sidebar stretches to the details column's height */
    gap: 24px;
    margin-top: 16px;
    /* Floor for sparse products (e.g. only a current price): keeps the Top Deals column
       tall enough to show several items and leaves natural padding under the details. */
    min-height: 480px;
    margin-bottom: 12px;
}
/* Details takes its content width (image + a comfortable info column); it does NOT
   grow, so the leftover space goes to the Top Deals sidebar instead of stretching the
   price box. */
.pd-details { flex: 1 1 auto; min-width: 0; }   /* middle stretches, pushing the sidebar to the right */
.pd-details-grid {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.pd-hero {
    position: relative;
    /* Hug the image instead of reserving a fixed 42% column — otherwise there's dead
       space between the image and the details. The image's own max-width sets the size. */
    flex: 0 0 auto;
    text-align: left;
}
.pd-hero img {
    width: auto;
    max-width: 340px;
    max-height: 380px;
    object-fit: contain;
}
/* Comfortable info column width so the price box doesn't stretch the whole page. */
.pd-info { flex: 1 1 auto; min-width: 0; }   /* stretch to fill the details column */
/* Brand on its own bold line, title (rest) smaller below it. */
.pd-brand-name { font-weight: 800; font-size: 1.15rem; margin: 0 0 2px; }
.pd-name { font-size: 1.02rem; font-weight: 600; line-height: 1.35; color: #333; margin: 0 0 14px; }
/* Title row: clamped to one line with a chevron to expand the full description. */
.pd-name-row { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 14px; }
.pd-name-row .pd-name { flex: 1 1 auto; min-width: 0; margin-bottom: 0; }
.pd-name.clamped {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pd-name-toggle {
    flex: 0 0 auto;
    border: none;
    background: none;
    cursor: pointer;
    color: #888;
    padding: 2px 4px;
    line-height: 1.35;
}
.pd-name-toggle .bi { transition: transform 0.15s ease; display: inline-block; }
.pd-name-toggle.open .bi { transform: rotate(180deg); }

.pd-prices {
    border: 1px solid #f8f8f8;   /* nearly invisible — the left accent does the framing */
    border-left: 4px solid var(--theme-bg-color, #f29c55);   /* quote-box accent on the left */
    border-radius: 0;
    padding: 0;
    margin-bottom: 16px;
    background: #fff;
    overflow: hidden;
}
.pd-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
}
/* Zebra-striped rows, starting white — barely-there tint so it doesn't strike. */
.pd-price-row:nth-child(even) { background: #fbfbfb; }
.pd-price-label { color: #777; font-size: 14px; min-width: 110px; }
/* Shown while prices are converted (COP): what Amazon charges, in USD. */
.pd-price-usd-note { color: #777; font-size: 13px; }
.pd-price-strike { color: #999; text-decoration: line-through; }
.pd-price-current { font-size: 20px; font-weight: 700; }
.pd-price-coupon .pd-coupon-amount {
    color: #fff;
    background: var(--theme-bg-color, #f29c55);
    padding: 2px 10px;
    border-radius: 6px;
    font-weight: 700;
}
.pd-price-final { border-top: 1px dashed #e0e0e0; }
/* Coupon-product price when the seller offer is missing, and the coupon expiry row. */
.price-unavailable { color: #999; font-style: italic; font-size: 14px; }
.pd-coupon-expiry-date { color: #777; font-size: 13px; }
.pd-coupon-expiry-date .bi { margin-right: 2px; }
.pd-final-amount { font-size: 24px; font-weight: 900; color: #1d7c4d; }

.pd-coupon-action { margin-bottom: 14px; }

/* Two-step CTA row: [1 peel coupon card]  →  [2 Amazon preview card]. The two cards sit
   side by side on EVERY screen size; both are column cards with a button bar at the bottom. */
.pd-cta-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-top: 6px;
    max-width: 560px;
}
/* Numbered step badge — translucent disc on the orange button bars. */
.pd-step {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}
.pd-cta-bar .pd-cta-label { min-width: 0; }
/* The order arrow between the two cards. */
.pd-cta-arrow {
    flex: 0 0 auto;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-bg-strong-color, #d98641);
    font-size: 20px;
}
/* Both cards share the fused card chrome and split the row width. */
.pd-cta-row .pd-amazon-go,
.pd-coupon-go {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
}
.pd-coupon-go {
    display: inline-flex;
    flex-direction: column;
    padding: 0;
    text-decoration: none;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pd-coupon-go:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}
/* Bottom button bar shared by both cards (mirrors .pd-amzn-btn). The scoped rule below
   beats .coupon-btn/.btn radii so the bar stays square and fused to the card. */
.pd-coupon-go .pd-cta-bar,
.pd-amazon-go .pd-cta-bar { border-radius: 0; }
.pd-cta-bar {
    border-radius: 0;
    width: 100%;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 10px;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.2;
    white-space: normal;
    text-align: center;
}

/* --- Peel-to-reveal coupon ticket -------------------------------------------------- */
.pd-peel-ticket {
    position: relative;
    flex: 1;
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    overflow: hidden;
}
/* The code printed "under" the cover. */
.pd-peel-code {
    font-family: Consolas, Menlo, monospace;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #5c4632;
    background: #fdf0e4;
    border: 1px dashed var(--theme-bg-color, #f29c55);
    border-radius: 6px;
    padding: 6px 12px;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* The peelable cover: soft orange with a lifted corner inviting the pull. */
.pd-peel-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: linear-gradient(135deg, #f8b878 0%, var(--theme-bg-color, #f29c55) 100%);
    color: #fff;
    transform-origin: bottom left;
    transition: transform 0.45s ease, opacity 0.35s ease;
}
.pd-peel-cover .bi-ticket-perforated-fill { font-size: 22px; }
.pd-peel-hint { font-size: 12px; font-weight: 700; letter-spacing: 0.4px; }
/* Folded-up corner (bottom-right) signalling "you can lift this". */
.pd-peel-cover::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    border-style: solid;
    border-width: 0 0 26px 26px;
    border-color: transparent transparent #fff transparent;
    filter: drop-shadow(-2px -2px 2px rgba(0, 0, 0, 0.18));
}
/* Peeled: the cover lifts away (rotating off like a sticker), revealing the code. */
.pd-coupon-go.peeled .pd-peel-cover {
    transform: rotate(-24deg) translate(-18%, -130%);
    opacity: 0;
    pointer-events: none;
}

.pd-reveal-btn { cursor: pointer; }
.pd-reveal-btn .pd-reveal-code {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
    font-size: 13px;
}
.pd-coupon-hint { font-size: 12px; color: #999; margin-top: 4px; }
.pd-coupon-guide-link {
    color: var(--link-color, #0077cc);
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
    white-space: nowrap;
}
.pd-coupon-guide-link:hover { text-decoration: underline; }
.pd-amazon { margin-top: 4px; display: flex; justify-content: flex-start; }

/* "Go to Amazon" CTA fused with a mini mock of the Amazon product page: dark Amazon
   navbar (logo + search pill + cart), white body with the real product image and a
   skeleton buy button. The whole thing is one link. */
.pd-amazon-go {
    display: inline-flex;
    flex-direction: column;
    width: 240px;
    text-decoration: none;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pd-amazon-go:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}
.pd-amzn-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #232f3e;          /* Amazon's dark navbar */
    color: #fff;
    padding: 6px 10px;
}
.pd-amzn-bar .bi-amazon { font-size: 17px; color: #ff9900; }
.pd-amzn-bar .bi-cart3 { font-size: 13px; color: #fff; }
.pd-amzn-search {
    flex: 1;
    height: 10px;
    border-radius: 5px;
    background: #fff;
    opacity: 0.92;
}
.pd-amzn-body {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 10px 12px;
}
.pd-amzn-body img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex: 0 0 44px;
}
.pd-amzn-lines { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.pd-amzn-line { height: 7px; border-radius: 4px; background: #e9e9e9; }
.pd-amzn-line.short { width: 60%; }
.pd-amzn-buy {
    height: 12px;
    width: 70%;
    border-radius: 6px;
    background: #e9e9e9;          /* same neutral gray as the text-line skeletons */
    margin-top: 2px;
}
/* The CTA itself fuses with the preview (no top radius, no gap). */
.pd-amazon-go .pd-amzn-btn {
    border-radius: 0;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Right sidebar — grows to fill the space left after image + details, scrolls within
   the details column's height. */
.pd-sidebar {
    position: relative;
    flex: 0 0 270px;   /* compact fixed column; details takes the rest */
    min-width: 0;
}
.pd-sidebar-inner {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}
.pd-sidebar-title, .pd-related-title {
    font-size: 1.05rem;
    font-weight: 700;
}
.pd-head-icon {
    margin-right: 8px;
    color: var(--theme-bg-strong-color, #bf711d);
    /* Bootstrap glyphs sit small inside their em box — bump them so they visually
       match the heading text height. */
    font-size: 1.15em;
    vertical-align: -0.05em;
}

/* Product image links straight to the Amazon listing. */
.pd-hero-link { display: contents; }
.pd-hero img { cursor: pointer; }
/* Related-products header keeps the light bar. */
.pd-related-title {
    margin: 0 0 12px;
    padding: 8px 12px;
    background: #fbfbfb;   /* barely-there tint */
    border-radius: 8px 8px 0 0;
}
/* Sidebar title is just a heading (no background bar), single line + ellipsis. */
.pd-sidebar-title {
    margin: 0 0 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Compact product card used in both sidebar and related grid */
.pd-card {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.15s;
}
.pd-card:hover { background: #f6f6f6; color: inherit; }
.pd-card-img { position: relative; flex: 0 0 64px; width: 64px; height: 64px; }
.pd-card-img img { width: 100%; height: 100%; object-fit: contain; }
.pd-card-img .coupon-marker { top: -2px; left: -2px; padding: 2px 5px; font-size: 11px; }
.pd-card-body { min-width: 0; flex: 1; }
.pd-card-brand { font-weight: 700; font-size: 12px; }
.pd-card-title {
    font-size: 13px; line-height: 1.3; margin: 2px 0 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pd-card-price { font-size: 13px; }

/* Desktop "Top Deals" sidebar cards: ~2/3 size so more fit in the column. Scoped to the
   sidebar so the related-products grid (which reuses .pd-card) is unaffected. The mobile
   media query below overrides these with the vertical mini-card layout. */
.pd-sidebar-cards .pd-card { padding: 6px; gap: 8px; }
.pd-sidebar-cards .pd-card-img { flex: 0 0 44px; width: 44px; height: 44px; }
.pd-sidebar-cards .pd-card-brand { font-size: 11px; }
.pd-sidebar-cards .pd-card-title {
    font-size: 12px;
    /* One line, ellipsized — the narrow sidebar can't fit more. */
    display: block;
    -webkit-line-clamp: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pd-sidebar-cards .pd-card-price { font-size: 12px; }

/* Extra homepage rows (horizontal) shown above the related-products grid. */
.pd-extra-rows { margin-top: 32px; }
.pd-extra-rows .pd-extra-row-app { margin-bottom: 20px; }
/* Coupon-titled homepage rows embedded in the /cupones guide page. */
.cg-coupon-rows .cg-coupon-row-app { margin-bottom: 20px; }

.pd-related {
    margin-top: 28px;
}

/* Admin sections collapsed by default via <details>, with a light header bar. */
.pd-admin-sep { border: 0; border-top: 1px solid #f0f0f0; }
.pd-admin-details > summary {
    cursor: pointer;
    list-style: none;
    font-size: 1rem;
    font-weight: 700;
    color: #555;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 8px 8px 0 0;   /* square bottom — reads as a header */
}
.pd-admin-details > summary::-webkit-details-marker { display: none; }
.pd-admin-chev {
    display: inline-block;
    margin-right: 6px;
    font-size: 0.85em;
    color: #999;
    transition: transform 0.15s ease;
}
.pd-admin-details[open] > summary { margin-bottom: 12px; }
.pd-admin-details[open] > summary .pd-admin-chev { transform: rotate(90deg); }
.pd-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);   /* 4 per row, bigger cards */
    gap: 16px;
    padding-left: 12px;   /* align cards with the section title text */
}
/* Related cards are vertical (big image on top) for visibility, vs the compact
   horizontal cards used in the sidebar. */
.pd-related-grid .pd-card {
    flex-direction: column;
    padding: 10px;
    border: 1px solid #eee;
}
.pd-related-grid .pd-card-img {
    flex: none;
    width: 100%;
    height: 150px;
}
.pd-related-grid .pd-card-title {
    -webkit-line-clamp: 3;
    font-size: 14px;
}
.pd-related-grid .pd-card-price { font-size: 14px; }
@media (max-width: 900px) {
    .pd-related-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .pd-related-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Stack on narrow screens: sidebar drops below the details. */
@media (max-width: 768px) {
    .pd-top { flex-direction: column; gap: 12px; min-height: 0; }   /* tighter gap; no desktop height floor */
    /* Reset the horizontal flex-basis values — in a column they'd become VERTICAL sizes
       and reserve huge empty height. Everything sizes to its content instead. */
    .pd-details { flex: 0 0 auto; }
    .pd-details-grid { flex-direction: column; align-items: stretch; position: relative; }
    .pd-info { flex: 0 0 auto; }
    /* Image centered on the page. Column, not row: the favourite/share row is a flow child
       now (it used to be absolutely positioned over the image), and in a row flexbox it
       would land BESIDE the image instead of under it. */
    .pd-hero { flex: 0 0 auto; max-width: 100%; display: flex; flex-direction: column; align-items: center; }
    /* Image ~40% smaller on mobile. */
    .pd-hero img { max-width: 200px; max-height: 230px; }
    .pd-hero-actions { justify-content: center; }

    .pd-sidebar { flex: 0 0 auto; max-width: 100%; }
    .pd-sidebar-inner { position: static; max-height: none; overflow: visible; padding: 10px 0 0; border: none; box-shadow: none; }
    /* Right category becomes a horizontal scroll strip instead of a vertical list. */
    .pd-sidebar-cards {
        display: flex;
        flex-direction: row;
        gap: 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        padding-bottom: 6px;
    }
    /* Compact horizontal card in the scroll strip, a notch smaller than desktop. */
    .pd-sidebar-cards .pd-card {
        flex: 0 0 auto;
        width: 140px;
        scroll-snap-align: start;
        border: 1px solid #eee;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
        padding: 5px;
        gap: 6px;
    }
    .pd-sidebar-cards .pd-card-img { flex: 0 0 36px; width: 36px; height: 36px; }
    .pd-sidebar-cards .pd-card-brand { font-size: 10px; }
    .pd-sidebar-cards .pd-card-title { font-size: 11px; }
    .pd-sidebar-cards .pd-card-price { font-size: 11px; }
}
.coupon-btn {
    background: var(--theme-bg-color, #f29c55);
    color: #fff;
    font-weight: 600;
    font-size: 12.5px;
    line-height: 1.2;
    padding: 5px 10px;
    border-radius: 6px;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    /* Keep the label on one line so the button stays compact instead of ballooning
       into a multi-line block. */
    white-space: nowrap;
}
.coupon-btn:hover, .coupon-btn:focus {
    background: #bf711d;  /* darker theme accent for hover */
    color: #fff;
    text-decoration: none;
}
.coupon-btn code {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 12px;
}
.coupon-btn.copied {
    background: #bf711d;
}
.coupon-btn.copied::after {
    content: ' \2713';  /* checkmark */
    margin-left: 4px;
}

/* ---- "Copiado!" celebration: pop + glow on the label, plus a sparkle burst ---- */
/* The `pd-celebrate` class is added on copy and removed when the label reverts to
   the code, so the animation only runs while the confirmation is showing. */
@keyframes pd-copied-pop {
    0%   { transform: scale(0.5); }
    50%  { transform: scale(1.25); }
    72%  { transform: scale(0.92); }
    100% { transform: scale(1); }
}
@keyframes pd-copied-glow {
    0%, 100% { text-shadow: 0 0 4px rgba(255, 214, 130, 0.5); }
    50%      { text-shadow: 0 0 12px rgba(255, 214, 130, 1), 0 0 4px rgba(255, 255, 255, 0.9); }
}
.coupon-btn.pd-celebrate .pd-reveal-label {
    display: inline-block;
    font-weight: 800;
    animation: pd-copied-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.5) both,
               pd-copied-glow 1.3s ease-in-out 0.5s infinite;
}

/* Sparkle particles — rendered in a fixed full-screen layer centered on the button
   so the button's own overflow:hidden can't clip them. Each particle flies outward
   along a per-particle (--dx,--dy) vector then fades. */
.pd-sparkle-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
}
.pd-sparkle {
    position: fixed;
    font-size: 16px;
    line-height: 1;
    will-change: transform, opacity;
    animation: pd-sparkle-burst 0.95s ease-out forwards;
}
@keyframes pd-sparkle-burst {
    0%   { transform: translate(-50%, -50%) scale(0) rotate(0deg); opacity: 0; }
    25%  { opacity: 1; }
    60%  { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.2) rotate(120deg); opacity: 1; }
    100% { transform: translate(calc(-50% + var(--dx) * 1.35), calc(-50% + var(--dy) * 1.35)) scale(0.2) rotate(220deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .coupon-btn.pd-celebrate .pd-reveal-label { animation: none; }
    .pd-sparkle { display: none; }
}

/* Admin-only banner that appears under the price when an ASIN lookup returned a
   product that isn't a live deal. Visually subdued — not a hot deal, just a result. */
.not-a-deal-notice {
    margin-top: 8px;
    padding: 6px 10px;
    border-left: 3px solid #bf711d;
    background: #fff4e6;
    color: #6c4318;
    font-size: 13px;
    border-radius: 0 4px 4px 0;
}
.not-a-deal-notice .bi {
    margin-right: 4px;
}
.not-a-deal-reasons {
    font-size: 11.5px;
    color: #8a6b3d;
    margin-top: 2px;
}
.product-grid {
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* Vertical <product-row> list (e.g. the product-detail "Top Deals" sidebar). */
/* Compact accented header: smaller type on a soft orange strip with a theme accent bar. */
.product-row.pr-vertical .section-header { margin-bottom: 10px; }
.product-row.pr-vertical .section-header h3 {
    flex: 1;
    min-width: 0;
    font-size: 13.5px;
    font-weight: 700;
    color: #5c4632;
    background: #fdf0e4;
    border-left: 3px solid var(--theme-bg-color, #f29c55);
    border-radius: 0 6px 6px 0;
    padding: 8px 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pr-vlist { display: flex; flex-direction: column; gap: 8px; }
.pr-vcard {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    padding: 6px;
    border-radius: 8px;
}
.pr-vcard:hover { background: #f6f6f6; color: inherit; }
.pr-vcard-img {
    position: relative;
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    background: #f6f6f6;
    border-radius: 6px;
}
.pr-vcard-img img { width: 100%; height: 100%; object-fit: contain; }
.pr-vcard-body { min-width: 0; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.pr-vcard-title {
    font-size: 12.5px;
    line-height: 1.3;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pr-vcard-price { font-size: 13px; font-weight: 700; margin-top: 2px; }
.pr-vcard-price .product-price-discount { font-size: 11px; padding: 1px 4px; margin: 0 2px 0 0; }
.pr-vcard-price .product-price { font-size: 13px; }
.pr-vcard-price .product-price-before { font-size: 11px; }

/* Heart toggle. No longer overlaid on the artwork — it lives in the .card-actions bar
   below, so it lays out in normal flow. */
.fav-heart {
    width: 30px;
    height: 30px;
    /* Without this the UA's default button padding inflates the circle past its box. */
    padding: 0;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    font-size: 15px;
    transition: transform 0.12s ease, color 0.12s ease;
}
.fav-heart:hover { transform: scale(1.12); color: #e0245e; }
.fav-heart.is-fav { color: #e0245e; }
/* Static (non-Vue) hearts carry both icons; .is-fav (set by favorites.js) swaps them. */
.fav-heart .fav-ico-full { display: none; }
.fav-heart.is-fav .fav-ico-empty { display: none; }
.fav-heart.is-fav .fav-ico-full { display: inline; }
/* Favourite + share. Overlaid on the artwork these two buttons covered a good part of the
   product and sat on top of the card's link, so a near-miss opened the deal instead of
   toggling. They now sit in the card's bottom-right corner — a dead zone no <a> spans —
   and they claim NO new height: every card type already has slack down there (a stretched
   grid row, the empty foot of the deal panel, the end of a list row). */
.card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}
/* A flat outline instead of the floating-pill look they needed against artwork. */
.card-actions .fav-heart,
.card-actions .puntos-share {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    font-size: 13px;
    background: #fff;
    border: 1px solid #e6e6e6;
    box-shadow: none;
}
.card-actions .fav-heart:hover { transform: none; background: #fff5f7; border-color: #f3c6d2; }
.card-actions .puntos-share:hover { background: #fff8f2; border-color: #f0cba6; }

/* Operator-only card buttons (copy ASIN, open detail page). Same footprint as the heart so
   the bar stays one row, but visually quieter — these are tools, not calls to action. */
.card-actions .card-admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #e6e6e6;
    border-radius: 50%;
    background: #fff;
    color: #8a8a8a;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
}
.card-actions .card-admin-btn:hover { background: #f4f6f8; color: #333; border-color: #ccd3da; }
.card-actions .card-admin-btn.is-copied { color: #198754; border-color: #a9d6bd; background: #f2fbf6; }
.card-actions .card-admin-btn.is-failed { color: #dc3545; border-color: #f0b4bb; background: #fdf3f4; }
/* Phones: match the 24px the other card buttons drop to (see the max-width:520px block). */
@media (max-width: 520px) {
    .product > .card-actions .card-admin-btn { width: 24px; height: 24px; font-size: 11px; }
}

/* Grid cards: pinned to the bottom-right corner. With the admin row present that lands the
   buttons in the same band as Exclude/+ rather than below it; without it they drop into the
   slack a stretched grid row already leaves under the text. */
.product > .card-actions { position: absolute; right: 8px; bottom: 6px; z-index: 2; }
/* Keep the last text row out from under the corner. */
.product-description > *:last-child { padding-right: 70px; }

/* Row cards: the whole media block is a single link, so bare buttons are not enough — a tap
   that misses a 26px circle still opens the deal. This is a shield, not a chip: it spans the
   deal panel's empty foot (same 32% basis as the panel) and sits above the link, so every
   click in that band is swallowed and the entire corner is inert, not just the icons.
   Height 30px fits inside the 32px the centred panel text leaves free, so it still costs the
   card nothing. */
.scroll-product-card { position: relative; }
.scroll-card-actions {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 32%;
    height: 30px;
    padding-right: 6px;
    gap: 6px;
    z-index: 2;
    /* Square, deliberately: a rounded top-left corner read as an odd white notch cutting
       into the orange, and border-radius clips hit-testing too, so the corner it rounded
       off fell through to the link behind. A plain band avoids both. The card's own
       overflow:hidden still rounds the outer bottom-right corner. */
    background: #fff;
}
.scroll-card-actions .fav-heart,
.scroll-card-actions .puntos-share { width: 26px; height: 26px; font-size: 12px; }
.scroll-card-link { display: block; text-decoration: none; color: inherit; }
.scroll-card-link:hover { color: inherit; }

/* Vertical list rows: the buttons cap the row, level with the 56px thumbnail — no divider
   and no extra height, since the row is already taller than a 28px button. */
.pr-vcard-link { display: flex; gap: 10px; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.pr-vcard-link:hover { color: inherit; }
/* Left padding is dead space between the link's edge and the first button, so a near-miss
   there does nothing instead of opening the deal. */
.pr-vcard > .card-actions {
    align-self: center;
    padding: 6px 2px 6px 10px;
    /* Wrap into two columns. With the two admin buttons, a four-in-a-row bar (~130px) ate
       the narrow sidebar's whole body width — the title clamped to nothing and the icons sat
       on top of the badge and price. A 2×2 block is ~62px wide and ~62px tall: level with the
       56px thumbnail, and it leaves the body its room. Two buttons (visitors) still fit one
       row inside the same cap. */
    flex: 0 0 auto;
    /* An explicit 2-column grid rather than flex-wrap + a width cap: the heart/share are
       30px and the admin buttons 28px, so a pixel cap either wrapped one-per-row or fit
       three — the grid gives 2×2 regardless of button size. */
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 6px;
    justify-content: end;
}
/* Compact buttons in the sidebar list: a 2×2 of 24px (54px tall with the gap) sits inside
   the 56px thumbnail, so the row never grows past the artwork. */
.pr-vcard > .card-actions .fav-heart,
.pr-vcard > .card-actions .puntos-share,
.pr-vcard > .card-actions .card-admin-btn {
    width: 24px;
    height: 24px;
    font-size: 12px;
}

/* Detail-page favorite button (label + heart, toggles via .is-fav). */
.pd-title-block { min-width: 0; }
/* Favourite + share row under the product image. These used to be pinned on top of the
   image, which sat a tap target on the link out to Amazon. */
.pd-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}
.pd-fav-btn,
.puntos-share.pd-share-btn {
    align-items: center;
    gap: 8px;
    width: auto;
    height: auto;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 999px;
    background: #fff;
    color: #444;
    box-shadow: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.pd-fav-btn { display: flex; }
/* NOTE: no `display` on the share pill — it is deliberately left to the
   `.puntos-share` / `body.puntos-ready .puntos-share` pair in site.css, which is what keeps
   it hidden from non-members. Setting it here would out-specify the hidden state. */
.pd-fav-btn:hover { border-color: #e0245e; color: #e0245e; }
.puntos-share.pd-share-btn:hover { border-color: var(--theme-bg-color, #f29c55); color: #b35418; background: #fff8f2; }
.pd-fav-btn .pd-fav-icon-full,
.pd-fav-btn .pd-fav-label-saved { display: none; }
.pd-fav-btn.is-fav {
    border-color: #e0245e;
    color: #e0245e;
    background: #fff5f8;
}
.pd-fav-btn.is-fav .pd-fav-icon-empty,
.pd-fav-btn.is-fav .pd-fav-label-add { display: none; }
.pd-fav-btn.is-fav .pd-fav-icon-full,
.pd-fav-btn.is-fav .pd-fav-label-saved { display: inline; }

/* Detail-page back button — pill, shown only when arriving from another site page.
   margin-top keeps it off the header. */
.pd-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 16px 0 12px;
    padding: 7px 16px;
    border: 1px solid #ddd;
    border-radius: 999px;
    background: #fff;
    color: #444;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.pd-back:hover {
    border-color: var(--theme-bg-color, #f29c55);
    color: var(--theme-bg-strong-color, #bf711d);
}
/* (The Amazon CTA now lives fused inside the .pd-amazon-go / .pd-coupon-go cards with a
   square bar — see .pd-cta-bar / .pd-amzn-btn. No pill radius here anymore.) */

/* Inline filter/sort/view toolbar above the product list. Establishes a stacking context
   so the drawer backdrop (fixed, z-index:-1) sits behind the drawer but above the page. */
.grid-tools {
    position: relative;
    z-index: 100;
}
.grid-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
}
/* Name of the category currently being viewed, on the left; pushes Sort + the view
   toggle to the right. */
.grid-toolbar-title {
    margin: 0 auto 0 0;
    font-size: 18px;
    font-weight: 700;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.grid-toolbar .view-toggle {
    display: inline-flex;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}
.grid-toolbar .view-toggle button {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #fff;
    color: #666;
    cursor: pointer;
    font-size: 16px;
}
.grid-toolbar .view-toggle button + button {
    border-left: 1px solid #ddd;
}
.grid-toolbar .view-toggle button:hover {
    background: #f5f5f5;
    color: #333;
}
.grid-toolbar .view-toggle button.active {
    background: #333;
    color: #fff;
}

/* List view: stack the cards full-width, each a horizontal row (image left, info right). */
.product-grid.list-view {
    grid-template-columns: 1fr;
}
.product-grid.list-view .product {
    display: flex;
    gap: 14px;
    max-width: none;
}
.product-grid.list-view .product-thumbnail {
    flex: 0 0 120px;
    width: 120px;
    height: 140px;
}
.product-grid.list-view .product-thumbnail img {
    max-width: 100%;
    height: 100%;
}
.product-grid.list-view .product-description {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
/* Mobile list mode: white rows with tighter spacing between them. */
@media (max-width: 768px) {
    .product-grid.list-view { gap: 8px; }
    .product-grid.list-view .product { background: #fff; }
}
.product-description {
    text-align: left;
    padding: 8px 10px;
    position: relative;
}
/* Amazon source mark — a TRUST cue, so it's meant to be read, not sensed: full opacity, the
   real wordmark shape. Absolutely positioned on the brand line, which is short, so it costs
   the card no height and no text width. Non-interactive so it can never eat a tap meant for
   the title link. Swap public/img/amazon-mark.svg for the official Associates asset and
   nothing here needs to change. */
.product-source-mark {
    position: absolute;
    top: 7px;
    right: 8px;
    z-index: 2;
    width: 58px;
    height: auto;
    pointer-events: none;
    user-select: none;
}
/* Keep the brand name clear of the mark. Only the brand line sits level with it — the title
   wraps underneath and uses the full width. */
.product-brand { padding-right: 62px; display: inline-block; }
@media (max-width: 520px) {
    .product-source-mark { width: 46px; top: 6px; right: 6px; }
    .product-brand { padding-right: 50px; }
}
.product-price-container {
    /* Was 35px — taller than the text needs. The slack pays for the corner action buttons
       so they cost the card no extra height. */
    line-height: 28px;
    vertical-align: middle;
    /* One line, always: discount chip, price, then the struck list price to its right. As
       inline spans these wrapped on the narrow 2-up mobile cards and dropped the list price
       onto a row of its own. nowrap forbids that; overflow:hidden is the backstop so
       pathological content clips instead of breaking the layout. */
    display: flex;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
}
.product-price-container > * { white-space: nowrap; }
.product-price {
    font-size: 20px;
    font-weight: bold;
    flex: 0 0 auto;
}
.product-price-before {
    color: #999;
    text-decoration: line-through;
    /* Last to give way if a price is unusually long — the price itself never shrinks. */
    flex: 0 1 auto;
    min-width: 0;
}
.product-price-discount {
    font-size: 20px;
    background: orange;
    color: #fff;
    font-weight: bold;
    padding: 4px;
    border-radius: 5px;
    /* Spacing comes from the container's gap now. */
    margin: 0;
    flex: 0 0 auto;
}
.product-buttons {
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
}
.product-buttons > .left-items {
    display: flex;
    gap: 2px;
}
.disclaimer {
    color: #777;
    font-size: 14px;
    margin: 20px 0;
    padding: 20px 0;
    text-align: justify;
}
button.decision-button {
    height: 40px;
}
#deals-menu-container {
    position: relative;
    z-index: 100;
}
#deals-bar {
    background: #fafafa;
    width: 100%;
    padding: 8px 0;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #e8e8e8;
}
.deals-bar-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}
.search-container {
    flex: 1;
    min-width: 0;
    line-height: 36px;
    display: flex;
    position: relative;
}
.search-container input {
    width: 100%;
    padding: 0 32px 0 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    height: 38px;
    background: #fff;
}
.search-container .bi-search {
    font-size: 18px;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
}
.bar-icon-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 16px;
    color: #666;
    cursor: pointer;
}
.bar-icon-btn:hover {
    background: #f5f5f5;
    color: #333;
}
.bar-icon-btn.active {
    background: #333;
    color: #fff;
    border-color: #333;
}
.bar-icon-btn.has-label {
    width: auto;
    padding: 0 10px;
    gap: 6px;
}
.bar-icon-label {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}
/* Category filter rendered as a soft gray pill (label + chevron) to the left of the
   search box, matching the search field's height. */
.bar-icon-btn.category-pill {
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    height: 38px;
    padding: 0 12px;
    gap: 8px;
    color: #222;
    font-weight: 600;
}
.bar-icon-btn.category-pill:hover {
    background: #e7e7e7;
    color: #222;
}
.bar-icon-btn.category-pill.active {
    background: #333;
    color: #fff;
}
.category-pill-caret {
    font-size: 13px;
    color: #777;
    transition: transform 0.15s ease;
}
.bar-icon-btn.category-pill.active .category-pill-caret {
    color: #fff;
    transform: rotate(180deg);   /* flip the chevron up when the drawer is open */
}

/* Drawer */
#deals-drawer {
    background: #fff;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    padding: 16px 0;
}
.drawer-enter-active, .drawer-leave-active {
    transition: all 0.12s ease;
    max-height: 500px;
    opacity: 1;
}
.drawer-enter-from, .drawer-leave-to {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}
.drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
}
#deals-drawer {
    position: relative;
    z-index: 1;
}
/* The inline Sort drawer and the top Category drawer both pop as normal dropdowns below
   their bar — content-sized (plus padding), not full page width. Each bar (grid-tools /
   deals-menu-container) is the positioned ancestor. */
.grid-tools #deals-drawer,
#deals-menu-container #deals-drawer {
    position: absolute;
    top: 100%;
    width: max-content;
    min-width: 280px;
    max-width: min(92vw, 540px);
    z-index: 50;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
/* Category dropdown: anchored to the trigger pill's left edge (the drawer lives inside
   .deals-bar-inner, which is the positioned ancestor). Sort dropdown: right-aligned
   under its buttons. */
.deals-bar-inner { position: relative; }
#deals-menu-container #deals-drawer { left: 12px; top: calc(100% + 9px); }
.grid-tools #deals-drawer { right: 0; }
/* Neutralize the Bootstrap .container inside the dropdown (it would force a page-wide
   responsive max-width); simple padding instead. */
.grid-tools #deals-drawer .container,
#deals-menu-container #deals-drawer .container {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0 16px;
}
.drawer-section {
    margin-bottom: 14px;
}
.drawer-section:last-child {
    margin-bottom: 0;
}
.drawer-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin-bottom: 8px;
}
.drawer-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.drawer-options button {
    padding: 6px 14px;
    font-size: 13px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: #fff;
    color: #555;
    cursor: pointer;
}
.drawer-options button.active {
    background: #333;
    color: #fff;
    border-color: #333;
}
.drawer-options button:hover:not(.active) {
    background: #f5f5f5;
}
.drawer-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 240px;
    overflow-y: auto;
}
.drawer-categories button {
    padding: 5px 12px;
    font-size: 13px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: #fff;
    color: #555;
    cursor: pointer;
    white-space: nowrap;
}
.drawer-categories button.active {
    background: #333;
    color: #fff;
    border-color: #333;
}
.drawer-categories button:hover:not(.active) {
    background: #f5f5f5;
}
.cat-count {
    color: inherit;
    opacity: 0.6;
    font-size: 12px;
}

/* Category Tree */
.drawer-tree {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 8px;
}
.tree-row {
    display: flex;
    align-items: center;
    padding: 2px 0;
}
.tree-toggle {
    width: 20px;
    text-align: center;
    cursor: pointer;
    color: #888;
    font-size: 12px;
    flex-shrink: 0;
}
.tree-toggle:hover {
    color: #333;
}
.tree-toggle-spacer {
    width: 20px;
    flex-shrink: 0;
}
.tree-row button {
    padding: 4px 10px;
    font-size: 13px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: none;
    color: #444;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tree-row button:hover {
    background: #f5f5f5;
}
.tree-row button.active {
    background: #333;
    color: #fff;
    border-color: #333;
}
select {
    font-size: 18px;
    padding: 5px;
}
.more-results {
    margin: 5px;
    margin-top: 30px;
    border-radius: 4px;
    padding: 6px 12px;
    background: #fff;
}
.price-update-time-warning {
    font-size: 12px;
    color: #777;
}
/* Both notice forms ship in the card; only one is shown. See the phone override below. */
.stale-short { display: none; }
/* On phones the cards are narrow; shrink the stale-price notice so it stays on one line
   for both the English and the (longer) Spanish string. */
@media (max-width: 600px) {
    .price-update-time-warning {
        font-size: 9.5px;
        white-space: nowrap;
    }
    .price-update-time-warning .bi {
        font-size: 9.5px;
    }
}
/* Small translucent "back to top" pill, floating just below the sticky search bar
   (#submenu, ~56px tall) so it doesn't cover it. */
.back-to-top {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: fit-content;
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    background: #1f1f1f;
    color: #fff;
    opacity: 0.6;                  /* sits at ~60%, full on hover */
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.back-to-top:hover {
    opacity: 1;
    transform: translateY(1px);
}
.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}
.fade-enter-from,
.fade-leave-to {
    opacity: 0;
    transform: translateY(10px);
}
.product-attribute {
    color: #666;
    font-size: 13px;
}

/* ========== Homepage Sections ========== */
.homepage-sections {
    padding: 4px 0 10px;
}

/* Promo Carousel */
.promo-carousel {
    position: relative;
    margin-bottom: 20px;
}
/* Mosaic is a fluid 4-column grid that scales proportionally with the page width.
   Row height and gap are container-relative (cqw) so the whole layout zooms in/out
   without any breakpoints — no rearrangement on resolution change. The choice
   between mosaic and mobile carousel is decided server-side via UA detection
   (see .is-mobile-device override below). */
.promo-carousel {
    container-type: inline-size;
    container-name: promo-shelf;
}
.promo-carousel-track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* ~200px when the container is ~1170px wide; scales smoothly in either direction. */
    grid-auto-rows: 17cqw;
    grid-auto-flow: dense;
    gap: 1.2cqw;
}
.promo-carousel-dots {
    display: none;
}

/* Promo Banners */
.promo-banner {
    border-radius: 16px;
    overflow: hidden;
    transform: translateY(0) scale(1);
    transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
    transform-origin: center center;
}
/* Whole-tile lift on hover. The parent transform carries every descendant
   (title, image, button) along with it — koupon.ai-style motion, no shadow. */
.promo-banner:hover {
    transform: translateY(-10px) scale(1.04);
    z-index: 2;
}
/* Mobile carousel: single tile fills the width, so we skip the lift to avoid
   a weird half-visible shift. */
.promo-carousel.is-mobile-device .promo-banner:hover {
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    .promo-banner {
        transition: none;
    }
    .promo-banner:hover {
        transform: none;
    }
}
.promo-banner-color-0 {
    background: linear-gradient(135deg, #ffb6d9 0%, #f8c8e0 50%, #e8d5f0 100%);
}
.promo-banner-color-1 {
    background: linear-gradient(135deg, #b6e6ff 0%, #c8e0f8 50%, #d5e8f0 100%);
}
.promo-banner-color-2 {
    background: linear-gradient(135deg, #b6ffcc 0%, #c8f8d5 50%, #d5f0e0 100%);
}

/* Phone/tablet mode: server-side UA flag triggers a single-banner carousel instead
   of the desktop mosaic. No viewport breakpoints — switching is data-driven.
   This is a TRANSFORM-driven slider, NOT native scroll: the container clips overflow
   and JS positions .promo-carousel-track via translateX. Native scroll momentum was
   removed because it flings past multiple slides on a hard swipe (see deals-base.js
   carousel methods). */
.promo-carousel.is-mobile-device {
    overflow: hidden;
    /* Stop horizontal gestures here from bubbling into the browser's edge back/forward
       swipe navigation, which on iOS Safari would hijack a past-the-edge over-swipe and
       leave the carousel unresponsive. */
    overscroll-behavior-x: contain;
}
/* touch-action: pan-y must cover the WHOLE carousel subtree, not just the track.
   The finger lands on the banner / image / link inside, and those default to
   touch-action: auto — which lets iOS Safari interpret a right-edge swipe as its
   forward-navigation gesture and steal the touch. Forcing pan-y on every descendant
   tells the browser "vertical scroll is yours, horizontal is mine" everywhere a
   touch can start. */
.promo-carousel.is-mobile-device,
.promo-carousel.is-mobile-device * {
    touch-action: pan-y;
}
.promo-carousel.is-mobile-device .promo-carousel-track {
    display: flex;
    flex-wrap: nowrap;
    /* The track is exactly one container wide; children overflow to the right and JS
       slides the whole track left by -100% per index. touch-action keeps vertical
       page scroll working while we handle horizontal drags ourselves. */
    width: 100%;
    touch-action: pan-y;
    gap: 0;
    grid-auto-rows: initial;
    /* No `will-change: transform` here on purpose — permanently promoting the track to a
       compositor layer triggered an iOS Safari hit-test bug where touch events stopped
       reaching it after the first transformed gesture. Transform animations are still
       composited fine without it. */
}
.promo-carousel.is-mobile-device .promo-banner {
    flex: 0 0 100%;
    border-radius: 12px;
    /* Fixed height for every slide. Without this, the flex row sizes to the tallest
       image and the other slides' cover-images get stretched to match. A fixed height
       makes every slide identical and lets each image fill its box consistently. */
    height: 200px;
    /* Drop any per-tile grid-column / grid-row spans inherited from desktop. */
    grid-column: auto !important;
    grid-row: auto !important;
}

/* Mobile CATEGORY-banner layout (NOT link tiles): text fills the left, the square
   Amazon product image fits on the right. Link tiles are excluded — they're designed
   full-bleed promo graphics and keep the desktop image-cover + text-overlay treatment
   (which the general .promo-banner:has(.promo-banner-img) rules above already provide). */
.promo-carousel.is-mobile-device .promo-banner:not(.promo-banner-tile):has(.promo-banner-img) {
    background: #ececec;
}
.promo-carousel.is-mobile-device .promo-banner:not(.promo-banner-tile):has(.promo-banner-img) .promo-banner-link {
    flex-direction: row;
    align-items: stretch;
    /* Kill the link padding on the image side so the photo can span the full banner
       height with no top/bottom margin. */
    padding: 0;
}
.promo-carousel.is-mobile-device .promo-banner:not(.promo-banner-tile):has(.promo-banner-img) .promo-banner-content {
    /* Restore inner spacing for the text column only (the link padding is now 0). */
    padding: 24px;
    flex: 1;
}
/* Image-only banner (displayHideText): no text column, so the photo spans the full slide. */
.promo-carousel.is-mobile-device .promo-banner .promo-banner-link:not(:has(.promo-banner-content)) .promo-banner-img {
    flex: 1 1 100% !important;
    width: 100% !important;
}
.promo-carousel.is-mobile-device .promo-banner .promo-banner-link:not(:has(.promo-banner-content)) .promo-banner-img img {
    object-fit: cover;
    object-position: center;
}
.promo-carousel.is-mobile-device .promo-banner:not(.promo-banner-tile):has(.promo-banner-img) .promo-banner-img {
    position: relative;
    inset: auto;
    flex: 0 0 45%;
    width: 45%;
    /* Stretch to the full banner height (no vertical centering gap). */
    height: auto;
    align-self: stretch;
    background: transparent;
    animation: none;
}
.promo-carousel.is-mobile-device .promo-banner:not(.promo-banner-tile):has(.promo-banner-img) .promo-banner-img img {
    width: 100%;
    height: 100%;
    /* contain: the whole product is scaled to fit, keeping aspect ratio — never cropped.
       Any leftover space around it shows the banner's background colour. */
    object-fit: contain;
    object-position: right center;
    filter: none;
}
/* Category banner text colours (no dark image scrim behind it like the tile/desktop case). */
.promo-carousel.is-mobile-device .promo-banner:not(.promo-banner-tile):has(.promo-banner-img) .promo-banner-title,
.promo-carousel.is-mobile-device .promo-banner:not(.promo-banner-tile):has(.promo-banner-img):nth-child(2n) .promo-banner-title,
.promo-carousel.is-mobile-device .promo-banner:not(.promo-banner-tile):has(.promo-banner-img):nth-child(3n) .promo-banner-title {
    color: #1a5276;
}
.promo-carousel.is-mobile-device .promo-banner:not(.promo-banner-tile):has(.promo-banner-img) .promo-banner-subtitle {
    color: #444;
}
.promo-carousel.is-mobile-device .promo-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px 0 4px;
}
.promo-carousel.is-mobile-device .promo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d0d0d0;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.promo-carousel.is-mobile-device .promo-dot.active {
    background: var(--theme-bg-strong-color);
    transform: scale(1.3);
}
.promo-banner-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    height: 100%;
    min-height: 180px;
    padding: 24px;
    gap: 16px;
    box-sizing: border-box;
}
.promo-banner-link:hover {
    color: inherit;
}
.promo-banner-content {
    flex: 1;
    min-width: 0;
    z-index: 1;
}
.promo-banner-title {
    font-size: 26px;
    font-weight: 900;
    color: #c0192c;
    margin: 0 0 8px;
    line-height: 1.2;
}
.promo-banner:nth-child(2n) .promo-banner-title {
    color: #1a5276;
}
.promo-banner:nth-child(3n) .promo-banner-title {
    color: #1a7642;
}
.promo-banner-subtitle {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin: 0 0 16px;
    line-height: 1.4;
    max-width: 320px;
    /* Render textarea line breaks as actual line breaks. pre-line collapses
       runs of spaces but keeps every \n the admin typed. The ::before pseudo
       inherits this so the shadow halo wraps the same way. */
    white-space: pre-line;
}
.promo-banner-btn {
    /* Same outlined pill as .pill-btn / .see-all-link everywhere else on the site. */
    display: inline-block;
    background: #fff;
    color: #1f1f1f;
    font-weight: 700;
    font-size: 15px;
    padding: 10px 24px;
    border: 2px solid #d8d8d8;
    border-radius: 999px;
    box-shadow: none;
}
.promo-banner-img {
    flex: 0 0 auto;
    width: 200px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.promo-banner-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.15));
}

/* Banner with an image: stretch the image across the whole tile and overlay
   the text on top with a soft scrim so titles stay legible. The colored
   gradient fallback above still applies when no image is set. */
.promo-banner:has(.promo-banner-img) {
    position: relative;
    background: #2a2a2a;
}
.promo-banner:has(.promo-banner-img) .promo-banner-img {
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    z-index: 0;
    /* Soft gray shimmer behind the <img> — visible only while the photo is loading
       (or if it 404s). Once the image is decoded it covers the box completely. */
    background-color: #d8d8d8;
    background-image: linear-gradient(100deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.55) 50%, rgba(255,255,255,0) 70%);
    background-size: 220% 100%;
    background-repeat: no-repeat;
    animation: promo-banner-img-shimmer 1.6s ease-in-out infinite;
}
.promo-banner:has(.promo-banner-img) .promo-banner-img img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    filter: none;
    position: relative;
    z-index: 1;
}
@keyframes promo-banner-img-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
    .promo-banner:has(.promo-banner-img) .promo-banner-img {
        animation: none;
    }
}
.promo-banner:has(.promo-banner-img) .promo-banner-content {
    position: relative;
    z-index: 1;
}
.promo-banner:has(.promo-banner-img) .promo-banner-title,
.promo-banner:has(.promo-banner-img):nth-child(2n) .promo-banner-title,
.promo-banner:has(.promo-banner-img):nth-child(3n) .promo-banner-title {
    color: #fff;
}
.promo-banner:has(.promo-banner-img) .promo-banner-subtitle {
    color: #f0f0f0;
}

/* Multi-image banner: prev/next arrows on the sides + dots at the bottom.
   Only the button inside is a link, so arrows can be clicked without navigating. */
.promo-banner-multi {
    position: relative;
}
.promo-banner-multi .promo-banner-link {
    position: relative;
}
.promo-banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s ease, transform 0.15s ease;
}
.promo-banner-arrow svg {
    display: block;
}
.promo-banner-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}
.promo-banner-arrow-prev { left: 12px; }
.promo-banner-arrow-next { right: 12px; }
.promo-banner-image-dots {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 3;
}
.promo-banner-image-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.45);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}
.promo-banner-image-dot.active {
    background: var(--theme-bg-strong-color);
    border-color: rgba(0, 0, 0, 0.55);
    transform: scale(1.2);
}
/* When the button is hidden but the banner still needs to be clickable (multi-image mode),
   this transparent overlay covers the tile under the arrows/dots/content. */
.promo-banner-fullclick {
    position: absolute;
    inset: 0;
    z-index: 1;
    text-decoration: none;
}
/* The content block has to stay positioned (so the button isn't covered by the
   .promo-banner-fullclick overlay). Arrows and dots already have their own
   position:absolute / z-index, so we leave them alone here. */
.promo-banner-multi .promo-banner-content {
    position: relative;
    z-index: 2;
}
@media (max-width: 520px) {
    .promo-banner-arrow {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
    .promo-banner-arrow-prev { left: 8px; }
    .promo-banner-arrow-next { right: 8px; }
}

/* Section Row */
.section-row {
    margin-bottom: 28px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 0 2px;
}
.section-header h3 {
    /* Match the "All articles" toolbar title (.grid-toolbar-title). */
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #222;
}
/* On phones the 18px heading dwarfs the inline icon — bring it down a notch. */
@media (max-width: 600px) {
    .section-header h3 { font-size: 16px; }
}
/* Pill "See all" button — outlined rounded button that fills orange on hover. */
.see-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #1f1f1f;
    text-decoration: none;
    white-space: nowrap;
    padding: 6px 16px;
    border: 2px solid #d8d8d8;
    border-radius: 999px;
    background: #fff;
    line-height: 1;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.see-all-link:hover {
    background: var(--theme-bg-color);
    border-color: var(--theme-bg-color);
    color: #fff;
}

/* Larger pill button — same outlined look as .see-all-link but bigger. Used for
   "Load more" and the "Visit homepage" CTA. Fills orange on hover. */
.pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #1f1f1f;
    text-decoration: none;
    white-space: nowrap;
    padding: 12px 32px;
    border: 2px solid #d8d8d8;
    border-radius: 999px;
    background: #fff;
    line-height: 1;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.pill-btn:hover {
    background: var(--theme-bg-color);
    border-color: var(--theme-bg-color);
    color: #fff;
}

/* Horizontal Scroll Container */
.scroll-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* NOTE: deliberately NO `scrollbar-width` here. In Chrome 121+ setting it makes the
       browser use its own standard scrollbar and ignore the ::-webkit-scrollbar styling
       below. Firefox (which has no ::-webkit-scrollbar) gets it via @supports at the end. */
    margin: 0 -4px;
    padding: 0 4px 8px;
    cursor: grab;                 /* drag-to-scroll the row */
}
.scroll-container.drag-scrolling { cursor: grabbing; user-select: none; }
/* Stop the browser ghost-dragging the card image/link while drag-scrolling. */
.scroll-container img, .scroll-container a { -webkit-user-drag: none; user-drag: none; }
/* Scrollbar fully hidden — Chrome/Safari via ::-webkit-scrollbar, Firefox via
   scrollbar-width, old Edge via -ms-overflow-style. The chevron hint signals scrollability. */
.scroll-container::-webkit-scrollbar { display: none; width: 0; height: 0; }
.scroll-container { scrollbar-width: none; -ms-overflow-style: none; }
.scroll-track {
    display: flex;
    gap: 12px;
}

/* Positioned wrapper so the scroll-right hint can overlay the (scrolling) track.
   overflow-x: clip keeps the animated chevron (which slides past the right edge) from
   widening the page on mobile, while leaving vertical card hover shadows visible. */
.scroll-viewport {
    position: relative;
    overflow-x: clip;
}
/* Large bare chevron (no circle) at the right edge, pointing LEFT to signal the swipe
   direction. It enters from the off-screen right, accelerates leftward, fades out, waits,
   then re-enters — miming the drag-left gesture. Fades away once the user scrolls. */
.scroll-hint {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;          /* never block drag-to-scroll or clicks */
    opacity: 0;                    /* hidden by default; shown only to first-timers */
    transition: opacity 0.4s ease;
}
.scroll-hint i {
    font-size: 80px;
    line-height: 1;
    /* Solid gray fill + matching stroke = a uniformly bold glyph with no edge artifact.
       The 50% transparency is applied via the animation's opacity, not the color, so the
       stroke and fill don't double up into a darker outline. */
    color: #707070;
    -webkit-text-stroke: 4px #707070;
    animation: scrollHintSwipe 2.2s linear infinite;
}
/* Only show the hint until the user has scrolled a row once (tracked via cookie). */
.scroll-viewport.show-hint .scroll-hint {
    opacity: 1;
}
@keyframes scrollHintSwipe {
    /* enter from the invisible right */
    0%   { transform: translateX(36px); opacity: 0; animation-timing-function: ease-out; }
    14%  { transform: translateX(18px); opacity: 0.5; animation-timing-function: cubic-bezier(0.5, 0, 0.85, 0.4); }
    /* accelerate to the left (ease-in curve = speeds up) */
    44%  { transform: translateX(-46px); opacity: 0.5; animation-timing-function: ease-out; }
    54%  { transform: translateX(-54px); opacity: 0; }
    /* wait a beat off-screen, then loop back in from the right */
    100% { transform: translateX(-54px); opacity: 0; }
}

/* "More product ideas" block shown at the bottom of category/search pages. */
.more-ideas {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}
.more-ideas-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 16px;
    /* Muted gray so the "More product ideas" heading stays secondary to the page content. */
    color: #9a9a9a;
}
.more-ideas-cta {
    text-align: center;
    margin-top: 24px;
}

/* Scroll Product Card — landscape "ad" style: product image on the left, an orange deal
   panel (% OFF / price / was-price) on the right, with the title underneath. Designed to
   look like a social-media ad tile and stay compact. */
.scroll-product-card {
    flex: 0 0 230px;
    border: 2px solid #e2e2e2;
    border-radius: 12px;
    background: #fff;
    /* A wrapper, not the link itself — the action buttons have to sit outside the <a>. */
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);   /* subtle, very transparent drop shadow */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}
.scroll-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    color: inherit;
}
.scroll-card-media {
    display: flex;
    height: 130px;
}
.scroll-product-img {
    flex: 1 1 60%;
    min-width: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    position: relative;
}
.scroll-product-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
/* Soft light-orange deal panel on the right of the image — gentle background with
   dark, high-contrast text instead of the previous saturated orange + white. */
.scroll-deal-panel {
    flex: 0 0 32%;
    background: #fdf0e4;
    color: #5c4632;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* The bottom 30px of this panel is covered by the action shield, so reserve it here:
       otherwise the text centres against the full height and reads low against the orange
       that is actually visible. */
    padding: 6px 4px 36px;
    line-height: 1;
}
.scroll-deal-off {
    font-weight: 800;
    font-size: 18px;
    color: #c4622a;               /* orange accent, strong enough to read on the light bg */
}
.scroll-deal-off span {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 1px;
}
.scroll-deal-price {
    font-size: 18px;
    font-weight: 800;
    color: #1f1f1f;
    margin-top: 7px;
}
.scroll-deal-before {
    font-size: 10px;
    color: #9b8472;              /* muted brown-gray, still legible on the light orange */
    text-decoration: line-through;
    margin-top: 3px;
}

/* Promo banner typography & padding scale proportionally with the mosaic container
   (cqw) instead of switching at viewport breakpoints. clamp() bounds them so they
   never get illegibly small on a phone or absurdly large on a 4K monitor. */
.promo-banner-link {
    padding: clamp(18px, 2cqw, 32px);
}
/* --text-scale (set by the admin's text-layout resize) scales the TITLE and SUBTITLE
   only — the button keeps its normal size regardless of the text scale. */
.promo-banner-title {
    font-size: calc(clamp(20px, 2cqw, 30px) * var(--text-scale, 1));
}
.promo-banner-subtitle {
    font-size: calc(clamp(15px, 1.3cqw, 19px) * var(--text-scale, 1));
}
.promo-banner-btn {
    font-size: clamp(13px, 1cqw, 16px);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
/* Desktop mosaic: keep scaling DOWN as the window shrinks. The generous clamp floors
   above are tuned for the (narrow-container) mobile carousel; on the mosaic they kick
   in early and the text/button stop shrinking and overflow the small tiles. */
.promo-carousel:not(.is-mobile-device) .promo-banner-title {
    font-size: calc(clamp(13px, 2.2cqw, 30px) * var(--text-scale, 1));
}
.promo-carousel:not(.is-mobile-device) .promo-banner-subtitle {
    font-size: calc(clamp(11px, 1.4cqw, 19px) * var(--text-scale, 1));
}
.promo-carousel:not(.is-mobile-device) .promo-banner-btn {
    font-size: clamp(10px, 1.1cqw, 16px);
    padding: clamp(5px, 0.8cqw, 10px) clamp(11px, 1.9cqw, 24px);
}
/* Hovering ANYWHERE on the banner gives the button a soft tint (not the loud orange
   fill — banners are already colorful); pressing shows the click. */
.promo-banner:hover .promo-banner-btn {
    background: #fdf0e4;                 /* very dim orange */
    border-color: #ecd9c4;
    color: #1f1f1f;
}
.promo-banner:active .promo-banner-btn {
    transform: scale(0.96);
}
/* The whole square reads as hovered: a barely-there tint veils the banner on hover. */
.promo-banner { position: relative; }
.promo-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(31, 31, 31, 0.05);
    opacity: 0;
    pointer-events: none;     /* never intercepts clicks */
    transition: opacity 0.15s ease;
    z-index: 3;
}
.promo-banner:hover::after { opacity: 1; }


@media (max-width: 520px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .product-thumbnail {
        overflow: hidden;
        /* Square image box (instead of the fixed 255px height) to save vertical space. */
        height: auto;
        aspect-ratio: 1 / 1;
    }
    .product-thumbnail img {
        max-width: 106%;
        height: 106%;
        margin-top: -3%;
        margin-left: -3%;
        object-fit: contain;
    }
    /* Two cards to a row leaves ~147px for the price line, and at the desktop 20px the three
       parts need ~162px — so they wrapped. Scale with the viewport instead of picking one
       fixed size: this keeps the type as large as still fits, and grows back to the full
       20px as the cards widen towards the 520px breakpoint. Measured at 375px the tightest
       real row ("-29% $134.99 $189.99") clears by 6px. */
    .product-price-container { gap: 4px; }
    .product-price-discount { font-size: clamp(11px, 3.5vw, 20px); padding: 2px 4px; }
    .product-price { font-size: clamp(13px, 4.2vw, 20px); }
    .product-price-before { font-size: clamp(10px, 2.9vw, 14px); }
    /* Icon + discount only. "Ver cupón (56%)" is 133px of a 147px-wide card interior, which
       leaves nothing for the favourite/share buttons parked in the corner. */
    .coupon-btn-full { display: none; }
    .coupon-btn-short { display: inline; }
    /* Same reasoning for the stale-price notice — the full sentence needs 155px. */
    .stale-full { display: none; }
    .stale-short { display: inline; }
    /* On the tallest card of a grid row there is no slack under the text, so a 28px corner
       reached up past the (14px) notice line and into the price row, which fills the card
       width and cannot yield 70px at any readable size. Smaller buttons plus a little foot
       on the description keep the corner in its own band. Costs ~6px of natural card height
       — the alternatives were +29px (letting the notice wrap) or +34px (a dedicated row). */
    /* Scoped to the grid card — the row-card shield and the list rows size their own. */
    .product > .card-actions { bottom: 4px; }
    .product > .card-actions .fav-heart,
    .product > .card-actions .puntos-share { width: 24px; height: 24px; font-size: 12px; }
    .product-description { padding-bottom: 14px; }
}
@media (min-width: 520px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 28px;
    }
    .product-thumbnail {
        height: 225px;
    }
    .product-thumbnail img {
        max-width: 225px;
        height: 225px;
    }
}
/* Wide desktop: a fixed 4-column grid with generous spacing. */
@media (min-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 32px;
    }
}
#submenu {
    min-height: 54px;
}
/* …but only reserve that height when it actually holds the filter bar (homepage).
   On pages where it's empty (product detail, etc.) it shouldn't leave a 54px gap. */
#submenu:empty {
    min-height: 0;
}
@media (max-width: 600px) {
    .back-to-top {
        top: 62px;
        opacity: 0.6;
    }
}
