/* Product Display Block Styles */
.sq-product-display {
    /* border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 2rem;
    margin: 1rem 0;
    background-color: #fff;
    max-width: 600px; */
}

.sq-product-display.alignfull {
    /* max-width: none;
    margin-left: auto;
    margin-right: auto; */
}

/* Preview Notice */
.sq-preview-notice {
    background-color: #f0f6fc;
    border: 1px solid #0073aa;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #0073aa;
}

.sq-preview-notice p {
    margin: 0;
}

/* Product Grid Layout */
.sq-product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

@media (min-width: 992px) {
    .sq-product-grid {
        grid-template-columns: 1fr 1fr;
        /* gap: 0rem; */
    }
}


@media (min-width: 1400px) {
    .sq-product-grid {
        gap: 10rem;
    }
}

/* Product Gallery Column */
.sq-product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 100%;
    overflow-x: hidden;
}

.sq-main-image {
    width: 100%;
    /* aspect-ratio: 1 / 1; */
    max-height: 70vh;
    overflow: hidden;
    border-radius: 8px;
    background-color: #f9f9f9;
    .sq-main-image-swiper{
        max-height: 70vh;
        .swiper-wrapper{
            max-height: 70vh;
            .swiper-slider-img-wrapper{
                height: 70vh;
                display: flex;
                align-items: center;
                justify-content: center;
                img {
                    width: 100% !important;
                    height: 100% !important;
                    border-radius: 8px;
                    object-fit: contain;
                    display: block;
                }
            }
        }
    }
}

.sq-main-image.sq-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
}

.sq-main-image.sq-placeholder img {
    object-fit: contain;
    opacity: 0.5;
}

/* Thumbnail Slider */
.sq-thumbnail-slider-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* .sq-thumbnail-swiper {
    width: 100%;
    max-width: 100%;
    padding: 0 35px;
    box-sizing: border-box;
} */

.sq-thumbnail-swiper .swiper-slide {
    width: auto !important;
    flex-shrink: 0;
}

.sq-thumbnail {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.sq-thumbnail:hover {
    border-color: #666;
}

.sq-thumbnail.active {
    border-color: #000;
}

/* Product Content Column */
.sq-product-content {
    display: flex;
    gap: 1.5rem;
    flex-direction: column;
}

.product-title-area {
    display: flex;
    height: fit-content;

    .product-title {
        width: 100%;
        height: inherit;

        .sq-product-title {
            font-size: var(--wp--preset--font-size--extra-large);
            max-width: 90%;
            font-weight: 300;
            font-family: var(--wp--preset--font-family--kollektif);
            margin-block: 0.125rem;
            /* font-weight: 600;
            margin: 0;
            color: #333; */
        }


        .sq-product-brand {
            font-size: var(--wp--preset--font-size--medium);
            text-transform: uppercase;
            color: var(--wp--preset--color--lrdv-light-grey);
            text-decoration: none;
            margin-block: 0.5rem;

            a {
                all: inherit;
            }
        }

    }


    .add-to-wishlist {
        margin-inline-start: auto;
        height: fit-content;

        button {
            margin-inline-start: auto;
            background: transparent;
            border: none;
            cursor: pointer;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }
    }

    .add-to-wishlist svg {
        stroke: var(--wp--preset--color--lrdv-dark);
        stroke-width: 4px;
        fill: none;
        transition: fill 0.3s ease;

        path {
            stroke: var(--wp--preset--color--lrdv-dark)
        }
    }
}

/* Product Info Container */
.sq-product-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.sq-product-price {
    font-size: var(--wp--preset--font-size--large);
    font-family: var(--wp--preset--font-family--inter);
    font-weight: 400;
    color: #000;

    .woocommerce-Price-currencySymbol {
        margin-inline-end: 0.5rem;
    }
}

.sq-product-price .amount {
    color: inherit;
}

.sq-product-price del {
    opacity: 0.6;
    margin-right: 0.5rem;
}

.sq-cart-form {
    .sq-product-price {
        margin-bottom: 1.5rem;
    }

    .sq-variations {
        margin-block: 1rem;

        label {
            display: none;
        }

        select {
            margin-bottom: 1rem;
            width: 100%;
            padding: 0.5rem 1rem;
            font-size: var(--wp--preset--font-size--small)
        }
        
        /* Style for disabled options in variation dropdowns */
        select option:disabled {
            color: #999;
            background-color: #f5f5f5;
            cursor: not-allowed;
        }
    }
    /* Reset variations button */
    .sq-reset-variations-button {
        display: block;
        width: 100%;
        padding: 0.5rem 1rem;
        margin-top: 0.5rem;
        margin-bottom: 1rem;
        font-size: 0.875rem;
        color: #666;
        background-color: transparent;
        border: 1px solid #ddd;
        border-radius: 4px;
        cursor: pointer;
        transition: all 0.2s ease;
        text-align: center;
    }
    
    .sq-reset-variations-button:hover {
        color: #333;
        border-color: #999;
        background-color: #f5f5f5;
    }
    
    /* Ensure stock status is on its own line */
    .sq-stock-status {
        display: block;
        width: 100%;
        margin-top: 0.5rem;
        margin-bottom: 1rem;
    }
    }

    .sq-form-loading {
        margin-block: 1.5rem;
    }

    /* Stock Status */
    .sq-stock-status {
        margin-block-start: 1rem;
        font-weight: 500;
        display: inline-block;
        font-size: var(--wp--preset--font-size--small);
    }

    .sq-stock-status.in-stock {
        color: #2e7d32;
    }

    .sq-stock-status.out-of-stock {
        color: #c62828;
    }


}


