/* =========================================================
   CONTENEDOR GENERAL
   ========================================================= */
/* 
.main-container {
    min-height: 100vh;
    background: #f5f7fa;
    padding: 35px 20px 60px;
} */

.container-create {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}


/* =========================================================
   ENCABEZADO
   ========================================================= */

.create-page-header {
    margin-bottom: 25px;
}

.create-page-label {
    display: block;
    margin-bottom: 5px;

    color: #048ABF;

    font-size: 13px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.create-page-header h4 {
    margin: 0;

    color: #1f2937;

    font-size: 28px;
    font-weight: 700;
}

.create-page-header p {
    margin: 7px 0 0;

    color: #6b7280;

    font-size: 14px;
}


/* =========================================================
   ERRORES
   ========================================================= */

.create-errors {
    margin-bottom: 22px;
    padding: 16px 18px;

    background: #fff5f5;

    border: 1px solid #f1c1c1;
    border-radius: 12px;

    color: #842029;
}

.create-errors-title {
    display: flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 8px;
}

.create-errors-title i {
    font-size: 18px;
}

.create-errors ul {
    margin: 8px 0 0;
    padding-left: 25px;

    font-size: 14px;
}

.create-errors li {
    margin-bottom: 3px;
}


/* =========================================================
   CARD PRINCIPAL DE CADA SECCIÓN
   ========================================================= */

.create-section {
    margin-bottom: 22px;
    padding: 28px;

    background: #ffffff;

    border: 1px solid #e7ebef;
    border-radius: 14px;

    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}


/* =========================================================
   ENCABEZADO DE SECCIÓN
   ========================================================= */

.create-section-header {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-bottom: 25px;
    padding-bottom: 18px;

    border-bottom: 1px solid #edf0f2;
}

.create-section-icon {
    flex-shrink: 0;

    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(4, 138, 191, 0.10);

    border-radius: 11px;

    color: #048ABF;

    font-size: 20px;
}

.create-section-header h5 {
    margin: 0;

    color: #1f2937;

    font-size: 19px;
    font-weight: 700;
}

.create-section-header p {
    margin: 4px 0 0;

    color: #6b7280;

    font-size: 14px;
}


/* =========================================================
   GRID DE FORMULARIOS
   ========================================================= */

.create-form-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 20px;
}


/* =========================================================
   GRUPOS DE FORMULARIO
   ========================================================= */

.create-form-group {
    margin-bottom: 20px;
}

.create-form-group label {
    display: block;

    margin-bottom: 7px;

    color: #374151;

    font-size: 14px;
    font-weight: 600;
}


/* =========================================================
   INPUTS
   ========================================================= */

.create-form-group .form-control,
.create-form-group .form-select {
    width: 100%;

    min-height: 44px;

    padding: 10px 13px;

    background-color: #ffffff;

    border: 1px solid #dfe4e8;
    border-radius: 9px;

    color: #374151;

    font-size: 14px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.create-form-group .form-control::placeholder {
    color: #9ca3af;
}


/* Focus */

.create-form-group .form-control:focus,
.create-form-group .form-select:focus {
    border-color: #048ABF;

    box-shadow: 0 0 0 3px rgba(4, 138, 191, 0.10);

    outline: none;
}


/* Textarea */

.create-form-group textarea.form-control {
    min-height: 130px;

    resize: vertical;
}


/* Errores */

.create-form-group .is-invalid {
    border-color: #dc3545;
}

.create-form-group .invalid-feedback {
    margin-top: 6px;

    font-size: 13px;
}


/* =========================================================
   AYUDA DE INPUT
   ========================================================= */

.create-input-help {
    margin-top: 7px;

    color: #8a949e;

    font-size: 12px;
}


/* =========================================================
   INPUT DE IMÁGENES
   ========================================================= */

#imgs {
    cursor: pointer;
}

#imgs.form-control {
    padding: 9px 12px;
}


/* =========================================================
   PREVISUALIZACIÓN DE IMÁGENES
   ========================================================= */

.product-image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;

    margin-top: 20px;
}

.product-image-preview img {
    width: 125px;
    height: 125px;

    object-fit: cover;

    border: 1px solid #e1e6ea;
    border-radius: 10px;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}


