/*
 * Offer System Ã¢â‚¬â€ storefront styles (Phase 5).
 *
 * Scoped under .oc-offer-* classes so nothing leaks into the rest of
 * the catalog theme. CSS logical properties (`inset-inline-start`,
 * `margin-inline-end`) used so RTL works automatically.
 *
 * Color overrides come from inline `style="--oc-offer-badge-bg: ...;
 * --oc-offer-badge-color: ...;"` written by the badge twig Ã¢â‚¬â€ admin can
 * configure per-offer badge / text colors from the offer form.
 */

:root {
    --oc-offer-badge-bg: #12314d;
    --oc-offer-badge-color: #ffffff;
    --oc-offer-block-bg: #f7faff;
    --oc-offer-block-border: #c7d6ee;
    --oc-offer-block-accent: #12314d;
    --oc-offer-block-text: #1f2937;
}

/* ===== Product card badge ============================================ */

.oc-offer-badge {
    position: absolute;
    inset-block-start: 10px;
    inset-inline-start: 10px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    width: 100%;
    padding: 5px 10px;

    /* Phase 5D Ã¢â‚¬â€ explicit fallbacks inside var() so the badge keeps a
       valid color even if `:root` defaults are unreachable. Admin
       inline `style="--oc-offer-badge-bg: ..."` still wins because
       inline custom-property declarations override `:root`. */
    background: var(
            --oc-offer-badge-bg, #12314d);
    color:      var(
            --oc-offer-badge-color, #ffffff);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    pointer-events: none;
    left: 0;
    right: 0;
}

.oc-offer-badge::before {
    content: "%";
    display: inline-block;
    font-weight: 700;
    line-height: 1;
}

/* The badge is positioned absolutely inside `.product-thumb .image`
   (and similar variants). Force these to act as positioning contexts
   even when the theme didn't already make them relative. The RIVO
   theme's `.card-product_wrapper` already has `position: relative`
   set in style.css, so it isn't repeated here. */
.product-thumb,
.product-thumb .image,
.product-card,
.product-card .image,
.ot-product-card,
.ot-product-card .image,
.ot-product-thumb,
.ot-product-thumb .image {
    position: relative;
}

/* Stacked variant Ã¢â‚¬â€ used inside the RIVO `.card-product_wrapper`
   where the top-left is occupied by `.product-badge_list` (sale/new
   chips) and the top-right by `.product-action_list` (wishlist).
   Phase 5C places the offer badge at the BOTTOM-START of the image
   area so it never collides with either pre-existing UI element.
   Wins for both LTR and RTL since `inset-inline-start` flips. */
.card-product_wrapper .oc-offer-badge,
.oc-offer-badge--stacked {
    inset-block-start: auto;
    inset-block-end: 0px;
    inset-inline-start: 2px;
}

/* ===== Product page block Ã¢â‚¬â€ RIVO identity (Phase 5B) =================
 *
 * Palette references the storefront's existing tokens:
 *   --rivo-navy   : #12314d   (primary)
 *   --rivo-gold   : #c9a84c   (accent)
 *   --rivo-ivory  : #f0ede6   (warm light bg)
 *   --rivo-light  : #f8f6f1   (block bg)
 *   --rivo-border-soft : #eee6dc
 *   --rivo-text   : navy
 *
 * Per-offer admin colors override `--oc-offer-block-accent` and
 * `--oc-offer-badge-bg` via an inline style on the block.
 * =====================================================================*/

.oc-offer-product-block {
    --oc-rivo-navy:        #12314d;
    --oc-rivo-navy-rgb:    18, 49, 77;
    --oc-rivo-gold:        #c9a84c;
    --oc-rivo-gold-rgb:    201, 168, 76;
    --oc-rivo-ivory:       #f0ede6;
    --oc-rivo-light:       #f8f6f1;
    --oc-rivo-border-soft: #eee6dc;

    --oc-offer-block-bg:     var(--oc-rivo-light, #f8f6f1);
    --oc-offer-block-border: var(--oc-rivo-border-soft, #eee6dc);
    --oc-offer-block-accent: var(--oc-rivo-navy, #12314d);
    --oc-offer-block-text:   var(--oc-rivo-navy, #12314d);
    --oc-offer-block-muted:  #6b7c93;

    position: relative;
    background: linear-gradient(
            180deg,
            var(--oc-offer-block-bg) 0%,
            #ffffff 100%
    );
    border: 1px solid var(--oc-offer-block-border);
    border-radius: 14px;
    padding: 18px 20px 20px;
    margin: 16px 0 14px;
    color: var(--oc-offer-block-text);
    box-shadow:
            0 1px 0 rgba(var(--oc-rivo-navy-rgb), 0.02),
            0 8px 24px -16px rgba(var(--oc-rivo-navy-rgb), 0.18);
    font-family: "Cairo", "Tajawal", inherit;
}

.oc-offer-product-block::before {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    inset-inline-end: 0;
    height: 3px;
    background: linear-gradient(
            90deg,
            var(--oc-offer-block-accent) 0%,
            var(--oc-rivo-gold) 100%
    );
    border-start-start-radius: 14px;
    border-start-end-radius: 14px;
}

/* Header (pill + headline) ------------------------------------------ */

.oc-offer-product-block__header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.oc-offer-product-block__pill {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 0.4em;
    padding: 4px 12px;
    background: var(--oc-offer-block-accent);
    color: #ffffff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.oc-offer-product-block__pill::before {
    content: "Ã¢Å“Â¦";
    color: var(--oc-rivo-gold);
    font-size: 13px;
    line-height: 1;
}

.oc-offer-product-block__headline {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--oc-offer-block-text);
    line-height: 1.35;
}

/* Before / Now / Save preview --------------------------------------- */

.oc-offer-preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--oc-offer-block-border);
    border-radius: 10px;
    margin-bottom: 16px;
}

.oc-offer-preview__col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.oc-offer-preview__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--oc-offer-block-muted);
    font-weight: 600;
}

.oc-offer-preview__value {
    font-size: 17px;
    font-weight: 700;
    color: var(--oc-offer-block-text);
    transition: color 0.2s ease;
}

.oc-offer-preview__value--before {
    color: var(--oc-offer-block-muted);
    text-decoration: line-through;
    text-decoration-color: rgba(var(--oc-rivo-navy-rgb), 0.35);
    font-weight: 500;
}

.oc-offer-preview__value--now {
    color: var(--oc-offer-block-accent);
    font-size: 22px;
}

.oc-offer-saving {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 4px 12px;
    background: rgba(var(--oc-rivo-gold-rgb), 0.15);
    color: #8a6f25;
    border: 1px solid rgba(var(--oc-rivo-gold-rgb), 0.35);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    width: max-content;
    max-width: 100%;
}

.oc-offer-saving__percent {
    font-weight: 600;
    opacity: 0.8;
}

/* Tier section ------------------------------------------------------ */

.oc-offer-tier-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.oc-offer-tier-section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.oc-offer-tier-section__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--oc-offer-block-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.oc-offer-tier-section__hint {
    font-size: 12px;
    color: var(--oc-offer-block-muted);
}

.oc-offer-tier-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Tier button -------------------------------------------------------- */

button.oc-offer-tier-item,
.oc-offer-tier-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 10px 18px;
    background: #ffffff;
    border: 1.5px solid var(--oc-offer-block-border);
    border-radius: 10px;
    color: var(--oc-offer-block-text);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.2;
    text-align: start;
    cursor: pointer;
    transition:
            border-color 0.18s ease,
            background 0.18s ease,
            color 0.18s ease,
            transform 0.12s ease,
            box-shadow 0.18s ease;
}

