/**
 * Design Sprint A — Стили блока «Hoy con descuento»
 *
 * Использует Design System токены из colors_and_type.css
 * (уже загружен через cgm-product.css → kit.css → @import colors_and_type.css)
 *
 * Загружается через cgm_enqueue_discounts_css() (inc-discounts.php) на:
 *   - front-page (/)
 *   - /descuentos/
 *   - любой странице с [cgm_discounts]
 *
 * Upload to: /www/wwwroot/curly.sale/wp-content/themes/generatepress-child/assets/css/cgm-discounts.css
 *
 * @version Design Sprint A (May 2026)
 */

/* ============================================================
   DESIGN TOKENS (inline fallback для страниц без colors_and_type.css)
   ============================================================ */
:root {
    /* Design System palette — sage → cream/coral (names kept stable) */
    --ds-sage:           #E8826B;
    --ds-sage-hover:     #D96A52;
    --ds-terracotta:     #A6705A;
    --ds-mint:           #FBF8F4;
    --ds-white:          #FFFFFF;
    --ds-charcoal:       #2B2622;
    --ds-slate:          #8A817A;
    --ds-silver:         #B8AFA6;
    --ds-border:         #EDE6DD;
    --ds-amber:          #F59E0B;
    --ds-crimson:        #E8220A;
    --ds-violet:         #7C3AED;
    --ds-radius:        16px;
    --ds-shadow-card:    var(--shadow-sm, 0 1px 3px rgba(43,38,34,0.06));
    --ds-shadow-hover:   var(--shadow-md, 0 4px 16px rgba(43,38,34,0.06));
    --ds-motion:         200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   SECTION — .cgm-discounts-section
   ============================================================ */

.cgm-discounts-section {
    padding: 72px 0;
    background: var(--bg-page, var(--ds-mint));
}

/* Header row: заголовок + timestamp ───────────── */
.cgm-ds__header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.cgm-ds__title {
    font-family: var(--font-display, 'Fraunces', Georgia, serif);
    font-size: clamp(1.6rem, 3vw, 2.18rem);   /* editorial H2 ~35px */
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--fg-1, var(--ds-charcoal));
    margin: 0;
}

.cgm-ds__meta {
    font-size: var(--text-sm, 0.875rem);
    color: var(--fg-2, var(--ds-slate));
    margin: 0;
    white-space: nowrap;
}

/* Grid — перенесено в cgm-card.css §1 (Sprint 24) */

/* CTA footer ────────────────────────────────── */
.cgm-ds__footer {
    text-align: center;
}

/* ============================================================
   CARD — .cgm-discount-card  (Sprint 23: устарело)
   ============================================================ */
/* → cgm_render_discount_card() теперь вызывает cgm_render_product_card()
      Все стили карточки — в cgm-card.css.
   → .badge-amber / .badge-crimson / .badge-violet — в cgm-card.css §4 */

/* ============================================================
   MOBILE OVERRIDES
   ============================================================ */

@media (max-width: 767px) {
    .cgm-discounts-section {
        padding: 32px 0;
    }

    .cgm-ds__header {
        margin-bottom: 16px;
        gap: 8px;
    }

    .cgm-ds__title {
        font-size: 1.25rem;
    }
}
