
/* VTT Storefront Polish 1.2.0 */

/* Prevent Elementor shortcode area from forcing overflow */
.elementor-widget-shortcode,
.elementor-widget-shortcode > .elementor-widget-container,
.elementor-widget-shortcode .woocommerce,
.elementor-widget-shortcode .woocommerce.columns-4 {
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow-x:hidden !important;
    box-sizing:border-box !important;
}

/* Desktop product grid */
body .woocommerce ul.products,
body .woocommerce-page ul.products,
body .elementor-widget-shortcode .woocommerce ul.products,
body .elementor-widget-shortcode .woocommerce ul.products.columns-4,
body .elementor-widget-shortcode .woocommerce.columns-4 ul.products {
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    gap:24px !important;
    width:100% !important;
    max-width:100% !important;
    margin:0 !important;
    padding:0 !important;
    list-style:none !important;
}

body .woocommerce ul.products::before,
body .woocommerce ul.products::after,
body .woocommerce-page ul.products::before,
body .woocommerce-page ul.products::after {
    display:none !important;
    content:none !important;
}

body .woocommerce ul.products li.product,
body .woocommerce-page ul.products li.product,
body .elementor-widget-shortcode .woocommerce ul.products li.product,
body .elementor-widget-shortcode .woocommerce.columns-4 ul.products li.product {
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    margin:0 !important;
    float:none !important;
    clear:none !important;
    box-sizing:border-box !important;
    background:#f8fbf6 !important;
    border:1px solid rgba(25,73,49,.10) !important;
    border-radius:14px !important;
    padding:14px !important;
    box-shadow:0 4px 14px rgba(22,54,36,.07) !important;
    overflow:hidden !important;
}

body .woocommerce ul.products li.product a img,
body .woocommerce-page ul.products li.product a img,
body .woocommerce ul.products li.product-category a img,
body .woocommerce-page ul.products li.product-category a img {
    display:block !important;
    width:100% !important;
    height:230px !important;
    max-height:230px !important;
    object-fit:contain !important;
    object-position:center !important;
    background:#f8fbf6 !important;
    padding:10px !important;
    box-sizing:border-box !important;
    margin:0 auto 12px !important;
}

/* Single product image */
body .woocommerce div.product div.images,
body .woocommerce-page div.product div.images {
    background:#f8fbf6 !important;
    border:1px solid rgba(25,73,49,.10) !important;
    border-radius:16px !important;
    padding:18px !important;
    box-sizing:border-box !important;
    box-shadow:0 5px 16px rgba(22,54,36,.07) !important;
}

body .woocommerce div.product div.images img,
body .woocommerce-page div.product div.images img {
    width:100% !important;
    height:auto !important;
    max-height:600px !important;
    object-fit:contain !important;
    object-position:center !important;
    background:#f8fbf6 !important;
}

/* Subtle age notice */
body .woocommerce-info.vtt-age-restricted-notice {
    background:rgba(255,255,255,.72) !important;
    color:#244330 !important;
    border:1px solid rgba(57,126,72,.20) !important;
    border-left:3px solid #4b9a55 !important;
    border-radius:9px !important;
    box-shadow:none !important;
    padding:10px 13px !important;
    margin:0 0 18px !important;
    font-size:.92rem !important;
    line-height:1.45 !important;
}
body .woocommerce-info.vtt-age-restricted-notice::before {
    content:"18+" !important;
    position:static !important;
    display:inline-block !important;
    font-family:inherit !important;
    font-weight:700 !important;
    font-size:.80rem !important;
    line-height:1 !important;
    color:#2d6b38 !important;
    background:#eaf5e9 !important;
    border-radius:999px !important;
    padding:4px 7px !important;
    margin:0 8px 0 0 !important;
}
body .woocommerce-info.vtt-age-restricted-notice strong {
    display:none !important;
}

/* Tablet - exactly 2 across */
@media screen and (max-width:1024px) {
    body .woocommerce ul.products,
    body .woocommerce-page ul.products,
    body .elementor-widget-shortcode .woocommerce ul.products,
    body .elementor-widget-shortcode .woocommerce ul.products.columns-4,
    body .elementor-widget-shortcode .woocommerce.columns-4 ul.products {
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
        gap:18px !important;
    }
    body .woocommerce ul.products li.product a img,
    body .woocommerce-page ul.products li.product a img {
        height:210px !important;
        max-height:210px !important;
    }
}