button.oc-offer-tier-item:hover,
.oc-offer-tier-item:hover {
    border-color: rgba(var(--oc-rivo-navy-rgb), 0.35);
    box-shadow: 0 4px 12px -8px rgba(var(--oc-rivo-navy-rgb), 0.4);
    transform: translateY(-1px);
}

button.oc-offer-tier-item:focus-visible,
.oc-offer-tier-item:focus-visible {
    outline: none;
    border-color: var(--oc-offer-block-accent);
    box-shadow: 0 0 0 3px rgba(var(--oc-rivo-navy-rgb), 0.18);
}

button.oc-offer-tier-item.is-active,
.oc-offer-tier-item.is-active,
.oc-offer-tier-item--best {
    background: var(--oc-offer-block-accent);
    border-color: var(--oc-offer-block-accent);
    color: #ffffff;
    box-shadow: 0 6px 18px -10px rgba(var(--oc-rivo-navy-rgb), 0.55);
}

.oc-offer-tier-item__qty {
    font-weight: 800;
    font-size: 15px;
}

.oc-offer-tier-item__sep {
    opacity: 0.55;
    font-weight: 400;
}

.oc-offer-tier-item__price,
.oc-offer-tier-item__bonus {
    font-weight: 700;
}

.oc-offer-tier-item__label {
    font-size: 11px;
    opacity: 0.7;
    margin-inline-start: 4px;
    padding-inline-start: 6px;
    border-inline-start: 1px solid currentColor;
}

.oc-offer-tier-item__chip {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    background: var(--oc-rivo-gold);
    color: #3c2f10;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.03em;
    margin-inline-start: 6px;
}

.oc-offer-tier-item.is-active .oc-offer-tier-item__chip,
.oc-offer-tier-item--best .oc-offer-tier-item__chip {
    background: var(--oc-rivo-gold);
    color: #3c2f10;
}

