/* Estilos generales */
.jd-games-shop {
    margin: 20px 0;
}

.jd-payment-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.jd-no-games {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Grid de juegos */
.jd-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.jd-game-card {
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.jd-game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.jd-game-card.jd-out-of-stock {
    opacity: 0.7;
    background: #f8f9fa;
}

.jd-game-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.jd-game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.jd-game-card:hover .jd-game-image img {
    transform: scale(1.05);
}

.jd-stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.jd-game-info {
    padding: 20px;
}

.jd-game-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.3em;
    color: #333;
}

.jd-game-description {
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.jd-game-price {
    font-size: 1.8em;
    font-weight: bold;
    color: #007cba;
    margin-bottom: 8px;
}

.jd-game-stock {
    margin-bottom: 15px;
    font-size: 0.9em;
}

.jd-stock-in {
    color: #28a745;
    font-weight: bold;
}

.jd-stock-out {
    color: #dc3545;
    font-weight: bold;
}

.jd-buy-button {
    width: 100%;
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.jd-buy-button:hover:not(.jd-button-disabled) {
    background: #005a87;
}

.jd-buy-button.jd-button-disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Página individual del juego */
.jd-single-game {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.jd-single-game-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 40px;
    align-items: start;
}

.jd-game-image-large {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.jd-game-image-large img {
    width: 100%;
    height: auto;
    display: block;
}

.jd-game-details h1 {
    font-size: 2.5em;
    margin: 0 0 20px 0;
    color: #333;
}

.jd-game-description-full {
    font-size: 1.1em;
    line-height: 1.6;
    color: #555;
    margin-bottom: 30px;
}

.jd-purchase-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.jd-game-price-large {
    font-size: 2.5em;
    font-weight: bold;
    color: #007cba;
    margin-bottom: 15px;
}

.jd-game-stock-large {
    font-size: 1.1em;
    margin-bottom: 20px;
}

.jd-buy-button-large {
    background: #28a745;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    width: 100%;
    transition: background 0.3s ease;
}

.jd-buy-button-large:hover:not(.jd-button-disabled) {
    background: #218838;
}

.jd-buy-button-large.jd-button-disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.jd-payment-methods-info {
    margin-top: 15px;
    text-align: center;
    color: #666;
}

/* Modal */
.jd-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

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

.jd-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s;
}

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

.jd-close-modal {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    z-index: 1;
}

.jd-close-modal:hover {
    color: #000;
}

#jd-modal-body {
    padding: 30px;
}

.jd-form-group {
    margin-bottom: 20px;
}

.jd-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.jd-form-group input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.jd-form-group input[type="email"]:focus {
    border-color: #007cba;
    outline: none;
}

.jd-payment-methods {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.jd-payment-methods label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
    padding: 10px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.jd-payment-methods label:hover {
    border-color: #007cba;
}

.jd-payment-methods input[type="radio"]:checked + span {
    font-weight: bold;
    color: #007cba;
}

.jd-pay-button {
    background: #28a745;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    width: 100%;
    transition: background 0.3s ease;
    margin-top: 10px;
}

.jd-pay-button:hover:not(:disabled) {
    background: #218838;
}

.jd-pay-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.jd-loading {
    text-align: center;
    padding: 20px;
}

.jd-loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.jd-success-message {
    text-align: center;
    padding: 30px;
}

.jd-success-icon {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .jd-games-grid {
        grid-template-columns: 1fr;
    }
    
    .jd-single-game-content {
        grid-template-columns: 1fr;
    }
    
    .jd-modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .jd-payment-methods {
        flex-direction: column;
        gap: 10px;
    }
}