/* ============================================================
   CCN Gift Cards
   ============================================================ */

/* -------- Лендинг -------- */
.ccn-gift-hero {
    background: linear-gradient(135deg,#0a1628 0%,#14253f 100%);
    color: #e2e8f0;
    padding: 64px 24px;
    margin: 0 -15px 40px;
    border-radius: 0;
    overflow: hidden;
}
.ccn-gift-hero__inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 48px;
    align-items: center;
}
.ccn-gift-hero__eyebrow {
    display: inline-block;
    color: #c5a55a;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 14px;
}
.ccn-gift-hero__title {
    margin: 0 0 18px;
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.05;
}
.ccn-gift-hero__lead {
    margin: 0 0 28px;
    font-size: 16px;
    line-height: 1.6;
    color: #cbd5e1;
    max-width: 520px;
}
.ccn-gift-hero__cta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.ccn-gift-btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all .15s ease;
    letter-spacing: .3px;
    cursor: pointer;
    border: 1px solid transparent;
}
.ccn-gift-btn--primary {
    background: #14b8a6;
    color: #ffffff;
}
.ccn-gift-btn--primary:hover { background: #0d9488; transform: translateY(-1px); }
.ccn-gift-btn--ghost {
    background: transparent;
    color: #c5a55a;
    border-color: rgba(197,165,90,.5);
}
.ccn-gift-btn--ghost:hover { border-color: #c5a55a; background: rgba(197,165,90,.08); }

.ccn-gift-how {
    max-width: 820px;
    margin: 0 auto 48px;
    padding: 0 20px;
}
.ccn-gift-how h2,
.ccn-gift-faq h2 {
    margin: 0 0 20px;
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
}
.ccn-gift-steps {
    padding-left: 20px;
    line-height: 1.7;
    font-size: 15px;
    color: #334155;
}
.ccn-gift-steps li { margin-bottom: 8px; }
.ccn-gift-steps b { color: #0f172a; }

.ccn-gift-faq {
    max-width: 820px;
    margin: 0 auto 48px;
    padding: 0 20px;
}
.ccn-gift-faq details {
    border-top: 1px solid #e2e8f0;
    padding: 14px 0;
}
.ccn-gift-faq details:last-of-type { border-bottom: 1px solid #e2e8f0; }
.ccn-gift-faq summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: #0f172a;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ccn-gift-faq summary::after { content: '+'; color: #14b8a6; font-size: 22px; font-weight: 300; }
.ccn-gift-faq details[open] summary::after { content: '−'; }
.ccn-gift-faq p {
    margin: 10px 0 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

.ccn-gift-legal {
    max-width: 820px;
    margin: 0 auto 60px;
    padding: 22px;
    background: #f8fafc;
    border-radius: 10px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
}
.ccn-gift-legal h3 { margin: 0 0 8px; font-size: 14px; color: #0f172a; text-transform: uppercase; letter-spacing: 1px; }
.ccn-gift-legal p { margin: 0; }

/* -------- Сертификат (визуал, общий для лендинга/email/печати) -------- */
.ccn-cert {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    aspect-ratio: 148 / 105; /* A6 landscape */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    position: relative;
    color: #ffffff;
    background: linear-gradient(135deg, #0f1f36 0%, #1a2a44 55%, #0f1f36 100%);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 20px 60px rgba(15,23,42,.35);
}
.ccn-cert__frame {
    position: relative;
    height: 100%;
    border: 1px solid rgba(197,165,90,.5);
    border-radius: 8px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(197,165,90,.12), transparent 60%),
        radial-gradient(circle at bottom left, rgba(20,184,166,.1), transparent 60%);
}
.ccn-cert__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
}
.ccn-cert__brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ccn-cert__logo-img {
    display: block;
    height: 34px;
    width: auto;
    max-width: 230px;
    object-fit: contain;
}
.ccn-cert__eyebrow {
    text-align: right;
    color: #c5a55a;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1.3;
}
.ccn-cert__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ccn-cert__label {
    display: block;
    font-size: 9px;
    letter-spacing: 2px;
    color: #8a9bb5;
    text-transform: uppercase;
    margin-bottom: 2px;
    font-weight: 600;
}
.ccn-cert__recipient {
    font-size: 17px;
    color: #ffffff;
    font-weight: 600;
}
.ccn-cert__amount { margin-top: 4px; }
.ccn-cert__value {
    font-size: 34px;
    font-weight: 800;
    color: #c5a55a;
    line-height: 1;
    letter-spacing: 1px;
}
.ccn-cert__currency { font-size: 18px; letter-spacing: 0; }
.ccn-cert__message {
    margin: 6px 0 0;
    font-size: 11px;
    color: #cfd6e0;
    font-style: italic;
    line-height: 1.4;
    max-height: 2.8em;
    overflow: hidden;
}
.ccn-cert__tagline {
    margin: 6px 0 0;
    font-size: 11px;
    color: #8a9bb5;
    font-style: italic;
    letter-spacing: .5px;
}
.ccn-cert__code {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed rgba(197,165,90,.35);
}
.ccn-cert__code code {
    display: block;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 2px;
    margin-top: 2px;
}
.ccn-cert__footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 14px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.ccn-cert__dates {
    display: flex;
    gap: 14px;
    font-size: 10px;
    color: #8a9bb5;
}
.ccn-cert__dates span {
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 8px;
    color: #8a9bb5;
}
.ccn-cert__dates b { color: #e2e8f0; font-size: 11px; font-weight: 600; }
.ccn-cert__legal {
    font-size: 8px;
    line-height: 1.4;
    color: #6b7a91;
    text-align: right;
    flex: 1 1 auto;
}
.ccn-cert__dates {
    flex: 0 0 auto;
}

/* -------- Бланк: белые поля под заполнение ручкой -------- */
.ccn-cert__fill {
    display: inline-block;
    background: #ffffff;
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px rgba(197,165,90,.4);
    vertical-align: middle;
}
.ccn-cert__fill--name {
    height: 22px;
    width: 70%;
    margin-top: 4px;
}
.ccn-cert__amount-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.ccn-cert__fill--amount {
    height: 34px;
    width: 130px;
}
.ccn-cert__fill--code {
    height: 20px;
    width: 80%;
    margin-top: 4px;
}
.ccn-cert__fill--date {
    height: 16px;
    width: 78px;
    margin-top: 3px;
}
.ccn-cert--blank .ccn-cert__currency { color: #c5a55a; font-weight: 800; }

/* Текстовый номинал (напр. «Наградная джерси CCN») */
.ccn-cert__value--text {
    font-size: 21px;
    line-height: 1.15;
    letter-spacing: 0;
    display: block;
}
/* Примечание мелким шрифтом (адрес выдачи и т.п.) */
.ccn-cert__note {
    margin: 8px 0 0;
    font-size: 9px;
    line-height: 1.4;
    color: #cfd6e0;
    max-width: 88%;
}
.ccn-cert__note b { color: #ffffff; }

/* -------- Квадратный мини-сертификат (thumbnail в каталоге/новинках) -------- */
.ccn-gift-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background:
        radial-gradient(circle at 25% 20%, rgba(197,165,90,.18), transparent 55%),
        radial-gradient(circle at 80% 85%, rgba(20,184,166,.15), transparent 55%),
        linear-gradient(135deg, #0f1f36 0%, #1a2a44 60%, #0f1f36 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.ccn-gift-thumb::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(197,165,90,.45);
    border-radius: 6px;
    pointer-events: none;
}
.ccn-gift-thumb__inner {
    text-align: center;
    color: #fff;
    padding: 14px;
    z-index: 1;
}
.ccn-gift-thumb__brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #c5a55a;
    color: #0a1628;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: 1px;
    border-radius: 50%;
    margin-bottom: 10px;
}
.ccn-gift-thumb__title {
    display: block;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #c5a55a;
    margin-bottom: 6px;
}
.ccn-gift-thumb__amount {
    display: block;
    font-size: 11px;
    color: #cbd5e1;
    letter-spacing: .5px;
}

/* Сэмпл-метка на лендинге */
.ccn-cert--sample::after {
    content: 'ОБРАЗЕЦ';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%) rotate(-22deg);
    font-size: 60px;
    font-weight: 900;
    letter-spacing: 8px;
    color: rgba(197,165,90,.1);
    pointer-events: none;
    white-space: nowrap;
}

/* -------- Поля на карточке товара -------- */
.ccn-gift-fields {
    background: rgba(20,184,166,.05);
    border: 1px solid rgba(20,184,166,.2);
    border-radius: 10px;
    padding: 18px 20px;
    margin: 18px 0 22px;
}
.ccn-gift-fields h3 {
    margin: 0 0 12px;
    font-size: 15px;
    color: #0f172a;
    font-weight: 600;
}
.ccn-gift-fields__row { margin: 0 0 12px; }
.ccn-gift-fields__row:last-child { margin-bottom: 0; }
.ccn-gift-fields__row label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 5px;
    color: #1e293b;
}
.ccn-gift-fields__row label span { color: #dc2626; }
.ccn-gift-fields__row input,
.ccn-gift-fields__row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font: inherit;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
}
.ccn-gift-fields__row input:focus,
.ccn-gift-fields__row textarea:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20,184,166,.15);
}
.ccn-gift-fields__row small {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

/* -------- Промо-баннер на главной -------- */
.ccn-gift-topbanner {
    /* Закрепляется над шапкой, под top-bar — чтобы не наезжало на меню */
    position: fixed;
    left: 0; right: 0;
    top: 34px; /* высота .top-bar */
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 10px 20px;
    background: linear-gradient(90deg, #0a1628 0%, #14b8a6 50%, #c5a55a 100%);
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    overflow: hidden;
    transition: filter .2s;
}
body.admin-bar .ccn-gift-topbanner { top: calc(32px + 34px); }
.ccn-gift-topbanner:hover { filter: brightness(1.08); color: #fff; }
.ccn-gift-topbanner__icon {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    flex-shrink: 0;
}
.ccn-gift-topbanner__text { line-height: 1.3; }
.ccn-gift-topbanner__text b { font-weight: 700; }
.ccn-gift-topbanner__cta {
    padding: 6px 14px;
    background: rgba(255,255,255,.15);
    border-radius: 6px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .15s;
}
.ccn-gift-topbanner:hover .ccn-gift-topbanner__cta { background: rgba(255,255,255,.28); }

/* -------- Адаптив -------- */
@media (max-width: 900px) {
    .ccn-gift-hero__inner { grid-template-columns: 1fr; gap: 32px; }
    .ccn-gift-hero__card { order: -1; }
    .ccn-cert { max-width: 360px; }
    .ccn-gift-topbanner { flex-wrap: wrap; font-size: 13px; padding: 10px 14px; }
    .ccn-gift-topbanner__text { flex: 1 1 100%; text-align: center; order: 2; }
    .ccn-gift-topbanner__icon { order: 1; }
    .ccn-gift-topbanner__cta { order: 3; font-size: 12px; padding: 5px 12px; }
}
@media (max-width: 500px) {
    .ccn-gift-hero { padding: 40px 16px; margin: 0 -15px 28px; }
    .ccn-cert { padding: 10px; }
    .ccn-cert__frame { padding: 14px 16px; }
    .ccn-cert__value { font-size: 28px; }
    .ccn-cert__value .ccn-cert__currency { font-size: 15px; }
}