/* Footer note + quantity hint --------------------------------------- */

.oc-offer-product-block__note {
    margin: 6px 0 0;
    padding-block-start: 12px;
    border-block-start: 1px dashed rgba(var(--oc-rivo-navy-rgb), 0.12);
    font-size: 12px;
    color: var(--oc-offer-block-muted);
    line-height: 1.5;
}

.oc-offer-quantity-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 8px 14px;
    margin: 10px 0 0;
    background: rgba(var(--oc-rivo-gold-rgb), 0.12);
    color: #6f5616;
    border: 1px dashed rgba(var(--oc-rivo-gold-rgb), 0.5);
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.45;
}

.oc-offer-quantity-hint__icon {
    color: var(--oc-rivo-gold, #c9a84c);
    font-size: 14px;
    line-height: 1;
}

/* ===== Cart line offer note ========================================= */

.oc-cart-offer-note {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 100%;
    margin-block: 8px 4px;
    padding: 8px 10px;
    background: #eefaf3;
    border: 1px solid #bfe8cd;
    border-radius: 8px;
    color: #17633a;
    font-size: 12px;
    line-height: 1.45;
}

.oc-cart-offer-note__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 18px;
    block-size: 18px;
    margin-block-start: 1px;
    border-radius: 999px;
    background: #1f8f52;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.oc-cart-offer-note__copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.oc-cart-offer-note__title {
    font-weight: 700;
    color: #155f37;
}

.oc-cart-offer-note__detail {
    color: #3f7f5a;
    font-size: 11px;
}

.oc-cart-offer-note__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-block-start: 4px;
    color: #2f6f4e;
    font-size: 11px;
    font-weight: 700;
}

.oc-cart-offer-note--drawer,
.oc-cart-offer-note--checkout {
    display: flex;
    margin-block: 6px 4px;
    padding: 6px 8px;
    font-size: 11px;
}

.oc-cart-offer-note--drawer .oc-cart-offer-note__icon,
.oc-cart-offer-note--checkout .oc-cart-offer-note__icon {
    inline-size: 16px;
    block-size: 16px;
    font-size: 10px;
}

.oc-cart-offer-hint {
    display: inline-flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 100%;
    margin-block: 8px 4px;
    padding: 8px 10px;
    background: #fff8e6;
    border: 1px solid #f1d58b;
    border-radius: 8px;
    color: #77540f;
    font-size: 12px;
    line-height: 1.45;
}

.oc-cart-offer-hint--activate,
.oc-cart-offer-hint--upgrade {
    background: #fff8e6;
    border-color: #f1d58b;
    color: #77540f;
}

.oc-cart-offer-hint--repeat {
    background: #fff4d8;
    border-color: #e2b64d;
    color: #6d4a07;
}

.oc-cart-offer-hint__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 18px;
    block-size: 18px;
    margin-block-start: 1px;
    border-radius: 999px;
    background: #d2a735;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.oc-cart-offer-hint--repeat .oc-cart-offer-hint__icon {
    background: #d69818;
}

.oc-cart-offer-hint__message,
.oc-cart-offer-hint__text {
    flex: 1 1 140px;
    min-width: 0;
    font-weight: 700;
}

.oc-cart-offer-hint__action {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    border: 1px solid rgba(18, 49, 77, 0.15);
    border-radius: 7px;
    padding: 5px 12px;
    background: #12314d;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
    cursor: pointer;
    white-space: nowrap;
}

.oc-cart-offer-hint__action:hover,
.oc-cart-offer-hint__action:focus {
    background: #0d2438;
    color: #ffffff;
}

.oc-cart-offer-hint__action:disabled,
.oc-cart-offer-hint__action[aria-disabled="true"] {
    background: #c7cdd3;
    border-color: #c7cdd3;
    box-shadow: none;
    color: #ffffff;
    cursor: not-allowed;
}

.oc-cart-offer-hint__stock {
    flex: 1 1 100%;
    color: #9a3412;
    font-size: 11px;
    font-weight: 700;
}

.oc-cart-offer-hint--drawer,
.oc-cart-offer-hint--checkout {
    display: flex;
    margin-block: 6px 4px;
    padding: 6px 8px;
    font-size: 11px;
}

.oc-cart-offer-hint--drawer {
    align-items: center;
}

.oc-cart-offer-hint--drawer .oc-cart-offer-hint__message {
    flex: 1 1 100%;
}

.oc-cart-offer-hint--drawer .oc-cart-offer-hint__action {
    min-height: 30px;
    padding: 5px 12px;
    font-size: 12px;
}

.oc-cart-offer-hint--checkout .oc-cart-offer-hint__message {
    flex-basis: auto;
}

