/* =========================================================
   ASHE PRODUCT LIST - CLEAN MINIMALIST VERSION
   ========================================================= */

/* Fix the empty top-left square */
.ashe-product-list-container ul.products::before,
.ashe-product-list-container ul.products::after {
    display: none !important;
    content: none !important;
}

.ashe-product-list-container ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 15px !important; /* Tighter gap for a cleaner look */
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* The Main Tile - Removed the double-box look */
.ashe-product-list-container ul.products li.product {
    border: 2px solid #1f73ea !important; /* Main Blue Border */
    border-radius: 12px !important;
    padding: 0 !important; /* Removed inner padding */
    background: #fff !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    transition: transform 0.2s ease;
}

/* Remove the specific WooCommerce inner image border/box */
.ashe-product-list-container ul.products li.product a img {
    border: none !important;
    margin: 0 !important;
    padding: 15px !important; /* Space around the bottle */
    background: #fff !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1/1 !important;
    object-fit: contain !important;
    display: block !important;
}

/* Product Info Section (Below Image) */
.ashe-product-list-container ul.products li.product .woocommerce-loop-product__title {
    font-size: 12px !important; /* Smaller, sleek font */
    font-weight: 700 !important;
    color: #333 !important;
    padding: 0 10px !important;
    margin: 10px 0 5px !important;
    line-height: 1.3 !important;
    min-height: 32px;
    text-align: center;
}

/* Price Section */
.ashe-product-list-container ul.products li.product .price {
    font-size: 14px !important;
    font-weight: 800 !important;
    color: #1b16e6 !important;
    padding-bottom: 15px !important;
    text-align: center;
    display: block !important;
}

/* Remove the inner 'Sale' box styling if it's causing clutter */
.ashe-product-list-container ul.products li.product .onsale {
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    margin: 0 !important;
    background: #1f73ea !important;
    font-size: 10px !important;
}

/* Responsive */
@media (max-width: 800px) {
    .ashe-product-list-container ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* 1. Ensure the product card is the 'anchor' for the badge */
.ashe-product-list-container ul.products li.product {
    position: relative !important; /* This is critical */
    border: 2px solid #1f73ea !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

/* 2. Position the Sale Label to the top right */
.ashe-product-list-container ul.products li.product .onsale {
    position: absolute !important;
    top: 10px !important;    /* Distance from top border */
    right: 10px !important;  /* Distance from right border */
    left: auto !important;   /* Reset default WooCommerce left positioning */
    margin: 0 !important;
    
    /* Styling to match your blue brand */
    background-color: #1f73ea !important; 
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    padding: 5px 10px !important;
    border-radius: 4px !important;
    z-index: 10 !important; /* Ensures it stays above the image */
    min-height: auto !important;
    line-height: 1 !important;
}

/* 3. Clean up the image area (removes the 'inner block' look) */
.ashe-product-list-container ul.products li.product a img {
    border: none !important;
    padding: 0 !important; /* Remove padding to let image fill width if needed */
    margin: 0 auto !important;
    display: block !important;
    aspect-ratio: 1/1 !important;
    object-fit: contain !important;
    background-color: #fff !important;
}


/* =========================================================
   BRAND / CATEGORY ARCHIVE STYLING
   Mirrors .ashe-product-list-container exactly so the page
   that opens after clicking a brand tile is identical in
   style to the full Product List page.
   ========================================================= */

/* Wrap the archive loop in a consistent container */
.tax-product_cat .site-main,
.tax-product_tag .site-main,
.post-type-archive-product .site-main {
    padding: 20px 18px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Kill WooCommerce pseudo-element spacers */
.tax-product_cat ul.products::before,
.tax-product_cat ul.products::after,
.tax-product_tag ul.products::before,
.tax-product_tag ul.products::after,
.post-type-archive-product ul.products::before,
.post-type-archive-product ul.products::after {
    display: none !important;
    content: none !important;
}

/* 4-column grid — matches product-list page */
.tax-product_cat ul.products,
.tax-product_tag ul.products,
.post-type-archive-product ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 15px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Kill WooCommerce float behaviour */
.tax-product_cat ul.products li.product,
.tax-product_tag ul.products li.product,
.post-type-archive-product ul.products li.product {
    float: none !important;
    clear: none !important;
    width: 100% !important;

    /* Card style — identical to .ashe-product-list-container */
    position: relative !important;
    border: 2px solid #1f73ea !important;
    border-radius: 12px !important;
    padding: 0 !important;
    background: #fff !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    transition: transform 0.2s ease;
}

.tax-product_cat ul.products li.product:hover,
.tax-product_tag ul.products li.product:hover,
.post-type-archive-product ul.products li.product:hover {
    transform: translateY(-2px);
}

/* Square product image */
.tax-product_cat ul.products li.product a img,
.tax-product_tag ul.products li.product a img,
.post-type-archive-product ul.products li.product a img {
    border: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: contain !important;
    background-color: #fff !important;
}

/* Product title */
.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
.tax-product_tag ul.products li.product .woocommerce-loop-product__title,
.post-type-archive-product ul.products li.product .woocommerce-loop-product__title {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #333 !important;
    padding: 0 10px !important;
    margin: 10px 0 5px !important;
    line-height: 1.3 !important;
    min-height: 32px;
    text-align: center;
}

/* Price */
.tax-product_cat ul.products li.product .price,
.tax-product_tag ul.products li.product .price,
.post-type-archive-product ul.products li.product .price {
    font-size: 14px !important;
    font-weight: 800 !important;
    color: #1b16e6 !important;
    padding-bottom: 15px !important;
    text-align: center;
    display: block !important;
}

/* Sale badge — top-right, brand blue */
.tax-product_cat ul.products li.product .onsale,
.tax-product_tag ul.products li.product .onsale,
.post-type-archive-product ul.products li.product .onsale {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    margin: 0 !important;
    background-color: #1f73ea !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    padding: 5px 10px !important;
    border-radius: 4px !important;
    z-index: 10 !important;
    min-height: auto !important;
    line-height: 1 !important;
}

/* Archive header (brand title) */
.ashe-archive-header {
    padding: 0 0 20px;
}

.ashe-archive-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #111;
    margin: 0;
}

/* WooCommerce result count + ordering toolbar */
.tax-product_cat .woocommerce-products-header,
.tax-product_tag .woocommerce-products-header {
    margin-bottom: 16px;
}

.tax-product_cat .woocommerce-result-count,
.tax-product_tag .woocommerce-result-count {
    font-size: 0.88rem;
    color: #666;
}

/* Responsive — 2-col on mobile */
@media (max-width: 800px) {
    .tax-product_cat ul.products,
    .tax-product_tag ul.products,
    .post-type-archive-product ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

