/* ============================================================
   Refubly — deals pages (pages/deals.css)
   /flash-sale and /special-offers, both rendered by
   components/deals-page.blade.php. Pushed after pages/shop.css
   by the two page views (layouts/shop @stack('page-styles')).
   Namespace: rd-*. Mode classes: .rd-page--flash / --offers.
   Restrained on purpose: type, real numbers and the product
   photos carry the page; icons only where they are UI.
   NOTE: theme sets html{font-size:62.5%} -> 1rem = 10px.
   ============================================================ */

.rd-page {
    --rd-ease: cubic-bezier(.22, .61, .36, 1);
    --rd-shadow-hover: 0 14px 36px rgba(13, 27, 61, .10);
    --rd-line: #cfe5d6;
    color: var(--rf-text);
}

/* Flash: warm neutral band, amber only on small accents. */
.rd-page--flash {
    --rd-hero-bg: #fffaf3;
    --rd-hero-line: #f3e6d2;
    --rd-hero-rule: #eedcc1;
    --rd-accent-ink: #b45309;
    --rd-accent-line: #f6e3c6;
}

/* Offers: the brand mint band, green accents. */
.rd-page--offers {
    --rd-hero-bg: var(--rf-mint);
    --rd-hero-line: #e2efe6;
    --rd-hero-rule: #d3e7da;
    --rd-accent-ink: var(--rf-primary);
    --rd-accent-line: var(--rd-line);
}

.rd-page img { max-width: 100%; }

/* ------------------------------------------------------------
   Buttons (pill, arrow nudges on hover)
   ------------------------------------------------------------ */

.rd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    height: 4.6rem;
    padding: 0 2.4rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: inherit;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s;
}

.rd-btn .rfi { font-size: 1.6rem; transition: transform .2s var(--rd-ease); }

.rd-btn:hover .rfi,
.rd-btn:focus-visible .rfi { transform: translateX(3px); }

.rd-btn:focus-visible { outline: 2px solid var(--rf-primary); outline-offset: 2px; }

.rd-btn:active { transform: translateY(1px); }

.rd-btn--primary { background: var(--rf-primary); color: #fff; }

.rd-btn--primary:hover,
.rd-btn--primary:focus-visible {
    background: var(--rf-primary-dark);
    color: #fff;
    box-shadow: 0 8px 20px rgba(5, 128, 58, .22);
}

.rd-btn--ghost { background: #fff; border-color: var(--rf-border); color: var(--rf-ink); }

.rd-btn--ghost:hover,
.rd-btn--ghost:focus-visible { background: var(--rf-mint); border-color: var(--rd-line); color: var(--rf-primary); }

/* ============================================================
   HERO — breadcrumbs, label, h1, one line, key figures
   ============================================================ */

.rd-hero {
    padding: 1.4rem 0 4.4rem;
    background: var(--rd-hero-bg);
    border-bottom: 1px solid var(--rd-hero-line);
}

/* Breadcrumbs (shared component), restyled for the band. */
.rd-hero .breadcrumb-nav { margin-bottom: 3.2rem; }

.rd-hero .breadcrumb {
    padding: 0;
    border: 0;
    font-size: 1.3rem;
    color: var(--rf-muted);
}

.rd-hero .breadcrumb li:not(:last-child) { opacity: 1; }

.rd-hero .breadcrumb a { transition: color .2s; }

.rd-hero .breadcrumb a:hover,
.rd-hero .breadcrumb a:focus-visible { color: var(--rf-primary); }

.rd-hero .breadcrumb li:last-child { color: var(--rf-ink); font-weight: 600; }

.rd-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 3.2rem;
    align-items: end;
}

.rd-hero__text { min-width: 0; }

/* Plain small label above the h1. */
.rd-eyebrow {
    margin: 0 0 1.2rem;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--rd-accent-ink);
}

.rd-title {
    margin: 0;
    font-family: var(--rf-font-heading, inherit);
    font-size: clamp(3rem, 2.2rem + 1.6vw, 4.8rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -.028em;
    color: var(--rf-ink);
    text-transform: none;
}

.rd-sub {
    max-width: 56rem;
    margin: 1.4rem 0 0;
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--rf-text);
}

.rd-note {
    max-width: 56rem;
    margin: 1.4rem 0 0;
    font-size: 1.35rem;
    line-height: 1.5;
    color: var(--rf-muted);
}