.oc-cart-offer-hint--checkout .oc-cart-offer-hint__action {
    display: none;
}

.oc-cart-offer-hint--drawer .oc-cart-offer-hint__icon,
.oc-cart-offer-hint--checkout .oc-cart-offer-hint__icon {
    inline-size: 16px;
    block-size: 16px;
    font-size: 12px;
}

/* ===== Dedicated offers page ======================================== */

.oc-offers-page {
    --oc-offers-navy: #12314d;
    --oc-offers-gold: #c9a84c;
    --oc-offers-ink: #172033;
    --oc-offers-muted: #6b7280;
    --oc-offers-line: #e7edf4;
    --oc-offers-soft: #f7f9fc;
    --oc-offers-warm: #fff8e7;

    color: var(--oc-offers-ink);
}

.oc-offers-breadcrumb {
    margin-block: 18px 10px;
}

.oc-offers-breadcrumb__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--oc-offers-muted);
    font-size: 13px;
}

.oc-offers-breadcrumb__item:not(:last-child)::after {
    content: "/";
    margin-inline-start: 8px;
    color: #b5beca;
}

.oc-offers-breadcrumb__item a {
    color: var(--oc-offers-muted);
    text-decoration: none;
}

.oc-offers-breadcrumb__item span {
    color: var(--oc-offers-navy);
    font-weight: 700;
}

.oc-offers-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 0 0 12px;
}

.oc-offers-hero__title {
    margin: 0;
    color: var(--oc-offers-navy);
    font-size: clamp(24px, 3.2vw, 36px);
    font-weight: 800;
    line-height: 1.15;
}

.oc-offers-hero__description {
    max-width: 620px;
    margin: 0;
    color: var(--oc-offers-muted);
    font-size: 15px;
    line-height: 1.7;
}

.oc-offers-count {
    flex: 0 0 auto;
    padding: 8px 14px;
    border: 1px solid rgba(201, 168, 76, 0.35);
    border-radius: 999px;
    background: var(--oc-offers-warm);
    color: #725912;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.oc-offers-toolbar {
    display: grid;
    grid-template-columns: minmax(170px, 1.1fr) minmax(170px, 1.1fr) minmax(150px, 0.9fr) minmax(96px, 0.5fr) auto;
    gap: 12px;
    align-items: end;
    margin-block: 18px 24px;
    padding: 14px;
    border: 1px solid var(--oc-offers-line);
    border-radius: 8px;
    background: #ffffff;
}

.oc-offers-filter {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    color: var(--oc-offers-muted);
    font-size: 12px;
    font-weight: 700;
}

.oc-offers-filter .form-select {
    min-height: 42px;
    border-color: #d9e1ea;
    color: var(--oc-offers-navy);
    font-weight: 700;
}

.oc-offers-toolbar__submit {
    min-height: 42px;
    padding-inline: 22px;
    border-color: var(--oc-offers-navy);
    background: var(--oc-offers-navy);
    font-weight: 800;
}

.oc-offers-layout {
    display: grid;
    gap: 24px;
}

.oc-offers-layout.has-left {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
}

.oc-offers-layout.has-right {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
}

.oc-offers-layout.has-both {
    grid-template-columns: minmax(190px, 240px) minmax(0, 1fr) minmax(190px, 240px);
}

.oc-offers-results {
    margin-block: 0 12px;
    color: var(--oc-offers-muted);
    font-size: 13px;
    font-weight: 700;
}

.oc-offers-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.oc-offers-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #ffffff;
    border: 1px solid var(--oc-offers-line);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.oc-offers-card:hover {
    border-color: rgba(18, 49, 77, 0.18);
    box-shadow: 0 18px 34px -28px rgba(18, 49, 77, 0.42);
    transform: translateY(-2px);
}

.oc-offers-card__media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--oc-offers-soft);
}

.oc-offers-card__image-link,
.oc-offers-card__image-link img {
    display: block;
    width: 100%;
    height: 100%;
}

.oc-offers-card__image-link img {
    object-fit: contain;
    padding: 12px;
}

.oc-offers-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 9px;
    padding: 14px;
}

.oc-offers-card__name {
    color: var(--oc-offers-ink);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.45;
    text-decoration: none;
}

.oc-offers-card__name:hover {
    color: var(--oc-offers-navy);
}

.oc-offers-card__offer-text {
    color: #6d520f;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.5;
}

.oc-offers-card__hint {
    padding: 7px 9px;
    border: 1px dashed rgba(201, 168, 76, 0.65);
    border-radius: 7px;
    background: var(--oc-offers-warm);
    color: #6d520f;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
}

.oc-offers-card__saving {
    width: max-content;
    max-width: 100%;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eefaf3;
    color: #17633a;
    font-size: 11px;
    font-weight: 800;
}

