.cotech-pit-admin-box {
    max-width: 900px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 22px 25px;
    margin: 20px 0;
}

.cotech-pit-admin-box h2 {
    margin-top: 0;
}

.cotech-pit-admin-box input[type="number"] {
    vertical-align: middle;
}


/* =========================================================
   PRODUCTS IN TABS
   ========================================================= */

.cotech-products-in-tabs {
    width: 100%;
    box-sizing: border-box;
}


/* =========================================================
   TABS
   ========================================================= */

.cotech-pit-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: var(--cotech-pit-tab-align);
    gap: var(--cotech-pit-tab-gap);
    margin: 0 0 24px;
}

.cotech-pit-tab {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 6px 0;
    cursor: pointer;
    color: var(--cotech-pit-tab-color);
    font-size: var(--cotech-pit-tab-size);
    font-weight: var(--cotech-pit-tab-weight);
    line-height: 1.3;
    border-radius: var(--cotech-pit-tab-radius);
    position: relative;
    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

.cotech-pit-tab:hover,
.cotech-pit-tab.is-active {
    color: var(--cotech-pit-tab-active);
}

.cotech-pit-tab:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}


/* =========================================================
   TAB STYLE - BACKGROUND
   ========================================================= */

.cotech-pit-tab-style-background .cotech-pit-tab {
    padding: 8px 14px;
}

.cotech-pit-tab-style-background .cotech-pit-tab.is-active {
    background: var(--cotech-pit-tab-bg);
    color: #fff;
}


/* =========================================================
   TAB STYLE - UNDERLINE
   ========================================================= */

.cotech-pit-tab-style-underline .cotech-pit-tab.is-active {
    color: var(--cotech-pit-tab-active);
}

.cotech-pit-tab-style-underline .cotech-pit-tab.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--cotech-pit-tab-underline-width);
    background: var(--cotech-pit-tab-underline);
    border-radius: 999px;
}


/* =========================================================
   TAB PANELS
   ========================================================= */

.cotech-pit-panel {
    display: none;
}

.cotech-pit-panel.is-active {
    display: block;
}


/* =========================================================
   PRODUCTS
   ========================================================= */

.cotech-pit-products {
    position: relative;
}

.cotech-pit-products ul.products {
    margin: 0 !important;
    overflow-y: hidden !important;
    align-items: stretch !important;
}


/* =========================================================
   GRID
   ========================================================= */

.cotech-pit-grid ul.products {
    display: grid !important;
    grid-template-columns:
        repeat(
            var(--cotech-pit-columns),
            minmax(0, 1fr)
        );
    gap: 24px;
}

.cotech-pit-grid ul.products li.product {
    width: auto !important;
    margin: 0 !important;
    min-width: 0;
    box-sizing: border-box;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

/* =========================================================
   SLIDER
   ========================================================= */

.cotech-pit-slider {
    overflow: hidden !important;
}

.cotech-pit-slider ul.products {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 24px;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 0 !important;
    align-items: stretch !important;
}

.cotech-pit-slider ul.products::-webkit-scrollbar {
    display: none;
}

/* =========================================================
   SLIDER PRODUCT CARD
   ========================================================= */

.cotech-pit-slider ul.products li.product {
    flex: 0 0 calc(
        (100% - (24px * (var(--cotech-pit-columns) - 1)))
        / var(--cotech-pit-columns)
    );

    width: auto !important;
    margin: 8px 0 !important;
    min-width: 0;
    box-sizing: border-box;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    align-self: stretch !important;


}

.cotech-pit-slider ul.products li.product > * {
    max-width: 100%;
}

.cotech-pit-slider ul.products li.product .woocommerce-loop-product__link {
    display: flex;
    flex-direction: column;
}

.cotech-pit-slider ul.products li.product .woocommerce-loop-product__title {
    min-height: 2.6em;
}


/* =========================================================
   SLIDER ARROWS
   ========================================================= */

.cotech-pit-arrow {
    position: absolute;
    top: 45%;
    z-index: 2;

    width: 38px;
    height: 38px;

    border: 0;
    border-radius: 50%;

    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);

    cursor: pointer;

    font-size: 18px;
    line-height: 38px;

    padding: 0;
}

.cotech-pit-prev {
    left: -10px;
}

