/* Sampieri Calculadora de Eventos — estilos (hermano visual de Maridaje) */

#scev-fab {
    position: fixed !important;
    bottom: 88px !important;   /* 60px arriba del de Maridaje (28px) */
    left: 28px !important;
    z-index: 9998 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 20px !important;
    background: #132f59 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 999px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 16px rgba(19,47,89,.35) !important;
    transition: transform .15s, box-shadow .15s !important;
    line-height: 1 !important;
    -webkit-appearance: none !important;
    font-family: inherit !important;
}
#scev-fab:hover  { transform: translateY(-2px) !important; box-shadow: 0 6px 20px rgba(19,47,89,.45) !important; }
#scev-fab:active { transform: scale(.97) !important; }

#scev-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(3px);
}
#scev-overlay.scev-open { display: flex; }

#scev-modal {
    background: #fff;
    width: 100%;
    max-width: 560px;
    max-height: 92vh;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #222;
}

#scev-modal-header {
    padding: 18px 24px 14px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
#scev-modal-header h2 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    color: #132f59;
}
#scev-modal-header p {
    margin: 0;
    font-size: 13px;
    color: #888;
}
#scev-close {
    background: none !important;
    border: none !important;
    font-size: 26px !important;
    line-height: 1 !important;
    color: #999 !important;
    cursor: pointer !important;
    padding: 0 !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 50% !important;
    transition: background .15s, color .15s !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
    text-shadow: none !important;
    margin: 0 !important;
    -webkit-appearance: none !important;
    font-family: inherit !important;
    font-weight: 400 !important;
}
#scev-close:hover { background: #f0f0f0 !important; color: #333 !important; }

/* Progress bar */
#scev-progress {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    background: #fafbfd;
    border-bottom: 1px solid #f0f0f0;
    gap: 4px;
}
.scev-step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}
.scev-step-dot span {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e0e4eb;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    transition: all .2s;
}
.scev-step-dot small {
    font-size: 10px;
    color: #999;
    font-weight: 500;
}
.scev-step-dot.active span   { background: #132f59; color: #fff; box-shadow: 0 0 0 3px rgba(19,47,89,.15); }
.scev-step-dot.active small  { color: #132f59; font-weight: 700; }
.scev-step-dot.done span     { background: #2e7d4f; color: #fff; }
.scev-step-line {
    flex: 1;
    height: 2px;
    background: #e0e4eb;
    margin: 0 2px;
    margin-bottom: 14px;
    border-radius: 2px;
    transition: background .3s;
}
.scev-step-line.done { background: #2e7d4f; }

#scev-modal-body {
    padding: 20px 24px 8px;
    overflow-y: auto;
    flex: 1;
}

.scev-step-title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 600;
    color: #222;
}

.scev-label {
    display: block;
    font-size: 12px;
    color: #666;
    font-weight: 600;
    margin: 14px 0 8px;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.scev-label:first-child,
.scev-step > .scev-label:first-of-type { margin-top: 0; }

.scev-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.scev-opt {
    background: #f7f8fa;
    border: 1.5px solid transparent;
    border-radius: 10px;
    padding: 12px 6px;
    font-size: 12px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    line-height: 1.2;
    text-align: center;
    position: relative;
    min-height: 74px;
    justify-content: center;
}
.scev-opt:hover    { background: #eef2f8; border-color: #dde3ec; }
.scev-opt.selected {
    background: #eef2f8;
    border-color: #132f59;
    color: #132f59;
    font-weight: 600;
}
.scev-opt.selected::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    background: #132f59;
    border-radius: 50%;
}
.scev-emoji { font-size: 24px; }

.scev-input-num {
    width: 100% !important;
    height: 44px !important;
    padding: 0 14px !important;
    border: 1.5px solid #e0e4eb !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    font-family: inherit !important;
    outline: none !important;
    box-sizing: border-box !important;
    background: #fff !important;
    color: #222 !important;
    -webkit-appearance: none !important;
    box-shadow: none !important;
    margin: 0 !important;
}
.scev-input-num:focus { border-color: #132f59 !important; }

.scev-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #e0e4eb;
    border-radius: 4px;
    outline: none;
    margin: 0;
}
.scev-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #132f59;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(19,47,89,.35);
}
.scev-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #132f59;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(19,47,89,.35);
}
.scev-slider-hints {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.scev-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: #999;
    text-align: center;
    line-height: 1.4;
}

/* Bebidas step */
.scev-bebida-chk {
    background: #f7f8fa;
    border: 1.5px solid transparent;
    border-radius: 10px;
    padding: 10px 6px;
    font-size: 11.5px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-family: inherit;
    line-height: 1.2;
    text-align: center;
    min-height: 68px;
    justify-content: center;
}
.scev-bebida-chk:hover    { background: #eef2f8; border-color: #dde3ec; }
.scev-bebida-chk.checked  {
    background: #eef2f8;
    border-color: #132f59;
    color: #132f59;
    font-weight: 600;
}
.scev-bebida-chk .scev-emoji { font-size: 20px; }

.scev-pct-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}
.scev-pct-row label {
    flex: 0 0 130px;
    font-size: 13px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}
.scev-pct-row input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    height: 4px;
    background: #e0e4eb;
    border-radius: 3px;
}
.scev-pct-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #132f59;
    border-radius: 50%;
    cursor: pointer;
}
.scev-pct-row .scev-pct-value {
    flex: 0 0 40px;
    text-align: right;
    font-weight: 700;
    color: #132f59;
    font-size: 13px;
}

