.woocommerce-product-gallery li img.flex-active {
    border: none !important;
}

.woocommerce-product-gallery ol>li {
    opacity: 0.7;
}

.woocommerce-product-gallery li:has(img.flex-active) {
    position: relative;
    opacity: 1;
}

/* Add overlay effect to active thumbnail */
.woocommerce-product-gallery li:has(img.flex-active)::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(90, 90, 90, 0.1);
    pointer-events: none;
}

.woocommerce-product-gallery__image img {
    width: unset !important;
}

.woocommerce-product-gallery li:has(img.flex-active):hover {
    opacity: 1;
}

.woocommerce-product-gallery__image.flex-active-slide {
    display: flex !important;
    justify-content: center;
}

.woocommerce-product-gallery .flex-control-thumbs {
    display: flex !important;
    justify-content: center;
}

.quantity-label {
    float: left;
}

/* Window */
.window {
    position: fixed;
    background: var(--window-bg);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    min-width: min(300px, 90vw);
    max-width: 90vw;
    max-height: 80vh;
    user-select: none;
    opacity: 0;
    pointer-events: auto; /* Re-enable pointer events for windows */
    overflow: hidden;
    z-index: 2;
}

.window-header {
    background: var(--window-header);
    padding: var(--spacing-xs);
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: flex;
    align-items: center;
    position: relative;
    user-select: none; /* Prevent text selection while dragging */
}

.window-controls {
    display: flex;
    gap: 6px;
    z-index: 3; /* Add this to ensure controls are above title */
}

.control {
    width: clamp(8px, 1.5vw, 12px);
    height: clamp(8px, 1.5vw, 12px);
    border-radius: 50%;
    position: relative;
}

.control.red { background-color: var(--control-red); }
.control.yellow { background-color: var(--control-yellow); }
.control.green { background-color: var(--control-green); }

.window-title {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    font-size: var(--font-size-small);
    color: #0a0a0a;
    margin: 0;
    z-index: 1; /* Add this to place title below controls */
}

.window-content {
    padding: var(--spacing-sm);
    user-select: text; /* Allow text selection inside the window */
    overflow-y: auto;
    max-height: calc(80vh - 40px);
}

.window-content img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Zoom Window */
.zoom-window {
    height: 30vh;
    width: 1200px;
    border: 1px solid #e0e0e0;
    margin-bottom: 1rem;
    overflow: hidden;
    position: relative;
    opacity: 1;
    max-width: 80%;
}

.zoom-window-content {
    position: relative;
    overflow: hidden;
    height: 100%;
}

.zoom-image {
    position: absolute;
    transform-origin: 0 0;
    width: 100%;
    height: auto;
    pointer-events: none;
}


/* Quantity Input and Add to cart*/
.quantity input::-webkit-outer-spin-button,
.quantity input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity {
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
    background-color: #fff;
}

.quantity input[type=number] {
    width: 30px !important; /* Adjust width */
    text-align: center;
    -moz-appearance: textfield;
    padding: 0 !important;
    line-height: unset !important;
    min-height: auto !important;
    background: transparent !important;
    border-radius: 0 !important;
}

.quantity input[type=number]:focus {
    box-shadow: none !important;
}

.quantity .minus, 
.quantity .plus {
    display: block !important;
    background-color: #f0f0f0;
    border: none;
    cursor: pointer;
    padding: 0.3rem 0.5rem !important;
    font-size: 1rem;
    line-height: 1;
    color: #555;
    transition: background-color 0.2s ease;
    width: max-content !important
}

.quantity .minus:focus,
.quantity .plus:focus {
    box-shadow: none !important;
}

/* Quantity and Add to Cart Button on separate lines */
.woocommerce-variation-add-to-cart,
.add_to_cart {
    width: max-content;
}

.single_add_to_cart_button  {
    flex-basis: 100%;
    width: 0px;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.single_add_to_cart_button img {
    width: 200px;
}

.single_add_to_cart_button:hover:not(.disabled) img {
    filter: grayscale(0) brightness(1.4);
}

.single_add_to_cart_button.disabled {
    opacity: 1 !important;
}

.single_add_to_cart_button.disabled img {
    filter: grayscale(1) brightness(1.5) opacity(0.5);
    pointer-events: none;
}

/* Variations */
.woocommerce .cart .variations label {
    font-weight: normal !important;
    padding-right: 0.6em;
}

.woocommerce .cart .variations th, .woocommerce .cart .variations td {
    padding-bottom: 0 !important;
}

.woocommerce .cart .variations label::after {
    content: ':';
}


.woocommerce .cart .variations {
    width: auto !important;
}

.woo-variation-swatches .wvs-style-squared.variable-items-wrapper .variable-item:not(.radio-variable-item).button-variable-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f8f8;
    box-shadow: none;
    -webkit-box-shadow: none;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.woo-variation-swatches .wvs-style-squared.variable-items-wrapper .variable-item:not(.radio-variable-item).button-variable-item:nth-child(1) {
    margin-left: 0;
}


.woo-variation-swatches .wvs-style-squared.variable-items-wrapper .variable-item:not(.radio-variable-item).button-variable-item:hover {
    background-color: #f0f0f0;
}

.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item).button-variable-item.selected:not(.no-stock) {
    border-color: #007aff;
    background-color: rgba(0, 122, 255, 0.1) !important;
    box-shadow: 0 0 0 1px rgba(0, 122, 255, 0.2);
}


/* === Impreza Main === */
.l-canvas {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.l-section {
    margin: auto !important;
}