/* Crystal Tech "Buy / View Pricing" modal — self-contained.
   ct-buy- prefix avoids collisions with site styles. */

.ct-buy-launcher {
    position: fixed;
    bottom: 24px;
    right: 96px;       /* sits to the left of the existing WhatsApp button */
    z-index: 9997;
    padding: 12px 20px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.35);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ct-buy-launcher:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(239, 68, 68, 0.45);
}
.ct-buy-launcher svg { width: 18px; height: 18px; }

.ct-buy-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    z-index: 10000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 40px 20px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.ct-buy-backdrop.is-open { display: flex; animation: ctBuyFade 0.2s ease; }
@keyframes ctBuyFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.ct-buy-modal {
    background: #ffffff;
    color: #0f172a;
    border-radius: 18px;
    width: min(1080px, 100%);
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    animation: ctBuyRise 0.25s ease;
}
@keyframes ctBuyRise {
    from { transform: translateY(16px); opacity: 0.5; }
    to   { transform: translateY(0); opacity: 1; }
}

.ct-buy-modal__header {
    padding: 24px 28px;
    background: linear-gradient(135deg, #6e56cf, #2563eb);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 16px;
}
.ct-buy-modal__title {
    flex: 1;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}
.ct-buy-modal__subtitle {
    margin-top: 4px;
    font-size: 13px;
    opacity: 0.9;
    font-weight: 400;
}
.ct-buy-modal__close {
    background: rgba(255,255,255,0.16);
    border: 0;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}
.ct-buy-modal__close:hover { background: rgba(255,255,255,0.28); }
.ct-buy-modal__close svg { width: 16px; height: 16px; }

.ct-buy-modal__body {
    padding: 28px;
    background: #f8fafc;
}
.ct-buy-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 820px) {
    .ct-buy-grid { grid-template-columns: 1fr; }
}

.ct-buy-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.ct-buy-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
    border-color: #cbd5e1;
}
.ct-buy-card.is-featured {
    border-color: #6e56cf;
    box-shadow: 0 12px 28px rgba(110, 86, 207, 0.18);
}
.ct-buy-card__badge {
    position: absolute;
    top: -10px;
    right: 18px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 4px 10px;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.35);
}
.ct-buy-card__title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}
.ct-buy-card__price {
    margin-top: 6px;
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
}
.ct-buy-card__desc {
    margin-top: 8px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}
.ct-buy-card__features {
    margin: 16px 0 22px 0;
    padding: 0;
    list-style: none;
    flex: 1;
}
.ct-buy-card__features li {
    font-size: 13px;
    color: #334155;
    padding-left: 22px;
    position: relative;
    margin-bottom: 8px;
    line-height: 1.4;
}
.ct-buy-card__features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #10b981;
    background-image: linear-gradient(135deg, #10b981, #059669);
}
.ct-buy-card__features li::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 8px;
    width: 7px;
    height: 4px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg);
}
.ct-buy-card__cta {
    background: #0f172a;
    color: #fff;
    border: 0;
    padding: 11px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.12s ease;
}
.ct-buy-card.is-featured .ct-buy-card__cta {
    background: linear-gradient(135deg, #6e56cf, #2563eb);
}
.ct-buy-card__cta:hover {
    transform: translateY(-1px);
    background: #1e293b;
}
.ct-buy-card.is-featured .ct-buy-card__cta:hover {
    background: linear-gradient(135deg, #5b46b0, #1d4ed8);
}

.ct-buy-modal__footer {
    padding: 14px 28px 22px;
    text-align: center;
    color: #64748b;
    font-size: 12px;
    background: #f8fafc;
}
.ct-buy-modal__footer a { color: #2563eb; text-decoration: none; font-weight: 600; }

.ct-buy-empty,
.ct-buy-error,
.ct-buy-loading {
    padding: 40px 24px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}
.ct-buy-error { color: #b91c1c; }

@media (max-width: 540px) {
    .ct-buy-launcher {
        right: 16px;
        bottom: 92px;
        padding: 10px 16px;
        font-size: 13px;
    }
    .ct-buy-modal__header { padding: 18px 20px; }
    .ct-buy-modal__title { font-size: 17px; }
    .ct-buy-modal__body { padding: 18px; }
    .ct-buy-card { padding: 18px; }
    .ct-buy-card__price { font-size: 24px; }
}