#scev-porcentajes-total {
    text-align: right;
    margin-top: 10px;
    font-size: 13px;
    color: #666;
}
#scev-porcentajes-total strong { color: #132f59; }
#scev-porcentajes-total.error strong { color: #e74c3c; }

/* Loading */
#scev-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 16px;
    color: #666;
    font-size: 14px;
}
.scev-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e6e9ef;
    border-top-color: #132f59;
    border-radius: 50%;
    animation: scev-spin 0.9s linear infinite;
}
@keyframes scev-spin { to { transform: rotate(360deg); } }

/* Bebida sin stock disponible */
.scev-bebida-chk.no-stock {
    opacity: .55;
    cursor: not-allowed;
    position: relative;
}
.scev-bebida-chk.no-stock:hover {
    background: #f7f8fa;
    border-color: transparent;
}
.scev-nostock-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #e74c3c;
    color: #fff;
    font-size: 8.5px;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
}

/* Brindis card — opción destacada */
.scev-brindis-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin-top: 18px;
    background: linear-gradient(135deg, #fef9ec 0%, #fff4d1 100%);
    border: 1.5px solid #f0d77a;
    border-radius: 12px;
    cursor: pointer;
    transition: all .15s;
}
.scev-brindis-card:hover {
    border-color: #e0a533;
    box-shadow: 0 3px 10px rgba(224, 165, 51, 0.15);
}
.scev-brindis-card:has(input:checked) {
    background: linear-gradient(135deg, #eef2f8 0%, #e3ebf5 100%);
    border-color: #132f59;
}
.scev-brindis-card input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    margin: 2px 0 0 !important;
    accent-color: #132f59;
    cursor: pointer;
    flex-shrink: 0;
}
.scev-brindis-content { flex: 1; }
.scev-brindis-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 3px;
}
.scev-brindis-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

