
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --page-background: #1d0c26;
    --panel-background: #2a1933;
    --panel-border: rgba(255, 255, 255, 0.12);
    --text-color: #f5d9fe;
    --muted-text: #e2bebb;
    --accent-color: #ffb955;
    --accent-hover: #ff5e5b;
    --field-background: #170720;
}

body {
    padding: 128px 16px 72px;
    background: linear-gradient(145deg, #2a1933 0%, #1d0c26 42%, #170720 100%);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.order-page { width: min(1152px, 100%); }
.site-header { position: fixed; inset: 0 0 auto; z-index: 100; height: 80px; background: rgba(29,12,38,.86); backdrop-filter: blur(20px); box-shadow: 0 4px 20px -2px rgba(23,10,30,.6); }
.header-shell { width: min(1152px, calc(100% - 32px)); height: 100%; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.site-brand { display: flex; align-items: center; gap: 12px; color: var(--text-color); text-decoration: none; }
.site-brand-mark { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; color: #68000b; background: linear-gradient(135deg,#ffb955,#b1005c); font: 800 18px 'Outfit',sans-serif; }
.site-brand-copy strong { display: block; font: 700 16px/1 'Outfit',sans-serif; }
.site-brand-copy small { display: block; margin-top: 5px; color: #ffb955; font: 800 10px/1 'Outfit',sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 8px; }
.site-nav a { padding: 9px 16px; border-radius: 999px; color: var(--muted-text); text-decoration: none; font-size: 14px; font-weight: 700; transition: .2s ease; }
.site-nav a:hover, .site-nav a[aria-current='page'] { color: var(--text-color); background: #35233e; }
.site-nav .catalog-link { color: #fff; background: linear-gradient(90deg,#ff5e5b,#b1005c); box-shadow: 0 8px 20px -4px rgba(255,94,91,.5); }
.site-nav .catalog-link:hover { background: linear-gradient(90deg,#ff716e,#c40066); }
.page-heading {
    margin-bottom: 32px;
    color: var(--text-color);
    font: 800 clamp(32px, 4vw, 44px)/1.12 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(340px, 5fr);
    gap: 32px;
    align-items: start;
}

.checkout-panels { display: grid; gap: 24px; }
.preview-column { min-width: 0; position: sticky; top: 96px; align-self: start; }
.panel {
    padding: 28px;
    background: rgba(42, 25, 51, 0.94);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(23, 10, 30, 0.58);
}

.panel-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.panel-heading > span {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 50%;
    color: #68000b;
    background: linear-gradient(135deg, #ffb955, #ff5e5b);
    font: 800 13px 'Outfit', sans-serif;
}
.panel-heading p {
    margin: 0 0 3px;
    color: #ffb955;
    font: 800 11px 'Outfit', sans-serif;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}
.panel-heading h2 { margin: 0; color: var(--text-color); font: 700 24px 'Outfit', sans-serif; }
.panel-intro { margin: -10px 0 22px; color: var(--muted-text); line-height: 1.5; }
.detail-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.detail-strip span { padding: 9px; border-radius: 10px; color: var(--muted-text); background: rgba(23,7,32,.55); font-size: 11px; text-align: center; }
.detail-strip strong { display: block; margin-bottom: 2px; color: var(--text-color); font-size: 12px; }
.trust-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px; border-radius: 12px; color: var(--muted-text); background: rgba(53,35,62,.7); font-size: 12px; line-height: 1.5; }
.trust-note b { color: #ffb955; }

.form-grid { gap: 18px; }
label { color: var(--text-color); font-size: 14px; }
input, select, textarea {
    padding: 12px 14px;
    color: var(--text-color);
    background: rgba(23, 7, 32, 0.88);
    border-color: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #ff5e5b;
    box-shadow: 0 0 0 3px rgba(255, 94, 91, 0.2);
}
.section-divider { background: rgba(255, 255, 255, 0.12); }
.contract-image-wrap { margin-bottom: 0; }
.contract-image-wrap img { border-radius: 16px; box-shadow: 0 12px 28px rgba(23, 10, 30, 0.55); }
.contract-radio:checked { background: #ff5e5b; box-shadow: inset 0 0 0 4px #fff, 0 0 0 4px rgba(255, 94, 91, 0.25); }

.reward-panel > .field.full-width { margin-bottom: 16px; }
.reward-panel input[type='checkbox'] { width: auto; accent-color: #ff5e5b; }
#giftcard_panel {
    background: #26142f !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    border-radius: 16px !important;
}
.button-row { margin-top: 22px; }
.button-row .primary-button { width: 100%; }
button { border-radius: 999px; }
.primary-button {
    color: #fff;
    background: linear-gradient(90deg, #ff5e5b, #b1005c);
    box-shadow: 0 8px 20px -4px rgba(255, 94, 91, 0.5);
}
.primary-button:hover { background: linear-gradient(90deg, #ff716e, #c40066); }
.secondary-button { background: #35233e; border: 1px solid rgba(255, 255, 255, 0.12); }

.preview-panel { position: static; max-height: calc(100vh - 112px); overflow-y: auto; }
.preview-window { min-height: 250px; padding: 60px 0 20px; overflow: visible; }
.preview-scale { width: 100%; height: 190px; }
#previewEnvelope { position: absolute; left: 50%; transform: translateX(-50%) scale(.54); transform-origin: top center; }
.preview-envelope-block { border-radius: 16px; }
#previewBase { background: #26142f; }
#previewBottomFlap { border-radius: 0 0 16px 16px; }

@media (max-width: 1023px) {
    .checkout-layout { grid-template-columns: 1fr; }
    .preview-panel { position: static; max-height: none; overflow: visible; }
    .preview-column { position: static; }
}
@media (max-width: 620px) {
    body { padding: 108px 12px 60px; }
    .site-header { height: 72px; }
    .header-shell { width: calc(100% - 24px); gap: 8px; }
    .site-brand-mark { width: 38px; height: 38px; }
    .site-brand-copy strong { font-size: 14px; }
    .site-brand-copy small { display: none; }
    .site-nav { gap: 2px; }
    .site-nav a { padding: 8px 9px; font-size: 12px; }
    .panel { padding: 20px; border-radius: 16px; }
    .panel-heading h2 { font-size: 20px; }
    .preview-window { min-height: 350px; padding: 112px 0 55px; }
    .preview-scale { width: 100%; height: 155px; }
    #previewEnvelope { transform: translateX(-50%) scale(.43); }
    .detail-strip { grid-template-columns: 1fr; }
    .button-row .primary-button, .preview-controls button { width: 100%; }
}
@media (max-width: 430px) {
    .site-brand-copy { display: none; }
    .site-nav a { padding-inline: 8px; }
}
