/*


Theme Name: All Terrain Shop
Theme Uri: https://allterrain.com.au
Author: Christopher Baker
Description: Single merged theme (Classic ATA with ATX Shop) optimised and slimmed for All Terrain Shop.
Version: 1.7.9
Text Domain: all-terrain-shop
Author URI: https://www.linkedin.com/in/cbakerau/
*/



/* Child overrides */




/* Ensure the image container anchors the badge */
.woocommerce div.product .woocommerce-product-gallery,
.woocommerce ul.products li.product .ast-woo-product-gallery {
    position: relative !important;
}


/* Hide native badge text so we can inject our own */
.woocommerce .onsale,
.badge-sale,
.product .sale-badge,
.product .badge.badge-sale {
    font-size: 0 !important;
}

/* Replace visible label text */


/* Some themes put nested nodes inside the badge; hide them */
.woocommerce .onsale * {
    display: none !important;
}

/* Product card layout & styling */
.woocommerce ul.products li.product {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08) !important;
    padding: 16px !important;
    background: #fff !important;
    transition: all 0.3s ease-in-out !important;
}

/* Hover effect */
.woocommerce ul.products li.product:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-3px) !important;
}

/* Title: clamp to 3 lines */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    min-height: 4.5em !important;               /* ~3 lines at 1.5em */
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* Make the product link area stretch */
.woocommerce ul.products li.product .woocommerce-loop-product__link {
    flex-grow: 1 !important;
}

/* Group price + button at the bottom */
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .button {
    margin-top: auto !important;
}

/* Buttons: alignment, size, and shape */
.woocommerce ul.products li.product .button {
    display: inline-block !important;
    width: 100% !important;
    text-align: center !important;
    border-radius: 8px !important;
    font-size: 12px !important;
}

/* Ensure other grid actions match button font size */
.woocommerce ul.products li.product .added_to_cart,
.woocommerce ul.products li.product .out-of-stock {
    font-size: 12px !important;
}

/* One-line, consistent-height product category label */
.woocommerce ul.products li.product .ast-woo-product-category,
.woocommerce ul.products li.product .woocommerce-loop-product__category,
.woocommerce ul.products li.product .woo-entry-category,
.woocommerce ul.products li.product .posted_in,
.woocommerce ul.products li.product .product_meta .posted_in {
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.5 !important;
    min-height: 1.5em !important;               /* exactly one line */
}


.ats-bundle-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.ats-bundle-items {
    margin-top: 20px;
    background: #fafafa;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
}

.ats-bundle-gallery img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .ats-bundle-layout {
        grid-template-columns: 1fr;
    }
}

/******************* ADDD CATEGORY **************/
/* Smaller subtext inside our category/shop intro box */
.ats-container.category-intro .term-description {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
}

/* Tighten spacing under the page title */
.tax-product_cat .woocommerce-products-header .page-title,
.tax-product_cat .woocommerce-products-header__title,
    /* Top area wrapper for category archives */
.ats-archive-header {
    max-width: 1200px;     /* align with your ats-container width */
    margin: 0 auto 18px;   /* center + space below */
    padding: 0;            /* let inner box control padding */
}

/* Page title inside our header */
.ats-archive-header .page-title {
    margin: 0 0 10px;
    line-height: 1.2;
    font-weight: 800;
    font-size: clamp(24px, 2.2vw + 1rem, 42px);
}

/* Our boxed subtext already uses ats-container styles; just tighten spacing */
.ats-archive-header .ats-container.category-intro {
    margin-top: 8px;
}

/* Mobile tweaks */
@media (max-width: 768px) {
    .ats-archive-header { margin-bottom: 14px; }
    .ats-archive-header .page-title { font-size: clamp(22px, 4.5vw + 0.5rem, 34px); }
}

/* Ensure the intro box has the ATS look if not already inherited */
.ats-container.category-intro {
    background: #ffffff;
    border: 2px solid #e5e5e5;
    border-radius: 16px;
    padding: 16px 22px;
    margin: 12px auto 28px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    max-width: 1200px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.ats-container.category-intro:hover {
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.10);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .ats-container.category-intro {
        padding: 22px 18px;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }
}


/* === Main ATS Container Styling === */
.ats-main-container {
    background: #ffffff;                  /* clean white background */
    border: 2px solid #e5e5e5;            /* light grey border */
    border-radius: 16px;                  /* smoother rounded corners */
    padding: 32px 36px;                   /* internal space */
    margin-top: 30px;                     /* gap above container */
    margin-bottom: 40px;                  /* gap below container */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06); /* subtle elevation */
    max-width: 1200px;                    /* keep layout clean */
    margin-left: auto;                    /* center horizontally */
    margin-right: auto;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* Hover or focus state for slight “lift” feel */
.ats-main-container:hover {
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.10);
    transform: translateY(-2px);
}

/* Text and spacing defaults inside container */
.ats-main-container p,
.ats-main-container li {
    color: #333;
    line-height: 1.6;
}

.ats-main-container h2,
.ats-main-container h3 {
    color: #111;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 12px;
    border-bottom: 2px solid #fdda0d;     /* yellow accent line */
    display: inline-block;
    padding-bottom: 6px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .ats-main-container {
        padding: 22px 18px;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }
}
body.post-type-archive-product .astra-shop-thumbnail-wrap .onsale,
body.tax-product_cat .astra-shop-thumbnail-wrap .onsale,
body.woocommerce-shop .astra-shop-thumbnail-wrap .onsale {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    content: none !important;
}
.onsale {
    display: none !important;
    visibility: hidden !important;
}

