/* ==========================================================================
   Amazon affiliate UI — product section + cookie consent
   Loaded site-wide via inc/affiliate.php (handle: mygall-affiliate).
   ========================================================================== */

/* ── Gift ideas product section ──────────────────────────────────────────── */
.aff-gifts {
    margin-block: var(--space-xl, 2.5rem);
}
.aff-gifts__head {
    margin-bottom: 1rem;
}
.aff-gifts__title {
    margin: 0 0 .25rem;
    font-size: clamp(1.25rem, 2.5vw, 1.6rem);
    line-height: 1.2;
}
.aff-gifts__notice {
    margin: 0;
    font-size: .8125rem;        /* ~13px — readable but unobtrusive (FTC: visible, not hidden) */
    font-style: italic;
    color: var(--color-text-muted, #6b7280);
}
.aff-gifts__preview-tag {
    display: inline-block;
    margin-left: .5rem;
    padding: .05rem .4rem;
    border-radius: 999px;
    font-style: normal;
    font-size: .6875rem;
    font-weight: 600;
    color: #fff;
    background: #d97706;
    vertical-align: middle;
}

.aff-gifts__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media (min-width: 700px) {
    .aff-gifts__grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── Product card ────────────────────────────────────────────────────────── */
.aff-card {
    display: flex;
}
.aff-card__link {
    display: flex;
    flex-direction: column;
    width: 100%;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
    background: var(--color-surface, #fff);
    transition: box-shadow .15s ease, transform .15s ease;
}
.aff-card__link:hover,
.aff-card__link:focus-visible {
    box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
    transform: translateY(-2px);
}
.aff-card__media {
    display: block;
    aspect-ratio: 1 / 1;
    background: var(--color-surface-alt, #f7f7f8);
}
.aff-card__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.aff-card__placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(135deg, #eef0f3 25%, transparent 25%) -8px 0,
        linear-gradient(225deg, #eef0f3 25%, transparent 25%) -8px 0,
        linear-gradient(45deg,  #eef0f3 25%, transparent 25%),
        linear-gradient(315deg, #eef0f3 25%, #f7f7f8 25%);
    background-size: 16px 16px;
}
.aff-card__title {
    flex: 1;
    padding: .6rem .7rem .35rem;
    font-size: .8125rem;
    line-height: 1.3;
}
.aff-card__cta {
    padding: 0 .7rem .7rem;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--color-accent, #b45309);
}

/* ── Cookie consent banner ───────────────────────────────────────────────── */
.mg-consent {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 9999;
    background: var(--color-surface, #fff);
    border-top: 1px solid var(--color-border, #e5e7eb);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, .10);
    padding: 1rem;
}
.mg-consent[hidden] { display: none; }
.mg-consent__inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
}
.mg-consent__text { flex: 1 1 320px; min-width: 0; }
.mg-consent__title { margin: 0 0 .25rem; font-weight: 700; }
.mg-consent__body  { margin: 0; font-size: .875rem; line-height: 1.5; color: var(--color-text, #374151); }
.mg-consent__body a { color: var(--color-accent, #b45309); }

.mg-consent__options { margin-top: .75rem; display: grid; gap: .5rem; }
.mg-consent__opt {
    display: flex;
    gap: .5rem;
    align-items: flex-start;
    font-size: .8125rem;
    line-height: 1.4;
}
.mg-consent__opt input { margin-top: .2rem; }

.mg-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}
.mg-consent__btn {
    cursor: pointer;
    border-radius: var(--radius-sm, 8px);
    border: 1px solid var(--color-border, #d1d5db);
    padding: .5rem .9rem;
    font-size: .875rem;
    font-weight: 600;
    background: #fff;
    color: var(--color-text, #374151);
}
.mg-consent__btn--ghost { background: transparent; }
.mg-consent__btn--primary {
    background: var(--color-accent, #b45309);
    border-color: var(--color-accent, #b45309);
    color: #fff;
}
.mg-consent__btn:hover { filter: brightness(.97); }

@media (max-width: 640px) {
    .mg-consent__actions { width: 100%; }
    .mg-consent__btn { flex: 1 1 auto; }
}
