.blr-gift-card-purchase-page {
    --blr-gift-gold: #b79b65;
    --blr-gift-gold-dark: #9e833d;
    --blr-gift-dark: #111827;
    --blr-gift-cream: #F3EDDC;
    --blr-gift-border: #e7ded0;

    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 16px 70px;
}

.blr-gift-card-purchase-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 32px;
    align-items: start;
}

/* ---------- Colonne visuel ---------- */
.blr-gift-card-preview-col {
    position: sticky;
    top: 120px;
}

.blr-gift-card-preview-image {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(17, 24, 39, .12);
    margin-bottom: 18px;
    container-type: inline-size;
}

.blr-gift-card-preview-image img {
    display: block;
    width: 100%;
    height: auto;
}

/* ---------- Superposition dynamique sur le visuel ---------- */
.blr-gcp-overlay {
    position: absolute;
    inset: 0;
}

.blr-gcp-field {
    position: absolute;
    font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: #1a1a1a;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    font-size: 1.7cqw;
}

/*
* Les champs texte sont ancrés par le bas (bottom) : le texte "pousse" vers
* le haut à partir du trait souligné, au lieu de déborder dessous quand on
* tape (ce qui arrivait avec un ancrage par le haut).
*/

.blr-gcp-buyer {
    left: 39.71%;
    width: 25.08%;
    bottom: 63.43%;
}

.blr-gcp-prestation {
    left: 42.78%;
    width: 27.84%;
    bottom: 54.37%;
}

.blr-gcp-amount {
    left: 23.18%;
    width: 19.84%;
    bottom: 45.18%;
}

.blr-gcp-message {
    left: 6.65%;
    width: 59.41%;
    bottom: 29.75%;
}

.blr-gcp-checkbox {
    left: 6.65%;
    width: 1.81%;
    top: 42.64%;
    height: 3.85%;
    bottom: auto;
}

.blr-gcp-checkbox-amount {
    top: 51.87%;
}

.blr-gcp-checkbox.is-checked::before,
.blr-gcp-checkbox.is-checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 12%;
    background: #1a1a1a;
}

.blr-gcp-checkbox.is-checked::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.blr-gcp-checkbox.is-checked::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* ---------- Loupe / agrandissement de l'aperçu ---------- */
.blr-gift-card-preview-image {
    cursor: zoom-in;
}

.blr-gift-card-zoom-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--blr-gift-dark);
    box-shadow: 0 2px 8px rgba(17, 24, 39, .25);
    cursor: zoom-in;
    opacity: 0;
    transform: scale(.85);
    transition: opacity .15s ease, transform .15s ease;
}

.blr-gift-card-preview-image:hover .blr-gift-card-zoom-btn,
.blr-gift-card-zoom-btn:focus-visible {
    opacity: 1;
    transform: scale(1);
}

@media (hover: none) {
    .blr-gift-card-zoom-btn {
        opacity: 1;
        transform: scale(1);
    }
}

.blr-gift-card-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: rgba(17, 24, 39, .82);
}

.blr-gift-card-lightbox.is-open {
    display: flex;
}

.blr-gift-card-lightbox-content {
    width: min(92vw, 640px);
}

.blr-gift-card-lightbox-content .blr-gift-card-preview-image {
    cursor: default;
    margin-bottom: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}

.blr-gift-card-lightbox-content .blr-gift-card-zoom-btn {
    display: none;
}

.blr-gift-card-lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease;
}

.blr-gift-card-lightbox-close:hover {
    background: rgba(255, 255, 255, .22);
}

.blr-gift-card-preview-info {
    background: #fff;
    border: 1px solid var(--blr-gift-border);
    border-radius: 14px;
    padding: 18px;
}

.blr-gift-card-preview-info h2 {
    font-size: 17px;
    margin: 0 0 8px;
    color: var(--blr-gift-dark);
}

.blr-gift-card-preview-info p {
    font-size: 13.5px;
    line-height: 1.6;
    color: #6b6459;
    margin: 0;
}

/* ---------- Colonne formulaire ---------- */
.blr-gift-card-purchase-card {
    background: #fff;
    border: 1px solid var(--blr-gift-border);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 26px rgba(17, 24, 39, .06);
}

.blr-gift-card-purchase-kicker {
    color: var(--blr-gift-gold);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 12px;
    margin-bottom: 6px;
}

.blr-gift-card-purchase-card h1 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--blr-gift-dark);
}

.blr-gift-card-purchase-intro {
    font-size: 14px;
    color: #6b6459;
    line-height: 1.6;
    margin-bottom: 22px;
}

