/**
 * abcweb_sales — storefront styles for on-page promotions.
 * Look replicates the legacy builder page (alfaram.nl/content/15-promoties)
 * with a fraction of its CSS. Accent colors are exposed as custom properties
 * so a theme can re-tint promos without overriding every rule; every var()
 * is preceded by a static fallback for browsers without custom properties.
 *
 * Compatibility notes (old iOS Safari):
 * - no `gap` in flex containers (iOS < 14.5) — spacing uses margins instead;
 *   grid uses `grid-gap` + `gap` (iOS < 12 only knows the prefixed name)
 * - rgba() instead of `rgb(r g b / a)` slash notation (iOS < 12.2)
 *
 * Typography selectors are prefixed with .sales-promos: the theme ships
 * `.rich-text p { font-size: 1rem }` and CMS content is wrapped in
 * .rich-text, so a single class would lose the cascade.
 */

.sales-promos {
    --sales-promo-accent: #64513F;
    --sales-promo-accent-hover: #7A654F;
    --sales-promo-accent-soft: rgba(100, 63, 31, 0.08);

    margin: 2rem 0;
}

.sales-promo + .sales-promo {
    margin-top: 4rem;
}

/* Section name — centered, underlined bar */
.sales-promo__header {
    text-align: center;
    border-bottom: 1px solid #E0E0E0;
    padding-bottom: 15px;
    margin-bottom: 40px;
}

.sales-promos .sales-promo__name {
    margin: 0;
    color: #64513F;
    color: var(--sales-promo-accent);
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 6px;
}

/* Two columns: copy | banner (stacked on mobile) */
.sales-promo__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 50px;
    gap: 50px;
}

@media (max-width: 767px) {
    .sales-promo__grid {
        grid-template-columns: 1fr;
    }
}

.sales-promo__banner {
    align-self: center;
}

.sales-promo__banner-link {
    display: block;
    text-decoration: none;
}

.sales-promo__banner img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/*
 * Layout variants. The grid is two equal columns; banner-left simply renders
 * the banner partial before the content partial (source order), so no column
 * swap rule is needed. The modifier class stays available for future
 * template-specific tweaks.
 */

/* Discount / code boxes */
.sales-promo__box {
    background-color: rgba(100, 63, 31, 0.08);
    background-color: var(--sales-promo-accent-soft);
    border-radius: 20px;
    padding: 1rem;
    margin: 25px 0;
    text-align: center;
}

.sales-promo__discount {
    padding: 1rem;
}

.sales-promos .sales-promo__discount-value {
    margin: 0;
    color: #64513F;
    color: var(--sales-promo-accent);
    font-size: 44px;
    font-weight: 800;
    line-height: 1.2;
}

.sales-promos .sales-promo__box-note,
.sales-promos .sales-promo__box-note p {
    margin: 0;
    color: #555;
    font-size: 13px;
}

.sales-promo__code-value {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: #64513F;
    color: var(--sales-promo-accent);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
}

.sales-promo .sales-promo__code-icon {
    margin-left: 10px;
    font-size: 1.2rem;
    vertical-align: middle;
    opacity: 0.6;
    transition: opacity 0.25s ease-out;
}

.sales-promo__code-value:hover .sales-promo__code-icon {
    opacity: 1;
}

.sales-promo__code-feedback {
    display: block;
    font-size: 12px;
    font-weight: 400;
    min-height: 1.25em;
}

/* Small print */
.sales-promos .sales-promo__combination,
.sales-promos .sales-promo__combination p {
    text-align: center;
    color: #AAA;
    font-size: 10px;
    font-style: italic;
}

.sales-promos .sales-promo__combination {
    margin: 15px 0;
}

.sales-promos .sales-promo__combination p {
    margin: 0;
}

/* CTA — pill button */
.sales-promo__cta {
    text-align: center;
    margin-top: 15px;
}

.sales-promo__cta-link {
    display: inline-block;
    padding: 12px 32px 8px;
    border-radius: 40px;
    background-color: #64513F;
    background-color: var(--sales-promo-accent);
    color: #FFF;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    transition: background-color 0.25s ease-out, letter-spacing 0.25s ease-out;
}

.sales-promo__cta-link:hover,
.sales-promo__cta-link:focus {
    background-color: #7A654F;
    background-color: var(--sales-promo-accent-hover);
    color: #FFF;
    letter-spacing: 4px;
    text-decoration: none;
}

/* Product carousel below the columns */
.sales-promo__products {
    margin-top: 40px;
}

/* Pre-init spacing only; flex `gap` needs iOS 14.5+, so older devices
   simply show the slides edge-to-edge until the swiper takes over. */
.sales-promo__products .swiper:not(.swiper-initialized) .swiper-wrapper {
    column-gap: 20px;
}
