/* Product Sync Pro frontend presentation.
   It never changes image files or product data. Single-product rules remain
   scoped to imported products; v1.50 covers only Home and Shop loop badges. */

/* Supplier tags remain assigned in WooCommerce but are not exposed in the
   product meta row. SKU, category and brand remain visible. */
body.single-product.pcs-imported-product .product_meta .tagged_as {
    display: none !important;
}

/* Match the existing A1Box in-stock pill even if the site-level custom CSS is
   temporarily unavailable. Existing site CSS may override these values. */
body.single-product.pcs-imported-product p.stock.in-stock.pcs-imported-stock-status {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 7px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: max-content !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 6px 0 14px !important;
    padding: 7px 12px !important;
    box-sizing: border-box !important;
    color: #008f45 !important;
    background: #eef9f3 !important;
    border: 1px solid #cdebd9 !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    text-align: left !important;
    letter-spacing: 0 !important;
}

body.single-product.pcs-imported-product p.stock.in-stock.pcs-imported-stock-status::before {
    content: "" !important;
    display: block !important;
    flex: 0 0 7px !important;
    width: 7px !important;
    height: 7px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #00a651 !important;
    border: 0 !important;
    border-radius: 50% !important;
    box-shadow: none !important;
}

/* Remove only redundant vertical spacing around BeTheme's top product block.
   Do not force image dimensions, crop, scale, transform or fixed heights. */
@media only screen and (min-width: 768px) {
    body.single-product.pcs-imported-product .product_wrapper {
        margin-bottom: 12px !important;
        padding-bottom: 0 !important;
    }

    body.single-product.pcs-imported-product .product_wrapper .product_image_wrapper,
    body.single-product.pcs-imported-product .product_wrapper .summary,
    body.single-product.pcs-imported-product .product_wrapper .entry-summary,
    body.single-product.pcs-imported-product .woocommerce-product-gallery {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
}

/* v1.44 — optional "Dostupno samo online" channel badge.
   It is presentation-only and appears only on the queried imported product. */
body.single-product.pcs-imported-product .pcs-stock-badges {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 6px 0 14px !important;
    padding: 0 !important;
}

body.single-product.pcs-imported-product .pcs-stock-badges p.stock {
    margin: 0 !important;
}

body.single-product.pcs-imported-product .pcs-online-only-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 7px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: max-content !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 7px 12px !important;
    box-sizing: border-box !important;
    color: #2271b1 !important;
    background: #eef5ff !important;
    border: 1px solid #c9def5 !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    text-align: left !important;
    letter-spacing: 0 !important;
}

body.single-product.pcs-imported-product .pcs-online-only-badge::before {
    content: "" !important;
    display: block !important;
    flex: 0 0 7px !important;
    width: 7px !important;
    height: 7px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #2271b1 !important;
    border: 0 !important;
    border-radius: 50% !important;
    box-shadow: none !important;
}
/* v1.46 — align stock + online-only badges exactly.
   The existing in-stock rule has higher specificity and may keep its own
   vertical margin inside the flex row, so override both pills together. */
body.single-product.pcs-imported-product .pcs-stock-badges p.stock.in-stock.pcs-imported-stock-status,
body.single-product.pcs-imported-product .pcs-stock-badges .pcs-online-only-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    align-self: center !important;
    box-sizing: border-box !important;
    min-height: 30px !important;
    height: 30px !important;
    margin: 0 !important;
    padding: 7px 12px !important;
    line-height: 1 !important;
    vertical-align: middle !important;
}

body.single-product.pcs-imported-product .pcs-stock-badges p.stock.in-stock.pcs-imported-stock-status::before,
body.single-product.pcs-imported-product .pcs-stock-badges .pcs-online-only-badge::before {
    align-self: center !important;
    margin: 0 !important;
}



/* v1.50 — Home uses the same fixed two-row geometry as Shop. */
body.home .shop_slider_ul li.product.pcs-online-only-card .mfn-product-badges::before {
    content: "Dostupno samo online" !important;
    display: inline-flex !important;
    flex: 0 0 auto !important;
    order: 99 !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    top: 30px !important;
    right: auto !important;
    bottom: auto !important;
    left: 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 24px !important;
    margin: 0 !important;
    padding: 3px 10px !important;
    box-sizing: border-box !important;
    border: 0 !important;
    border-radius: 5px !important;
    background: #2271b1 !important;
    color: #fff !important;
    box-shadow: none !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 18px !important;
    text-align: center !important;
    white-space: nowrap !important;
    pointer-events: none !important;
}

body.home .shop_slider_ul li.product.pcs-online-only-card.pcs-online-only-lang-en .mfn-product-badges::before {
    content: "Available online only" !important;
}

body.home .shop_slider_ul li.product.pcs-online-only-card.pcs-online-only-lang-de .mfn-product-badges::before {
    content: "Nur online verfügbar" !important;
}

/* Shop archive: keep the proven v1.48 image-row marker, but use one fixed
   second row for every imported card. A1Box puts NOVO / Artikal u dolasku at
   top:15px with a 24px height, so top:45px gives a consistent 6px gap. */
body.woocommerce-shop
.products_wrapper.mfn-woo-products > ul.products > li.product.pcs-online-only-shop-product
> .mfn-li-product-row-image {
    position: relative !important;
}

body.woocommerce-shop
.products_wrapper.mfn-woo-products > ul.products > li.product.pcs-online-only-shop-product
> .mfn-li-product-row-image::after {
    content: "Dostupno samo online" !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    top: 45px !important;
    right: auto !important;
    bottom: auto !important;
    left: 8px !important;
    z-index: 160 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 16px) !important;
    height: 24px !important;
    margin: 0 !important;
    padding: 3px 10px !important;
    box-sizing: border-box !important;
    border: 0 !important;
    border-radius: 5px !important;
    box-shadow: none !important;
    color: #ffffff !important;
    background: #2271b1 !important;
    font-family: inherit !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    font-style: normal !important;
    line-height: 18px !important;
    text-align: center !important;
    white-space: nowrap !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: none !important;
}

body.woocommerce-shop
.products_wrapper.mfn-woo-products > ul.products > li.product.pcs-online-only-shop-product.pcs-online-only-lang-en
> .mfn-li-product-row-image::after {
    content: "Available online only" !important;
}

body.woocommerce-shop
.products_wrapper.mfn-woo-products > ul.products > li.product.pcs-online-only-shop-product.pcs-online-only-lang-de
> .mfn-li-product-row-image::after {
    content: "Nur online verfügbar" !important;
}

/* On narrow Shop layouts A1Box itself moves "Artikal u dolasku" to the
   second row when NOVO is also present. Only in that case move our marker to
   the third row, avoiding overlap while desktop badges remain fully aligned. */
@media only screen and (max-width: 767px),
       only screen and (orientation: landscape) and (max-width: 950px) and (max-height: 500px) {
    body.woocommerce-shop
    .products_wrapper.mfn-woo-products > ul.products > li.product.pcs-online-only-shop-product.outofstock:has(.mfn-product-badges .mfn-new-badge)
    > .mfn-li-product-row-image::after,
    body.woocommerce-shop
    .products_wrapper.mfn-woo-products > ul.products > li.product.pcs-online-only-shop-product.outofstock:has(.mfn-product-badges .onsale)
    > .mfn-li-product-row-image::after {
        top: 75px !important;
    }
}
