/* ==========================================================
   FelipeWeb FreeFire Recargas América
   Frontend - Recargas únicamente
========================================================== */

:root {
    --fw-primary: #0A84FF;
    --fw-primary-hover: #2D9CFF;
    --fw-bg: #0b1220;
    --fw-card: #111b2b;
    --fw-border: #263752;
    --fw-text: #ffffff;
    --fw-muted: #9eacbf;
    --fw-success: #38d39f;
    --fw-danger: #ff5c70;
    --fw-radius: 18px;
}

body.fwffra-modal-open {
    overflow: hidden;
}

.fwffra-shop {
    max-width: 1100px;
    margin: 40px auto;
    color: var(--fw-text);
}

.fwffra-shop-header {
    margin-bottom: 30px;
    text-align: center;
}

.fwffra-shop-header h2 {
    margin: 0;
    color: #fff;
    font-size: 32px;
    line-height: 1.2;
}

.fwffra-shop-header p {
    color: var(--fw-muted);
    margin: 10px 0 0;
}

.fwffra-product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.fwffra-product-card {
    appearance: none;
    width: 100%;
    border: 1px solid var(--fw-border);
    border-radius: var(--fw-radius);
    padding: 25px 20px 20px;
    background: linear-gradient(180deg, #162236 0%, #0f1928 100%);
    color: #fff;
    text-align: center;
    cursor: pointer;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
    font: inherit;
}

.fwffra-product-card:hover {
    transform: translateY(-5px);
    border-color: var(--fw-primary);
    box-shadow: 0 18px 40px rgba(10,132,255,.16);
}

.fwffra-product-icon,
.fwffra-modal-product-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.fwffra-product-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 15px;
    border-radius: 18px;
    background: rgba(10,132,255,.12);
}

.fwffra-product-icon svg,
.fwffra-modal-product-icon svg {
    width: 42px;
    height: 42px;
    fill: none;
    stroke: #4da3ff;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fwffra-product-name {
    display: block;
    min-height: 48px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.45;
}

.fwffra-product-price {
    display: block;
    margin-top: 12px;
    color: #39d39f;
    font-size: 24px;
    font-weight: 800;
}

.fwffra-product-action {
    display: block;
    margin-top: 16px;
    padding: 11px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--fw-primary), var(--fw-primary-hover));
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
}

.fwffra-empty {
    padding: 25px;
    border: 1px solid var(--fw-border);
    border-radius: 14px;
    background: var(--fw-card);
    color: var(--fw-muted);
    text-align: center;
}


/* ==========================================================
   TARJETAS DE PRODUCTO - PALETA NEGRO / ROJO
========================================================== */

.fwffra-product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.fwffra-product-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
    grid-template-rows: 1fr;
    align-items: center;
    min-width: 0;
    min-height: 112px;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 1px solid #d90012;
    border-radius: 12px;
    background: linear-gradient(180deg, #19090c 0%, #100709 100%);
    color: #fff;
    text-align: left;
    box-shadow: 0 0 0 1px rgba(217,0,18,.08), 0 8px 25px rgba(0,0,0,.22);
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
    font: inherit;
}

.fwffra-product-card:hover {
    transform: translateY(-3px);
    border-color: #ff3043;
    box-shadow: 0 10px 30px rgba(217,0,18,.22);
}

.fwffra-product-card:focus-visible {
    outline: 2px solid #ff3043;
    outline-offset: 3px;
}

.fwffra-product-card-featured {
    margin-top: 8px;
}

.fwffra-product-badge {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 15px 0 11px;
    background: #d90012;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .55px;
    text-transform: uppercase;
    clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%);
}

.fwffra-product-main {
    display: flex;
    align-items: center;
    min-width: 0;
    height: 100%;
    padding: 14px 7px 12px 12px;
    gap: 7px;
}

.fwffra-product-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    margin: 0;
    border-radius: 0;
    background: transparent;
}

.fwffra-product-icon svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: #ff0015;
    stroke-width: 2.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fwffra-product-diamonds {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1;
}

