/* =========================================================
   DRILL CONNEX — PRODUCT CONTACT BUTTON
   ========================================================= */

.drillconnex-product-contact {
    margin-top: 15px !important;
    margin-bottom: 10px !important;
    width: 100% !important;
}

.drillconnex-product-contact .drillconnex-contact-button {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;

    background: #f5c400 !important;
    color: #111111 !important;

    padding: 13px 24px !important;
    border-radius: 4px !important;

    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;

    text-decoration: none !important;
}

.drillconnex-product-contact .drillconnex-contact-button:hover {
    background: #e0b300 !important;
    color: #111111 !important;
}


/* =========================================================
   DRILL CONNEX — CATEGORY PAGE HEADER
   ========================================================= */


/* ---------------------------------------------------------
   REMOVE BREADCRUMB
   --------------------------------------------------------- */

.tax-product_cat .woocommerce-breadcrumb {
    display: none !important;
}


/* ---------------------------------------------------------
   HIDE DUPLICATE CATEGORY TITLE
   --------------------------------------------------------- */

.tax-product_cat .woocommerce-products-header__title {
    display: none !important;
}


/* ---------------------------------------------------------
   CATEGORY DESCRIPTION CONTAINER
   --------------------------------------------------------- */

.tax-product_cat .term-description,
.tax-product_cat .woocommerce-products-header__description {
    margin: 0 !important;
    padding: 0 !important;

    border: none !important;

    box-sizing: border-box !important;
}


/* ---------------------------------------------------------
   FULL-WIDTH CATEGORY BANNER
   --------------------------------------------------------- */

.tax-product_cat .term-description img,
.tax-product_cat .woocommerce-products-header__description img {
    display: block !important;

    width: 100vw !important;
    max-width: 100vw !important;

    height: auto !important;
    min-height: 0 !important;

    object-fit: contain !important;

    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;

    margin-top: 0 !important;
    margin-bottom: 0 !important;

    border-radius: 0 !important;
}


/* ---------------------------------------------------------
   FULL-WIDTH GREY DESCRIPTION SECTION
   --------------------------------------------------------- */

.tax-product_cat .term-description,
.tax-product_cat .woocommerce-products-header__description {
    background: #f5f5f5 !important;

    width: 100vw !important;
    max-width: 100vw !important;

    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;

    padding-top: 35px !important;
    padding-bottom: 35px !important;
}


/* ---------------------------------------------------------
   DESCRIPTION TEXT
   --------------------------------------------------------- */

.tax-product_cat .term-description p,
.tax-product_cat .woocommerce-products-header__description p {
    max-width: 1100px !important;

    margin-left: auto !important;
    margin-right: auto !important;

    margin-top: 0 !important;
    margin-bottom: 20px !important;

    padding-left: 20px !important;
    padding-right: 20px !important;

    font-size: 17px !important;
    line-height: 1.75 !important;

    color: #333333 !important;
}


/* Last paragraph */

.tax-product_cat .term-description p:last-child,
.tax-product_cat .woocommerce-products-header__description p:last-child {
    margin-bottom: 0 !important;
}


/* =========================================================
   PRODUCT AREA
   ========================================================= */

.tax-product_cat .woocommerce-result-count,
.tax-product_cat .woocommerce-ordering {
    margin-top: 30px !important;
}

.tax-product_cat .products {
    border-top: 1px solid #d6d6d6 !important;

    padding-top: 35px !important;
}


/* =========================================================
   REMOVE ANY GAP ABOVE CATEGORY HEADER
   ========================================================= */

.tax-product_cat .site-content,
.tax-product_cat .content-area,
.tax-product_cat .woocommerce-products-header {
    margin-top: 0 !important;
    padding-top: 0 !important;
}


/* Description starts immediately */

.tax-product_cat .term-description,
.tax-product_cat .woocommerce-products-header__description {
    margin-top: 0 !important;
    padding-top: 0 !important;
}