/* Grouped Products */
.sq-grouped-products {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.sq-grouped-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.sq-grouped-product-item:last-child {
    border-bottom: none;
}

.sq-grouped-product-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: var(--wp--preset--font-size--medium) !important;
    font-weight: 600;
}

.sq-grouped-product-price {
    font-weight: bold;
    color: #000;
}

.sq-grouped-product-quantity {
    min-width: 80px;
}

/* Quantity */
.sq-quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.sq-quantity-wrapper label {
    font-weight: 600;
    color: #333;
}

.sq-quantity-input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: var(--wp--preset--font-size--small) !important;
    text-align: center;
}

/* .sq-quantity-input:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.1);
} */

/* Add to Cart Button */
.sq-cart-button-wrapper,
.sq-request-button-wrapper {
    margin-top: 1rem;
}

.sq-add-to-cart-button,
.sq-add-to-request-button {
    background-color: var(--wp--preset--color--lrdv-dark);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-size: var(--wp--preset--font-size--small);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.sq-add-to-cart-button:hover:not(:disabled),
.sq-add-to-request-button:hover:not(:disabled) {
    background-color: #1e3a8a;
    transform: translateY(-1px);
}

.sq-add-to-cart-button:active:not(:disabled),
.sq-add-to-request-button:active:not(:disabled) {
    transform: translateY(0);
}

.sq-add-to-cart-button:disabled,
.sq-add-to-request-button:disabled {
    background-color: #6b7280;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Loading */
.sq-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    color: #666;
    font-style: italic;
    margin-block: 1.5rem;
}

.sq-loading::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-top: 2px solid #2c5aa0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Variations Loader */
.sq-variations-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    gap: 1rem;
}

.sq-loader-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #ddd;
    border-top: 3px solid #2c5aa0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.sq-loader-text {
    color: #666;
    font-size: var(--wp--preset--font-size--small);
    font-style: italic;
}

.sq-variations-hidden {
    display: none !important;
}

/* Messages */
.sq-messages {
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
}

.sq-messages.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.sq-messages.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.sq-messages p {
    margin: 0;
}

/* Out of Stock */
.sq-out-of-stock {
    padding: 1rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-align: center;
    color: #6c757d;
}

.sq-product-description {
    font-family: var(--wp--preset--font-family--kollektif);

    h2 {
        font-size: var(--wp--preset--font-size--medium);
        font-weight: 400;
        color: #000;
    }

    p {
        font-size: var(--wp--preset--font-size--medium);
        font-weight: 300;
        color: #828282;
        line-height: 1.3;
    }
}



