/* ========= MODAL VARIACIONES (LOOK SAAS) ========= */

.variation-modal {
    border-radius: 18px;
    border: none;
    box-shadow: 0 18px 45px rgba(15,23,42,0.35);
    overflow: hidden;
}

/* Header */
.variation-modal .modal-header {
    padding: 14px 20px 6px;
}

.variation-modal .modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
}

.variation-modal .modal-header .text-muted.small {
    font-size: .8rem;
}

/* Body */
.variation-modal .modal-body {
    border-top: 1px solid #e5e7eb;
    padding-top: 14px;
    background: #f3f4f6;
}

/* Tabs */
.variation-tabs {
    border-bottom: 0;
    gap: .5rem;
}

.variation-tabs .nav-link {
    border-radius: 999px;
    font-size: .83rem;
    padding: .35rem .9rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    background-color: #f9fafb;
    box-shadow: 0 1px 2px rgba(15,23,42,0.05);
    transition: all .15s ease-in-out;
}

.variation-tabs .nav-link i {
    font-size: .85rem;
}

.variation-tabs .nav-link:hover {
    background-color: #eef2ff;
    border-color: #c7d2fe;
    color: #111827;
}

.variation-tabs .nav-link.active {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 14px rgba(37,99,235,.3);
}

/* Tarjeta general */
.variation-card {
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    background: radial-gradient(circle at top left, #f9fafb 0, #ffffff 55%);
    padding: 18px 20px;
}

.variation-card h6 {
    font-size: .96rem;
    font-weight: 600;
    color: #111827;
}

.variation-card small {
    font-size: .8rem;
}

/* Título principal del formulario */
.variation-card > .mb-3 h6 {
    font-size: 1rem;
    font-weight: 700;
}

.variation-card > .mb-3 small {
    font-size: .78rem;
}

/* Scroll lista */
.variation-list-scroll {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.variation-list-scroll::-webkit-scrollbar {
    width: 5px;
}
.variation-list-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.variation-list-scroll::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 999px;
}

/* Secciones del formulario */
.variation-section {
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    padding: 12px 14px 14px;
    background: #f9fafb;
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
}

.variation-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(37,99,235,0.05), transparent);
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease-in-out;
}

.variation-section:focus-within::before {
    opacity: 1;
}

.variation-section-title {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #000000;
    margin-bottom: .35rem;
}

/* Labels y texto del form */
.variation-section .form-label {
    font-size: .82rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: .2rem;
}

.variation-section .form-check-label {
    font-size: .84rem;
    color: #374151;
}

.variation-section small {
    font-size: .75rem;
    color: #6b7280;
}

/* Campos */
.variation-section .form-control,
.variation-section .form-select {
    font-size: .86rem;
    border-radius: 10px;
    border-color: #d1d5db;
    background-color: #fdfdfd;
    transition: border-color .12s ease-out, box-shadow .12s ease-out, background-color .12s ease-out;
}

.variation-section .form-control::placeholder {
    color: #9ca3af;
    font-size: .82rem;
}

.variation-section .form-control:focus,
.variation-section .form-select:focus {
    border-color: #2563eb;
    background-color: #ffffff;
    box-shadow: 0 0 0 1px rgba(37,99,235,.2);
}

/* Inputs de número (min/max) */
.variation-section input[type="number"]::-webkit-inner-spin-button,
.variation-section input[type="number"]::-webkit-outer-spin-button {
    height: auto;
}

/* Opciones */
.option-row {
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
    padding: 9px 10px 7px;
    background-color: #ffffff;
    margin-bottom: .45rem;
}

.option-row .form-label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6b7280;
    margin-bottom: .15rem;
}

.option-row .input-group-text {
    font-size: .8rem;
    border-radius: 999px 0 0 999px;
}

.option-row .form-control {
    border-radius: 0 999px 999px 0;
}

/* Botón eliminar opción */
.option-row .btn-outline-danger.btn-sm {
    border-radius: 999px;
    padding: .15rem .45rem;
}

/* Botón principal */
.variation-card .btn.btn-success {
    border-radius: 999px;
    font-size: .9rem;
    padding: .55rem 1.3rem;
    font-weight: 600;
    background: linear-gradient(135deg,#16a34a,#22c55e);
    border: none;
    box-shadow: 0 8px 20px rgba(34,197,94,.35);
}

.variation-card .btn.btn-success:hover {
    filter: brightness(0.97);
}

/* Responsive */
@media (max-width: 767.98px) {
    .variation-card {
        padding: 14px 12px;
    }
    .variation-section {
        padding: 9px 10px 11px;
    }
    .variation-tabs {
        flex-wrap: wrap;
    }
}


/* ========= VARIACIONES EXISTENTES (LISTADO COMPACTO) ========= */
/* ========= LISTA 2 COLUMNAS VARIACIONES ========= */

.variation-2col-wrapper {
    padding: 4px 2px;
}

.variation-2col-item {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
}

.v2-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.v2-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.v2-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #111827;
}

.v2-type {
    font-size: 0.75rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background-color: #eef2ff;
    color: #4f46e5;
    border: 1px solid #c7d2fe;
    max-width: fit-content;
}

.v2-delete-btn {
    border: none;
    background-color: #fee2e2;
    color: #b91c1c;
    border-radius: 999px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
}

.v2-delete-btn:hover {
    background-color: #fecaca;
}

/* Meta en dos chips pequeños dentro de la tarjeta */
.v2-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.78rem;
    margin-top: 2px;
}

.v2-meta-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
    color: #9ca3af;
}

.v2-meta-value {
    font-weight: 500;
    color: #374151;
    margin-left: 0.15rem;
}

/* Opciones en formato pills compactas */
.v2-options {
    margin-top: 4px;
}

.v2-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.v2-pill {
    border-radius: 999px;
    background-color: #1a1b1cd9;
    color: #f9fafb;
    padding: 0.14rem 0.55rem;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.v2-pill .price {
    font-size: 0.75rem;
    color: #bbf7d0;
}

/* En móvil, las tarjetas siguen siendo 1 columna, en desktop 2 columnas (ya lo hace el grid col-md-6) */