/* ===== Generic product thumb offer metadata ========================= */

.oc-product-offer-hint {
    display: block;
    margin-block: 7px 5px;
    padding: 6px 9px;
    max-width: 100%;
    border: 1px dashed rgba(201, 168, 76, 0.62);
    border-radius: 8px;
    background: #fff8e7;
    color: #6d520f;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
    text-align: center;
}

.oc-product-offer-saving {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    max-width: 100%;
    margin-block: 2px 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eefaf3;
    color: #17633a;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.35;
}

.oc-offers-card__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin-block-start: auto;
}

.oc-offers-card__price-new {
    color: var(--oc-offers-navy);
    font-size: 16px;
    font-weight: 900;
}

.oc-offers-card__price-old {
    color: var(--oc-offers-muted);
    font-size: 12px;
    text-decoration: line-through;
}

.oc-offers-card__actions {
    margin-block-start: 2px;
}

.oc-offers-card__actions.product-action_bot {
    position: static;
    inset: auto;
    z-index: auto;
    transform: none;
    opacity: 1;
    visibility: visible;
    width: 100%;
    text-align: center;
}

.oc-offers-card__actions.product-action_bot > * {
    width: 100%;
}

.oc-offers-card__actions.product-action_bot .tf-btn.btn-white {
    background: var(--oc-offers-navy);
    border-color: var(--oc-offers-navy);
    color: #ffffff;
}

.oc-offers-card__actions.product-action_bot .tf-btn.btn-white:hover {
    background: #ffffff;
    border-color: var(--oc-offers-navy);
    color: var(--oc-offers-navy);
}

.oc-offers-card__actions form {
    margin: 0;
}

.oc-offers-card__button {
    width: 100%;
    min-height: 40px;
    border-color: var(--oc-offers-navy);
    background: var(--oc-offers-navy);
    font-size: 13px;
    font-weight: 900;
}

.oc-offers-card__button:disabled {
    border-color: #d7dce2;
    background: #d7dce2;
    color: #ffffff;
    cursor: not-allowed;
}

