/*
Theme Name: HomeTribe Child
Theme URI: https://hometribe.online
Description: Child theme for Astra — HomeTribe custom design
Author: HomeTribe
Template: astra
Version: 1.0.0
*/

/* ===== WooCommerce Product Grid — Consistent Cards ===== */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
    background: #fff !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 16px rgba(27, 43, 75, 0.08) !important;
    transition: all 0.25s ease !important;
    display: flex !important;
    flex-direction: column !important;
}

ul.products li.product:hover {
    box-shadow: 0 12px 40px rgba(27, 43, 75, 0.12) !important;
    transform: translateY(-4px) !important;
}

ul.products li.product a.woocommerce-LoopProduct-link {
    display: block !important;
    overflow: hidden !important;
}

ul.products li.product img {
    width: 100% !important;
    height: 280px !important;
    object-fit: cover !important;
    transition: transform 0.4s !important;
}

ul.products li.product:hover img {
    transform: scale(1.05) !important;
}

ul.products li.product .woocommerce-loop-product__title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1B2B4B !important;
    padding: 12px 14px 4px !important;
    line-height: 1.4 !important;
    min-height: 42px !important;
}

ul.products li.product .price {
    font-size: 15px !important;
    color: #1B2B4B !important;
    font-weight: 700 !important;
    padding: 0 14px 4px !important;
}

ul.products li.product .price del {
    color: #6b7280 !important;
    font-weight: 400 !important;
}

ul.products li.product .price ins {
    color: #c0392b !important;
}

ul.products li.product .button,
ul.products li.product .add_to_cart_button,
ul.products li.product .product_type_simple,
ul.products li.product .product_type_variable {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: #1B2B4B !important;
    color: #fff !important;
    padding: 10px 22px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-family: inherit !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-weight: 600 !important;
    margin: 4px 14px 14px !important;
    transition: all 0.25s ease !important;
    border: none !important;
    cursor: pointer !important;
}

ul.products li.product .button:hover,
ul.products li.product .add_to_cart_button:hover,
ul.products li.product .product_type_simple:hover,
ul.products li.product .product_type_variable:hover {
    background: #C9A84C !important;
}

/* Hide Astra's card action button overlay */
ul.products li.product .ast-on-card-button {
    display: none !important;
}

/* Astra shop summary — clean layout */
ul.products li.product .astra-shop-summary-wrap {
    padding: 0 !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

ul.products li.product .astra-shop-thumbnail-wrap {
    position: relative !important;
}

/* Hide Astra category label */
ul.products li.product .ast-woo-product-category {
    display: none !important;
}

/* Hide Astra swatches on shop cards */
ul.products li.product .cfvsw_variations_form {
    display: none !important;
}

/* Mobile responsive */
@media (max-width: 900px) {
    ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 600px) {
    ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    ul.products li.product img {
        height: 180px !important;
    }
    ul.products li.product .woocommerce-loop-product__title {
        font-size: 13px !important;
        min-height: 36px !important;
    }
}

/* ===== Individual Product Page Image ===== */
.woocommerce div.product div.images img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px !important;
    object-fit: contain !important;
}
.woocommerce div.product div.images .woocommerce-product-gallery {
    max-width: 500px !important;
}
.woocommerce div.product div.images .woocommerce-product-gallery__image img {
    max-height: 500px !important;
    width: 100% !important;
    object-fit: cover !important;
}

/* ===== Content cleanup - no more massive text blocks ===== */
.woocommerce div.product div.woocommerce-product-details__short-description {
    max-width: 100% !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
}

/* ===== Speed: lazy load ALL images ===== */
img {
    loading: lazy !important;
}

/* ===== Remove duplicate content overflow ===== */
.woocommerce div.product .entry-content {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
}
.woocommerce div.product div.images img{max-width:100%!important;height:auto!important;object-fit:contain!important}
.woocommerce div.product div.images .woocommerce-product-gallery{max-width:500px!important}
.woocommerce-product-gallery__image img{max-height:500px!important;width:100%!important;object-fit:cover!important}
.woocommerce-product-gallery__trigger{display:none!important}
img{max-width:100%!important;height:auto!important}
.entry-content img{max-width:100%!important}

/* === Individual Product Image Sizing === */
.woocommerce div.product div.images img,
.woocommerce-product-gallery__image img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    max-height: 500px !important;
}
img {
    max-width: 100% !important;
    height: auto !important;
}
.entry-content img {
    max-width: 100% !important;
    height: auto !important;
}

/* Individual product page image sizing */
.woocommerce div.product div.images img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}
.woocommerce-product-gallery__image img {
    max-height: 500px !important;
}
img {
    max-width: 100%;
    height: auto;
}
.entry-content img {
    max-width: 100%;
    height: auto;
}

/* Speed: lazy loading hint */
img[width][height] {
    content-visibility: auto;
}

/* Product description readability */
.woocommerce div.product .woocommerce-product-details__short-description {
    font-size: 15px;
    line-height: 1.6;
    max-width: 100%;
}

/* === PRODUCT IMAGE SIZING FIX === */
.woocommerce div.product div.images img,
.woocommerce div.product div.images .woocommerce-product-gallery__image img,
.woocommerce-product-gallery__wrapper img {
  max-width: 100% !important;
  height: auto !important;
  max-height: 500px !important;
  object-fit: contain !important;
}

/* Single product content readability */
.woocommerce div.product .woocommerce-product-details__short-description {
  font-size: 15px !important;
  line-height: 1.6 !important;
  max-width: 700px !important;
}

.woocommerce div.product .entry-content {
  max-width: 100% !important;
  overflow-wrap: break-word !important;
}

.entry-content img {
  max-width: 100% !important;
  height: auto !important;
}

/* === FIX: Product page images fit window === */
.woocommerce div.product div.images img,
.woocommerce div.product div.images .woocommerce-product-gallery__wrapper img,
.woocommerce-product-gallery__wrapper img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}

/* Single product gallery max height */
.woocommerce-product-gallery__image img {
    max-height: 500px !important;
    width: auto !important;
    margin: 0 auto !important;
}

/* Content images max width */
.woocommerce div.product .woocommerce-tabs .panel img,
.entry-content img {
    max-width: 100% !important;
    height: auto !important;
}

/* Remove massive image padding */
.woocommerce div.product div.images {
    padding: 0 !important;
}

/* Make sure images don't overflow on mobile */
@media (max-width: 768px) {
    .woocommerce div.product div.images img,
    .woocommerce-product-gallery__image img {
        max-width: 100% !important;
        max-height: 350px !important;
    }
}