/* Mobile - exactly 1 across */
@media screen and (max-width:767px) {
    body .woocommerce ul.products,
    body .woocommerce-page ul.products,
    body .elementor-widget-shortcode .woocommerce ul.products,
    body .elementor-widget-shortcode .woocommerce ul.products.columns-4,
    body .elementor-widget-shortcode .woocommerce.columns-4 ul.products {
        grid-template-columns:minmax(0,1fr) !important;
        gap:16px !important;
    }
    body .woocommerce ul.products li.product,
    body .woocommerce-page ul.products li.product {
        padding:12px !important;
    }
    body .woocommerce ul.products li.product a img,
    body .woocommerce-page ul.products li.product a img {
        height:220px !important;
        max-height:220px !important;
        padding:8px !important;
    }
}


/* Product imagery: show the whole item, don't crop long rifles / toys / boxes */
body .woocommerce ul.products li.product a img,
body .woocommerce-page ul.products li.product a img,
body .woocommerce ul.products li.product-category a img,
body .woocommerce-page ul.products li.product-category a img {
    object-fit: contain !important;
    object-position: center !important;
    background: #f8fbf6 !important;
    padding: 10px !important;
    box-sizing: border-box !important;
}

/* Single product gallery - softer than the stark white block */
body.single-product .woocommerce-product-gallery,
body.single-product div.product div.images {
    background: #f8fbf6 !important;
    border-radius: 14px !important;
    padding: 12px !important;
    box-sizing: border-box !important;
}
body.single-product .woocommerce-product-gallery img,
body.single-product div.product div.images img {
    object-fit: contain !important;
    object-position: center !important;
    background: transparent !important;
}

/* Compact 18+ warning above Add to Basket */
body.single-product .vtt-age-restricted-notice {
    display:flex !important;
    align-items:center !important;
    gap:9px !important;
    width:100% !important;
    background:rgba(255,255,255,.58) !important;
    color:#244330 !important;
    border:1px solid rgba(57,126,72,.18) !important;
    border-left:3px solid #4b9a55 !important;
    border-radius:8px !important;
    padding:9px 11px !important;
    margin:8px 0 14px !important;
    box-sizing:border-box !important;
    box-shadow:none !important;
    font-size:.88rem !important;
    line-height:1.35 !important;
}
body.single-product .vtt-age-restricted-notice .vtt-age-pill {
    flex:0 0 auto !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-width:36px !important;
    height:25px !important;
    padding:0 7px !important;
    border-radius:999px !important;
    background:#eaf5e9 !important;
    color:#2d6b38 !important;
    font-weight:700 !important;
    font-size:.80rem !important;
}
body.single-product .vtt-age-restricted-notice strong {
    display:inline !important;
}


/* =========================================================
   1.4.2 - PRODUCT ARCHIVE / CATEGORY PAGE REFRESH
   Makes the Woo/Astra category pages feel like a designed shop,
   rather than white supplier images floating on a green page.
   ========================================================= */

body.woocommerce-shop .site-main,
body.tax-product_cat .site-main {
    padding-top: 22px !important;
}

/* Cleaner category heading */
body.woocommerce-shop .woocommerce-products-header,
body.tax-product_cat .woocommerce-products-header {
    margin: 0 0 22px !important;
}

body.woocommerce-shop .woocommerce-products-header__title,
body.tax-product_cat .woocommerce-products-header__title,
body.woocommerce-shop .page-title,
body.tax-product_cat .page-title {
    color: #183c2b !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    margin-bottom: 8px !important;
}

/* Give sorting/results a proper toolbar feel */
body.woocommerce-shop .woocommerce-result-count,
body.tax-product_cat .woocommerce-result-count {
    margin: 8px 0 18px !important;
    color: #66756b !important;
    font-size: 0.92rem !important;
}

body.woocommerce-shop .woocommerce-ordering,
body.tax-product_cat .woocommerce-ordering {
    margin: 0 0 20px !important;
}

body.woocommerce-shop .woocommerce-ordering select,
body.tax-product_cat .woocommerce-ordering select {
    border: 1px solid rgba(24,60,43,.14) !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    padding: 10px 36px 10px 12px !important;
    min-height: 42px !important;
    box-shadow: 0 3px 12px rgba(24,60,43,.05) !important;
}

/* Better grid spacing */
body.woocommerce-shop ul.products,
body.tax-product_cat ul.products {
    gap: 22px !important;
    align-items: stretch !important;
}