/* =========================================================
   PRODUCT BROCHURE TAB — MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .woocommerce-tabs ul.tabs {
        display: flex !important;

        flex-wrap: nowrap !important;

        width: 100% !important;

        margin: 0 !important;
        padding: 0 !important;

        overflow: hidden !important;
    }


    /* Individual tabs */

    .woocommerce-tabs ul.tabs li {
        flex: 1 1 0 !important;

        width: 50% !important;
        max-width: 50% !important;

        margin: 0 !important;
        padding: 0 !important;

        box-sizing: border-box !important;

        text-align: center !important;
    }


    /* Tab links */

    .woocommerce-tabs ul.tabs li a {
        display: flex !important;

        align-items: center !important;
        justify-content: center !important;

        width: 100% !important;

        min-height: 48px !important;

        padding: 10px 8px !important;

        box-sizing: border-box !important;

        white-space: nowrap !important;

        font-size: 13px !important;
    }


    /* =====================================================
       CATEGORY PAGE — MOBILE
       ===================================================== */

    .tax-product_cat .term-description,
    .tax-product_cat .woocommerce-products-header__description {
        padding-top: 0 !important;
        padding-bottom: 25px !important;

        margin-top: 0 !important;
    }


    /* Category banner */

    .tax-product_cat .term-description img,
    .tax-product_cat .woocommerce-products-header__description img {
        display: block !important;

        width: 100vw !important;
        max-width: 100vw !important;

        height: auto !important;

        margin-top: 0 !important;
        margin-bottom: 0 !important;

        object-fit: contain !important;
    }


    /* Description text */

    .tax-product_cat .term-description p,
    .tax-product_cat .woocommerce-products-header__description p {
        font-size: 15px !important;

        line-height: 1.65 !important;

        padding-left: 20px !important;
        padding-right: 20px !important;

        margin-bottom: 16px !important;
    }


    /* Last paragraph */

    .tax-product_cat .term-description p:last-child,
    .tax-product_cat .woocommerce-products-header__description p:last-child {
        margin-bottom: 0 !important;
    }

}


/* =========================================================
   DRILL CONNEX — MOBILE SINGLE PRODUCT GALLERY
   =========================================================

   IMPORTANT:
   Do NOT alter the display mode of
   .woocommerce-product-gallery__image.

   WooCommerce needs to control the slides itself,
   especially when there are multiple images.
   ========================================================= */

@media (max-width: 767px) {

    /* -----------------------------------------------------
       GALLERY CONTAINER
       ----------------------------------------------------- */

    .single-product
    div.product
    .woocommerce-product-gallery {
        width: 100% !important;
        max-width: 100% !important;

        margin-top: 25px !important;
        margin-bottom: 20px !important;

        box-sizing: border-box !important;
    }


    /* -----------------------------------------------------
       MAIN GALLERY VIEWPORT
       ----------------------------------------------------- */

    .single-product
    div.product
    .woocommerce-product-gallery
    .flex-viewport {
        width: 100% !important;
        max-width: 100% !important;

        box-sizing: border-box !important;

        overflow: hidden !important;
    }


    /* -----------------------------------------------------
       GALLERY SLIDES
       
       Leave WooCommerce's display/flex behaviour alone.
       ----------------------------------------------------- */

    .single-product
    div.product
    .woocommerce-product-gallery
    .woocommerce-product-gallery__image {
        box-sizing: border-box !important;

        padding: 0 !important;

        margin: 0 !important;
    }


    /* -----------------------------------------------------
       MAIN PRODUCT IMAGE
       ----------------------------------------------------- */

    .single-product
    div.product
    .woocommerce-product-gallery
    .woocommerce-product-gallery__image img {

        display: block !important;

        width: auto !important;

        max-width: 100% !important;

        height: auto !important;

        max-height: 450px !important;

        margin-left: auto !important;
        margin-right: auto !important;

        object-fit: contain !important;

        box-sizing: border-box !important;
    }


    /* -----------------------------------------------------
       THUMBNAILS
       ----------------------------------------------------- */

    .single-product
    div.product
    .woocommerce-product-gallery
    .flex-control-thumbs {

        display: flex !important;

        flex-wrap: nowrap !important;

        gap: 8px !important;

        width: 100% !important;

        margin: 12px 0 0 0 !important;

        padding: 0 !important;

        overflow-x: auto !important;

        box-sizing: border-box !important;
    }


    /* Individual thumbnails */

    .single-product
    div.product
    .woocommerce-product-gallery
    .flex-control-thumbs li {

        flex: 0 0 72px !important;

        width: 72px !important;

        margin: 0 !important;

        padding: 0 !important;
    }


    /* Thumbnail images */

    .single-product
    div.product
    .woocommerce-product-gallery
    .flex-control-thumbs img {

        display: block !important;

        width: 72px !important;

        height: 72px !important;

        object-fit: contain !important;

        margin: 0 !important;
    }

}


/* =========================================================
   DRILL CONNEX — DISABLE PRODUCT IMAGE ZOOM
   ========================================================= */

/* Remove zoom cursor */

.single-product
.woocommerce-product-gallery__image,
.single-product
.woocommerce-product-gallery__image img {
    cursor: default !important;
}


/* Prevent visual transform */

.single-product
.woocommerce-product-gallery__image img {
    transform: none !important;

    transition: none !important;
}


/* Prevent hover transform */

.single-product
.woocommerce-product-gallery__image img:hover {
    transform: none !important;
}


/* Remove WooCommerce zoom trigger */

.single-product
.woocommerce-product-gallery__trigger {
    display: none !important;
}


/* Remove zoom container if one exists */

.single-product
.zoomContainer {
    display: none !important;
}




