/* ============================================================
   COINS SHOP STYLES - coins-shop.css
   Ameria2 Dragon Coins Payment System
   ============================================================ */

/* MAIN WRAPPER */
.coins-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0;
}

/* TITLES AND HEADERS */
.coins-title {
    text-align: center;
    color: #d4a574;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    color: #d4a574;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #a43e2c;
}

/* EVENT BANNER */
.event-banner {
    background: rgba(125, 184, 79, 0.15);
    border: 2px solid #7db84f;
    padding: 11px;
    border-radius: 0;
    margin-bottom: 18px;
    color: #7db84f;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
}

.event-banner strong {
    color: #fff;
}

/* PAYMENT METHODS SECTION */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.method-btn {
    background: linear-gradient(135deg, #5a4a38 0%, #4a3a28 100%);
    border: 2px solid #8b7a68;
    color: #d4a574;
    padding: 11px;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 13px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
}

.method-btn:hover {
    border-color: #a43e2c;
    box-shadow: 0 0 10px rgba(164, 62, 44, 0.2);
}

.method-btn.active {
    background: linear-gradient(135deg, #a43e2c, #c65438);
    border-color: #a43e2c;
    color: white;
}

/* COINS GRID */
.coins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

/* COINS CARD */
.coins-card {
    background: linear-gradient(135deg, #5a4a38 0%, #4a3a28 100%);
    border: 3px solid #a43e2c;
    border-radius: 0;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.coins-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(164, 62, 44, 0.3);
    border-color: #d97706;
}

.coins-card.active {
    background: linear-gradient(135deg, #6b5a48 0%, #5a4938 100%);
    border-color: #d97706;
    box-shadow: 0 8px 20px rgba(217, 119, 6, 0.3);
}

.coins-card.active::before {
    content: '★ MEJOR OFERTA ★';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #7db84f, #6ba547);
    color: white;
    padding: 6px 16px;
    border-radius: 0;
    font-size: 10px;
    font-weight: bold;
    border: 2px solid #9ed76e;
    white-space: nowrap;
}

/* POPULAR PAYMENT - LA MAS USADA */
.coins-card.popular-payment {
    background: linear-gradient(135deg, #6b5a48 0%, #5a4938 100%);
    border-color: #fbbf24;
    box-shadow: 0 8px 20px rgba(251, 191, 36, 0.3);
    transform: scale(1.02);
}

.coins-card.popular-payment:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 28px rgba(251, 191, 36, 0.4);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1a1a1a;
    padding: 6px 16px;
    border-radius: 0;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid #f59e0b;
    white-space: nowrap;
    z-index: 10;
}

/* COINS CARD CONTENT */
.coins-amount {
    font-size: 40px;
    font-weight: bold;
    color: #d4a574;
    margin: 12px 0;
}

.coins-label {
    font-size: 16px;
    color: #a39080;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 6px 0;
}

.coins-price {
    font-size: 24px;
    color: #d4a574;
    margin: 10px 0;
    font-weight: bold;
}

.coins-description {
    font-size: 18px;
    color: #a39080;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(212, 165, 116, 0.2);
    line-height: 1.4;
    min-height: 40px;
}

/* COINS BREAKDOWN */
.coins-breakdown {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(212, 165, 116, 0.2);
    font-size: 18px;
    color: #a39080;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    margin: 4px 0;
    font-size: 19px;
}

.breakdown-row strong {
    color: #d4a574;
}

.breakdown-row.bonus-row strong {
    color: #7db84f;
}

.breakdown-row.total-row {
    margin-top: 8px;
    border-top: 1px solid rgba(212, 165, 116, 0.2);
    padding-top: 6px;
    font-weight: bold;
}

.breakdown-row.total-row span {
    font-weight: bold;
}

.breakdown-row.total-row strong {
    color: #d97706;
}

/* BUY BUTTON */
.btn-comprar {
    background: linear-gradient(135deg, #a43e2c, #c65438);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 0;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    margin-top: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(164, 62, 44, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-comprar:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 16px rgba(164, 62, 44, 0.5);
}

/* MODAL STYLES */
#paymentModal {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(135deg, #5a4a38 0%, #4a3a28 100%);
    margin: 8% auto;
    padding: 28px;
    border: 2px solid #a43e2c;
    border-radius: 0;
    width: 90%;
    max-width: 480px;
    color: #f7e7ca;
    animation: slideIn 0.3s ease;
    box-sizing: border-box;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close {
    color: #d4a574;
    float: right;
    font-size: 26px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #a43e2c;
}

.modal-title {
    color: #d4a574;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    clear: both;
}

.modal-method {
    background: rgba(164, 62, 44, 0.15);
    padding: 11px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 18px;
}

.modal-method strong {
    color: #d4a574;
}

/* COINS DESGLOSE (Breakdown in Modal) */
.coins-desglose {
    background: rgba(164, 62, 44, 0.1);
    padding: 14px;
    border-radius: 8px;
    margin: 18px 0;
}

.desglose-title {
    color: #d4a574;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 18px;
}

.desglose-row {
    display: flex;
    justify-content: space-between;
    margin: 6px 0;
    font-size: 18px;
}

.desglose-row .label {
    color: #a39080;
}

.desglose-row .value {
    color: #d4a574;
    font-weight: bold;
}

.desglose-row.total {
    border-top: 1px solid rgba(164, 62, 44, 0.3);
    padding-top: 6px;
    margin-top: 6px;
    font-size: 15px;
}

.desglose-row.total .value {
    color: #7db84f;
    font-size: 17px;
    font-weight: bold;
}

/* MODAL BUTTONS */
.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    width: 100%;
}

.btn-modal {
    padding: 11px;
    border: none;
    border-radius: 0;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-cancelar {
    background: #6b5a48;
    color: #d4a574;
    border: 2px solid #8b7a68;
    width: 35%;
}

.btn-cancelar:hover {
    background: #7b6a58;
    border-color: #d4a574;
}

.btn-pagar {
    background: linear-gradient(135deg, #a43e2c, #c65438);
    color: white;
    box-shadow: 0 4px 12px rgba(164, 62, 44, 0.3);
    width: 65%;
    margin-right: 1px;
}

.btn-pagar:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 16px rgba(164, 62, 44, 0.5);
}

.btn-home {
    background: linear-gradient(135deg, #a43e2c, #c65438);
    color: white;
    box-shadow: 0 4px 12px rgba(164, 62, 44, 0.3);
    width: 100%;
}

.btn-home:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 16px rgba(164, 62, 44, 0.5);
}

/* SUCCESS/ERROR/WARNING MODALS */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

.success-modal {
    background: linear-gradient(135deg, #5a4a38 0%, #4a3a28 100%);
    border: 3px solid #7db84f;
    border-radius: 0;
    padding: 32px;
    text-align: center;
    max-width: 400px;
    color: #f7e7ca;
    animation: slideIn 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.success-icon {
    font-size: 48px;
    color: #7db84f;
    margin-bottom: 16px;
    animation: bounceIn 0.5s ease;
}

/* Error modal variant */
.success-modal.error-modal {
    border-color: #f44336;
}

.success-icon.error-icon {
    color: #f44336;
}

/* Warning modal variant */
.success-modal.warning-modal {
    border-color: #ff9800;
}

.success-icon.warning-icon {
    color: #ff9800;
}

@keyframes bounceIn {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.success-modal h2 {
    color: #d4a574;
    font-size: 24px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.success-message {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 22px;
    color: #a39080;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* PROMO CODE SECTION */
.promo-section {
    background: rgba(164, 62, 44, 0.1);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 18px;
}

.promo-label {
    color: #d4a574;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.promo-input-group {
    display: flex;
    gap: 8px;
}

.promo-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #8b7a68;
    color: #d4a574;
    padding: 8px;
    border-radius: 4px;
    flex: 1;
    font-size: 11px;
    text-transform: uppercase;
}

.promo-input::placeholder {
    color: #8b7a68;
}

.promo-input:focus {
    outline: none;
    border-color: #a43e2c;
    box-shadow: 0 0 8px rgba(164, 62, 44, 0.2);
}

#applyPromoBtn {
    background: linear-gradient(135deg, #a43e2c, #c65438);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 11px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(164, 62, 44, 0.3);
}

#applyPromoBtn:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(164, 62, 44, 0.5);
}

#applyPromoBtn:active {
    transform: translateY(1px);
}

#promoMessage {
    font-size: 11px;
    margin-top: 8px;
}

#promoMessage.success {
    color: #7db84f;
}

#promoMessage.error {
    color: #f44336;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .coins-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 12px;
    }

    .coins-card {
        padding: 16px;
    }

    .coins-amount {
        font-size: 28px;
    }

    .coins-price {
        font-size: 16px;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .payment-methods {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    }

    .modal-buttons {
        flex-direction: column;
    }

    .btn-cancelar,
    .btn-pagar {
        width: 100%;
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .coins-grid {
        grid-template-columns: 1fr;
    }

    .coins-title {
        font-size: 16px;
        margin-bottom: 18px;
    }

    .coins-amount {
        font-size: 24px;
    }

    .coins-price {
        font-size: 14px;
    }

    .payment-methods {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .method-btn {
        font-size: 9px;
        padding: 8px;
    }
}

/* ============================================================
   NEW UTILITY CLASSES AND MODAL ENHANCEMENTS
   ============================================================ */

/* Hidden utility class */
.hidden {
    display: none !important;
}

/* Utility class to override display for flex containers */
#paymentModal.hidden {
    display: none !important;
}

/* Bonus text color */
.bonus-text {
    color: #7db84f;
}

/* Total breakdown row styling */
.breakdown-row.total-row {
    margin-top: 8px;
    border-top: 1px solid rgba(212, 165, 116, 0.2);
    padding-top: 6px;
}

.breakdown-row.total-row span {
    font-weight: bold;
}

.breakdown-row.total-row strong {
    color: #d97706;
}

/* Modal price section */
.modal-price-section {
    background: rgba(164, 62, 44, 0.1);
    padding: 11px;
    border-radius: 8px;
    margin: 14px 0;
    font-size: 14px;
    color: #a39080;
}

.modal-price-section strong {
    color: #d4a574;
}

/* Promo code section */
.promo-section {
    margin: 14px 0;
}

.promo-input {
    width: 100%;
    padding: 11px;
    background: rgba(212, 165, 116, 0.1);
    border: 1px solid #a39080;
    color: #d4a574;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.promo-input::placeholder {
    color: rgba(212, 165, 116, 0.6);
}

.btn-apply-promo {
    width: 100%;
    padding: 11px;
    background: linear-gradient(135deg, #a43e2c, #c65438);
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    font-size: 13px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(164, 62, 44, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-apply-promo:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 16px rgba(164, 62, 44, 0.5);
}

.btn-apply-promo:active {
    transform: translateY(1px);
}

.promo-message {
    margin-top: 10px;
    font-size: 14px;
    color: #f44336;
    font-weight: bold;
    min-height: 16px;
}

.promo-message.error {
    color: #f44336;
}

.promo-message.success {
    color: #7db84f;
}

.promo-discount {
    margin-top: 8px;
    padding: 8px;
    background: rgba(125, 184, 79, 0.15);
    border-left: 2px solid #7db84f;
    color: #7db84f;
    font-size: 13px;
    font-weight: bold;
}