.cotech-pit-next {
    right: -10px;
}


/* =========================================================
   SLIDER DOTS
   ========================================================= */

.cotech-pit-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 15px;
}

.cotech-pit-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;
    border: 0;

    padding: 0;
    background: #ccc;
}

.cotech-pit-dot.is-active {
    background: currentColor;
}


/* =========================================================
   VIEW ALL BUTTON
   ========================================================= */

.cotech-pit-view-all-wrap {
    display: flex;
    justify-content: var(--cotech-pit-view-align);

    margin-top: 22px;

    width: 100%;
    box-sizing: border-box;
}

.cotech-pit-view-all {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    text-decoration: none !important;

    background: var(--cotech-pit-view-bg);
    color: var(--cotech-pit-view-text) !important;

    border:
        var(--cotech-pit-view-border-width)
        solid
        var(--cotech-pit-view-border);

    border-radius: var(--cotech-pit-view-radius);

    padding:
        var(--cotech-pit-view-py)
        var(--cotech-pit-view-px);

    font-size: var(--cotech-pit-view-size);
    font-weight: var(--cotech-pit-view-weight);

    line-height: 1.2;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.cotech-pit-view-all:hover {
    background: var(--cotech-pit-view-hover-bg);
    color: var(--cotech-pit-view-hover-text) !important;
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.cotech-pit-empty {
    text-align: center;
    margin: 20px 0;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {

    .cotech-pit-grid ul.products {
        grid-template-columns:
            repeat(
                var(--cotech-pit-tablet),
                minmax(0, 1fr)
            );
    }

    .cotech-pit-slider ul.products li.product {
        flex-basis: calc(
            (100% - (24px * (var(--cotech-pit-tablet) - 1)))
            / var(--cotech-pit-tablet)
        );
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .cotech-pit-tabs {
        gap: 14px;
        margin-bottom: 18px;
    }

    .cotech-pit-grid ul.products {
        grid-template-columns:
            repeat(
                var(--cotech-pit-mobile),
                minmax(0, 1fr)
            );

        gap: 14px;
    }

    .cotech-pit-slider ul.products {
        gap: 14px;
    }

    .cotech-pit-slider ul.products li.product {
        flex-basis: calc(
            (100% - (14px * (var(--cotech-pit-mobile) - 1)))
            / var(--cotech-pit-mobile)
        );
    }

    .cotech-pit-arrow {
        width: 34px;
        height: 34px;
        line-height: 34px;
    }

    .cotech-pit-prev {
        left: -5px;
    }

    .cotech-pit-next {
        right: -5px;
    }

    .cotech-pit-tab-style-background .cotech-pit-tab {
        padding: 7px 11px;
    }

    .cotech-pit-view-all-wrap {
        margin-top: 18px;
    }

}


/* =========================================================
   HIDE PRODUCT ELEMENTS
   ========================================================= */

.cotech-pit-hide-image
.woocommerce-loop-product__link img {
    display: none !important;
}

.cotech-pit-hide-title
.woocommerce-loop-product__title {
    display: none !important;
}

.cotech-pit-hide-price
.price {
    display: none !important;
}

.cotech-pit-hide-sale_badge
.onsale {
    display: none !important;
}

.cotech-pit-hide-rating
.star-rating {
    display: none !important;
}

.cotech-pit-hide-add_to_cart
.add_to_cart_button,
.cotech-pit-hide-add_to_cart
.button.product_type_simple,
.cotech-pit-hide-add_to_cart
.button.product_type_variable,
.cotech-pit-hide-add_to_cart
.button.product_type_grouped {
    display: none !important;
}

/* =========================================================
   PRODUCT IMAGE - BORDER RADIUS
   ========================================================= */

.cotech-pit-grid ul.products li.product img,
.cotech-pit-slider ul.products li.product img {
	    border: 1px solid #ccc;
    border-radius: 12px !important;
    overflow: hidden;
}


/* Cotech Products in Tabs: limit product titles to 2 lines */
.cotech-products-in-tabs ul.products li.product .woocommerce-loop-product__title {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    text-overflow: ellipsis;
    line-height: 1.4em !important;
    min-height: 2.8em !important;
    max-height: 2.8em !important;
}
