/* =========================================================
   CATÁLOGO CURSOSCV
========================================================= */

.cv-catalogo {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}


/* =========================================================
   BLOQUEAR SCROLL
========================================================= */

body.cv-no-scroll {
    overflow: hidden !important;
}


/* =========================================================
   ENCABEZADO
========================================================= */

.cv-catalogo header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}


.cv-catalogo header h2 {
    margin: 0;
    padding: 0;
}


.cv-catalogo header p {
    margin: 6px 0 0;
}


/* =========================================================
   BOTÓN PEDIDO
========================================================= */

.cv-cart-toggle {
    border: 0;
    border-radius: 7px;
    padding: 11px 18px;
    background: #111;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: .2s;
}


.cv-cart-toggle:hover {
    background: #333;
}


/* =========================================================
   BUSCADOR
========================================================= */

.cv-tools {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}


.cv-tools input,
.cv-tools select {
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 7px;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
}


.cv-tools select {
    max-width: 280px;
}


/* =========================================================
   ESTADO
========================================================= */

.cv-catalogo [data-status] {
    margin-bottom: 18px;
    font-size: 14px;
    color: #666;
}


/* =========================================================
   GRID
========================================================= */

.cv-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}


/* =========================================================
   TARJETA
========================================================= */

.cv-card {
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition:
        transform .2s ease,
        box-shadow .2s ease;
}


.cv-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
}


/* =========================================================
   IMAGEN
========================================================= */

.cv-img {
    aspect-ratio: 1 / 1;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}


.cv-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


.cv-no-image {
    color: #999;
    font-size: 14px;
}


/* =========================================================
   CUERPO
========================================================= */

.cv-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}


.cv-body small {
    font-size: 12px;
    color: #888;
}


.cv-body h3 {
    font-size: 18px;
    line-height: 1.3;
    margin: 6px 0 8px;
}


.cv-subtitle {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 10px;
}


/* =========================================================
   PARTE INFERIOR
========================================================= */

.cv-bottom {
    margin-top: auto;
    padding-top: 15px;
}


.cv-price {
    display: block;
    font-size: 20px;
    margin-bottom: 12px;
}


/* =========================================================
   BOTONES TARJETA
========================================================= */

.cv-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}


.cv-card-actions button {
    width: 100%;
    border: 0;
    border-radius: 7px;
    padding: 11px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: .2s;
}


.cv-info-button {
    background: #f1f1f1;
    color: #222;
}


.cv-info-button:hover {
    background: #e5e5e5;
}


.cv-add-button {
    background: #111;
    color: #fff;
}


.cv-add-button:hover {
    background: #333;
}


/* =========================================================
   PAGINACIÓN
========================================================= */

.cv-pages {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin: 30px 0;
}


.cv-pages button {
    border: 1px solid #ddd;
    background: #fff;
    padding: 9px 14px;
    border-radius: 7px;
    cursor: pointer;
}


.cv-pages button:disabled {
    opacity: .45;
    cursor: not-allowed;
}


/* =========================================================
   CARRITO
========================================================= */

.cv-cart {
    position: fixed !important;

    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;

    width: min(430px, 94vw) !important;
    height: 100vh !important;

    background: #fff !important;

    z-index: 2147483000 !important;

    box-sizing: border-box !important;

    padding: 22px !important;

    transform: translateX(110%) !important;

    transition:
        transform .28s ease !important;

    box-shadow:
        -10px 0 35px rgba(0,0,0,.20) !important;

    overflow-y: auto !important;

    visibility: hidden;

    pointer-events: none;
}


.cv-cart.open {
    transform: translateX(0) !important;

    visibility: visible;

    pointer-events: auto;
}


/* =========================================================
   CONTROL DE VISTAS
========================================================= */

/*
 * Ocultar cualquier elemento marcado como hidden.
 */

.cv-cart [hidden] {
    display: none !important;
}


/*
 * Vista carrito.
 */

.cv-cart-view {
    width: 100%;
    min-height: 100%;
    box-sizing: border-box;
}


/*
 * Vista formulario.
 */

.cv-checkout-view {
    width: 100%;
    box-sizing: border-box;
}