.fwffra-product-diamonds strong {
    display: block;
    color: #fff;
    font-size: clamp(21px, 1.65vw, 28px);
    font-style: italic;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.fwffra-product-diamonds small {
    display: block;
    margin-top: 8px;
    color: #a9a0a2;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2px;
    line-height: 1;
    white-space: nowrap;
}

.fwffra-product-divider {
    position: absolute;
    top: 0;
    right: 42%;
    width: 1px;
    height: 100%;
    border-left: 1px dashed rgba(217,0,18,.9);
    pointer-events: none;
}

.fwffra-product-purchase {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 10px;
    min-width: 0;
    height: 100%;
    padding: 12px 15px 11px 9px;
}

.fwffra-product-price {
    display: block;
    margin: 0;
    color: #ff1a2b;
    font-size: clamp(18px, 1.55vw, 25px);
    font-weight: 900;
    font-style: italic;
    line-height: 1;
    text-align: right;
    white-space: nowrap;
}

.fwffra-product-action {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin: 0;
    padding: 0 8px;
    border-radius: 8px;
    background: linear-gradient(180deg, #ec0b1d 0%, #c90010 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .35px;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 5px 14px rgba(217,0,18,.18);
}

.fwffra-product-diamonds-long strong {
    font-size: clamp(18px, 1.45vw, 23px);
    letter-spacing: -.4px;
}

.fwffra-product-diamonds-long small {
    margin-top: 6px;
    font-size: 8px;
    letter-spacing: 1.5px;
}

.fwffra-product-card:hover .fwffra-product-action {
    filter: brightness(1.08);
}

@media (max-width: 1050px) {
    .fwffra-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fwffra-product-diamonds strong {
        font-size: 26px;
    }

    .fwffra-product-price {
        font-size: 22px;
    }
}

@media (max-width: 600px) {
    .fwffra-product-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .fwffra-product-card {
        min-height: 105px;
    }

    .fwffra-product-card-featured {
        margin-top: 8px;
    }

    .fwffra-product-divider {
        right: 42%;
    }

    .fwffra-product-diamonds strong {
        font-size: 27px;
    }

    .fwffra-product-diamonds-long strong {
        font-size: 24px;
    }

    .fwffra-product-price {
        font-size: 23px;
    }
}

/* ==========================================================
   MODAL
========================================================== */

.fwffra-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
}

.fwffra-modal.show {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.fwffra-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 8, 18, .82);
    backdrop-filter: blur(7px);
}

.fwffra-modal-dialog {
    position: relative;
    z-index: 2;
    width: min(700px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 32px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 22px;
    background: #0d1726;
    color: #fff;
    box-shadow: 0 30px 80px rgba(0,0,0,.55);
}

.fwffra-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    background: #162236;
    color: #fff;
    cursor: pointer;
    font-size: 26px;
    line-height: 1;
}

.fwffra-modal-close:hover {
    background: #20324d;
}

.fwffra-step-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.fwffra-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--fw-primary);
    font-weight: 900;
}

.fwffra-modal-product {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
    padding: 20px;
    border: 1px solid var(--fw-border);
    border-radius: 15px;
    background: #111d2f;
}

.fwffra-modal-product-icon {
    flex: 0 0 62px;
    width: 62px;
    height: 62px;
    border-radius: 16px;
    background: rgba(10,132,255,.12);
}

.fwffra-modal-product-icon svg {
    width: 40px;
    height: 40px;
}

.fwffra-modal-product-label {
    color: #8292a8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.fwffra-modal-product h3 {
    margin: 5px 0 4px;
    color: #fff;
    font-size: 20px;
    line-height: 1.3;
}

.fwffra-modal-price {
    color: #39d39f;
    font-size: 24px;
    font-weight: 900;
}

.fwffra-field {
    margin-bottom: 22px;
}

.fwffra-field label {
    display: block;
    margin-bottom: 9px;
    color: #dce4ee;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .8px;
}

.fwffra-field input {
    box-sizing: border-box;
    width: 100%;
    padding: 15px 16px;
    border: 1px solid var(--fw-border);
    border-radius: 11px;
    background: #080f19;
    color: #fff;
    font-size: 15px;
}

.fwffra-field input:focus {
    outline: none;
    border-color: var(--fw-primary);
    box-shadow: 0 0 0 4px rgba(10,132,255,.14);
}

.fwffra-input-with-button {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 9px;
}

#fwffra-verify {
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #d90012, #ff3043);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
}

#fwffra-verify:hover {
    filter: brightness(1.08);
}

.fwffra-validation {
    min-height: 22px;
    margin-top: 8px;
    color: var(--fw-muted);
    font-size: 13px;
}