/* Resultado */
.scev-resumen {
    background: #fafbfd;
    border-left: 3px solid #132f59;
    border-radius: 0 8px 8px 0;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #444;
    line-height: 1.6;
}
.scev-resumen strong { color: #132f59; }

/* Total destacado */
.scev-total-box {
    background: linear-gradient(135deg, #132f59 0%, #1d4a8a 100%);
    color: #fff;
    padding: 16px 18px;
    border-radius: 12px;
    margin-bottom: 16px;
    text-align: center;
}
.scev-total-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: .85;
    margin-bottom: 4px;
}
.scev-total-num {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
}
.scev-total-num small { font-size: 14px; font-weight: 500; opacity: .85; margin-left: 4px; }

.scev-cat {
    margin-bottom: 16px;
    border: 1px solid #ecedf0;
    border-radius: 12px;
    padding: 14px;
}
.scev-cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 10px;
}
.scev-cat-title {
    font-size: 14px;
    font-weight: 700;
    color: #132f59;
    display: flex;
    align-items: center;
    gap: 6px;
}
.scev-cat-count {
    background: #132f59;
    color: #fff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.scev-cat-count small { font-weight: 400; opacity: .85; }

.scev-select-hint {
    font-size: 11px;
    color: #666;
    margin: 0 0 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.scev-prods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
/* En desktop ocultamos el 4º producto para mantener simetría 1 fila */
@media (min-width: 481px) {
    .scev-prods .scev-prod:nth-child(n+4) { display: none; }
}
.scev-prod {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 8px 8px;
    background: #fafbfd;
    border: 2px solid transparent;
    border-radius: 10px;
    text-align: center;
    font-size: 11.5px;
    color: inherit;
    cursor: pointer;
    transition: all .15s;
}
.scev-prod:hover {
    background: #eef2f8;
    border-color: #dde3ec;
}
.scev-prod.selected {
    background: #eef2f8;
    border-color: #132f59;
    box-shadow: 0 2px 8px rgba(19,47,89,.12);
}
.scev-prod-check {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    border: 2px solid #d5d9e2;
    border-radius: 50%;
    background: #fff;
    transition: all .15s;
}
.scev-prod.selected .scev-prod-check {
    background: #132f59;
    border-color: #132f59;
}
.scev-prod.selected .scev-prod-check::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.scev-prod img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    background: #fff;
}
.scev-prod-name {
    font-weight: 600;
    color: #222;
    line-height: 1.25;
    font-size: 11px;
    min-height: 28px;
}
.scev-prod-price {
    color: #132f59;
    font-weight: 700;
    font-size: 12px;
}
.scev-prod-link {
    font-size: 10px;
    color: #888;
    text-decoration: none;
    margin-top: 2px;
    display: inline-block;
}
.scev-prod-link:hover { color: #132f59; text-decoration: underline; }

.scev-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
    align-items: stretch;
}
.scev-btn-wa,
.scev-btn-reset {
    height: 48px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    line-height: 1;
    letter-spacing: .2px;
    text-decoration: none;
    white-space: nowrap;
    min-width: 0;
}
.scev-btn-wa {
    background: linear-gradient(135deg, #25d366 0%, #1fb855 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}
.scev-btn-wa:hover {
    background: linear-gradient(135deg, #1fb855 0%, #199c48 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}
.scev-btn-wa:active { transform: translateY(0); }
.scev-btn-wa svg { flex-shrink: 0; }

.scev-btn-reset {
    background: #fff;
    color: #132f59;
    border: 1.5px solid #d5d9e2;
}
.scev-btn-reset:hover {
    background: #f7f8fa;
    border-color: #132f59;
    color: #0d2340;
}
.scev-btn-reset:active { background: #eef2f8; }

@media (max-width: 420px) {
    /* Mantener botones lado a lado pero permitir que el texto ocupe 2 líneas si hace falta */
    .scev-btn-wa, .scev-btn-reset {
        height: auto;
        min-height: 48px;
        padding: 10px 12px;
        font-size: 12.5px;
        white-space: normal;
        text-align: center;
        line-height: 1.25;
    }
    .scev-btn-wa svg, .scev-btn-reset svg {
        width: 16px;
        height: 16px;
    }
}

/* Botón principal: Armar carrito */
.scev-btn-cart {
    width: 100%;
    background: linear-gradient(135deg, #132f59 0%, #1d4a8a 100%);
    color: #fff;
    border: none;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    box-shadow: 0 4px 14px rgba(19, 47, 89, 0.3);
    line-height: 1;
    letter-spacing: .3px;
}
.scev-btn-cart:hover:not(:disabled) {
    background: linear-gradient(135deg, #0d2340 0%, #143968 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(19, 47, 89, 0.4);
    color: #fff;
}
.scev-btn-cart:active:not(:disabled) { transform: translateY(0); }
.scev-btn-cart:disabled {
    opacity: .85;
    cursor: wait;
    background: #132f59;
    transform: none;
}
.scev-cart-hint {
    font-size: 11.5px;
    color: #888;
    text-align: center;
    margin: 6px 0 0;
    line-height: 1.4;
}
.scev-cart-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: scev-spin 0.7s linear infinite;
}

/* Footer botones */
#scev-modal-footer {
    padding: 14px 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    background: #fafbfd;
}
.scev-btn-pri, .scev-btn-sec {
    height: 42px;
    padding: 0 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
    border: none;
    -webkit-appearance: none;
}
.scev-btn-pri {
    background: #132f59;
    color: #fff;
    margin-left: auto;
}
.scev-btn-pri:hover:not(:disabled) { background: #0d2340; }
.scev-btn-pri:disabled { background: #c6ccd6; cursor: not-allowed; }
.scev-btn-sec {
    background: #fff;
    color: #132f59;
    border: 1.5px solid #d5d9e2;
}
.scev-btn-sec:hover { background: #f7f8fa; }

/* Mobile */
@media (max-width: 480px) {
    #scev-modal { max-width: 100%; max-height: 95vh; border-radius: 12px; }
    #scev-modal-header { padding: 14px 16px 10px; }
    #scev-modal-body { padding: 16px 18px 8px; }
    #scev-progress { padding: 10px 14px; }
    .scev-step-dot small { display: none; }
    .scev-step-dot span { width: 22px; height: 22px; font-size: 11px; }
    .scev-step-line { margin-bottom: 0; }
    .scev-prods { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .scev-pct-row label { flex: 0 0 110px; font-size: 12px; }
    #scev-modal-footer { padding: 12px 16px; }
}
