* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(160deg, #1a0e2e 0%, #2d1b4e 40%, #1a0e2e 100%);
    color: #e0d8f0;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Producto */
.product-section {
    display: flex;
    gap: 30px;
    padding: 40px 0;
    border-bottom: 1px solid rgba(199, 75, 155, 0.2);
}

.book-cover img {
    width: 200px;
    border-radius: 4px;
    box-shadow: 0 8px 30px rgba(199, 75, 155, 0.3);
}

.book-info h1 {
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.3;
}

.author {
    color: #b8a0d4;
    margin-bottom: 16px;
}

.description {
    color: #c4b5db;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e84da0;
}

/* Selector tipo de libro */
.book-type-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.book-type-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 12px;
    border: 2px solid rgba(199, 75, 155, 0.25);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    background: rgba(26, 14, 46, 0.5);
}

.book-type-option:hover {
    border-color: rgba(232, 77, 160, 0.5);
}

.book-type-option.selected {
    border-color: #e84da0;
    background: rgba(232, 77, 160, 0.1);
    box-shadow: 0 0 16px rgba(232, 77, 160, 0.2);
}

.book-type-option input[type="radio"] {
    display: none;
}

.option-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.option-price {
    font-size: 0.85rem;
    color: #e84da0;
    font-weight: 700;
}

/* Formulario */
.shipping-section {
    padding: 40px 0;
}

.shipping-section h2 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    margin-bottom: 16px;
}

label {
    font-size: 0.85rem;
    color: #b8a0d4;
    margin-bottom: 6px;
}

input, select {
    background: rgba(26, 14, 46, 0.8);
    border: 1px solid rgba(199, 75, 155, 0.25);
    border-radius: 8px;
    padding: 12px 14px;
    color: #fff;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus {
    outline: none;
    border-color: #e84da0;
    box-shadow: 0 0 12px rgba(232, 77, 160, 0.2);
}

input::placeholder {
    color: #6b5a80;
}

select {
    cursor: pointer;
}

select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Teléfono con prefijo */
.phone-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(26, 14, 46, 0.8);
    border: 1px solid rgba(199, 75, 155, 0.25);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.phone-input-wrapper:focus-within {
    border-color: #e84da0;
    box-shadow: 0 0 12px rgba(232, 77, 160, 0.2);
}

.phone-prefix {
    padding: 12px 10px 12px 14px;
    color: #b8a0d4;
    font-size: 0.95rem;
    user-select: none;
    border-right: 1px solid rgba(199, 75, 155, 0.25);
}

.phone-input-wrapper input {
    border: none;
    background: transparent;
    border-radius: 0;
    flex: 1;
}

.phone-input-wrapper input:focus {
    box-shadow: none;
}

/* Resumen */
.order-summary {
    background: rgba(26, 14, 46, 0.6);
    border: 1px solid rgba(199, 75, 155, 0.2);
    border-radius: 12px;
    padding: 24px;
    margin: 30px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: #c4b5db;
}

.summary-row.total {
    border-top: 1px solid rgba(199, 75, 155, 0.3);
    margin-top: 8px;
    padding-top: 16px;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Botón pagar */
#pay-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #c74b9b, #e84da0);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#pay-button:hover:not(:disabled) {
    opacity: 0.9;
    box-shadow: 0 4px 20px rgba(232, 77, 160, 0.4);
}

#pay-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Confirmación */
.confirmation {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.confirmation-card {
    background: rgba(26, 14, 46, 0.8);
    border: 1px solid rgba(199, 75, 155, 0.25);
    border-radius: 16px;
    padding: 48px;
    text-align: center;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.check-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #c74b9b, #e84da0);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 24px;
}

.confirmation-card h1 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.subtitle {
    color: #c4b5db;
    margin-bottom: 32px;
}

.order-details {
    text-align: left;
    background: rgba(15, 8, 30, 0.6);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: #c4b5db;
    font-size: 0.95rem;
}

.detail-row.total {
    border-top: 1px solid rgba(199, 75, 155, 0.3);
    margin-top: 8px;
    padding-top: 12px;
    color: #fff;
    font-weight: 700;
}

.note {
    color: #8a7aa0;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Nota de envío */
.shipping-note {
    color: #8a7aa0;
    font-size: 0.8rem;
    line-height: 1.5;
    text-align: center;
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(15, 8, 30, 0.4);
    border-radius: 8px;
    border-left: 3px solid rgba(199, 75, 155, 0.4);
}

/* Categoría de envío */
.shipping-category {
    font-size: 0.8rem;
    color: #b8a0d4;
    font-style: italic;
}

/* Responsive */
@media (max-width: 600px) {
    .product-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .book-cover img {
        width: 160px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .confirmation-card {
        padding: 32px 20px;
    }
}