.fwffra-validation.fwffra-success {
    color: var(--fw-success);
}

.fwffra-validation.fwffra-error {
    color: var(--fw-danger);
}

.fwffra-account-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: -7px 0 22px;
    padding: 13px 15px;
    border: 1px solid rgba(56,211,159,.25);
    border-radius: 12px;
    background: rgba(56,211,159,.08);
}

.fwffra-account-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--fw-success);
}

.fwffra-account-check svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #07130f;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fwffra-account-box small {
    display: block;
    margin-bottom: 2px;
    color: var(--fw-success);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1px;
}

.fwffra-account-box strong {
    color: #fff;
    font-size: 15px;
}

.fwffra-help {
    display: block;
    margin-top: 7px;
    color: #74839a;
    font-size: 12px;
}

.fwffra-modal-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0 16px;
    padding: 17px 18px;
    border: 1px solid var(--fw-border);
    border-radius: 12px;
    background: #111d2f;
}

.fwffra-modal-summary span {
    color: #aab7c7;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .8px;
}

.fwffra-modal-summary strong {
    color: #39d39f;
    font-size: 22px;
}

#fwffra-buy {
    width: 100%;
    padding: 16px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--fw-primary), var(--fw-primary-hover));
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform .2s ease, opacity .2s ease;
}

#fwffra-buy:not(:disabled):hover {
    transform: translateY(-2px);
}

#fwffra-buy:disabled {
    opacity: .45;
    cursor: not-allowed;
}

#fwffra-message {
    margin-top: 18px;
}

.fwffra-error {
    padding: 15px;
    border-radius: 10px;
    background: rgba(255,92,112,.12);
    border: 1px solid rgba(255,92,112,.25);
    color: #ff9aa8;
    line-height: 1.5;
}

.fwffra-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    color: #d7e0eb;
    text-align: center;
}

.fwffra-loading span {
    color: var(--fw-muted);
    font-size: 13px;
}

.fwffra-spinner,
.fwffra-mini-spinner {
    display: inline-block;
    border: 3px solid rgba(255,255,255,.15);
    border-top-color: #4da3ff;
    border-radius: 50%;
    animation: fwffra-spin .8s linear infinite;
}

.fwffra-spinner {
    width: 38px;
    height: 38px;
}

.fwffra-mini-spinner {
    width: 12px;
    height: 12px;
    margin-right: 6px;
    vertical-align: -2px;
}

@keyframes fwffra-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================
   RESULTADO FINAL
========================================================== */

.fwffra-success-card {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 20px;
    background: #0b1225;
    color: #fff;
    text-align: center;
    box-shadow: 0 20px 55px rgba(0,0,0,.35);
}

.fwffra-status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border-radius: 50%;
}

.fwffra-status-success {
    width: 72px;
    height: 72px;
    background: #18c957;
    box-shadow: 0 8px 25px rgba(24,201,87,.22);
}

.fwffra-status-success svg {
    width: 42px;
    height: 42px;
    fill: none;
    stroke: #fff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fwffra-status-pending {
    width: 64px;
    height: 64px;
    background: #f0a500;
    color: #fff;
    font-size: 32px;
    font-weight: 900;
}

.fwffra-success-card h2 {
    margin: 0 0 10px;
    color: #38d39f;
    font-size: 32px;
}

.fwffra-success-card h3 {
    margin: 0 0 25px;
    color: #fff;
    font-size: 20px;
}

.fwffra-success-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 14px;
    margin: 25px 0;
}

.fwffra-detail {
    padding: 18px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    background: #111827;
    text-align: left;
}

.fwffra-detail-icon {
    margin-bottom: 8px;
    color: #60a5fa;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1px;
}

.fwffra-detail-title {
    margin-bottom: 7px;
    color: #7eaef0;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .8px;
}

.fwffra-detail-value {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    word-break: break-word;
}

.fwffra-mail-info {
    margin-top: 25px;
    padding: 18px 20px;
    border-left: 4px solid #38d39f;
    border-radius: 10px;
    background: #0f172a;
    color: #d9e0e8;
    line-height: 1.6;
}

.fwffra-mail-info strong {
    color: #38d39f;
}

.fwffra-final-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
}

.fwffra-primary-button,
.fwffra-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none !important;
}

.fwffra-primary-button {
    background: linear-gradient(135deg, var(--fw-primary), var(--fw-primary-hover));
    color: #fff !important;
}