/* =========================================================
   DRILL CONNEX — GROUPED PRODUCT
   SHOW CHILD PRODUCTS + QUANTITY CONTROLS
   ========================================================= */

/* Make the grouped product table visible */
.single-product .woocommerce-grouped-product-list {
    display: table !important;
    width: 100% !important;
    height: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    margin: 20px 0 !important;
    border-collapse: collapse !important;
}

/* Show each grouped product row */
.single-product .woocommerce-grouped-product-list-item {
    display: table-row !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Show all cells */
.single-product .woocommerce-grouped-product-list-item td {
    display: table-cell !important;
    visibility: visible !important;
    opacity: 1 !important;
    vertical-align: middle !important;
    padding: 14px 10px !important;
    border-bottom: 1px solid #dfe3e7 !important;
}

/* Quantity column */
.single-product .woocommerce-grouped-product-list-item .quantity {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Quantity input */
.single-product .woocommerce-grouped-product-list-item .quantity .qty {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 60px !important;
    min-height: 42px !important;
    text-align: center !important;
}

/* Product name */
.single-product .woocommerce-grouped-product-list-item .woocommerce-grouped-product-list-item__label {
    display: table-cell !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Price */
.single-product .woocommerce-grouped-product-list-item .woocommerce-grouped-product-list-item__price {
    display: table-cell !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Grouped product Add to cart button */
.single-product .grouped_form .single_add_to_cart_button {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.single-product .woocommerce-grouped-product-list-item__price .amount::after {
    content: " excl. GST";
    font-size: 12px;
    font-weight: 400;
    margin-left: 4px;
    white-space: nowrap;
}


/* =========================================================
   DRILL CONNEX — GROUPED PRODUCT AVAILABILITY
   ========================================================= */

.single-product .woocommerce-grouped-product-list-item__price
.ast-stock-detail {
    display: block !important;

    margin: 4px 0 0 0 !important;

    font-size: 14px !important;

    line-height: 1.4 !important;

    font-weight: 400 !important;
}


/* "Availability:" label */

.single-product .woocommerce-grouped-product-list-item__price
.ast-stock-avail {
    font-size: 14px !important;
    font-weight: 600 !important;
}


/* "Available on backorder" */

.single-product .woocommerce-grouped-product-list-item__price
.ast-stock-detail .stock {
    font-size: 14px !important;
    font-weight: 400 !important;
}
/* Hide Related Products */
.single-product .related.products {
    display: none !important;
}

/* Drill Connex menu dividers */
a[href="#menu-divider"] {
    display: block !important;
    height: 1px !important;
    min-height: 1px !important;
    background: #d9d9d9 !important;
    padding: 0 !important;
    margin: 12px 15px !important;
    font-size: 0 !important;
    line-height: 0 !important;
    pointer-events: none !important;
}

.drill-bit-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 25px;
}

.drill-bit-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
}

.drill-bit-table th,
.drill-bit-table td {
    white-space: nowrap;
}

.drill-bit-table th {
    vertical-align: middle;
}

.drill-bit-table th img {
    display: block;
    margin: 5px auto 0;
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.drill-bit-table td:first-child {
    font-weight: bold;
}

.drill-bit-table td,
.drill-bit-table th {
    text-align: center;
    vertical-align: middle;
}

.drill-bit-table td:first-child,
.drill-bit-table th:first-child {
    text-align: left;
}

.drill-bit-table-scroll-hint {
    display: none;
}

@media (max-width: 767px) {
    .drill-bit-table-scroll-hint {
        display: block;
        font-size: 13px;
        font-style: italic;
        text-align: center;
        margin: 8px 0 25px;
        opacity: 0.7;
    }
}


/* Hide post metadata on search results */
.search .entry-meta {
    display: none !important;
}

/* Hide "New in store" section on empty cart */
.woocommerce-cart .wp-block-woocommerce-empty-cart-block
.wp-block-woocommerce-product-new,
.woocommerce-cart .wp-block-woocommerce-empty-cart-block
.wp-block-heading.has-text-align-center:not(.wc-block-cart__empty-cart__title),
.woocommerce-cart .wp-block-woocommerce-empty-cart-block
> .wp-block-separator {
    display: none !important;
}

.woocommerce .price .woocommerce-Price-amount.amount::after {
    content: " excl. GST";
    font-size: 12px !important;
    font-weight: 400 !important;
    margin-left: 5px !important;
    white-space: nowrap !important;
}


.single-product:has(.woocommerce-grouped-product-list) .price {
    display: none !important;
}


.single-product .product_meta .posted_in:has(a[href*="/product-category/cpt-parts-products/"]) {
    display: none !important;
}



/* Hide breadcrumb on CPT Parts product pages */
body.single-product:has(.product_meta .posted_in a[href*="/product-category/cpt-parts-products/"]) .woocommerce-breadcrumb {
    display: none !important;
}

