:root {
    --primary-color: #8bc34a; /* Green from the logo to make it pop */
    --accent-color: #d32f2f; /* Red for terror alerts/requirements */
    --bg-overlay: rgba(0, 0, 0, 0.7);
    --card-bg: rgba(32, 33, 36, 0.85); /* Dark Google Forms style card */
    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --border-color: #5f6368;
    --card-border-radius: 8px;
}

body {
    margin: 0;
    font-family: 'Roboto', Arial, sans-serif;
    color: var(--text-primary);
    background-color: #111;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('fondo.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(4px); /* Premium feel */
}

.form-container {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 24px 12px;
    box-sizing: border-box;
}

.header-image {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: var(--card-border-radius);
    overflow: hidden;
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.header-image img {
    width: 100%;
    max-height: 250px;
    object-fit: contain;
    padding: 10px;
}

.form-card {
    background: var(--card-bg);
    border-radius: var(--card-border-radius);
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255,255,255,0.05);
    backdrop-filter: blur(12px);
    transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.form-card:hover {
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.6);
}

.title-card {
    border-top: 10px solid var(--primary-color);
}

h1 {
    font-size: 32px;
    font-weight: 400;
    margin: 0 0 12px 0;
    line-height: 40px;
    color: #fff;
}

.title-card p {
    font-size: 14px;
    margin: 0 0 16px 0;
}

.required-indicator, .required {
    color: var(--accent-color);
}

.required-indicator {
    font-size: 13px;
    margin-top: 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

label {
    display: block;
    font-size: 15px;
    margin-bottom: 8px;
    font-weight: 400;
    color: #e8eaed;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
    font-size: 15px;
    color: #fff;
    padding: 8px 0;
    box-sizing: border-box;
    transition: border-bottom-color 0.3s;
    font-family: inherit;
}

input:focus {
    outline: none;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 7px; /* Prevent layout shift */
}

input::placeholder {
    color: var(--text-secondary);
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-card {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, transform 0.1s;
    background-color: rgba(255, 255, 255, 0.03);
}

.option-card:hover {
    background-color: rgba(139, 195, 74, 0.1); /* Primary color low opacity */
    border-color: var(--primary-color);
}

.option-card:active {
    transform: scale(0.99);
}

.option-card input[type="radio"] {
    margin-top: 4px;
    margin-right: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
    transform: scale(1.2);
}

.option-content {
    display: flex;
    flex-direction: column;
}

.option-title {
    font-weight: 500;
    font-size: 16px;
    color: #fff;
}

.option-price {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary-color);
    margin: 6px 0;
}

.option-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.submit-btn {
    background-color: var(--primary-color);
    color: #000;
    border: none;
    border-radius: 4px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.submit-btn:hover {
    background-color: #9ccc65; /* Lighter green */
}

.submit-btn:active {
    transform: scale(0.95);
}

.clear-btn {
    background: transparent;
    color: var(--primary-color);
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.clear-btn:hover {
    background-color: rgba(139, 195, 74, 0.1);
}

/* Hide number input spinners for a cleaner look */
input[type="number"]::-webkit-inner-spin-button, 
input[type="number"]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}
input[type="number"] {
  -moz-appearance: textfield; /* Firefox */
}

/* Fix visibility of options in the select dropdown */
select option {
    background-color: #202124;
    color: #fff;
}

/* ---- Selector de Cantidad ---- */
.combo-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cantidad-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.cantidad-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    white-space: nowrap;
}

.cantidad-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cantidad-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--primary-color);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cantidad-btn:hover {
    background-color: rgba(139, 195, 74, 0.15);
}

.cantidad-btn:active {
    transform: scale(0.9);
}

.cantidad-input {
    width: 40px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--primary-color);
    padding: 4px 0;
}

/* ---- Tarjeta de Estado / Agradecimiento Post-Pago ---- */
.status-card {
    text-align: center;
    padding: 40px 24px;
    border-top: 10px solid var(--primary-color);
    animation: fadeIn 0.4s ease-out;
}

.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    margin-bottom: 20px;
}

.status-icon.success-icon {
    background: rgba(139, 195, 74, 0.15);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.status-icon.failure-icon {
    background: rgba(211, 47, 47, 0.15);
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.status-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

.status-message {
    font-size: 16px;
    color: #e8eaed;
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto 24px auto;
}

.status-info-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

.status-actions {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Lista de Productos Multi-Selección (Imágenes 3 y 4) ---- */
.products-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
}

.product-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--card-border-radius);
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.product-item-card.has-selected {
    background: rgba(184, 69, 230, 0.08);
    border-color: #b845e6;
    box-shadow: 0 0 12px rgba(184, 69, 230, 0.2);
}

.product-main-content {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 1;
}

.product-thumbnail {
    width: 90px;
    height: 90px;
    min-width: 90px;
    border-radius: 6px;
    overflow: hidden;
    background: #0d0e12;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-thumbnail-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle, #2a1636 0%, #0d0e12 100%);
    color: #b845e6;
    padding: 6px;
    box-sizing: border-box;
    font-size: 11px;
    font-weight: 700;
}

.product-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.product-title {
    font-size: 16px;
    font-weight: 700;
    color: #b845e6; /* Purple highlight matching official store */
    margin: 0;
    line-height: 1.3;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #b845e6;
    margin: 2px 0;
}

.product-short-desc {
    font-size: 13px;
    color: #e0e0e0;
    line-height: 1.4;
    margin: 0;
}

.more-info-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: #d154ff;
    text-decoration: underline;
    cursor: pointer;
    margin-top: 4px;
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 0;
    text-align: left;
    font-family: inherit;
}

.more-info-link:hover {
    color: #f1b8ff;
}

.product-counter-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 90px;
}

.counter-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

.counter-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.counter-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    user-select: none;
}

.counter-btn:hover {
    background: rgba(184, 69, 230, 0.35);
    border-color: #b845e6;
    color: #fff;
}

.counter-btn:active {
    transform: scale(0.9);
}

.counter-display {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    min-width: 20px;
    text-align: center;
}

@media (max-width: 580px) {
    .product-item-card {
        flex-direction: column;
        align-items: stretch;
    }
    .product-counter-container {
        flex-direction: row;
        justify-content: space-between;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding-top: 10px;
        margin-top: 6px;
    }
}

/* ---- Barra de Resumen de Total ---- */
.total-summary-card {
    background: rgba(139, 195, 74, 0.12);
    border: 1px solid var(--primary-color);
    border-radius: var(--card-border-radius);
    padding: 14px 20px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.total-label {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
}

.total-amount {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
}

/* ---- Ventana Emergente (Modal) "Más información" ---- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    animation: fadeIn 0.25s ease-out;
}

.modal-card {
    background: #1c1d21;
    border: 1px solid #444;
    border-radius: var(--card-border-radius);
    width: 100%;
    max-width: 580px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
    overflow: hidden;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #b845e6;
}

.modal-close-btn {
    background: none;
    border: none;
    color: #aaa;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.15s;
}

.modal-close-btn:hover {
    color: #fff;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    color: #ddd;
}

.modal-body p {
    margin: 0 0 12px 0;
}

.modal-body strong {
    color: #fff;
}

.modal-body ul {
    margin: 8px 0 16px 0;
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 6px;
}

.modal-body a {
    color: #d154ff;
    text-decoration: underline;
}

.modal-body a:hover {
    color: #e8a7ff;
}

.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: flex-end;
    background: rgba(0, 0, 0, 0.2);
}