.blr-gift-card-purchase-toggle {
    display: flex;
    border: 1px solid var(--blr-gift-border);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 22px;
}

.blr-gift-card-toggle-btn {
    flex: 1;
    border: none;
    background: #fff;
    padding: 11px 16px;
    font-weight: 600;
    font-size: 14px;
    color: var(--blr-gift-dark);
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.blr-gift-card-toggle-btn + .blr-gift-card-toggle-btn {
    border-left: 1px solid var(--blr-gift-border);
}

.blr-gift-card-toggle-btn.active {
    background: var(--blr-gift-gold);
    color: #fff;
}

.blr-gift-card-toggle-btn:disabled {
    opacity: .7;
    cursor: default;
}

.blr-gift-card-section-title {
    font-size: 15px;
    font-weight: 700;
    margin: 26px 0 14px;
    color: var(--blr-gift-dark);
    padding-top: 14px;
    border-top: 1px solid var(--blr-gift-border);
}

.blr-gift-card-field {
    margin-bottom: 16px;
}

.blr-gift-card-field label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 5px;
    color: var(--blr-gift-dark);
}

.blr-gift-card-field .form-control,
.blr-gift-card-field .form-select {
    border-color: var(--blr-gift-border);
    border-radius: 8px;
}

.blr-gift-card-field .form-control:focus,
.blr-gift-card-field .form-select:focus {
    border-color: var(--blr-gift-gold);
    box-shadow: 0 0 0 .2rem rgba(197, 157, 95, .18);
}

.blr-gift-card-amount-input {
    position: relative;
}

.blr-gift-card-amount-input input {
    padding-right: 34px;
}

.blr-gift-card-amount-input span {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9c9488;
    font-weight: 600;
    pointer-events: none;
}

.blr-gift-card-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--blr-gift-cream);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--blr-gift-dark);
}

.blr-gift-card-total-row strong {
    font-size: 17px;
}

/* ---------- Résumé (une fois passé au paiement) ---------- */
.blr-gift-card-summary {
    background: var(--blr-gift-cream);
    border: 1px solid var(--blr-gift-border);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 22px;
}

.blr-gift-card-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.blr-gift-card-summary-header h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--blr-gift-dark);
}

.blr-gift-card-edit-btn {
    border: 1px solid var(--blr-gift-gold);
    background: #fff;
    color: var(--blr-gift-gold-dark);
    font-weight: 600;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
}

.blr-gift-card-edit-btn:hover {
    background: var(--blr-gift-gold);
    color: #fff;
}

#gift-card-summary-content {
    margin: 0;
}

#gift-card-summary-content div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13.5px;
    padding: 5px 0;
    border-bottom: 1px dashed var(--blr-gift-border);
}

#gift-card-summary-content div:last-child {
    border-bottom: none;
}

#gift-card-summary-content dt {
    color: #6b6459;
    font-weight: 600;
}

#gift-card-summary-content dd {
    margin: 0;
    text-align: right;
    color: var(--blr-gift-dark);
    font-weight: 600;
}

.blr-gift-card-submit-btn {
    display: block;
    width: 100%;
    margin-top: 18px;
    padding: 13px;
    border: none;
    border-radius: 999px;
    background: var(--blr-gift-gold);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background .15s ease;
}

.blr-gift-card-submit-btn:hover {
    background: var(--blr-gift-gold-dark);
}

.blr-gift-card-submit-btn:disabled {
    opacity: .7;
    cursor: default;
}

.blr-payment-error {
    display: none;
    color: #b91c1c;
    font-size: 13px;
    margin-top: 10px;
}

.blr-gift-card-payment-cancelled {
    background: #fdecec;
    border: 1px solid #f3c2c2;
    color: #9c2b2b;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13.5px;
    margin-bottom: 22px;
}

@media (max-width: 860px) {
    .blr-gift-card-purchase-layout {
        grid-template-columns: 1fr;
    }

    .blr-gift-card-preview-col {
        position: static;
        display: flex;
        gap: 16px;
    }

    .blr-gift-card-preview-image {
        flex: 0 0 140px;
        margin-bottom: 0;
    }

    .blr-gift-card-zoom-btn {
        width: 26px;
        height: 26px;
        top: 6px;
        right: 6px;
    }

    .blr-gift-card-zoom-btn svg {
        width: 14px;
        height: 14px;
    }

    .blr-gift-card-preview-info {
        flex: 1;
    }
}

@media (max-width: 560px) {
    .blr-gift-card-preview-col {
        flex-direction: column;
    }

    .blr-gift-card-preview-image {
        flex: none;
    }
}