/* Product card: make the whole card light so white JPEG backgrounds blend in */
body.woocommerce-shop ul.products li.product,
body.tax-product_cat ul.products li.product {
    background: #ffffff !important;
    border: 1px solid rgba(24,60,43,.08) !important;
    border-radius: 16px !important;
    padding: 12px 12px 16px !important;
    box-sizing: border-box !important;
    box-shadow: 0 7px 22px rgba(24,60,43,.07) !important;
    overflow: hidden !important;
    transition: transform .18s ease, box-shadow .18s ease !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

body.woocommerce-shop ul.products li.product:hover,
body.tax-product_cat ul.products li.product:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 28px rgba(24,60,43,.10) !important;
}

/* Consistent image stage */
body.woocommerce-shop ul.products li.product .astra-shop-thumbnail-wrap,
body.tax-product_cat ul.products li.product .astra-shop-thumbnail-wrap,
body.woocommerce-shop ul.products li.product .woocommerce-loop-product__link,
body.tax-product_cat ul.products li.product .woocommerce-loop-product__link {
    overflow: visible !important;
}

body.woocommerce-shop ul.products li.product .astra-shop-thumbnail-wrap,
body.tax-product_cat ul.products li.product .astra-shop-thumbnail-wrap {
    height: 235px !important;
    min-height: 235px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px !important;
    margin: 0 0 12px !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
}