.oc-offers-tier-filter {
    margin: 0;
    padding-block: 0 14px;
    border-block-end: 1px solid var(--oc-offers-line, #e7edf4);
}

.oc-offers-tier-filter__title {
    margin-block-end: 10px;
    color: var(--oc-offers-navy, #12314d);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.oc-offers-tier-filter__list {
    display: grid;
    gap: 2px;
}

.oc-offers-tier-filter__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 34px;
    margin: 0;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--oc-offers-ink, #172033);
    font-size: 13px;
    font-weight: 600;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.oc-offers-tier-filter__item:hover {
    background: var(--oc-offers-soft, #f7f9fc);
}

.oc-offers-tier-filter__item.is-active {
    background: rgba(18, 49, 77, 0.07);
    color: var(--oc-offers-navy, #12314d);
    font-weight: 800;
}

.oc-offers-tier-filter__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.oc-offers-tier-filter__count {
    flex: 0 0 auto;
    min-width: 22px;
    padding: 1px 8px;
    border-radius: 999px;
    background: #edf1f6;
    color: var(--oc-offers-muted, #6b7280);
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.oc-offers-tier-filter__item.is-active .oc-offers-tier-filter__count {
    background: rgba(18, 49, 77, 0.12);
    color: var(--oc-offers-navy, #12314d);
}

.oc-offers-tier-filter__item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.oc-offers-tier-filter__mark {
    display: inline-flex;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    border: 1.5px solid #9aa5b1;
    border-radius: 999px;
    background: #ffffff;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.oc-offers-tier-filter__item.is-active .oc-offers-tier-filter__mark {
    border-color: var(--oc-offers-navy, #12314d);
    background: var(--oc-offers-navy, #12314d);
    box-shadow: inset 0 0 0 4px #ffffff;
}

.oc-offers-pagination {
    margin-block: 22px 34px;
}

.oc-offers-empty {
    display: flex;
    min-height: 300px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    border: 1px dashed #d9e1ea;
    border-radius: 8px;
    background: #ffffff;
    padding: 44px 20px;
    text-align: center;
}

.oc-offers-empty__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: var(--oc-offers-warm);
    color: #725912;
    font-size: 22px;
    font-weight: 900;
}

.oc-offers-empty__title {
    margin: 0;
    color: var(--oc-offers-navy);
    font-size: 20px;
    font-weight: 800;
}

.oc-offers-empty__button {
    min-width: 150px;
    border-color: var(--oc-offers-navy);
    background: var(--oc-offers-navy);
    font-weight: 800;
}

/* ===== Responsive ==================================================== */

@media (max-width: 1199px) {
    .oc-offers-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

    .oc-offers-toolbar__submit {
        grid-column: 1 / -1;
    }

    .oc-offers-layout,
    .oc-offers-layout.has-left,
    .oc-offers-layout.has-right,
    .oc-offers-layout.has-both {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .oc-offers-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .oc-offers-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (max-width: 540px) {
    .oc-offers-toolbar {
        grid-template-columns: 1fr;
    }

    .oc-offers-grid {
        grid-template-columns: 1fr;
    }

    .oc-offer-product-block {
        padding: 14px 14px 16px;
    }

    .oc-offer-preview {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 12px;
    }

    .oc-offer-preview__col--save {
        grid-column: 1 / -1;
    }

    .oc-offer-preview__value {
        font-size: 15px;
    }

    .oc-offer-preview__value--now {
        font-size: 18px;
    }

    button.oc-offer-tier-item,
    .oc-offer-tier-item {
        padding: 8px 14px;
        font-size: 13px;
    }

    .oc-offer-tier-item__qty {
        font-size: 14px;
    }

    .oc-offer-badge {
        font-size: 11px;
        padding: 3px 8px;
    }
}

/* ===================================================================== */
/* Phase 9 â€” Single offer page (.oc-offer-single).                       */
/* Scoped + logical properties so RTL flips automatically. Reuses the    */
/* existing .oc-offers-grid / .oc-offers-card product card styles.       */
/* ===================================================================== */

/* ----- Single-offer hero: title + end-date countdown ----- */
/* Title and countdown are two SEPARATE blocks: a standalone page
   heading, then a distinct countdown card below it. */
.oc-offer-single__hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-block: 0 24px;
}

.oc-offer-single__hero-main {
    width: 100%;
    min-width: 0;
}

.oc-offer-single__title {
    position: relative;
    margin: 0;
    padding-block-end: 12px;
    font-size: clamp(19px, 2.1vw, 26px);
    font-weight: 800;
    line-height: 1.25;
    color: var(--oc-offers-navy, #12314d);
}

.oc-offer-single__title::after {
    content: "";
    position: absolute;
    inset-block-end: 0;
    inset-inline-start: 0;
    width: 54px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--oc-offers-navy, #12314d) 0%, #c9a84c 100%);
}

.oc-offer-single__meta {
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

/* Offer end-date countdown â€” its own distinct card, separate from the
   title, spanning the full content width. */
.oc-offer-countdown {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    border: 1px solid var(--oc-offer-block-border, #c7d6ee);
    border-radius: 14px;
    background: linear-gradient(180deg, var(--oc-offer-block-bg, #f7faff) 0%, #ffffff 72%);
    box-shadow: 0 14px 30px -26px rgba(18, 49, 77, 0.5);
    overflow: hidden;
}

.oc-offer-countdown::before {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    inset-inline-end: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--oc-offers-navy, #12314d) 0%, #c9a84c 100%);
}

.oc-offer-countdown__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
    color: var(--oc-offers-muted, #6b7280);
}

.oc-offer-countdown__label::before {
    content: "\23f1";
    font-size: 14px;
    line-height: 1;
}

.oc-offer-countdown__timer {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.oc-offer-countdown__seg {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 54px;
    padding: 9px 6px;
    border-radius: 12px;
    background: var(--oc-offers-navy, #12314d);
    color: #fff;
    box-shadow: 0 8px 18px -12px rgba(18, 49, 77, 0.7);
}

.oc-offer-countdown__seg b {
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.oc-offer-countdown__seg i {
    font-size: 10px;
    font-weight: 700;
    font-style: normal;
    letter-spacing: .02em;
    opacity: .8;
}

.oc-offer-countdown__sep {
    align-self: center;
    margin-block-start: -8px;
    color: var(--oc-offer-block-border, #c7d6ee);
    font-size: 18px;
    font-weight: 900;
}

/* ----- Section blocks ----- */
.oc-offer-single__section {
    margin-block-end: 28px;
}


@media (max-width: 575px) {
    .oc-offer-single__hero {
        padding: 18px 16px;
    }

    .oc-offer-countdown__seg {
        min-width: 46px;
        padding: 7px 4px;
    }

    .oc-offer-countdown__seg b {
        font-size: 18px;
    }
}

/* ===================================================================== */
/* Phase 10 â€” Offer Pages UX / Conversion (display only).                */
/* Scoped under .oc-offers-page / .oc-offer-info-page. Logical           */
/* properties used throughout so RTL/LTR flip automatically. No global   */
/* element selectors. No cart/discount logic involved.                   */
/* ===================================================================== */

.oc-offers-page .oc-offers-hero__main {
    min-width: 0;
}

.oc-offers-page .oc-offers-hero__cta,
.oc-offer-info-page .oc-offer-single__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-block-start: 14px;
    padding: 10px 22px;
    border-radius: 999px;
    background: var(--oc-offers-navy, #12314d);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color .18s ease, transform .18s ease;
}

.oc-offers-page .oc-offers-hero__cta:hover,
.oc-offer-info-page .oc-offer-single__cta:hover {
    background: #1c4670;
    transform: translateY(-1px);
    color: #fff;
}

.oc-offers-page .oc-offers-hero__cta:focus-visible,
.oc-offer-info-page .oc-offer-single__cta:focus-visible,
.oc-offers-page .oc-offers-clear:focus-visible,
.oc-offers-page .oc-offers-cat-filter__item:focus-visible {
    outline: 3px solid rgba(18, 49, 77, 0.35);
    outline-offset: 2px;
}

/* Sidebar offer filters (collapsible on mobile via <details>) */
.oc-offers-page .oc-offers-filters {
    margin-block-end: 18px;
    border: 1px solid var(--oc-offers-line, #e7edf4);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.oc-offers-page .oc-offers-filters__summary {
    display: none; /* desktop: filters always shown, no toggle */
    padding: 12px 14px;
    background: var(--oc-offers-soft, #f7f9fc);
    color: var(--oc-offers-navy, #12314d);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.oc-offers-page .oc-offers-filters__summary::-webkit-details-marker {
    display: none;
}

.oc-offers-page .oc-offers-filters__body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 14px;
}


.oc-offers-page .oc-offers-cat-filter__title {
    margin-block-end: 10px;
    color: var(--oc-offers-navy, #12314d);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.oc-offers-page .oc-offers-cat-filter__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.oc-offers-page .oc-offers-cat-filter__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 7px;
    color: var(--oc-offers-ink, #172033);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.oc-offers-page .oc-offers-cat-filter__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.oc-offers-page .oc-offers-cat-filter__count {
    flex: 0 0 auto;
    min-width: 22px;
    padding: 1px 8px;
    border-radius: 999px;
    background: #edf1f6;
    color: var(--oc-offers-muted, #6b7280);
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.oc-offers-page .oc-offers-cat-filter__item:hover {
    background: var(--oc-offers-soft, #f7f9fc);
}

.oc-offers-page .oc-offers-cat-filter__item.is-active {
    background: rgba(18, 49, 77, 0.07);
    color: var(--oc-offers-navy, #12314d);
    font-weight: 800;
}

.oc-offers-page .oc-offers-cat-filter__item.is-active .oc-offers-cat-filter__count {
    background: rgba(18, 49, 77, 0.12);
    color: var(--oc-offers-navy, #12314d);
}

.oc-offers-page .oc-offers-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border: 1px dashed #cdd6e0;
    border-radius: 8px;
    background: #fff;
    color: var(--oc-offers-muted, #6b7280);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.oc-offers-page .oc-offers-clear:hover {
    border-color: var(--oc-offers-navy, #12314d);
    color: var(--oc-offers-navy, #12314d);
}

/* Sidebar "Categories" navigation module — styled to match the offers
   sidebar category filter card. STYLE ONLY: every link href / route /
   data-oc-category-link attribute and the active state are unchanged.
   Self-contained (not scoped to a page root + uses var() fallbacks) so it
   renders correctly anywhere the module is placed. */
.oc-cat-nav {
    margin-block-end: 18px;
    border: 1px solid var(--oc-offers-line, #e7edf4);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.oc-cat-nav__title {
    margin: 0;
    padding: 14px 14px 8px;
    color: var(--oc-offers-navy, #12314d);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.oc-cat-nav__list,
.oc-cat-nav__sublist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.oc-cat-nav__list {
    padding: 8px 12px 12px;
}

.oc-cat-nav__sublist {
    margin-block-start: 2px;
}

/* Children: one indent step + a solid tree guide line on the inline-start
   edge (the right edge in RTL) so they read as nested under the parent. */
.oc-cat-nav__sublist--child {
    margin-inline-start: 11px;
    padding-inline-start: 10px;
    border-inline-start: 1px solid var(--oc-offers-line, #e7edf4);
}

/* Grandchildren: a further indent step + a lighter dashed guide line. */
.oc-cat-nav__sublist--grandchild {
    margin-inline-start: 10px;
    padding-inline-start: 10px;
    border-inline-start: 1px dashed var(--oc-offers-line, #e7edf4);
}

.oc-cat-nav__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 7px;
    color: var(--oc-offers-ink, #172033);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.oc-cat-nav__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.oc-cat-nav__count {
    flex: 0 0 auto;
    min-width: 22px;
    padding: 1px 8px;
    border-radius: 999px;
    background: #edf1f6;
    color: var(--oc-offers-muted, #6b7280);
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

/* Level typography: weight + colour + size step down with depth so parent,
   child and grandchild are clearly distinguishable at a glance. */
.oc-cat-nav__item--parent {
    font-weight: 700;
    color: var(--oc-offers-ink, #172033);
}

.oc-cat-nav__item--child {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--oc-offers-muted, #6b7280);
}

.oc-cat-nav__item--grandchild {
    font-size: 12px;
    font-weight: 500;
    color: var(--oc-offers-muted, #6b7280);
    opacity: 0.92;
}

.oc-cat-nav__item:hover {
    background: var(--oc-offers-soft, #f7f9fc);
    color: var(--oc-offers-navy, #12314d);
}

.oc-cat-nav__item.is-active {
    background: rgba(18, 49, 77, 0.07);
    color: var(--oc-offers-navy, #12314d);
    font-weight: 800;
}

.oc-cat-nav__item.is-active .oc-cat-nav__count {
    background: rgba(18, 49, 77, 0.12);
    color: var(--oc-offers-navy, #12314d);
}

.oc-cat-nav__item.is-active:hover {
    background: rgba(18, 49, 77, 0.10);
}

.oc-cat-nav__item:focus-visible {
    outline: 3px solid rgba(18, 49, 77, 0.35);
    outline-offset: 2px;
}

/* Restyle the shared filter module ("Enhanced Search") so it matches the
   offer filters card. Scoped to .ot-cat-page so it applies to BOTH the
   offers pages and the category / manufacturer / search listing pages
   (which share the .ot-cat-page root) for a consistent sidebar look.
   The "Apply" button is hidden only on the offers pages (they auto-apply
   on change); other pages keep their working Apply button. */
.ot-cat-page [data-oc-filter-module] {
    margin-block-end: 18px;
    border: 1px solid var(--oc-offers-line, #e7edf4);
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
    overflow: hidden;
}

.ot-cat-page [data-oc-filter-module] .card-header {
    padding: 12px 14px;
    background: var(--oc-offers-soft, #f7f9fc);
    border: 0;
    color: var(--oc-offers-navy, #12314d);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.ot-cat-page [data-oc-filter-module] .list-group {
    padding: 8px;
    border: 0;
}

.ot-cat-page [data-oc-filter-module] .list-group-item {
    padding: 4px 6px;
    border: 0;
    background: transparent;
}

.ot-cat-page [data-oc-filter-module] a.list-group-item {
    margin-block: 2px 4px;
    color: var(--oc-offers-navy, #12314d);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.01em;
    pointer-events: none;
}

.ot-cat-page [data-oc-filter-module] .form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    margin: 0;
    padding: 5px 8px;
    border-radius: 8px;
}

.ot-cat-page [data-oc-filter-module] .form-check:hover {
    background: var(--oc-offers-soft, #f7f9fc);
}

.ot-cat-page [data-oc-filter-module] .form-check-input {
    flex: 0 0 auto;
    float: none;
    margin: 0;
    cursor: pointer;
}

.ot-cat-page [data-oc-filter-module] .form-check-input:checked {
    background-color: var(--oc-offers-navy, #12314d);
    border-color: var(--oc-offers-navy, #12314d);
}

.ot-cat-page [data-oc-filter-module] .form-check-label {
    margin: 0;
    color: var(--oc-offers-ink, #172033);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* Hide the redundant Apply button on the offers AND category pages (both
   auto-apply filters on change via AJAX). Manufacturer/search keep theirs. */
.oc-offers-page [data-oc-filter-module] .card-footer,
#product-category [data-oc-filter-module] .card-footer {
    display: none;
}

/* Single-offer page: neutralise the theme's sticky/scrolling sidebar so
   the column sits naturally next to the offer content (matches the
   listing page's sidebar behaviour). */
#marketing-offer-info .ot-cat-sidebar {
    position: static;
    height: auto;
    max-height: none;
    overflow: visible;
    overflow-y: visible;
    overscroll-behavior: auto;
}

/* Empty state extra line */
.oc-offers-page .oc-offers-empty__text {
    margin: 6px 0 16px;
    color: var(--oc-offers-muted, #6b7280);
    font-size: 14px;
    line-height: 1.6;
}

/* Loading state: keep layout stable while AJAX swaps the grid */
.oc-offers-page #marketing-offer-list.ot-is-loading {
    opacity: 0.55;
    transition: opacity .15s ease;
    pointer-events: none;
}

/* Anchor scroll offset for the CTA jump */
.oc-offer-info-page #oc-offer-products {
    scroll-margin-block-start: 90px;
}

/* Responsive */
@media (max-width: 991px) {
    .oc-offers-page .oc-offers-filters__summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .oc-offers-page .oc-offers-filters__summary::after {
        content: "+";
        font-size: 18px;
        font-weight: 700;
    }

    .oc-offers-page .oc-offers-filters[open] .oc-offers-filters__summary::after {
        content: "\2212";
    }
}