/*
 * Global WooCommerce Element Styles
 */

/* ==========================================================================
   Product Loop / Grid Item Styles
   ========================================================================== */

/* 1. Base Product Card Container
   -------------------------------------------------------------------------- */
   ul.products li.product {
    text-align: right; /* RTL */
    /* background-color: var(--alpine-card-bg, #fff); */
    /* border: 1px solid var(--alpine-border-color, #e0e0e0); */
    /* border-radius: var(--alpine-card-border-radius, 6px); */ /* Use variable */
    padding: 0;
    /* overflow: hidden; */
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: row;
    position: relative;
    margin-bottom: 2em; /* Keep consistent margin */
    flex-wrap: wrap;
}

ul.products li.product:hover {
    /* transform: translateY(-4px); */
    box-shadow: var(--alpine-card-hover-shadow, 0 3px 30px -6px  rgba(0,0,0,0.1)); /* Use variable */
    /* border-color: var(--alpine-border-hover-color, #d0d0d0); */
    background: #fff;
}

/* Out of stock state */
ul.products li.product.outofstock {
    opacity: 0.7;
}
ul.products li.product.outofstock .product-info-holder::after {
    content: "Ãƒâ€”Ã‚ÂÃƒâ€”Ã¢â‚¬â€œÃƒâ€”Ã…â€œ Ãƒâ€”Ã…Â¾Ãƒâ€”Ã¢â‚¬ÂÃƒâ€”Ã…Â¾Ãƒâ€”Ã…â€œÃƒâ€”Ã‚ÂÃƒâ€”Ã¢â€žÂ¢"; /* RTL Out of Stock Text */
    position: absolute;
    bottom: 15px; /* Position above price */
    left: 15px; /* RTL */
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--alpine-text-secondary, #666);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 3px;
    border: 1px solid var(--alpine-border-color, #e0e0e0);
    z-index: 4;
}

/* 2. Product Link & Image Area
   -------------------------------------------------------------------------- */
ul.products li.product .woocommerce-loop-product__link {
    display: block;
    position: relative;
    background-color: var(--alpine-image-bg, #fff);
    text-decoration: none;
    /* overflow: hidden; */ /* Ensure image effects dont bleed */
}

ul.products li.product a img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1; /* Square aspect ratio */
    object-fit: contain;
    margin: 0;
    padding: 15px; /* Slightly more padding */
    /* border-bottom: 1px solid var(--alpine-border-color, #e0e0e0); */
    box-sizing: border-box;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

ul.products li.product a:hover img {
    /* transform: scale(1.03); /* Subtle zoom on hover */
    opacity: 0.95;
}

/* 3. Badges & Icons (Sale, Wishlist)
   -------------------------------------------------------------------------- */
ul.products li.product .onsale {
    position: absolute;
    top: 15px;
    right: 15px; /* RTL - Consistent padding */
    background-color: var(--alpine-red, #e0192e);
    color: #fff;
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 3px;
    z-index: 3; /* Above image link */
    margin: 0;
    line-height: 1.4;
    text-transform: uppercase;
    user-select: none;
}

.tinv-wishlist .tinvwl_add_to_wishlist_button.tinvwl-icon-heart-plus.no-txt, .tinv-wishlist .tinvwl_add_to_wishlist_button.tinvwl-icon-heart.no-txt {
     top: 3px;
     right: 7px; /* RTL - Consistent padding */
     z-index: 4; /* Above sale badge */
     /* background-color: rgba(255,255,255,0.9); */
     /* border: 1px solid var(--alpine-border-color, #ddd); */
     border-radius: 50%;
     width: 34px;
     height: 34px;
     padding: 0;
     display: flex;
     align-items: center;
     justify-content: center;
     color: var(--alpine-dark-text, #333);
     font-size: 15px;
     transition: all 0.2s ease;
     /* box-shadow: 0 1px 4px rgba(0,0,0,0.1); */
     cursor: pointer;
}

ul.products li.product .tinvwl_add_to_wishlist_button:hover,
ul.products li.product .tinvwl_add_to_wishlist_button:focus,
ul.products li.product .tinvwl_add_to_wishlist_button.tinvwl-product-in-list {
     background-color: var(--alpine-red);
     color: #fff;
     border-color: var(--alpine-red);
     outline: none; /* Remove default focus outline if custom style added */
     box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Ensure icon inside scales correctly */
ul.products li.product .tinvwl_add_to_wishlist_button > * {
    max-width: 16px;
    max-height: 16px;
    line-height: 1;
    flex-shrink: 0; /* Prevent icon shrinking */
}
.tinv-wraper.tinv-wishlist.tinvwl-above_thumb-add-to-cart {
    opacity: 0;
    left: 0;
    right: 15px;
    bottom: 25px;
    top: auto;
}

ul.products li.product:hover .tinv-wraper.tinv-wishlist.tinvwl-above_thumb-add-to-cart {
    opacity: 1;
}
.alpine-brand-logo-overlay {
    position: absolute;
    top: 13px;
    right: 8px;
    width: 22%;
    height: 20%;
    opacity: 0.5;
    filter: grayscale(1);
    display: flex;
    justify-content: start;
    align-items: start;
}
.alpine-brand-logo-overlay.alpine-brand-name-overlay {
    width: auto;
    top: 7px;
    right: 12px;
    font-size: 13px;
}
.woocommerce ul.products li.product a  .alpine-brand-logo-overlay img {
    padding: 0;
    width: 100%;
    height: 100%;
    object-fit: scale-down;
    object-position: top right;
}


/* 4. Product Info Area
   -------------------------------------------------------------------------- */
ul.products li.product .product-info-holder {
    padding: 7px 0 0; /* Increased padding */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative; /* Needed for outofstock pseudo-element */
    align-items: center;
    /* justify-content: center; */
    flex: 1;
}
.woocommerce ul.products li.product .onsale {
    min-height: auto;
    right: auto;
    left: 13px;
    top: 13px;
    line-height: 1;
    font-size: 0.9rem;
    border-radius: 60px;
    transform: scale(0.8);
    transition: 0.2s all ease;
}
/* 5. Product Title
   -------------------------------------------------------------------------- */
.woocommerce ul.products li.product .woocommerce-loop-category__title, .woocommerce ul.products li.product .woocommerce-loop-product__title, .woocommerce ul.products li.product h3 {
    font-size: 16px; /* Slightly larger */
    font-weight: 600;
    color: var(--alpine-text-main, #222);
    /* margin: 0 0 5px 0; */
    line-height: 1.05;
    /* height: 2.9em; */ /* Approx 2 lines for 16px font */
    /* Standard 2-line clamp */
    /* display: -webkit-box; */
    /* -webkit-line-clamp: 3; */
    /* -webkit-box-orient: vertical; */
    /* overflow: hidden; */
    /* text-overflow: ellipsis; */
    /* padding-inline-end: 20px; */
    width: 100%;
    text-align: center;
    min-height: 50px;
    display: flex;
    align-items: start;
    justify-content: center;
    text-wrap-style: balance;
}

ul.products li.product h3.woocommerce-loop-product__title a {
    color: inherit; /* Inherit color from h3 */
    text-decoration: none;
    transition: color 0.2s ease;
}

ul.products li.product h3.woocommerce-loop-product__title a:hover,
ul.products li.product h3.woocommerce-loop-product__title a:focus {
    color: var(--alpine-red, #e0192e);
    text-decoration: none;
}

/* 6. Product Brand/Subtitle
   -------------------------------------------------------------------------- */
ul.products li.product .woocommerce-loop-product__brand {
    font-size: 13px;
    color: var(--alpine-text-secondary, #666);
    margin-bottom: 12px;
    display: block;
    line-height: 1.4;
    height: 1.4em; /* Reserve space for 1 line */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
ul.products li.product .woocommerce-loop-product__brand a {
     color: inherit;
     text-decoration: none;
     transition: color 0.2s ease;
}
ul.products li.product .woocommerce-loop-product__brand a:hover,
ul.products li.product .woocommerce-loop-product__brand a:focus {
    color: var(--alpine-red, #e0192e);
    text-decoration: underline;
}

/* 7. Swatches Placeholder
   -------------------------------------------------------------------------- */
.product-swatches {
    margin-bottom: 12px;
    min-height: 22px; /* Adjusted height */
    line-height: 0; /* Prevent extra space from line height */
}
.product-swatches .swatch {
    display: inline-block;
    width: 18px; /* Smaller swatches */
    height: 18px;
    border-radius: 50%;
    margin: 0 0 4px 4px; /* RTL + bottom margin */
    border: 1px solid var(--alpine-border-color, #e0e0e0);
    box-shadow: inset 0 0 1px rgba(0,0,0,0.1);
    /* background-color needs to be set dynamically */
}
.woocommerce .products ul::after, .woocommerce .products ul::before, .woocommerce ul.products::after, .woocommerce ul.products::before {
    display: none;
}
/* 8. Price
   -------------------------------------------------------------------------- */
.woocommerce ul.products li.product .price {
    display: flex; /* Use flex for better alignment */
    flex-wrap: wrap; /* Allow wrapping if needed */
    align-items: baseline; /* Align text nicely */
    color: var(--alpine-dark-text, #333);
    font-size: 1.1em; /* Slightly reduced */
    font-weight: 700;
    margin: auto auto 10px; /* Pushes price to bottom */
    /* padding-top: 12px; */
    /* text-align: left; */ /* RTL */
    min-height: 1.2em; /* Ensure minimum height */
    /* border-top: 1px solid var(--alpine-border-color-light, #eee); */ /* Lighter separator */
    align-items: end;
    justify-content: center;
    flex: 0 0 auto;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    line-height: 1;
}
ul.products li.product .price ins {
    background-color: transparent;
    color: var(--alpine-red, #e0192e); /* Make sale price prominent */
    text-decoration: none;
    font-weight: 700;
    padding: 0;
    /* margin-left: 6px; */ /* RTL spacing */
    order: 1; /* Show first */
}
ul.products li.product .price del {
    color: var(--alpine-text-secondary, #666);
    opacity: 0.9;
    font-weight: 400;
    font-size: 0.9em;
    padding: 0;
    background: none;
    order: 2; /* Show after sale price */
    line-height: 1; /* Adjust alignment */
}
/* Handle case where there is no sale price */
ul.products li.product .price > .amount {
    order: 1; /* Ensure regular price shows first if no 'ins'/'del' */
}
bdi {
    display: flex;
    align-items: center;
    color: #e0383f;
}
/* 9. Hide Add to Cart Button (Globally for loop items)
   -------------------------------------------------------------------------- */
ul.products li.product .button,
ul.products li.product .added_to_cart {
    display: none !important;
}


/* Product loop */



.woocommerce ul.products li.product div + a.woocommerce-loop-product__link {
    background: #eeeeee73;
    mix-blend-mode: multiply;
    padding: 10px;
    display: flex;
    flex-direction: column;
    height: initial;
    /* box-shadow: inset 0px -500px 300px -450px rgb(0 0 0 / 4%); */
    /* border: 1px solid #e6dede6b; */
    width: -webkit-fill-available;
}

.woocommerce ul.products li.product a img {
    height: auto;
    /* background: #eee; */
    object-fit: contain;
    object-position: center;
    mix-blend-mode: multiply;
    padding: 20px;
    margin: 0;
    aspect-ratio: 1/1;
}

span.title-holder {
    position: relative;
    z-index: 1;
    background: white;
    padding: 0px 40px;
}


/* Loading Button Animation */

.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) button.button.loading::after {
    top: 0;
    bottom: 0;
    margin: auto 10px;
}

/* ========================================================================== */ 


.woocommerce  ul.products li.product .onsale {}

.product-content-section.frequently-bought-together-section {}

.woocommerce  .product-content-section.frequently-bought-together-section ul.products li.product .onsale {
    transform: scale(0.6);
    /* transform-origin: 10% 10%; */
}

.woocommerce .product-content-section.frequently-bought-together-section ul.products li.product a img {
    padding: 0px;
}

.woocommerce .product-content-section.frequently-bought-together-section ul.products li.product a .alpine-brand-logo-overlay {
    max-height: 50px;
    max-width: 27%;
    top: 0;
    right: 0;
}