/* Never crop the actual product */
body.woocommerce-shop ul.products li.product .astra-shop-thumbnail-wrap img,
body.tax-product_cat ul.products li.product .astra-shop-thumbnail-wrap img,
body.woocommerce-shop ul.products li.product a img,
body.tax-product_cat ul.products li.product a img {
    display: block !important;
    width: 100% !important;
    height: 219px !important;
    max-width: 100% !important;
    max-height: 219px !important;
    object-fit: contain !important;
    object-position: center !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

/* Product metadata */
body.woocommerce-shop ul.products li.product .ast-woo-product-category,
body.tax-product_cat ul.products li.product .ast-woo-product-category,
body.woocommerce-shop ul.products li.product .product-category,
body.tax-product_cat ul.products li.product .product-category {
    color: #7a897f !important;
    font-size: .78rem !important;
    line-height: 1.2 !important;
    margin: 1px 0 7px !important;
}

body.woocommerce-shop ul.products li.product .woocommerce-loop-product__title,
body.tax-product_cat ul.products li.product .woocommerce-loop-product__title {
    color: #182a21 !important;
    font-size: 1rem !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    margin: 0 0 10px !important;
    min-height: 2.5em !important;
}

/* Price stronger and cleaner */
body.woocommerce-shop ul.products li.product .price,
body.tax-product_cat ul.products li.product .price {
    color: #183c2b !important;
    font-size: 1.02rem !important;
    font-weight: 700 !important;
    margin-top: auto !important;
    margin-bottom: 0 !important;
}

/* Archive buttons, if Astra/Woo shows them */
body.woocommerce-shop ul.products li.product .button,
body.tax-product_cat ul.products li.product .button {
    width: 100% !important;
    text-align: center !important;
    margin-top: 12px !important;
    border-radius: 9px !important;
    min-height: 42px !important;
}

/* Desktop/tablet/mobile columns */
@media (min-width: 1025px) {
    body.woocommerce-shop ul.products,
    body.tax-product_cat ul.products {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 1024px) and (min-width: 641px) {
    body.woocommerce-shop ul.products,
    body.tax-product_cat ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body.woocommerce-shop ul.products li.product .astra-shop-thumbnail-wrap,
    body.tax-product_cat ul.products li.product .astra-shop-thumbnail-wrap {
        height: 220px !important;
        min-height: 220px !important;
    }

    body.woocommerce-shop ul.products li.product .astra-shop-thumbnail-wrap img,
    body.tax-product_cat ul.products li.product .astra-shop-thumbnail-wrap img,
    body.woocommerce-shop ul.products li.product a img,
    body.tax-product_cat ul.products li.product a img {
        height: 204px !important;
        max-height: 204px !important;
    }
}

@media (max-width: 640px) {
    body.woocommerce-shop ul.products,
    body.tax-product_cat ul.products {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    body.woocommerce-shop ul.products li.product,
    body.tax-product_cat ul.products li.product {
        max-width: 460px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    body.woocommerce-shop ul.products li.product .astra-shop-thumbnail-wrap,
    body.tax-product_cat ul.products li.product .astra-shop-thumbnail-wrap {
        height: 250px !important;
        min-height: 250px !important;
    }

    body.woocommerce-shop ul.products li.product .astra-shop-thumbnail-wrap img,
    body.tax-product_cat ul.products li.product .astra-shop-thumbnail-wrap img,
    body.woocommerce-shop ul.products li.product a img,
    body.tax-product_cat ul.products li.product a img {
        height: 234px !important;
        max-height: 234px !important;
    }
}


/* =========================================================
   1.5.0 - SEARCH + CONSISTENT PRODUCT IMAGE PRESENTATION
   ========================================================= */

.vtt-product-search {
    width:100%;
    clear:both;
    margin:0 0 22px;
    padding:14px;
    border:1px solid rgba(24,60,43,.10);
    border-radius:14px;
    background:#f8fbf6;
    box-sizing:border-box;
}
.vtt-product-search__form {
    display:flex;
    gap:9px;
    width:100%;
    margin:0;
}
.vtt-product-search__field {
    flex:1 1 auto;
    min-width:0;
    min-height:44px;
    margin:0 !important;
    padding:10px 13px !important;
    border:1px solid rgba(24,60,43,.18) !important;
    border-radius:10px !important;
    background:#fff !important;
    color:#182a21 !important;
    box-shadow:none !important;
}
.vtt-product-search__button {
    flex:0 0 auto;
    min-height:44px;
    padding:10px 18px !important;
    border-radius:10px !important;
}
.vtt-product-search__hint {
    margin:7px 2px 0;
    color:#718078;
    font-size:.78rem;
}

/* Use one quiet image stage everywhere. White supplier JPEGs visually merge
   into the card instead of appearing as a stark white box. Source images
   with excessive margins are separately normalised by the catalogue rescue. */
body.woocommerce-shop ul.products li.product,
body.tax-product_cat ul.products li.product,
body.search-results ul.products li.product {
    background:#f8fbf6 !important;
}
body.woocommerce-shop ul.products li.product .astra-shop-thumbnail-wrap,
body.tax-product_cat ul.products li.product .astra-shop-thumbnail-wrap,
body.search-results ul.products li.product .astra-shop-thumbnail-wrap {
    height:250px !important;
    min-height:250px !important;
    padding:10px !important;
    background:#f8fbf6 !important;
}
body.woocommerce-shop ul.products li.product .astra-shop-thumbnail-wrap img,
body.tax-product_cat ul.products li.product .astra-shop-thumbnail-wrap img,
body.search-results ul.products li.product .astra-shop-thumbnail-wrap img,
body.woocommerce-shop ul.products li.product a img,
body.tax-product_cat ul.products li.product a img,
body.search-results ul.products li.product a img {
    height:230px !important;
    max-height:230px !important;
    object-fit:contain !important;
    object-position:center !important;
    background:transparent !important;
    mix-blend-mode:multiply;
}

@media (max-width: 1024px) and (min-width: 641px) {
    body.woocommerce-shop ul.products li.product .astra-shop-thumbnail-wrap,
    body.tax-product_cat ul.products li.product .astra-shop-thumbnail-wrap,
    body.search-results ul.products li.product .astra-shop-thumbnail-wrap {
        height:230px !important;
        min-height:230px !important;
    }
    body.woocommerce-shop ul.products li.product .astra-shop-thumbnail-wrap img,
    body.tax-product_cat ul.products li.product .astra-shop-thumbnail-wrap img,
    body.search-results ul.products li.product .astra-shop-thumbnail-wrap img,
    body.woocommerce-shop ul.products li.product a img,
    body.tax-product_cat ul.products li.product a img,
    body.search-results ul.products li.product a img {
        height:210px !important;
        max-height:210px !important;
    }
}

@media (max-width: 640px) {
    .vtt-product-search__form { flex-direction:column; }
    .vtt-product-search__button { width:100%; }
    body.woocommerce-shop ul.products li.product .astra-shop-thumbnail-wrap,
    body.tax-product_cat ul.products li.product .astra-shop-thumbnail-wrap,
    body.search-results ul.products li.product .astra-shop-thumbnail-wrap {
        height:270px !important;
        min-height:270px !important;
    }
    body.woocommerce-shop ul.products li.product .astra-shop-thumbnail-wrap img,
    body.tax-product_cat ul.products li.product .astra-shop-thumbnail-wrap img,
    body.search-results ul.products li.product .astra-shop-thumbnail-wrap img,
    body.woocommerce-shop ul.products li.product a img,
    body.tax-product_cat ul.products li.product a img,
    body.search-results ul.products li.product a img {
        height:250px !important;
        max-height:250px !important;
    }
}