.fwffra-secondary-button {
    border: 1px solid #33445d;
    background: #111b2b;
    color: #dbe5f0 !important;
}

@media (max-width: 900px) {
    .fwffra-product-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media (max-width: 640px) {

    .fwffra-shop {
        margin: 20px auto;
        padding: 0 12px;
    }

    .fwffra-shop-header h2 {
        font-size: 26px;
    }

    .fwffra-product-grid {
        grid-template-columns: 1fr;
    }

    .fwffra-modal {
        padding: 10px;
    }

    .fwffra-modal-dialog {
        max-height: calc(100vh - 20px);
        padding: 23px 18px;
        border-radius: 17px;
    }

    .fwffra-input-with-button {
        grid-template-columns: 1fr;
    }

    #fwffra-verify {
        min-height: 46px;
    }

    .fwffra-success-details {
        grid-template-columns: 1fr;
    }

    .fwffra-success-card {
        margin: 20px 10px;
        padding: 25px 18px;
    }

    .fwffra-final-actions {
        flex-direction: column;
    }

    .fwffra-primary-button,
    .fwffra-secondary-button {
        width: 100%;
        box-sizing: border-box;
    }
}


/* ==========================================================
   MODAL DE COMPRA - PALETA NEGRO / ROJO
   Los estilos de las tarjetas permanecen sin cambios.
========================================================== */

.fwffra-modal-dialog {
    border-color: rgba(217,0,18,.42);
    background: #0b0b0e;
    box-shadow: 0 30px 80px rgba(0,0,0,.72), 0 0 0 1px rgba(217,0,18,.06);
}

.fwffra-modal-close {
    border-color: rgba(217,0,18,.35);
    background: #171014;
}

.fwffra-modal-close:hover {
    background: #281016;
    border-color: #d90012;
}

.fwffra-step-indicator {
    color: #fff;
}

.fwffra-step-number {
    background: linear-gradient(180deg, #ec0b1d 0%, #c90010 100%);
    box-shadow: 0 5px 16px rgba(217,0,18,.2);
}

.fwffra-modal-product {
    border-color: rgba(217,0,18,.38);
    background: #140c10;
}

.fwffra-modal-product-icon {
    background: rgba(217,0,18,.10);
    border: 1px solid rgba(217,0,18,.18);
}

.fwffra-modal-product-icon svg {
    stroke: #ff0015;
}

.fwffra-modal-product-label {
    color: #9f858a;
}

.fwffra-modal-product h3 {
    color: #fff;
}

.fwffra-modal-prices {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.fwffra-modal-price {
    margin: 0;
    color: #ff1a2b;
    font-size: 24px;
    font-weight: 900;
    line-height: 1.1;
}

.fwffra-modal-price-usd::before {
    content: '';
}

.fwffra-modal-price-cop {
    color: #e7dfe1;
    font-size: 24px;
    font-weight: 900;
    line-height: 1.1;
}

.fwffra-field label {
    color: #e7dfe1;
}

.fwffra-field input {
    border-color: #3b2025;
    background: #080709;
}

.fwffra-field input:focus {
    border-color: #d90012;
    box-shadow: 0 0 0 4px rgba(217,0,18,.14);
}

.fwffra-modal-summary {
    border-color: rgba(217,0,18,.35);
    background: #140c10;
}

.fwffra-modal-summary strong {
    color: #ff1a2b;
}

.fwffra-modal-summary small {
    margin-left: auto;
    color: #b9aeb1;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

#fwffra-buy {
    background: linear-gradient(180deg, #ec0b1d 0%, #c90010 100%);
    box-shadow: 0 8px 22px rgba(217,0,18,.18);
}

#fwffra-buy:not(:disabled):hover {
    filter: brightness(1.08);
}

.fwffra-help {
    color: #897a7e;
}

.fwffra-validation.fwffra-success {
    color: #38d39f;
}

@media (max-width: 640px) {
    .fwffra-modal-prices {
        gap: 6px;
    }

    .fwffra-modal-price {
        font-size: 21px;
    }

    .fwffra-modal-price-cop {
        font-size: 21px;
    }

    .fwffra-modal-summary {
        flex-wrap: wrap;
        gap: 8px;
    }

    .fwffra-modal-summary small {
        width: 100%;
        margin-left: 0;
        text-align: right;
    }
}
