/* =========================================================
   WP Premium — Modal de Produto (cópia visual do Lovable)
   ========================================================= */

.wpp-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: hsl(224 30% 6% / 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: wpp-fade-in 0.2s ease;
}
@keyframes wpp-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.wpp-modal {
    position: relative;
    width: 100%;
    max-width: 32rem;
    max-height: 90vh;
    overflow-y: auto;
    background: hsl(224 25% 9%);
    border: 1px solid hsl(224 20% 16%);
    border-radius: 1rem;
    box-shadow: 0 8px 32px hsl(224 30% 2% / 0.6),
                0 0 40px hsl(185 85% 55% / 0.15);
    color: hsl(210 40% 97%);
    font-family: 'DM Sans', system-ui, sans-serif;
    animation: wpp-slide-up 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes wpp-slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

/* Loading */
.wpp-modal--loading {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wpp-modal__spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid hsl(224 20% 16%);
    border-top-color: hsl(185 85% 55%);
    border-radius: 50%;
    animation: wpp-spin 0.8s linear infinite;
}
@keyframes wpp-spin {
    to { transform: rotate(360deg); }
}

/* Close button */
.wpp-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    width: 2rem;
    height: 2rem;
    background: hsl(224 25% 9% / 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid hsl(224 20% 16% / 0.5);
    border-radius: 0.5rem;
    color: hsl(215 20% 60%);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s;
}
.wpp-modal__close:hover { color: #fff; }

/* Header */
.wpp-modal__image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 1rem 1rem 0 0;
}
.wpp-modal__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.wpp-modal__header {
    padding: 1.5rem;
    border-bottom: 1px solid hsl(224 20% 16%);
}
.wpp-modal__badge {
    display: inline-block;
    margin-bottom: 0.5rem;
    padding: 4px 12px;
    border-radius: 9999px;
    background: linear-gradient(135deg, hsl(185 85% 55%), hsl(270 60% 55%));
    color: hsl(224 30% 6%);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.wpp-modal__title {
    font-family: 'Syne', system-ui, sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    line-height: 1.2;
    margin: 0;
    color: #fff;
}

/* Body */
.wpp-modal__body { padding: 2rem; }
.wpp-modal__desc {
    color: hsl(215 20% 60%);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}
.wpp-modal__desc p { margin: 0 0 0.75rem; }
.wpp-modal__desc ul { margin: 0.5rem 0; padding-left: 1.25rem; }
.wpp-modal__desc li { margin-bottom: 0.25rem; }
.wpp-modal__desc strong { color: hsl(210 40% 97%); }

/* Demo link */
.wpp-modal__demolink {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0 2rem;
    color: hsl(185 85% 55%);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}
.wpp-modal__demolink:hover { opacity: 0.8; }
.wpp-modal__demolink--disabled {
    color: hsl(215 20% 60%);
    opacity: 0.5;
    cursor: default;
}

/* Garantias */
.wpp-modal__guarantees { margin-bottom: 2rem; }
.wpp-modal__guarantees h3 {
    font-family: 'Syne', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: hsl(215 20% 60%);
    margin: 0 0 1rem;
    font-weight: 700;
}
.wpp-modal__guarantees ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.wpp-modal__guarantees li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}
.wpp-modal__guarantees .check {
    color: hsl(185 85% 55%);
    font-size: 0.875rem;
    margin-top: 2px;
    flex-shrink: 0;
}
.wpp-modal__guarantees li strong {
    color: #fff;
    display: block;
    font-weight: 600;
    margin-bottom: 2px;
}
.wpp-modal__guarantees li span {
    color: hsl(215 20% 60%);
    font-size: 0.75rem;
    display: block;
    line-height: 1.5;
}

/* Entrega Google Drive */
.wpp-modal__delivery {
    background: hsl(224 20% 14% / 0.5);
    border: 1px solid hsl(224 20% 16%);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.wpp-modal__delivery .icon {
    font-size: 1.25rem;
    color: hsl(185 85% 55%);
    flex-shrink: 0;
}
.wpp-modal__delivery .muted {
    font-size: 0.75rem;
    color: hsl(215 20% 60%);
    margin: 0 0 0.125rem;
}
.wpp-modal__delivery p {
    margin: 0;
    font-size: 0.875rem;
}

/* Coupon */
.wpp-modal__coupon {
    background: hsl(224 20% 14% / 0.3);
    border: 1px solid hsl(224 20% 16%);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}
.wpp-modal__coupon-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: #fff;
}
.wpp-modal__coupon-input {
    display: flex;
    gap: 0.5rem;
}
.wpp-modal__coupon-input input {
    flex: 1;
    height: 2.25rem;
    padding: 0 0.75rem;
    background: hsl(224 20% 14%);
    border: 1px solid hsl(224 20% 16%);
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.875rem;
    text-transform: uppercase;
    font-family: inherit;
}
.wpp-modal__coupon-input input:focus {
    outline: none;
    border-color: hsl(185 85% 55%);
    box-shadow: 0 0 0 3px hsl(185 85% 55% / 0.15);
}
.wpp-modal__coupon-input button {
    height: 2.25rem;
    padding: 0 1rem;
    background: linear-gradient(135deg, hsl(185 85% 55%), hsl(270 60% 55%));
    color: hsl(224 30% 6%);
    border: none;
    border-radius: 0.5rem;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.875rem;
    transition: opacity 0.2s;
}
.wpp-modal__coupon-input button:hover { opacity: 0.9; }
.wpp-modal__coupon-applied {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: hsl(185 85% 55% / 0.05);
    border: 1px solid hsl(185 85% 55% / 0.2);
    border-radius: 0.5rem;
    gap: 0.75rem;
}
.wpp-modal__coupon-applied .primary {
    margin: 0 0 0.25rem;
    font-weight: 700;
    color: hsl(185 85% 55%);
    font-size: 0.875rem;
}
.wpp-modal__coupon-applied .muted {
    margin: 0;
    font-size: 0.75rem;
    color: hsl(215 20% 60%);
}
.wpp-modal__coupon-applied button {
    background: transparent;
    border: none;
    color: hsl(215 20% 60%);
    cursor: pointer;
    font-size: 1rem;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}
.wpp-modal__coupon-applied button:hover {
    background: hsl(224 20% 14%);
    color: #fff;
}
.wpp-modal__coupon-error {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: hsl(0 72% 60%);
}

/* PIX button */
.wpp-modal__btn-pix {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    background: transparent;
    border: 1px solid hsl(185 85% 55% / 0.3);
    border-radius: 0.5rem;
    color: #fff;
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    transition: background 0.2s, border-color 0.2s;
}
.wpp-modal__btn-pix:hover {
    background: hsl(185 85% 55% / 0.05);
    border-color: hsl(185 85% 55% / 0.6);
}
.wpp-modal__btn-pix span {
    background: linear-gradient(135deg, hsl(185 85% 55%), hsl(270 60% 55%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

/* Price + CTA */
.wpp-modal__price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.wpp-modal__price > div { min-width: 0; }
.wpp-modal__price .line-through {
    color: hsl(215 20% 60%);
    text-decoration: line-through;
    font-size: 0.875rem;
    margin: 0;
}
.wpp-modal__price-final {
    font-family: 'Syne', sans-serif;
    font-size: 1.875rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
    background: linear-gradient(135deg, hsl(185 85% 55%), hsl(270 60% 55%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}
.wpp-modal__price .muted {
    font-size: 0.75rem;
    color: hsl(215 20% 60%);
    margin: 0.25rem 0 0;
}
.wpp-modal__btn-buy {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, hsl(185 85% 55%), hsl(270 60% 55%));
    color: hsl(224 30% 6%);
    border: none;
    border-radius: 0.5rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 0 40px hsl(185 85% 55% / 0.35);
    font-size: 1rem;
    font-family: inherit;
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.2s;
}
.wpp-modal__btn-buy:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 60px hsl(185 85% 55% / 0.55);
}

/* Secure footer */
.wpp-modal__secure {
    margin: 1.5rem 0 0;
    text-align: center;
    font-size: 0.75rem;
    color: hsl(215 20% 60%);
}
.wpp-modal__secure strong {
    color: hsl(185 85% 55%);
    font-weight: 700;
}

/* Mobile */
@media (max-width: 600px) {
    .wpp-modal__body { padding: 1.5rem; }
    .wpp-modal__title { font-size: 1.25rem; }
    .wpp-modal__price-final { font-size: 1.5rem; }
    .wpp-modal__price { flex-direction: column; align-items: stretch; }
    .wpp-modal__btn-buy { justify-content: center; }
}

/* Scroll customizado dentro do modal */
.wpp-modal::-webkit-scrollbar { width: 8px; }
.wpp-modal::-webkit-scrollbar-track { background: transparent; }
.wpp-modal::-webkit-scrollbar-thumb {
    background: hsl(224 20% 16%);
    border-radius: 4px;
}
.wpp-modal::-webkit-scrollbar-thumb:hover { background: hsl(224 20% 22%); }