/* ---- Key figures: big numbers, small labels, thin rules ---- */

.rd-figures {
    display: flex;
    margin: 0;
    padding: 0;
}

.rd-figure {
    display: flex;
    flex-direction: column-reverse;   /* markup is dt, dd: show the number first */
    justify-content: flex-end;
    min-width: 0;
    padding: 0 3.2rem;
    border-left: 1px solid var(--rd-hero-rule);
}

.rd-figure:first-child { padding-left: 0; border-left: 0; }

.rd-figure:last-child { padding-right: 0; }

.rd-figure dd {
    margin: 0;
    font-family: var(--rf-font-heading, inherit);
    font-size: 4.4rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.03em;
    color: var(--rf-ink);
    font-variant-numeric: tabular-nums;
}

.rd-figure--accent dd { color: var(--rd-accent-ink); }

.rd-figure dt {
    margin-top: .8rem;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--rf-muted);
    white-space: nowrap;
}

/* ---- Flash clock ---- */

.rd-timer {
    display: inline-flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 100%;
    margin-top: 2.4rem;
}

.rd-timer__label {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--rf-ink);
}

.rd-timer__ends { font-weight: 600; color: var(--rf-muted); }

.rd-timer__clock { display: flex; gap: .8rem; }

.rd-timer__clock[hidden] { display: none; }

.rd-timer__unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 6.4rem;
    height: 6.4rem;
    border: 1px solid var(--rd-accent-line);
    border-radius: 1.2rem;
    background: #fff;
    overflow: hidden;
}

.rd-timer__unit b {
    display: block;
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    color: var(--rf-ink);
    font-variant-numeric: tabular-nums;
}

.rd-timer__unit b.is-tick { animation: rd-tick .38s var(--rd-ease); }

.rd-timer__unit small {
    margin-top: .45rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--rf-muted);
}

.rd-timer__ended { margin: 0; font-size: 1.4rem; font-weight: 600; color: var(--rf-text); }

.rd-timer__ended[hidden] { display: none; }

@keyframes rd-tick {
    from { opacity: 0; transform: translateY(-45%); }
    to { opacity: 1; transform: none; }
}

/* ---- Load-in: label, line, clock and figures settle in; the h1 (the
   page's LCP text) paints at once. ---- */

@keyframes rd-rise {
    from { opacity: 0; transform: translateY(1rem); }
    to { opacity: 1; transform: none; }
}

.rd-in { animation: rd-rise .6s var(--rd-ease) both; }

.rd-in--2 { animation-delay: .06s; }

.rd-in--3 { animation-delay: .14s; }

@media (min-width: 992px) {
    .rd-hero { padding: 1.8rem 0 5.2rem; }

    .rd-hero__grid {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 6.4rem;
    }

    .rd-sub { font-size: 1.7rem; }
}

/* ============================================================
   TOOLBAR — category chips, result count, sort
   ============================================================ */

.rd-toolbar {
    position: relative;
    z-index: 20;
    background: #fff;
    border-bottom: 1px solid var(--rf-border);
    transition: box-shadow .2s;
}

.rd-toolbar.is-stuck { box-shadow: 0 8px 20px rgba(13, 27, 61, .06); }

.rd-toolbar__inner {
    display: flex;
    align-items: center;
    gap: 1.2rem 2.4rem;
    padding-block: 1.4rem;
}

.rd-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    flex: 1 1 auto;
    min-width: 0;
}

.rd-chip {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    height: 3.8rem;
    margin: 0;
    padding: 0 1.1rem 0 1.5rem;
    border: 1px solid var(--rf-border);
    border-radius: 999px;
    background: #fff;
    color: var(--rf-ink);
    font-family: inherit;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s, transform .15s;
}

.rd-chip__n {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    height: 2.2rem;
    padding: 0 .6rem;
    border-radius: 999px;
    background: var(--rf-bg-soft);
    color: var(--rf-muted);
    font-size: 1.15rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    transition: background-color .2s, color .2s;
}

.rd-chip:hover { border-color: var(--rd-line); color: var(--rf-primary); }

.rd-chip:focus-visible { outline: 2px solid var(--rf-primary); outline-offset: 2px; }

.rd-chip:active { transform: scale(.97); }

.rd-chip.is-active {
    border-color: #bfe0cb;
    background: var(--rf-primary-soft);
    color: var(--rf-primary);
}