/*
 * Cuando estamos en formulario,
 * la vista del carrito desaparece completamente.
 */

.cv-cart.cv-show-checkout .cv-cart-view {
    display: none !important;
}


/*
 * Cuando estamos en formulario,
 * solamente se muestra el formulario.
 */

.cv-cart.cv-show-checkout .cv-checkout-view {
    display: block !important;
}


/*
 * Cuando NO estamos en formulario,
 * el formulario queda completamente oculto.
 */

.cv-cart:not(.cv-show-checkout) .cv-checkout-view {
    display: none !important;
}


/* =========================================================
   ENCABEZADO DEL CARRITO
========================================================= */

.cv-cart-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}


.cv-cart-head h3 {
    margin: 0;
}


.cv-cart-head button {
    border: 0 !important;
    background: transparent !important;
    color: #222 !important;
    font-size: 30px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    padding: 4px 8px !important;
}


/* =========================================================
   ELEMENTOS CARRITO
========================================================= */

.cv-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}


.cv-row-info strong {
    display: block;
    font-size: 14px;
    line-height: 1.35;
}


.cv-row-info small {
    display: block;
    margin-top: 4px;
    color: #777;
}


.cv-row-qty {
    display: flex;
    align-items: center;
    gap: 7px;
}


.cv-row-qty button {
    width: 30px;
    height: 30px;
    padding: 0 !important;
    border: 1px solid #ddd !important;
    background: #fff !important;
    color: #222 !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    font-size: 18px !important;
}


.cv-row-qty span {
    min-width: 18px;
    text-align: center;
}


.cv-row-remove {
    border: 0 !important;
    background: transparent !important;
    color: #999 !important;
    font-size: 22px !important;
    cursor: pointer !important;
    padding: 4px !important;
}


.cv-row-remove:hover {
    color: #d00 !important;
}


/* =========================================================
   CARRITO VACÍO
========================================================= */

.cv-cart-empty {
    text-align: center;
    padding: 50px 20px;
    color: #777;
}


.cv-cart-empty-icon {
    font-size: 45px;
    margin-bottom: 10px;
}


/* =========================================================
   PIE DEL CARRITO
========================================================= */

.cv-cart-foot {
    position: sticky !important;
    bottom: 0 !important;

    margin:
        20px -22px -22px !important;

    padding: 18px 22px !important;

    background: #fff !important;

    border-top: 1px solid #eee !important;
}


.cv-cart-foot strong {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 17px;
}


.cv-cart-foot button {
    width: 100%;
    border: 0;
    border-radius: 7px;
    padding: 13px;
    background: #111;
    color: #fff;
    cursor: pointer;
    font-size: 15px;
}


.cv-cart-foot button:hover {
    background: #333;
}


/* =========================================================
   FONDO CARRITO
========================================================= */

.cv-backdrop {
    position: fixed !important;

    inset: 0 !important;

    background: rgba(0,0,0,.55) !important;

    z-index: 2147482990 !important;

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transition: opacity .25s ease;
}


.cv-backdrop.open {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;
}


/* =========================================================
   FORMULARIO DE PEDIDO
========================================================= */

.cv-checkout-view {
    width: 100%;
    box-sizing: border-box;
}


.cv-checkout-head {
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}


.cv-checkout-head h3 {
    margin: 18px 0 5px;
    font-size: 24px;
}


.cv-checkout-head p {
    margin: 0;
    color: #777;
    font-size: 14px;
}


.cv-checkout-back {
    border: 0 !important;
    background: transparent !important;
    color: #222 !important;
    padding: 0 !important;
    cursor: pointer !important;
    font-size: 14px !important;
}


.cv-checkout-back:hover {
    text-decoration: underline;
}


/* =========================================================
   CAMPOS FORMULARIO
========================================================= */

.cv-checkout-form {
    display: flex;
    flex-direction: column;
    gap: 17px;
}


.cv-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}


.cv-form-field label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}


.cv-form-field input,
.cv-form-field textarea {
    width: 100% !important;
    box-sizing: border-box !important;

    border: 1px solid #ddd !important;

    border-radius: 7px !important;

    background: #fff !important;

    color: #222 !important;

    padding: 12px 13px !important;

    font-size: 14px !important;

    font-family: inherit !important;

    outline: none !important;
}