/* =========================================================
   PREGUNTA DE VARIANTES
   ========================================================= */

.variant-question {
    padding: 18px 20px;

    background: #f8fafb;

    border: 1px solid #e5eaee;
    border-radius: 11px;
}

.variant-question-title {
    margin-bottom: 12px;

    color: #374151;

    font-size: 14px;
    font-weight: 600;
}

.variant-question-options {
    display: flex;
    align-items: center;
    gap: 28px;
}

.variant-question .form-check {
    display: flex;
    align-items: center;
    gap: 7px;

    margin: 0;
}

.variant-question .form-check-input {
    margin: 0;

    cursor: pointer;
}

.variant-question .form-check-input:checked {
    background-color: #048ABF;
    border-color: #048ABF;
}

.variant-question .form-check-label {
    cursor: pointer;

    color: #4b5563;

    font-size: 14px;
}


/* =========================================================
   SUBSECCIONES
   ========================================================= */

.variant-subsection {
    padding: 22px;

    background: #fafbfc;

    border: 1px solid #e7ebef;
    border-radius: 12px;
}

.variant-subsection-header {
    margin-bottom: 20px;
}

.variant-subsection-header h6 {
    margin: 0;

    color: #1f2937;

    font-size: 16px;
    font-weight: 700;
}

.variant-subsection-header p {
    margin: 5px 0 0;

    color: #6b7280;

    font-size: 13px;
}

.variant-subsection-header span {
    display: inline-block;

    margin-top: 6px;

    color: #8a949e;

    font-size: 12px;
}


/* =========================================================
   PRECIO
   ========================================================= */

.price-input-wrapper {
    position: relative;
}

.price-input-wrapper > span {
    position: absolute;

    left: 13px;
    top: 50%;

    transform: translateY(-50%);

    color: #6b7280;

    font-size: 14px;
    font-weight: 600;

    z-index: 2;
}

.price-input-wrapper .form-control {
    padding-left: 29px;
}


/* =========================================================
   CONTENEDOR DE TIPOS DE VARIANTES
   ========================================================= */

#variant-types-container {
    margin-top: 5px;
}


/* =========================================================
   MENSAJE CUANDO NO HAY CARACTERÍSTICAS
   ========================================================= */

.variant-empty-message {
    display: flex;
    align-items: center;
    gap: 9px;

    width: 100%;

    padding: 14px 16px;

    background: #f8fafb;

    border: 1px solid #dfe7eb;
    border-radius: 10px;

    color: #6b7280;

    font-size: 14px;
}

.variant-empty-message i {
    color: #048ABF;

    font-size: 17px;
}


/* =========================================================
   CARDS GENERADAS POR JAVASCRIPT
   ========================================================= */

#variant-types-container .card {
    height: 100%;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e3e8ec;
    border-radius: 11px;

    box-shadow: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

#variant-types-container .card:hover {
    border-color: rgba(4, 138, 191, 0.35);

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);

    transform: translateY(-1px);
}

#variant-types-container .card-header {
    background: #f7f9fa;

    border-bottom: 1px solid #e8edf0;

    color: #374151;

    font-size: 14px;
    font-weight: 700;
}

#variant-types-container .card-body {
    padding: 16px;
}

#variant-types-container .form-check {
    margin-bottom: 9px;
}

#variant-types-container .form-check:last-child {
    margin-bottom: 0;
}

#variant-types-container .form-check-input {
    cursor: pointer;
}

#variant-types-container .form-check-input:checked {
    background-color: #048ABF;
    border-color: #048ABF;
}

#variant-types-container .form-check-label {
    cursor: pointer;

    color: #4b5563;

    font-size: 14px;
}


/* =========================================================
   VARIANTES GENERADAS
   ========================================================= */

.variant-generated {
    margin-top: 24px;
    padding-top: 24px;

    border-top: 1px solid #e9edef;
}


/* =========================================================
   TABLA
   ========================================================= */

.variant-generated .table-responsive {
    overflow-x: auto;

    margin-top: 18px;

    border: 1px solid #e3e8ec;
    border-radius: 11px;
}

.variant-generated table {
    width: 100%;
    min-width: 700px;

    margin: 0;

    background: #ffffff;
}

