/*
 Theme Name: Astra Child (PC Sidebar)
 Description: Midooc – Sidebar PC Styles (≥1025px)
 Author: Midooc Group Genius Team
 Template: astra
 Version: 25.0.0.27 (Dec 2025)
*/

@media (min-width: 1025px) {

    /* 1. Parent list container */
    .wc-block-product-categories-list {
        list-style: none;
        padding: 0;
        margin: 0;
        position: relative;
        z-index: 50;
    }

    .wc-block-product-categories-list > li {
        position: relative;
    }

    /* 2. Parent button style */
    .wc-block-product-categories-list > li > a {
        display: flex;
        justify-content: space-between;
        align-items: center;

        padding: 10px 14px;
        margin-bottom: 8px;
        height: 42px;

        background: #fafafa;
        border: 1px solid #dcdcdc;
        border-radius: 10px;

        font-size: 16px;
        font-weight: 600;
        color: #333;

        transition:
            background .25s ease,
            color .25s ease,
            border-color .25s ease;
    }

    .wc-block-product-categories-list > li > a:hover {
        background: #eef4ff;
        border-color: #1a73e8;
        color: #1a73e8;
    }

    /* Current family highlight */
    .wc-block-product-categories-list .current-cat > a,
    .wc-block-product-categories-list .current-cat-parent > a,
    .wc-block-product-categories-list .current-cat-ancestor > a {
        background: #e8f0fe;
        border-color: #1a73e8;
        color: #1a73e8;
    }

    /* 3. Hide original inline submenu on PC */
    .wc-block-product-categories-list > li > ul {
        display: none !important;
    }

    /* 4. Floating submenu panel on the right */
    .midooc-submenu-panel {
        position: absolute;
        left: 100%;
        top: 0;
        margin-left: 12px;
        min-width: 240px;

        background: #fff;
        border: 1px solid #e5e5e5;
        border-radius: 10px;

        padding: 4px 0;
        display: none;
        z-index: 9999;

        box-shadow: none;
    }

    .midooc-submenu-panel.show {
        display: block;
    }

    .midooc-submenu-panel a {
        display: block;
        padding: 6px 16px;
        font-size: 15px;
        color: #333;
        white-space: nowrap;
        transition: background .2s ease, color .2s ease;
    }

    .midooc-submenu-panel a:hover {
        background: #f3f6ff;
        color: #1a73e8;
    }
}

/* Remove gap to keep hover bridge clean */
.wc-block-product-categories-list > li {
    margin-bottom: 0 !important;
}

/* Active state from JS */
.midooc-active {
    background: #eef4ff !important;
    border-color: #1a73e8 !important;
    color: #1a73e8 !important;
}

/* Ensure panel alignment outside media-query as well */
.midooc-submenu-panel {
    position: absolute;
    left: 100%;
    margin-left: 12px;
    min-width: 220px;
}

/* Hover bridge: move from parent to child without losing hover */
@media (min-width: 1025px) {

    .wc-block-product-categories-list > li {
        position: relative;
    }

    .wc-block-product-categories-list > li.has-children::before {
        content: "";
        position: absolute;
        top: 0;
        left: 100%;
        width: 40px;
        height: 42px;
        background: transparent;
        z-index: 5;
    }

    .wc-block-product-categories-list > li.has-children:hover::before {
        height: 200px;
    }
}

/* Apple-like product cards (category + Product Range) */
@media (min-width: 1025px) {

    body.tax-product_cat ul.products,
    body.page-id-3062 ul.products {
        row-gap: 32px;
    }

    body.tax-product_cat ul.products li.product,
    body.page-id-3062 ul.products li.product {
        background: #ffffff;
        border-radius: 18px;
        padding: 18px 18px 20px;
        box-shadow: 0 14px 30px rgba(0, 0, 0, 0.04);
        transition:
            transform .25s ease,
            box-shadow .25s ease,
            border-color .25s ease,
            background-color .25s ease;
        border: 1px solid rgba(0, 0, 0, 0.04);
        overflow: hidden;
    }

    body.tax-product_cat ul.products li.product:hover,
    body.page-id-3062 ul.products li.product:hover {
        transform: translateY(-6px);
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
        border-color: rgba(0, 0, 0, 0.06);
    }

    body.tax-product_cat ul.products li.product a img,
    body.page-id-3062 ul.products li.product a img {
        border-radius: 16px;
        margin-bottom: 14px;
        transition: transform .3s ease;
    }

    body.tax-product_cat ul.products li.product:hover a img,
    body.page-id-3062 ul.products li.product:hover a img {
        transform: scale(1.03);
    }

    body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
    body.page-id-3062 ul.products li.product .woocommerce-loop-product__title {
        font-size: 15px;
        font-weight: 600;
        line-height: 1.35;
        margin-top: 4px;
        margin-bottom: 8px;
        color: #111111;
        min-height: 2.7em;
    }

    body.tax-product_cat ul.products li.product .price,
    body.page-id-3062 ul.products li.product .price {
        font-size: 15px;
        font-weight: 600;
        color: #111111;
        margin-bottom: 10px;
    }

    body.tax-product_cat ul.products li.product .price del,
    body.page-id-3062 ul.products li.product .price del {
        color: #999999;
        font-weight: 400;
        margin-right: 4px;
    }

    body.tax-product_cat ul.products li.product .button,
    body.page-id-3062 ul.products li.product .button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 8px 18px;
        border-radius: 999px;
        font-size: 13px;
        font-weight: 600;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        background: #111111;
        color: #ffffff;
        border: none;
        transition:
            background .2s ease,
            transform .2s ease,
            box-shadow .2s ease;
    }

    body.tax-product_cat ul.products li.product .button:hover,
    body.page-id-3062 ul.products li.product .button:hover {
        background: #000000;
        transform: translateY(-1px);
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
    }

    body.tax-product_cat ul.products li.product .onsale,
    body.page-id-3062 ul.products li.product .onsale {
        border-radius: 999px;
        padding: 4px 10px;
        font-size: 11px;
        font-weight: 600;
        background: #007aff;
    }
}

/* Arrow span added by JS */
.m-arrow {
    display: inline-block;
    margin-left: 8px;
    font-size: 18px;
    color: #1a73e8;
    transform: scale(1);
    transform-origin: center center;
    transition: transform .2s ease;
}

/* Hover scale for arrow */
.wc-block-product-categories-list li.has-children:hover .m-arrow {
    transform: scale(1.8);
}