.rd-chip.is-active .rd-chip__n { background: #fff; color: var(--rf-primary); }

.rd-toolbar__end {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    flex: none;
    margin-left: auto;
}

.rd-count {
    margin: 0;
    font-size: 1.35rem;
    color: var(--rf-muted);
    white-space: nowrap;
}

.rd-count strong { color: var(--rf-ink); font-weight: 700; }

.rd-sort {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--rf-muted);
    text-transform: none;
    letter-spacing: 0;
}

.rd-sort__field { position: relative; display: block; }

.rd-sort select {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    height: 3.8rem;
    margin: 0;
    padding: 0 3.6rem 0 1.4rem;
    border: 1px solid var(--rf-border);
    border-radius: 1rem;
    background: #fff none;
    color: var(--rf-ink);
    font-family: inherit;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: none;
    transition: border-color .2s;
}

.rd-sort select:hover { border-color: var(--rd-line); }

.rd-sort select:focus-visible {
    border-color: var(--rf-primary);
    outline: 2px solid var(--rf-primary);
    outline-offset: 1px;
}

.rd-sort .rfi {
    position: absolute;
    top: 50%;
    right: 1.2rem;
    margin-top: -.75rem;
    font-size: 1.5rem;
    color: var(--rf-muted);
    pointer-events: none;
}

@media (min-width: 768px) {
    /* Sticks under the theme's fixed header bar; the page script keeps
       --rd-top at that bar's height (0 while it is not fixed). The bar's
       parent (.rd-browse) ends with the grid, so it lets go there. */
    .rd-toolbar { position: sticky; top: var(--rd-top, 0px); }
}

/* ============================================================
   RESULTS GRID
   ============================================================ */

.rd-results { padding: 2.8rem 0 1.6rem; }

.rd-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
}

.rd-grid[hidden],
.rd-item[hidden] { display: none; }

.rd-item { min-width: 0; }

@media (min-width: 768px) {
    .rd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; }
}

@media (min-width: 992px) {
    .rd-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
    .rd-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.8rem; }
}

/* Filter that matched nothing */
.rd-filter-empty {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.6rem 2.4rem;
    padding: 2.4rem 2.8rem;
    border: 1px solid var(--rf-border);
    border-radius: 1.6rem;
    background: var(--rf-bg-soft);
}

.rd-filter-empty[hidden] { display: none; }

.rd-filter-empty > div { flex: 1 1 26rem; min-width: 0; }

.rd-filter-empty__title { margin: 0; font-size: 1.6rem; font-weight: 700; color: var(--rf-ink); }

.rd-filter-empty__text { margin: .3rem 0 0; font-size: 1.4rem; line-height: 1.5; color: var(--rf-text); }

/* ============================================================
   SECTIONS: cross-promo, empty state, assurance
   ============================================================ */

.rd-section { padding-block: 2.4rem; }

.rd-section--assure { padding-bottom: 1.6rem; }

/* ---- Cross-promo card: words and one button ---- */

.rd-promo {
    display: flex;
    align-items: center;
    gap: 2rem 3.2rem;
    padding: 2.6rem 3.2rem;
    border: 1px solid;
    border-radius: 2rem;
    color: var(--rf-text);
    transition: border-color .25s, box-shadow .25s, transform .25s var(--rd-ease);
}

