/* =========================================
   MODULE: PRODUCT QUICK VIEW (BUTTON & MODAL)
   ========================================= */

/* --- 1. BUTTON STYLING --- */

.vortex-btn-view {
    width: 46px !important;
    height: 46px !important;
    border-radius: 50% !important;

    background-color: var(--wp--preset--color--custom-blanco-suave, #f0f0f0);
    color: var(--wp--preset--color--custom-color-7, #8770ff);

    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
    cursor: pointer;

    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease, color 0.2s ease;
}

/* Hover: Scale Up */
.vortex-btn-view:hover {
    background-color: var(--wp--preset--color--custom-color-7, #8770ff);
    color: #ffffff;
    transform: scale(1.1);
}

/* Active: Scale Down */
.vortex-btn-view:active {
    transform: scale(0.9);
}

/* ---------------------------------------------------------
   2. MODAL SHELL
   --------------------------------------------------------- */

#vortex-qv-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;

    display: flex;
    align-items: center;
    justify-content: center;

    /* Hidden State */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0s linear 0.35s;
}

#vortex-qv-modal.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.vortex-modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.vortex-modal-container {
    position: relative;
    background: var(--wp--preset--color--custom-color-3, #161718);
    width: 90%;
    max-width: 1100px;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;

    /* Entry Animation */
    transform: scale(0.95) translateY(20px);
    opacity: 0;
    transition: transform 0.25s ease-in, opacity 0.25s ease-in;
}

#vortex-qv-modal.active .vortex-modal-container {
    transform: scale(1) translateY(0);
    opacity: 1;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

/* ---------------------------------------------------------
   3. LAYOUT & SCROLLBARS
   --------------------------------------------------------- */

.vortex-qv-modal-content {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    height: 80vh;
    max-height: 800px;
    overflow: hidden;
}

.vortex-qv-image {
    flex: 0 0 auto;
    height: 100%;
    aspect-ratio: 2/3;
    background-color: #000;
}

.vortex-qv-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vortex-qv-details {
    flex: 1;
    padding: 40px 32px 40px 40px;
    overflow-y: auto;
    scrollbar-gutter: stable;

    display: flex;
    flex-direction: column;
    text-align: left;
    color: var(--wp--preset--color--custom-blanco-suave, #f0f0f0) !important;
}

/* Dark Scrollbar Styling */
.vortex-qv-details::-webkit-scrollbar {
    width: 8px;
}

.vortex-qv-details::-webkit-scrollbar-track {
    background: transparent;
}

.vortex-qv-details::-webkit-scrollbar-thumb {
    background-color: #333;
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.vortex-qv-details::-webkit-scrollbar-thumb:hover {
    background-color: var(--wp--preset--color--custom-color-7, #8770ff);
}

/* ---------------------------------------------------------
   4. CONTENT TYPOGRAPHY
   --------------------------------------------------------- */

.vortex-qv-title {
    margin-bottom: 5px;
    margin-top: 0px;
    font-size: 1.8rem;
    line-height: 1.2;
    color: var(--wp--preset--color--custom-blanco-suave);
}

.vortex-qv-price {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 20px;
    text-decoration: none;
}

/* --- Fix WooCommerce Discount Price Underline --- */

/* 1. Remove the default browser underline from the new price */
.vortex-qv-price ins {
    text-decoration: none !important;
    background: transparent;
    /* Sometimes themes add a background to ins */
}

/* 2. Ensure no borders are applied to the amounts */
.vortex-qv-price bdi,
.vortex-qv-price .amount {
    border-bottom: none !important;
}

/* 3. Style the old price (strikethrough) so it looks clean */
.vortex-qv-price del {
    text-decoration: line-through !important;
    opacity: 0.5;
    /* Fades the old price slightly */
    font-weight: normal;
    /* Makes the new bold price stand out more */
    margin-right: 8px;
    font-size: 1rem;
    /* Makes the old price slightly smaller */
}





/* ---------------------------------------------------------
   5. NATIVE BLOCK OVERRIDES (Critical for Layout)
   --------------------------------------------------------- */

/* Rating Text */
#vortex-qv-modal .is-style-rating-number-text {
    color: var(--wp--preset--color--custom-gris-claro);
    font-size: 1rem !important;
}

/* Rating Spacing */
.vortex-qv-details .wc-block-components-product-rating {
    margin-bottom: 10px;
    display: block;
}

/* Add to Cart Container */
.vortex-qv-atc {
    margin-bottom: 15px;
    width: 100%;
}

/* Hide native wrapper margins to use our own spacing */
.vortex-qv-atc .wc-block-components-notices {
    margin-bottom: 0 !important;
    min-height: auto !important;
}

.vortex-qv-atc .wp-block-add-to-cart-with-options {
    width: 100%;
}


/* ---------------------------------------------------------
   6. UI CONTROLS & LOADER
   --------------------------------------------------------- */

.vortex-modal-close {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    z-index: 100 !important;
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 32px !important;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
}

.vortex-modal-close:hover {
    color: var(--wp--preset--color--custom-blanco-suave) !important;
    transform: scale(1.2) rotate(90deg);
}

/* --- THE LOADER ANIMATION --- */
.vortex-qv-loader {
    display: block;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--wp--preset--color--custom-color-7);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: vortex-spin 1s linear infinite;
    margin: 50px auto;
    /* Centers the loader in the modal */
}

@keyframes vortex-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Error Message Styling */
.vortex-error {
    text-align: center;
    padding: 40px;
    color: #ff6b6b;
    font-size: 1.1rem;
}

/* ---------------------------------------------------------
   7. RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 900px) {
    .vortex-qv-modal-content {
        flex-direction: column;
        height: auto;
        max-height: 90vh;
        overflow-y: auto;
    }

    .vortex-qv-image {
        height: 250px;
        width: 100%;
    }

    .vortex-qv-details {
        padding: 20px;
        overflow: visible;
    }
}