.variant-generated thead th {
    padding: 13px 14px;

    background: #f6f8f9;

    color: #374151;

    border-bottom: 1px solid #dfe5e9;

    font-size: 13px;
    font-weight: 700;

    white-space: nowrap;
}

.variant-generated tbody td {
    padding: 12px 14px;

    color: #4b5563;

    border-color: #edf0f2;

    font-size: 14px;

    vertical-align: middle;
}

.variant-generated tbody tr:last-child td {
    border-bottom: 0;
}


/* Inputs de la tabla */

.variant-generated .form-control,
.variant-generated .form-select {
    min-height: 40px;

    border: 1px solid #dfe4e8;
    border-radius: 8px;

    font-size: 13px;
}

.variant-generated .form-control:focus,
.variant-generated .form-select:focus {
    border-color: #048ABF;

    box-shadow: 0 0 0 3px rgba(4, 138, 191, 0.08);

    outline: none;
}


/* =========================================================
   ACCIONES
   ========================================================= */

.create-form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    padding: 18px 22px;
}


/* Botón general */

.create-btn {
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 9px 20px;

    border-radius: 8px;

    font-size: 14px;
    font-weight: 600;

    text-decoration: none;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}


/* Cancelar */

.create-btn-secondary {
    background: #ffffff;

    border: 1px solid #d9dfe3;

    color: #4b5563;
}

.create-btn-secondary:hover {
    background: #f5f7f9;

    border-color: #cbd2d7;

    color: #374151;

    text-decoration: none;
}


/* Publicar */

.create-btn-primary {
    background: #048ABF;

    border: 1px solid #048ABF;

    color: #ffffff;
}

.create-btn-primary:hover {
    background: #037ba9;

    border-color: #037ba9;

    color: #ffffff;

    transform: translateY(-1px);

    box-shadow: 0 4px 10px rgba(4, 138, 191, 0.20);
}

.create-btn:active {
    transform: translateY(0);
}


/* =========================================================
   RESPONSIVE - TABLET
   ========================================================= */

@media (max-width: 768px) {

    .main-container {
        padding: 25px 15px 45px;
    }

    .create-page-header h4 {
        font-size: 25px;
    }

    .create-section {
        padding: 22px 20px;
    }

    .create-form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .create-section-header {
        align-items: flex-start;
    }

    .create-section-icon {
        width: 40px;
        height: 40px;

        font-size: 18px;
    }

    .create-section-header h5 {
        font-size: 17px;
    }

    .variant-subsection {
        padding: 18px;
    }

    .create-form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .create-btn {
        width: 100%;
    }

}


/* =========================================================
   RESPONSIVE - MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .main-container {
        padding: 20px 10px 40px;
    }

    .create-page-header {
        margin-bottom: 20px;
    }

    .create-page-header h4 {
        font-size: 22px;
    }

    .create-page-header p {
        font-size: 13px;
    }

    .create-section {
        padding: 18px 15px;

        border-radius: 12px;
    }

    .create-section-header {
        gap: 10px;

        margin-bottom: 20px;
    }

    .create-section-icon {
        width: 36px;
        height: 36px;

        border-radius: 9px;

        font-size: 16px;
    }

    .create-section-header h5 {
        font-size: 16px;
    }

    .create-section-header p {
        font-size: 12px;
    }

    .variant-question {
        padding: 15px;
    }

    .variant-question-options {
        gap: 20px;
    }

    .variant-subsection {
        padding: 15px;
    }

    .product-image-preview {
        gap: 9px;
    }

    .product-image-preview img {
        width: 90px;
        height: 90px;
    }

    .create-form-actions {
        padding: 15px;
    }

}

/*prueba*/
.discount-preview {
    margin-top: -10px;
    margin-bottom: 24px;
    padding: 16px;

    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;

    display: flex;
    flex-direction: column;
    gap: 10px;
}

.discount-preview > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.discount-preview span {
    color: #6b7280;
    font-size: .85rem;
}

.discount-preview strong {
    color: #374151;
    font-size: .9rem;
}

.discount-preview-total {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.discount-preview-total span {
    color: #048ABF;
    font-weight: 600;
}

.discount-preview-total strong {
    color: #048ABF;
    font-size: 1.1rem;
}