.rd-promo--offers { background: var(--rf-mint); border-color: #dcebe1; }

.rd-promo--flash { background: #fffaf3; border-color: #f3e6d2; }

.rd-promo__text { display: flex; flex: 1 1 auto; flex-direction: column; gap: .4rem; min-width: 0; }

.rd-promo__text strong {
    font-size: 2rem;
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: -.015em;
    color: var(--rf-ink);
}

.rd-promo__text span { font-size: 1.45rem; line-height: 1.55; color: var(--rf-text); }

.rd-promo__cta { flex: none; }

.rd-promo:hover,
.rd-promo:focus-visible { color: var(--rf-text); transform: translateY(-3px); box-shadow: var(--rd-shadow-hover); }

.rd-promo:focus-visible { outline: 2px solid var(--rf-primary); outline-offset: 3px; }

.rd-promo:hover .rd-btn--primary,
.rd-promo:focus-visible .rd-btn--primary { background: var(--rf-primary-dark); }

.rd-promo:hover .rd-btn .rfi,
.rd-promo:focus-visible .rd-btn .rfi { transform: translateX(3px); }

/* ---- Empty state: heading, one line, two buttons ---- */

.rd-section--empty { padding-block: 6.4rem 4rem; }

.rd-empty { max-width: 56rem; margin: 0 auto; text-align: center; }

.rd-empty__title {
    margin: 0;
    font-size: clamp(2.2rem, 1.8rem + .8vw, 2.8rem);
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -.015em;
    color: var(--rf-ink);
}

.rd-empty__text { margin: 1rem auto 0; font-size: 1.5rem; line-height: 1.6; color: var(--rf-text); }

.rd-empty__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 2.6rem;
}

/* ---- Assurance strip: one light bordered row, small line icons ---- */

.rd-assure {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    border: 1px solid var(--rf-border);
    border-radius: 1.6rem;
    background: #fff;
    list-style: none;
    overflow: hidden;
}

.rd-assure__item {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    min-width: 0;
    padding: 2rem 2.2rem;
}

.rd-assure__item + .rd-assure__item { border-left: 1px solid var(--rf-border-soft); }

.rd-assure__item .rfi { margin-top: .1rem; font-size: 2rem; color: var(--rf-primary); }

.rd-assure strong { display: block; font-size: 1.4rem; font-weight: 700; line-height: 1.3; color: var(--rf-ink); }

.rd-assure small { display: block; margin-top: .2rem; font-size: 1.25rem; line-height: 1.4; color: var(--rf-muted); }

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

@media (max-width: 991px) {
    .rd-assure { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .rd-assure__item:nth-child(odd) { border-left: 0; }

    .rd-assure__item:nth-child(n + 3) { border-top: 1px solid var(--rf-border-soft); }

    /* Figures run full width under the text, split by rules. */
    .rd-figures { padding-top: 2.4rem; border-top: 1px solid var(--rd-hero-rule); }

    .rd-figure { flex: 1 1 0; padding: 0 2rem; }

    .rd-figure dd { font-size: 3.6rem; }
}

@media (max-width: 767px) {
    .rd-hero { padding: 1rem 0 3.2rem; }

    .rd-hero .breadcrumb-nav { margin-bottom: 2.2rem; }

    .rd-hero__grid { gap: 2.4rem; }

    .rd-sub { font-size: 1.5rem; }

    /* Toolbar: chips scroll sideways on their own row, count + sort below. */
    /* A fixed gutter here (rf-container's varies by breakpoint), so the
       chip row can bleed to the screen edge by exactly that much. */
    .rd-toolbar .rd-toolbar__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 1.2rem;
        padding: 1.2rem 1.6rem;
    }

    .rd-chips {
        flex-wrap: nowrap;
        margin-inline: -1.6rem;
        padding: .2rem 1.6rem;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scroll-padding-inline: 1.6rem;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .rd-chips::-webkit-scrollbar { display: none; }

    .rd-chip { flex: none; scroll-snap-align: start; }

    .rd-toolbar__end { justify-content: space-between; gap: 1.2rem; margin-left: 0; }

    .rd-sort__label { display: none; }

    .rd-sort select { height: 4.2rem; font-size: 1.6rem; }

    .rd-results { padding-top: 2rem; }

    .rd-promo { flex-direction: column; align-items: stretch; padding: 2.2rem 2rem; }

    .rd-promo__cta { width: 100%; }

    .rd-filter-empty { padding: 2rem; }

    .rd-filter-empty .rd-btn { width: 100%; }
}

@media (max-width: 575px) {
    .rd-figure { padding: 0 1.4rem; }

    .rd-figure dd { font-size: 2.8rem; }

    .rd-figure dt { font-size: 1.2rem; white-space: normal; }

    .rd-timer { display: flex; width: 100%; }

    .rd-timer__clock { gap: .6rem; }

    .rd-timer__unit { flex: 1 1 0; width: auto; height: 6rem; }

    .rd-timer__unit b { font-size: 2.2rem; }

    .rd-assure__item { flex-direction: column; gap: .8rem; padding: 1.6rem; }

    .rd-assure strong { font-size: 1.35rem; }

    .rd-empty__actions .rd-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .rd-in,
    .rd-timer__unit b.is-tick { animation: none; }

    .rd-promo,
    .rd-chip,
    .rd-btn .rfi { transition: none; }

    .rd-promo:hover,
    .rd-promo:focus-visible { transform: none; }
}