.cv-form-field input:focus,
.cv-form-field textarea:focus {
    border-color: #888 !important;

    box-shadow:
        0 0 0 2px rgba(0,0,0,.05) !important;
}


.cv-form-field textarea {
    resize: vertical;
}


/* =========================================================
   RESUMEN
========================================================= */

.cv-checkout-summary {
    margin-top: 5px;

    padding: 16px;

    border-radius: 8px;

    background: #f7f7f7;
}


.cv-summary-title {
    font-weight: 700;

    font-size: 15px;

    margin-bottom: 12px;
}


.cv-summary-row {
    display: flex;

    justify-content: space-between;

    gap: 12px;

    padding: 7px 0;

    border-bottom: 1px solid #e5e5e5;

    font-size: 13px;
}


.cv-summary-row span {
    flex: 1;
}


.cv-summary-row strong {
    white-space: nowrap;
}


.cv-summary-total {
    display: flex;

    justify-content: space-between;

    gap: 10px;

    padding-top: 13px;

    margin-top: 5px;

    font-size: 17px;

    font-weight: 700;
}


/* =========================================================
   BOTÓN ENVIAR PEDIDO
========================================================= */

.cv-submit-order {
    width: 100% !important;

    border: 0 !important;

    border-radius: 7px !important;

    padding: 14px !important;

    background: #111 !important;

    color: #fff !important;

    cursor: pointer !important;

    font-size: 15px !important;
}


.cv-submit-order:hover {
    background: #333 !important;
}


/* =========================================================
   MODAL
========================================================= */

.cv-modal {
    position: fixed !important;

    inset: 0 !important;

    width: 100vw !important;

    height: 100vh !important;

    z-index: 2147483100 !important;

    display: flex !important;

    align-items: center !important;

    justify-content: center !important;

    padding: 25px !important;

    box-sizing: border-box !important;

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transition: opacity .25s ease;

    isolation: isolate;
}


.cv-modal.open {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;
}


/* =========================================================
   FONDO MODAL
========================================================= */

.cv-modal-backdrop {
    position: absolute !important;

    inset: 0 !important;

    background:
        rgba(0,0,0,.65) !important;

    z-index: -1 !important;

    cursor: pointer;
}


/* =========================================================
   CAJA MODAL
========================================================= */

.cv-modal-box {
    position: relative !important;

    width: min(980px, 94vw) !important;

    max-height: 90vh !important;

    overflow-y: auto !important;

    background: #fff !important;

    border-radius: 14px !important;

    box-shadow:
        0 25px 70px rgba(0,0,0,.30) !important;

    z-index: 2 !important;

    box-sizing: border-box !important;
}


/* =========================================================
   BOTÓN CERRAR MODAL
========================================================= */

.cv-modal-close {
    position: absolute !important;

    top: 12px !important;

    right: 12px !important;

    z-index: 20 !important;

    width: 40px !important;

    height: 40px !important;

    border: 0 !important;

    border-radius: 50% !important;

    background: rgba(255,255,255,.95) !important;

    color: #222 !important;

    font-size: 28px !important;

    line-height: 38px !important;

    padding: 0 !important;

    cursor: pointer !important;

    box-shadow:
        0 2px 10px rgba(0,0,0,.15) !important;
}


.cv-modal-close:hover {
    background: #f0f0f0 !important;
}


/* =========================================================
   CONTENIDO MODAL
========================================================= */

.cv-modal-content {
    width: 100%;
}


/* =========================================================
   LAYOUT MODAL
========================================================= */

.cv-modal-layout {
    display: grid;

    grid-template-columns:
        minmax(300px, 45%)
        1fr;

    min-height: 430px;
}


/* =========================================================
   IMAGEN MODAL
========================================================= */

.cv-modal-image {
    min-height: 430px;

    background: #f5f5f5;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    border-radius:
        14px 0 0 14px;
}


.cv-modal-image img {
    width: 100%;

    height: 100%;

    min-height: 430px;

    object-fit: cover;

    display: block;
}


