/* Para todo el proyecto */
* {
    scrollbar-width: none; /* Firefox */
}
*::-webkit-scrollbar {
    display: none; /* Chrome, Edge, Safari */
}
/* Asegura que el scroll siga funcionando */
html, body {
    overflow-y: scroll;
}

/* Modal del carrito */
.cart-modal {
    display: none;
    position: fixed;
    z-index: 999999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
    /* Centrado con Flexbox para móviles y escritorio */
    align-items: center;
    justify-content: center;
}
.cart-modal.show {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.cart-modal-content {
    position: relative;
    background: #f8f8f8;
    /* ancho fluido con máximo */
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    margin: auto;
    padding: 35px;
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideInDown 0.4s ease-out;
}

@keyframes slideInDown {
    from { transform: translateY(-50px); opacity: 0; }
    to   { transform: translateY(0);      opacity: 1; }
}

.cart-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.cart-close:hover,
.cart-close:focus {
    color: #d4af37;
    background: white;
    transform: scale(1.1);
}

/* Estilos del carrito */
.cart-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f8f8;
    color: #1a1a1a;
    line-height: 1.6;
}

.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

/* Plans Section */
.plans-section {
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    animation: slideInLeft 0.8s ease-out 0.4s both;
}

@keyframes slideInLeft {
    from { transform: translateX(-20px); opacity: 0; }
    to   { transform: translateX(0);      opacity: 1; }
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #d4af37;
    font-weight: 600;
    text-align: center;
}

.plans-grid {
    display: grid;
    gap: 1.5rem;
    /* columnas fluidas: se adaptan según el espacio */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.plan-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    animation: fadeIn 0.6s ease-out calc(0.6s + var(--delay, 0s)) both;
}
.plan-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}
.plan-card.selected {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.1);
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.plan-name { font-size: 1.2rem; font-weight: 600; color: #d4af37; }
.plan-price { font-size: 1.5rem; font-weight: 700; color: #d4af37; }
.plan-description { color: #666; margin-bottom: 1rem; font-size: 0.95rem; }
.plan-features { list-style: none; }
.plan-features li {
    padding: 0.3rem 0;
    position: relative;
    padding-left: 1.5rem;
    color: #555;
    font-size: 0.9rem;
}
.plan-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #d4af37;
    font-weight: bold;
}

.plan-badge {
    position: absolute;
    top: -10px;
    right: 15px;
    background: #d4af37;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Form de envío */
.plans-section form {
    display: grid;
    gap: 1rem;
}
.plans-section form .flex-row {
    display: flex;
    gap: 1rem;
}
.plans-section form .flex-row > div {
    flex: 1;
}
.plans-section form input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* Resultado AJAX */
#result-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}
#result-container table {
    width: 100%;
}
#result-container th,
#result-container td {
    padding: 0.5rem;
    text-align: left;
}

/* Order Summary */
.order-summary {
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    position: sticky;
    top: 20px;
    animation: slideInRight 0.8s ease-out 0.6s both;
}

@keyframes slideInRight {
    from { transform: translateX(20px); opacity: 0; }
    to   { transform: translateX(0);      opacity: 1; }
}

.summary-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #d4af37;
    font-weight: 600;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 1rem;
}

.selected-plan { text-align: center; margin-bottom: 2rem; }
.selected-plan-name { font-size: 1.1rem; color: #d4af37; font-weight: 600; }
.selected-plan-price { font-size: 2rem; color: #d4af37; font-weight: 700; }

.plan-benefits {
    background: rgba(0,0,0,0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(212,175,55,0.2);
}
.benefit-item { display: flex; align-items: center; margin-bottom: 0.5rem; font-size: 0.9rem; color: #555; }
.benefit-item:last-child { margin-bottom: 0; }
.benefit-icon { color: #d4af37; margin-right: 0.5rem; }

.price-breakdown { margin-bottom: 2rem; }
.price-item {
    display: flex; justify-content: space-between;
    margin-bottom: 0.75rem; padding: 0.5rem 0;
    font-size: 0.95rem; color: #333;
}
.price-item:last-child {
    border-top: 1px solid rgba(212,175,55,0.3);
    padding-top: 1rem;
    font-weight: 600; font-size: 1.1rem; color: #d4af37;
}

/* Payment */
.payment-section {
    margin-top: 2rem;
    text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.stripe-button {
    width: 100%; padding: 1rem;
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: #fff; border: none; border-radius: 8px;
    font-size: 1rem; font-weight: 600; cursor: pointer;
    transition: all 0.2s ease;
}
.stripe-button:hover {
    background: linear-gradient(135deg, #b8860b, #8b7355);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212,175,55,0.3);
}
.stripe-button:disabled {
    opacity: 0.6; cursor: not-allowed; transform: none;
}
.coinbase-button {
    width: 100%; padding: 1rem;
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: #fff; border: none; border-radius: 8px;
    font-size: 1rem; font-weight: 600; cursor: pointer;
    transition: all 0.2s ease;
}
.coinbase-button:hover {
    background: linear-gradient(135deg, #b8860b, #8b7355);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212,175,55,0.3);
}
.coinbase-button:disabled {
    opacity: 0.6; cursor: not-allowed; transform: none;
}
.security-badges {
    display: flex; justify-content: center; gap: 1rem;
    margin-top: 1rem; font-size: 0.85rem; color: #666;
}
.badge { display: flex; align-items: center; gap: 0.5rem; color: #4d4d4d; font-size: 15px; }

.no-selection {
    text-align: center; color: #888; font-style: italic; margin: 2rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .cart-modal-content {
        width: 98%; margin: 1% auto; max-height: 95vh;
    }
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .plans-grid {
        grid-template-columns: 1fr;
    }
    .plans-section form .flex-row {
        flex-direction: column;
    }
    .order-summary {
        position: static;
        margin-top: 2rem;
    }
    .cart-title {
        font-size: 1.75rem;
    }
}