/* Responsive Design */
@media (max-width: 768px) {
    .sq-product-display {
        padding: 1rem;
    }

    .sq-grouped-product-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .sq-quantity-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .sq-add-to-cart-button {
        max-width: none;
    }

    /* Thumbnail slider responsive adjustments */
    .sq-thumbnail-swiper {
        padding: 0 20px;
    }

    .sq-thumbnail {
        width: 60px;
        height: 60px;
    }
}


    .sq-quantity-wrapper {
        max-width: 200px;
    }

    /* ========================================
    Card Mode Styles (from product-block)
    ======================================== */


    .product-block {
        display: grid;
        grid-template-rows: auto;
        max-width: 100%;
        /* z-index: 2; */

        &:hover{
            .image{
                img{
                    transform: scale(1.1);
                    transition: .3s all;
                }
            }
        }
    }

    .product-block .image {
        grid-row: 1;
        grid-column: 1 / 2;
        max-width: 100%;
        overflow: hidden;
        border-radius: .75rem;
        position: relative;
        z-index: 1;
    }

    .product-block .image img {
        width: 100%;
        height: 100%;
        aspect-ratio: 1;
        object-fit: cover;
        transition: .4s all;
    }

    .product-block .content {
        margin-block-start: 1.25rem;
        grid-row: 2;
        grid-column: 1 / 2;
        display: grid;
        /* grid-template-rows: 1fr 1fr 1fr; */
        grid-auto-rows: minmax(2.5rem, auto);
    }

    .product-block .content {
        grid-auto-rows: initial;
    }

    .product-block .content .product-title {
        font-weight: normal;
        font-size: var(--wp--preset--font-size--medium);
        margin: 0;
        color: var(--wp--preset--color--lrdv-dark);
    }

    .product-block .content .product-title a {
        color: inherit;
        text-decoration: none;
    }

    .product-block .content .product-brand {
        align-self: baseline;
        font-weight: 100;
        color: var(--wp--preset--color--lrdv-light-grey);
        text-transform: uppercase;
        font-size: var(--wp--preset--font-size--extra-small);
        margin-block: 0.5rem 1.25rem;
        font-weight: 300;
    }

    .product-block .content .product-brand a {
        color: inherit;
        text-decoration: none;
    }

    .product-block .content .product-price {
        color: var(--wp--preset--color--lrdv-grey);
        font-size: var(--wp--preset--font-size--medium);
        margin-block: initial;
    }

    .product-block .add-to-cart svg {
        display: none;
    }

    .product-block .add-to-cart button {
        background-color: var(--wp--preset--color--lrdv-dark);
        width: 100%;
        color: white;
        padding: 0.75rem 1rem;
        border-radius: 0.25rem;
        font-size: var(--wp--preset--font-size--small);
        cursor: pointer;
        position: relative;
        z-index: 3;
    }

    .product-block .add-to-cart {
        grid-row: 1;
        grid-column: 1;
        padding: 0.75rem;
        place-self: end;
    }

    .product-block .add-to-cart svg {
        display: block;
    }

    .product-block .add-to-cart span {
        display: none;
    }

    .product-block .add-to-cart button {
        background-color: initial;
        width: initial;
        padding: 0;
    }


    .product-block .add-to-wishlist {
        grid-row: 1;
        grid-column: 1;
        place-self: start;
        padding: 0.75rem;
    }

    .product-block .add-to-wishlist button {
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 3;
    }

    .product-block .add-to-wishlist svg {
        stroke: var(--wp--preset--color--lrdv-cream);
        stroke-width: 4px;
        fill: none;
        transition: fill 0.3s ease;
    }

    /* Pulsing animation for loading state */
    .product-block .add-to-wishlist button.pulsing svg {
        animation: wishlist-pulse 0.8s ease-in-out infinite;
    }

    /* Ripple effect for fill/unfill */
    .product-block .add-to-wishlist button.ripple svg {
        animation: wishlist-ripple 0.5s ease-out;
    }

    .product-block .unique {
        grid-row: 1;
        grid-column: 1;
        place-self: start end;
        padding: 0.75rem;
        position: relative;
        z-index: 3;
    }

    .product-block button {
        background: none;
        outline: none;
        border: none;
        padding: 0;
    }

    /* Keyframe animations for wishlist */
    @keyframes wishlist-pulse {

        0%,
        100% {
            transform: scale(1);
            opacity: 1;
        }

        50% {
            transform: scale(1.15);
            opacity: 0.8;
        }
    }

    @keyframes wishlist-ripple {
        0% {
            transform: scale(1);
            opacity: 1;
        }

        50% {
            transform: scale(1.3);
            opacity: 0.6;
        }

        100% {
            transform: scale(1);
            opacity: 1;
        }
    }


/* Check Availability Button */
.sq-check-availability-button {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.625rem 1.25rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #495057;
    font-size: var(--wp--preset--font-size--small);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sq-check-availability-button:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.sq-check-availability-button:active {
    background-color: #dee2e6;
    transform: translateY(1px);
}

/* Stock Availability Modal */

#stock-availability-modal {
    .stock-modal__container {
        max-width: 600px;

        .modal__close {
            display: block;
            margin-inline-start: auto;
            background: none;
            border: none;
            outline: none;
            padding-block: 1rem 0.5rem;
            padding-inline: 1rem;
            cursor: pointer;
        }

    }

    .stock-availability-modal-content {
        padding-block: 0 1.5rem;
        padding-inline: 1.5rem;
    }

    .stock-availability-modal-content h3 {
        margin: 0 0 0.5rem 0;
        font-size: 1.5rem;
        color: #212529;
    }

    .stock-availability-modal-content .variant-info {
        margin: 0 0 1.5rem 0;
        color: #6c757d;
        font-size: 0.9375rem;
    }

    .outlet-stock-table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 1rem;
    }

    .outlet-stock-table thead {
        background-color: #f8f9fa;
    }

    .outlet-stock-table th {
        padding: 0.75rem;
        text-align: left;
        font-weight: 600;
        color: #495057;
        border-bottom: 2px solid #dee2e6;
    }

    .outlet-stock-table td {
        padding: 0.75rem;
        border-bottom: 1px solid #dee2e6;
    }

    .outlet-stock-table tbody tr.in-stock {
        background-color: #f1f9f1;
    }

    .outlet-stock-table tbody tr.out-of-stock {
        background-color: #fff5f5;
        color: #999;
    }

    .outlet-stock-table tbody tr.in-stock td:last-child {
        color: #28a745;
        font-weight: 600;
    }

    .outlet-stock-table tbody tr.out-of-stock td:last-child {
        color: #dc3545;
        font-weight: 600;
    }

/* Position relative for containers that need skeleton overlays */
.sq-cart-form {
    position: relative;
}

/* Modal specific skeleton positioning */
#product-modal .modal__content {
    position: relative;
}
}