.cv-modal-no-image {
    color: #999;
}


/* =========================================================
   INFORMACIÓN MODAL
========================================================= */

.cv-modal-info {
    padding: 45px 40px 35px;

    display: flex;

    flex-direction: column;

    box-sizing: border-box;
}


.cv-modal-categories {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;

    margin-bottom: 12px;
}


.cv-modal-categories span {
    background: #f1f1f1;

    border-radius: 20px;

    padding: 5px 10px;

    font-size: 12px;
}


.cv-modal-sku {
    color: #999;

    font-size: 12px;

    margin-bottom: 8px;
}


.cv-modal-info h2 {
    font-size: 30px;

    line-height: 1.2;

    margin:
        0 0 10px;
}


.cv-modal-subtitle {
    color: #666;

    font-size: 16px;

    line-height: 1.5;

    margin-bottom: 18px;
}


.cv-modal-description {
    font-size: 15px;

    line-height: 1.7;

    color: #444;

    margin-bottom: 20px;
}


/* =========================================================
   DETALLES MODAL
========================================================= */

.cv-modal-details {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 12px;

    margin-top: 5px;
}


.cv-modal-details > div {
    padding: 12px;

    background: #f7f7f7;

    border-radius: 7px;
}


.cv-modal-details span {
    display: block;

    font-size: 12px;

    color: #888;

    margin-bottom: 3px;
}


.cv-modal-details strong {
    font-size: 14px;
}


/* =========================================================
   PIE MODAL
========================================================= */

.cv-modal-footer {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 15px;

    margin-top: auto;

    padding-top: 25px;
}


.cv-modal-price {
    font-size: 27px;

    font-weight: 700;

    white-space: nowrap;
}


.cv-modal-add {
    border: 0 !important;

    border-radius: 7px !important;

    padding: 13px 22px !important;

    background: #111 !important;

    color: #fff !important;

    cursor: pointer !important;

    font-size: 15px !important;
}


.cv-modal-add:hover {
    background: #333 !important;
}


/* =========================================================
   VACÍO
========================================================= */

.cv-empty {
    text-align: center;

    padding: 50px 20px;

    grid-column: 1 / -1;

    color: #777;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1000px) {

    .cv-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


/* =========================================================
   TABLET PEQUEÑA
========================================================= */

@media (max-width: 760px) {

    .cv-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .cv-tools {
        flex-direction: column;
    }


    .cv-tools select {
        max-width: none;
    }


    .cv-modal {
        padding: 15px !important;
    }


    .cv-modal-layout {
        grid-template-columns: 1fr;
    }


    .cv-modal-image {
        min-height: 250px;

        max-height: 300px;

        border-radius:
            14px 14px 0 0;
    }


    .cv-modal-image img {
        min-height: 250px;

        max-height: 300px;
    }


    .cv-modal-info {
        padding:
            30px 25px 25px;
    }


    .cv-modal-info h2 {
        font-size: 24px;
    }

}


/* =========================================================
   MÓVIL
========================================================= */

@media (max-width: 480px) {

    .cv-grid {
        grid-template-columns: 1fr;
    }


    .cv-catalogo header {
        flex-direction: column;

        align-items: stretch;
    }


    .cv-modal {
        padding: 8px !important;
    }


    .cv-modal-box {
        width: 96vw !important;

        max-height: 94vh !important;

        border-radius: 10px !important;
    }


    .cv-modal-image {
        min-height: 210px;

        max-height: 230px;
    }


    .cv-modal-image img {
        min-height: 210px;

        max-height: 230px;
    }


    .cv-modal-info {
        padding:
            28px 18px 20px;
    }


    .cv-modal-info h2 {
        font-size: 22px;
    }


    .cv-modal-details {
        grid-template-columns: 1fr;
    }


    .cv-modal-footer {
        flex-direction: column;

        align-items: stretch;
    }


    .cv-modal-price {
        text-align: center;
    }


    .cv-modal-add {
        width: 100%;
    }


    .cv-cart {
        width: 94vw !important;
    }


    .cv-summary-row {
        flex-direction: column;

        gap: 3px;
    }

}