/**
 * AlanDog - Shop/Category Grid Enhancements
 * Sprint 2: Product cards, price/kg, badges, empty state
 *
 * Design system:
 *   --alandog-green:  #085d91 (azure blue, primary — FIX-UI-69: was #085d91, 2.99:1→4.60:1)
 *   --alandog-cta:    #963B1A (CTA orange)
 *   --alandog-gold:   #F4A261 (accent)
 *   --alandog-text:   #1F2937
 *   --alandog-muted:  #495260 (FIX-UI-76: was #495260, 4.39:1→5.14:1 on #F3F4F6)
 *   --alandog-bg:     #F9FAFB
 */

/* ============================================================
   CSS Variables (scoped to shop pages)
   ============================================================ */
:root {
    --alandog-green: #085d91; /* FIX-UI-69: was #085d91 */
    --alandog-cta: #963B1A;
    --alandog-gold: #F4A261;
    --alandog-text: #1F2937;
    --alandog-muted: #495260; /* FIX-UI-76: was #495260, 4.39:1→5.14:1 on #F3F4F6 */
    --alandog-bg: #F9FAFB;
    --alandog-border: #E5E7EB;
    --alandog-success: #035d43; /* FIX-UI-76: was #035d43, 3.76:1→5.66:1 with white */
    --alandog-warning: #B45309;
    --alandog-danger: #a61d1d;
}

/* ============================================================
   a) Price per kg
   ============================================================ */
.alandog-price-per-kg {
    display: block;
    font-size: 11px;
    line-height: 1.3;
    color: var(--alandog-muted);
    font-weight: 400;
    margin-top: 2px;
    margin-bottom: 4px;
    letter-spacing: 0.01em;
}

.alandog-price-per-kg .woocommerce-Price-amount {
    font-size: inherit;
    color: inherit;
    font-weight: 500;
}

.alandog-price-per-kg .woocommerce-Price-amount bdi,
.alandog-sub-amount .woocommerce-Price-amount bdi,
.woocommerce ul.products li.product .mf-product-price-box > .price .woocommerce-Price-amount bdi,
.woocommerce ul.products li.product .mf-product-price-box > .price .woocommerce-Price-amount,
.woocommerce ul.products li.product .mf-product-price-box > .alandog-price-per-kg .woocommerce-Price-amount,
.woocommerce ul.products li.product .alandog-sub-amount .woocommerce-Price-amount {
    font-size: inherit !important;
    line-height: inherit;
    color: inherit !important;
    font-weight: inherit;
}

/* ============================================================
   b) Badge system (overlay on product image)
   ============================================================ */
.alandog-shop-badge {
    position: absolute;
    z-index: 4;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    line-height: 1.4;
    pointer-events: none;
    white-space: nowrap;
}

/* Free shipping badge — top-left */
.alandog-shop-badge-free-shipping {
    top: 8px;
    left: auto;
    right: 8px;
    background: var(--alandog-green);
    color: #fff;
    max-width: calc(100% - 64px);
    text-align: center;
}

/* Low stock badge — top-right */
.alandog-shop-badge-low-stock {
    top: 8px;
    right: 8px;
    background: var(--alandog-warning);
    color: #fff;
}

/* Adjust WC sale badge position if our badges are present */
.woocommerce ul.products li.product .product-inner .onsale {
    top: auto;
    bottom: 8px;
    left: 8px;
    right: auto;
}

/* ============================================================
   c) Product grid responsive
   ============================================================ */

/* Desktop: 4 columns */
@media (min-width: 1200px) {
    .woocommerce ul.products.columns-4 li.product {
        width: 23.5%;
        margin-right: 2%;
    }
    .woocommerce ul.products.columns-4 li.product:nth-child(4n) {
        margin-right: 0;
    }
}

/* Tablet: 3 columns */
@media (min-width: 768px) and (max-width: 1199px) {
    .woocommerce ul.products li.product {
        width: 31.33%;
        margin-right: 3%;
    }
    .woocommerce ul.products li.product:nth-child(3n) {
        margin-right: 0;
    }
}

/* Mobile: 2 columns */
@media (max-width: 767px) {
    .woocommerce ul.products li.product {
        width: 48%;
        margin-right: 4%;
    }
    .woocommerce ul.products li.product:nth-child(2n) {
        margin-right: 0;
    }

    /* Smaller badges on mobile */
    .alandog-shop-badge {
        font-size: 9px;
        padding: 2px 6px;
    }

    .alandog-price-per-kg {
        font-size: 10px;
    }
}

/* ============================================================
   d) Empty state (no products found)
   ============================================================ */
.alandog-empty-state {
    text-align: center;
    padding: 60px 20px;
    max-width: 540px;
    margin: 0 auto;
}

.alandog-empty-state__icon {
    margin-bottom: 20px;
}

.alandog-empty-state__icon svg {
    display: inline-block;
}

.alandog-empty-state__title {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--alandog-text);
    margin: 0 0 12px;
}

.alandog-empty-state__text {
    font-size: 15px;
    color: var(--alandog-muted);
    line-height: 1.6;
    margin: 0 0 24px;
}

.alandog-empty-state__suggestions {
    text-align: left;
    background: var(--alandog-bg);
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 28px;
}

.alandog-empty-state__suggestions h3 {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--alandog-text);
    margin: 0 0 10px;
}

.alandog-empty-state__suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.alandog-empty-state__suggestions li {
    font-size: 14px;
    color: var(--alandog-muted);
    line-height: 1.7;
    padding-left: 18px;
    position: relative;
}

.alandog-empty-state__suggestions li::before {
    content: '\2022';
    color: var(--alandog-green);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.alandog-empty-state__cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.alandog-empty-state__cta-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--alandog-text);
}

.alandog-empty-state__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.alandog-empty-state__link {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--alandog-border);
    color: var(--alandog-text);
    background: #fff;
}

.alandog-empty-state__link:hover {
    border-color: var(--alandog-green);
    color: var(--alandog-green);
    box-shadow: 0 2px 8px rgba(18, 156, 237, 0.12);
}

.alandog-empty-state__link--piucane:hover {
    border-color: var(--alandog-green);
    color: var(--alandog-green);
}

.alandog-empty-state__link--piugatto:hover {
    border-color: #7C3AED;
    color: #7C3AED;
}

.alandog-empty-state__link--extreme:hover {
    border-color: var(--alandog-danger);
    color: var(--alandog-danger);
}

.alandog-empty-state__link--shop {
    background: var(--alandog-green);
    color: #fff;
    border-color: var(--alandog-green);
}

.alandog-empty-state__link--shop:hover {
    background: #0A6DB0;
    color: #fff;
    border-color: #0A6DB0;
}

/* Mobile empty state */
@media (max-width: 767px) {
    .alandog-empty-state {
        padding: 40px 16px;
    }

    .alandog-empty-state__title {
        font-size: 18px;
    }

    .alandog-empty-state__text {
        font-size: 14px;
    }

    .alandog-empty-state__links {
        flex-direction: column;
        align-items: stretch;
    }

    .alandog-empty-state__link {
        text-align: center;
    }
}

/* ============================================================
   e) Visual ordering: price-per-kg before footer-button
   ============================================================ */
.woocommerce ul.products li.product .mf-product-price-box {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%; /* FIX-CAT-3: force full-width — flex container was collapsing to 0 */
}

.woocommerce ul.products li.product .mf-product-price-box .price {
    display: block;
    width: 100%;
    order: 1;
}

.woocommerce ul.products li.product .mf-product-price-box .alandog-price-per-kg {
    width: 100%;
    order: 2;
}

.woocommerce ul.products li.product .mf-product-price-box .footer-button {
    width: 100%;
    order: 3;
}

/* ============================================================
   f) Product card image container — ensure relative positioning
      for badge overlays
   ============================================================ */
.woocommerce ul.products li.product .mf-product-thumbnail,
.woocommerce ul.products li.product .product-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* FIX-UI-103: Square product images for consistent grid */
.woocommerce ul.products li.product .mf-product-thumbnail a,
.woocommerce ul.products li.product .product-thumbnail a {
    display: flex;
    align-items: center !important;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.woocommerce ul.products li.product .mf-product-thumbnail a img,
.woocommerce ul.products li.product .product-thumbnail a img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0;
}

.woocommerce ul.products li.product .mf-product-thumbnail a img:not(.alandog-secondary-img),
.woocommerce ul.products li.product .product-thumbnail a img:not(.alandog-secondary-img) {
    transform: scale(1.26);
    transform-origin: center center;
    transition: transform 0.25s ease;
    object-position: center center;
    mix-blend-mode: multiply;
    filter: contrast(1.02) saturate(1.01);
}

.woocommerce ul.products li.product .mf-product-thumbnail-grey {
    display: none;
}

/* ============================================================
   f) Ensure badges stack correctly with existing sale badge
   ============================================================ */
.woocommerce ul.products li.product .alandog-shop-badge-free-shipping + .onsale,
.woocommerce ul.products li.product .onsale {
    z-index: 3;
}

/* ============================================================
   g) CARD REDESIGN — FIX-CARD-* (match target design)
   ============================================================ */

/* --- Discount percentage badge --- */
.alandog-discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--alandog-danger, #a61d1d);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 4px;
    z-index: 5;
    line-height: 1.2;
}

/* Hide WooCommerce default onsale badge (we use discount % instead) */
.woocommerce ul.products li.product .onsale {
    display: none !important;
}

/* --- Variant count tag --- */
.alandog-variant-count {
    display: inline-block;
    font-size: 11px;
    color: var(--alandog-muted, #495260);
    background: #F3F4F6;
    padding: 2px 8px;
    border-radius: 3px;
    margin-top: 4px;
    line-height: 1.3;
}

/* --- Subscription price line --- */
.alandog-sub-price {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 8px;
    margin-top: 0;
    font-size: 12px;
    line-height: 1.25;
    width: 100%;
    padding: 8px 10px;
    background: #f8fbf9;
    border: 1px solid #deebe2;
    border-radius: 10px;
    margin: 0;
}
.alandog-sub-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 0;
}
.alandog-sub-label {
    color: #4f675a;
    width: auto;
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-transform: none;
    font-weight: 700;
}
.alandog-sub-amount {
    color: #035d43;
    font-size: 17px !important;
    line-height: 1;
    font-weight: 800;
}
.alandog-sub-amount .woocommerce-Price-amount {
    font-size: inherit !important;
    color: inherit;
    font-weight: inherit;
}
.alandog-sub-pct {
    background: #e6f5ea;
    border: 1px solid #c9e5d2;
    color: #035d43;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 999px;
    line-height: 1.2;
    white-space: nowrap;
    align-self: center;
}

/* Keep recurring offer secondary, not louder than the main price */
.alandog-sub-price:hover {
    background: #f4faf6;
}

/* --- Quantity + Add to Cart --- */
.alandog-loop-qty-atc {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px 10px;
    width: 100%;
}
.alandog-qty-wrap {
    display: flex;
    align-items: center;
    border: 1px solid var(--alandog-border, #E5E7EB);
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}
.alandog-qty-btn {
    width: 26px;
    height: 32px;
    border: none;
    background: #F9FAFB;
    color: var(--alandog-text, #1F2937);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    padding: 0;
    line-height: 1;
}
.alandog-qty-btn:hover {
    background: #E5E7EB;
}
.alandog-qty-input {
    width: 28px;
    height: 32px;
    border: none;
    border-left: 1px solid var(--alandog-border, #E5E7EB);
    border-right: 1px solid var(--alandog-border, #E5E7EB);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--alandog-text, #1F2937);
    -moz-appearance: textfield;
    appearance: textfield;
    padding: 0;
    background: #fff;
}
.alandog-qty-input::-webkit-inner-spin-button,
.alandog-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.alandog-atc-btn {
    flex: 1;
    min-width: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 32px;
    background: var(--alandog-cta, #963B1A) !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 700;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    padding: 0 12px !important;
    line-height: 34px !important;
    white-space: nowrap;
}
.alandog-atc-btn:hover {
    background: #a8432a !important;
    transform: translateY(-1px);
}
.alandog-atc-btn.alandog-select-opts {
    width: 100%;
    background: #fff !important;
    color: var(--alandog-cta, #963B1A) !important;
    border: 2px solid var(--alandog-cta, #963B1A) !important;
}
.alandog-atc-btn.alandog-select-opts:hover {
    background: var(--alandog-cta, #963B1A) !important;
    color: #fff !important;
}

/* --- Hide elements replaced by redesign --- */
/* FIX-UI-103: Un-hide brand name — key for product scannability and PiùCane brand awareness */
.woocommerce ul.products li.product .alandog-loop-brand {
    display: block !important; /* !important: overrides prior display:none rule */
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #065282; /* FIX-UI-121: was #0E7BBA (4.6:1 AAA fail) → #065282 = 7.8:1 on white (AAA pass) */
    margin-bottom: 2px;
    order: 0;
}
/* FIX-UI-107+121: Brand name link — 24px target-size + AAA contrast */
.woocommerce ul.products li.product .alandog-loop-brand a {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    line-height: 24px;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 1;
}
.woocommerce ul.products li.product .alandog-wishlist-btn {
    display: none !important;
}
/* Price-per-kg: keep hidden — shop-enhancements.php outputs its own version */
.woocommerce ul.products li.product .alandog-price-per-kg {
    display: none !important;
}
/* Hide old acquisto-periodico label inside price tag (replaced by .alandog-sub-price) */
.woocommerce ul.products li.product .acquisto-periodico-label {
    display: none !important;
}
/* Hide old footer-button (replaced by .alandog-loop-qty-atc) */
.woocommerce ul.products li.product .mf-product-price-box .footer-button {
    display: none !important;
}

/* --- Flex layout on details container to control visual order --- */
.woocommerce ul.products li.product .mf-product-details {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
.woocommerce ul.products li.product .mf-product-content {
    order: 1;
    padding: 12px 14px 0;
}
.woocommerce ul.products li.product .mf-product-price-box {
    order: 2;
}
.woocommerce ul.products li.product .alandog-sub-price {
    order: 3;
}
.woocommerce ul.products li.product .alandog-loop-qty-atc {
    order: 4;
}
.woocommerce ul.products li.product .alandog-card-trust {
    order: 5;
}

/* --- FIX-UI-105: Delivery estimate trust signal on product cards --- */
.alandog-card-trust {
    padding: 4px 12px 8px;
    order: 5;
}
.alandog-card-trust__delivery {
    font-size: 11px;
    color: #035d43; /* FIX-UI-121: AAA contrast — was #047857 (5.23:1) → #035d43 (7.0:1) on #f0fdf4 */
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.alandog-card-trust__delivery::before {
    content: '\1F4E6';
    font-size: 12px;
}

/* --- Price styling adjustments --- */
.woocommerce ul.products li.product .mf-product-price-box .price {
    font-size: 20px !important;
    line-height: 1.05;
    margin: 0;
}
.woocommerce ul.products li.product .mf-product-price-box .price ins {
    display: block;
    font-weight: 800;
    text-decoration: none;
    color: var(--alandog-green, #085d91);
    font-size: 20px;
}
.woocommerce ul.products li.product .mf-product-price-box .price ins .woocommerce-Price-amount {
    font-size: 20px;
    color: var(--alandog-green, #085d91);
}
.woocommerce ul.products li.product .mf-product-price-box .price del {
    display: block;
    font-size: 13px !important;
    color: var(--alandog-muted, #495260) !important;
    font-weight: 400;
    margin-left: 0;
    opacity: 1 !important;
}
.woocommerce ul.products li.product .mf-product-price-box .price del bdi,
.woocommerce ul.products li.product .mf-product-price-box .price del span {
    font-size: inherit !important;
    color: inherit !important;
    display: inline !important;
}
.woocommerce ul.products li.product .mf-product-price-box .price a {
    text-decoration: none;
    color: inherit;
}

.woocommerce ul.products li.product .mf-product-price-box .alandog-var-label {
    display: none !important;
}

.woocommerce ul.products li.product .woocommerce-product-details__short-description {
    display: none !important;
}

.woocommerce ul.products li.product .product-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.woocommerce ul.products li.product .alandog-social-badges {
    padding: 10px 14px 0;
    margin: 0;
}

.woocommerce ul.products li.product .mf-product-content h2,
.woocommerce ul.products li.product .mf-product-content .woocommerce-loop-product__title {
    display: block;
    margin: 0;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--alandog-text, #1F2937);
}

.woocommerce ul.products li.product .mf-product-content h2 a,
.woocommerce ul.products li.product .mf-product-content .woocommerce-loop-product__title a {
    color: inherit;
    text-decoration: none;
}

.woocommerce ul.products li.product .alandog-variant-count {
    margin-top: 6px;
}

.woocommerce ul.products li.product .mf-rating {
    margin: 6px 0 0;
}

.woocommerce ul.products li.product .mf-product-price-box {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 6px;
    width: 100%;
    margin-top: auto;
    padding: 12px 14px 0 !important;
}

.woocommerce ul.products li.product .mf-product-price-box > .price {
    order: 1;
}

.woocommerce ul.products li.product .mf-product-price-box > .alandog-price-per-kg {
    order: 2;
    margin: 0;
    font-size: 11px;
    line-height: 1.35;
    display: inline-flex !important;
    align-items: baseline;
    gap: 2px;
    color: var(--alandog-muted, #495260);
}

.woocommerce ul.products li.product .mf-product-price-box > .alandog-sub-price {
    order: 3;
}

.woocommerce ul.products li.product .mf-product-price-box > .footer-button {
    order: 4;
}

.woocommerce ul.products li.product .mf-product-price-box > .alandog-loop-qty-atc,
.woocommerce ul.products li.product .mf-product-details > .alandog-loop-qty-atc {
    order: 4;
}

.woocommerce ul.products li.product .alandog-loop-qty-atc {
    margin-top: 6px;
    padding: 8px 0 0;
    border-top: 1px solid #eef2f7;
}

/* --- Mobile adjustments --- */
@media screen and (max-width: 767px) {
    .alandog-loop-qty-atc {
        padding: 8px 0 0;
        gap: 4px;
    }
    .alandog-qty-btn {
        width: 26px;
        height: 30px;
        font-size: 14px;
    }
    .alandog-qty-input {
        width: 28px;
        height: 30px;
        font-size: 12px;
    }
    .alandog-atc-btn {
        height: 30px;
        font-size: 12px !important;
        padding: 0 8px !important;
        line-height: 30px !important;
    }
    .alandog-discount-badge {
        font-size: 10px;
        padding: 2px 5px;
    }
    .alandog-sub-price {
        font-size: 11px;
        padding: 6px 8px;
        margin: 0;
    }
    /* FIX-UI-150: Hide qty selector on mobile cards — reduces card height ~40px */
    .alandog-loop-qty-atc .alandog-qty-btn,
    .alandog-loop-qty-atc .alandog-qty-input {
        display: none;
    }
    .alandog-loop-qty-atc {
        padding: 4px 8px;
    }
    .alandog-atc-btn {
        width: 100% !important; /* !important: overrides inline width */
    }

    /* FIX-UI-104: Collapse SEO intro text on mobile — saves ~170px above products */
    .autooptimize-shop-intro {
        max-height: 60px !important; /* !important: overrides inline style */
        overflow: hidden !important;
        position: relative;
        margin-bottom: 12px !important;
        padding: 10px 14px !important;
        font-size: 13px !important;
    }
    .autooptimize-shop-intro::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 30px;
        background: linear-gradient(transparent, #f8f9fa);
        pointer-events: none;
    }
    /* FIX-UI-104: Horizontal scroll for subcategory tiles on mobile — saves ~250px */
    .woocommerce-products-header > div:last-child > ul,
    #container-subcategory {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        padding-bottom: 8px;
        scrollbar-width: none;
    }
    .woocommerce-products-header > div:last-child > ul::-webkit-scrollbar,
    #container-subcategory::-webkit-scrollbar {
        display: none;
    }
    .woocommerce-products-header > div:last-child > ul > li,
    #container-subcategory li.sub-category {
        flex: 0 0 auto;
        width: 80px;
    }
    /* FIX-UI-133: Hide shipping badge on mobile — delivery info shown in card footer */
    .alandog-shop-badge-free-shipping {
        display: none;
    }
}

/* CENSUS FIX: Product title overflow — truncate to 2 lines on ALL viewports */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2.woocommerce-loop-product__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    max-height: calc(1.3em * 2);
    line-height: 1.3;
}

/* FIX-UI-132: Mobile product card text readability */
@media screen and (max-width: 767px) {
    /* Title: 13px for readability, line-clamp inherited from above */
    .woocommerce ul.products li.product .woocommerce-loop-product__title,
    .woocommerce ul.products li.product h2.woocommerce-loop-product__title,
    .woocommerce ul.products li.product .mf-product-content h2 {
        font-size: 14px;
        line-height: 1.35;
        max-height: calc(1.35em * 2);
    }
    /* Price: more prominent */
    .woocommerce ul.products li.product .mf-product-price-box .price {
        font-size: 18px;
    }
    .woocommerce ul.products li.product .mf-product-price-box .price ins {
        font-size: 18px;
        font-weight: 800;
    }
    /* Brand name: slightly larger for scannability */
    .woocommerce ul.products li.product .alandog-loop-brand {
        font-size: 11px;
        letter-spacing: 0.04em;
        margin-bottom: 4px;
    }
    /* Delivery text: compact on mobile */
    .alandog-card-trust {
        padding: 2px 14px 10px;
    }
    .alandog-card-trust__delivery {
        font-size: 10px;
    }

    .woocommerce ul.products li.product .mf-product-thumbnail {
        aspect-ratio: 1 / 1;
    }

    .woocommerce ul.products li.product .mf-product-thumbnail a img:not(.alandog-secondary-img) {
        padding: 0;
        transform: scale(1.34);
    }

    .woocommerce ul.products li.product .alandog-social-badges {
        padding: 8px 14px 0;
    }

    .woocommerce ul.products li.product .mf-product-content {
        padding: 10px 14px 0;
    }

    .woocommerce ul.products li.product .mf-product-price-box {
        padding: 10px 14px 0 !important;
        gap: 5px;
    }

    .woocommerce ul.products li.product .mf-product-price-box > .alandog-price-per-kg {
        font-size: 10px;
    }

    .woocommerce ul.products li.product .alandog-sub-label {
        font-size: 9px;
    }

    .woocommerce ul.products li.product .alandog-sub-amount {
        font-size: 15px !important;
    }

    .woocommerce ul.products li.product .alandog-sub-pct {
        font-size: 9px;
        padding: 2px 6px;
    }
}

/* FIX-UI-136: ATC button AJAX feedback animation */
.alandog-atc-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}
.alandog-atc-btn.loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: alandog-btn-spin 0.6s linear infinite;
    margin-left: 6px;
    vertical-align: middle;
}
@keyframes alandog-btn-spin {
    to { transform: rotate(360deg); }
}
.alandog-atc-btn.added {
    background: #035d43 !important; /* !important: overrides var(--alandog-cta) temporarily */
}
.alandog-atc-btn.added::before {
    content: '✓ ';
}

/* ============================================================
   UX GAP #5: Category-specific promo banner (Acquisto Periodico)
   ============================================================ */
.alandog-category-promo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #2D6A4F 0%, #1B4332 100%);
    border-radius: 12px;
    padding: 20px 28px;
    margin-bottom: 24px;
    color: #fff;
    gap: 20px;
    position: relative;
}
.alandog-category-promo__content h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #fff; /* AAA: white on #2D6A4F = 8.14:1 */
}
.alandog-category-promo__content p {
    font-size: 14px;
    margin: 0;
    opacity: 0.9;
}
.alandog-category-promo__cta {
    display: inline-block;
    padding: 12px 28px;
    background: #963B1A;
    color: #fff;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}
.alandog-category-promo__cta:hover {
    background: #a8432a;
    color: #fff;
}
.alandog-category-promo__close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}
.alandog-category-promo__close:hover {
    color: #fff;
}
@media (max-width: 767px) {
    .alandog-category-promo {
        flex-direction: column;
        text-align: center;
        padding: 16px 20px;
    }
    .alandog-category-promo__content h3 { font-size: 16px; }
    .alandog-category-promo__content p { font-size: 13px; }
}

/* FIX-UI-145: Bestseller/Nuovo badges — CSS was lost from earlier agent copy */
.alandog-social-badges {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 4px;
}
.alandog-social-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    width: fit-content;
}
.alandog-social-badge--bestseller {
    background: #F4A261;
    color: #1F2937;
}
.alandog-social-badge--new {
    background: #035d43;
    color: #fff;
}
@media (max-width: 767px) {
    .alandog-social-badge {
        font-size: 9px;
        padding: 2px 6px;
    }
}

/* ============================================================
   UX GAP #2: Load More AJAX Pagination
   ============================================================ */
.alandog-load-more-wrap {
    text-align: center;
    padding: 32px 0 8px;
    clear: both;
}
.alandog-load-progress {
    font-size: 14px;
    color: #495260;
    margin-bottom: 16px;
}
.alandog-load-progress strong {
    color: #1F2937;
}
.alandog-load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 48px;
    background: #fff;
    border: 2px solid #035d43;
    border-radius: 8px;
    color: #035d43;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
    text-decoration: none;
    min-height: 48px;
    line-height: 1.4;
}
.alandog-load-more-btn:hover {
    background: #035d43;
    color: #fff;
    text-decoration: none;
}
.alandog-load-more-btn:focus-visible {
    outline: 2px solid #035d43;
    outline-offset: 2px;
}
.alandog-load-more-btn.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}
.alandog-load-more-btn.loading::after {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: alandog-spin 0.6s linear infinite;
    margin-left: 8px;
}
@keyframes alandog-spin {
    to { transform: rotate(360deg); }
}
.alandog-load-more-btn.done {
    border-color: #d1d5db;
    color: #6b7280;
    cursor: default;
    pointer-events: none;
}
@media (max-width: 767px) {
    .alandog-load-more-btn {
        width: 100%;
        padding: 14px 24px;
    }
    .alandog-load-more-wrap {
        padding: 24px 16px 8px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   CONVERSION EXPERIENCE UPGRADES — 2026-03-22
   Reference: conversion-focused listing patterns
   ═══════════════════════════════════════════════════════════════════ */

/* ── FIX 1: Filter Chips Styling ──────────────────────────────────
   PHP in filter-chips.php outputs .alandog-filter-chip but ZERO CSS existed.
   benchmark pattern: pill-shaped removable chips above product grid. */
.alandog-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}
.alandog-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f0fdf4;
    border: 1px solid #2D6A4F;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #2D6A4F;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}
.alandog-filter-chip:hover {
    background: #2D6A4F;
    color: #fff;
}
.alandog-filter-chip::after {
    content: "✕";
    font-size: 11px;
    font-weight: 700;
    opacity: 0.6;
}
.alandog-filter-chip:hover::after {
    opacity: 1;
}
.alandog-clear-all-filters {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 13px;
    color: #E76F51;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s;
}
.alandog-clear-all-filters:hover {
    color: #c45a3f;
}

/* FIX 2: Un-hide Price/kg — override the display:none in card redesign section.
   Font/color already defined in section (a) above. Only !important display override needed. */
.woocommerce ul.products li.product .mf-product-price-box .alandog-price-per-kg {
    display: block !important;
}

/* ── FIX 3: Enhanced Card Spacing ─────────────────────────────────
   Current padding too cramped (10-12px). the reference pattern uses generous whitespace
   with clear visual hierarchy between price and ATC. */
.woocommerce ul.products li.product .product-inner .mf-product-price-box,
.product_loop-no-hover ul.products li.product .product-inner .mf-product-price-box {
    display: flex !important;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
}
.woocommerce ul.products li.product .mf-product-price-box {
    padding: 12px 16px 0 !important;
}
.woocommerce ul.products li.product .mf-product-price-box .price {
    margin-bottom: 2px;
}
.woocommerce ul.products li.product .alandog-loop-qty-atc {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
}

/* ── FIX 5: Product Card Hover — Secondary Image Reveal ───────────
   the reference pattern shows product from different angle on hover.
   Pure CSS cross-fade between first and second gallery image. */
.woocommerce ul.products li.product .mf-product-thumbnail {
    position: relative;
    overflow: hidden;
}
.woocommerce ul.products li.product .mf-product-thumbnail img.alandog-secondary-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.woocommerce ul.products li.product:hover .mf-product-thumbnail img.alandog-secondary-img {
    opacity: 1;
}

/* ── FIX-UI-201: Results Count + Sort Dropdown (benchmark §4.1) ──────
   Reference pattern: clean toolbar with results count left and sort control right.
   Better typography and spacing for clarity. */
.woocommerce-result-count {
    font-size: 14px;
    color: var(--alandog-muted, #495260);
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0;
}
.woocommerce-ordering select {
    font-size: 14px;
    font-weight: 500;
    color: var(--alandog-text, #1F2937);
    border: 1.5px solid var(--alandog-border, #E5E7EB);
    border-radius: 8px;
    padding: 8px 32px 8px 12px;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23495260' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}
.woocommerce-ordering select:focus {
    border-color: var(--alandog-green, #085d91);
    outline: none;
    box-shadow: 0 0 0 3px rgba(8, 93, 145, 0.12);
}

/* ── FIX-UI-197: Product Card Hover Shadow + Border (benchmark §4.3) ──
   Subtle elevation on hover for depth/interactivity feedback.
   the reference pattern uses thin border + lift shadow — no dramatic animation. */
.woocommerce ul.products li.product .product-inner {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    background: #fff;
}
.woocommerce ul.products li.product .product-inner:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
    transform: translateY(-2px);
}
/* Mobile: active state for touch feedback (no hover on touch devices) */
@media (hover: none) {
    .woocommerce ul.products li.product .product-inner:active {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
        transform: scale(0.98);
    }
}

/* ── FIX-UI-196: Sticky Filter Sidebar (benchmark §4.2) ─────────────
   Desktop: sidebar scrolls independently from product grid.
   Prevents user from losing filter context on long category pages. */
@media (min-width: 992px) {
    .catalog-sidebar,
    .shop-sidebar,
    .sidebar-content .catalog-sidebar,
    .content-sidebar .catalog-sidebar {
        position: sticky;
        top: 80px;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: #d1d5db transparent;
    }
    .catalog-sidebar::-webkit-scrollbar {
        width: 4px;
    }
    .catalog-sidebar::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 2px;
    }

    /* FIX-PDP-SHOP2: Scroll fade indicator — shows more filters below */
    .catalog-sidebar::after,
    .shop-sidebar::after {
        content: '';
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        display: block;
        height: 32px;
        background: linear-gradient(to bottom, transparent, #fff);
        pointer-events: none;
        margin-top: -32px;
    }
}


/* ── FIX-PDP-SHOP2: Filter widget headings (benchmark §4.2 accordion) ──
   Clean typography for sidebar filter groups. */
@media (min-width: 992px) {
    .catalog-sidebar .widget-title,
    .shop-sidebar .widget-title {
        font-size: 14px;
        font-weight: 700;
        color: var(--alandog-text, #1F2937);
        text-transform: none;
        letter-spacing: 0;
        padding-bottom: 8px;
        margin-bottom: 12px;
        border-bottom: 1px solid var(--alandog-border, #E5E7EB);
    }
    /* Filter checkbox labels: readable size, proper spacing */
    .catalog-sidebar .widget ul li,
    .shop-sidebar .widget ul li {
        padding: 4px 0;
        font-size: 13px;
        color: var(--alandog-text, #1F2937);
    }
    .catalog-sidebar .widget ul li a,
    .shop-sidebar .widget ul li a {
        color: var(--alandog-text, #1F2937);
        text-decoration: none;
        transition: color 0.15s;
    }
    .catalog-sidebar .widget ul li a:hover,
    .shop-sidebar .widget ul li a:hover {
        color: var(--alandog-green, #085d91);
    }
    /* Filter count — muted, right-aligned */
    .catalog-sidebar .widget ul li .count,
    .shop-sidebar .widget ul li .count {
        float: right;
        color: var(--alandog-muted, #495260);
        font-size: 12px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   FIX-SHOP-02: Star Rating Polish (UX Gap 8, shop cards)
   the reference pattern shows prominent gold stars + "(N)" count on every card.
   The mf-rating is output by autooptimize_rating_with_count()
   but needs polished styling for visual consistency.
   ═══════════════════════════════════════════════════════════════════ */
.woocommerce ul.products li.product .mf-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 4px 0 2px;
    line-height: 1;
}
.woocommerce ul.products li.product .mf-rating .icon-star {
    font-size: 13px;
    color: #d1d5db; /* empty star */
    transition: color 0.15s;
}
.woocommerce ul.products li.product .mf-rating .icon-star[style*="color"] {
    /* filled star — inline style from PHP, but ensure consistency */
    color: #f59e0b !important; /* accent gold */
}
.woocommerce ul.products li.product .mf-rating .mf-rating-count {
    font-size: 11px;
    font-weight: 500;
    color: var(--alandog-muted, #495260);
    margin-left: 3px;
}
/* Products with zero reviews — show subtle "no reviews" state */
.woocommerce ul.products li.product .star-rating {
    font-size: 13px;
    color: #f59e0b;
    margin: 4px 0 2px;
}
@media (max-width: 767px) {
    .woocommerce ul.products li.product .mf-rating .icon-star {
        font-size: 11px;
    }
    .woocommerce ul.products li.product .mf-rating .mf-rating-count {
        font-size: 10px;
    }
}


/* ═══════════════════════════════════════════════════════════════════
   FIX-SHOP-03: Mobile Shop Grid Optimization (benchmark reference)
   Better tap targets, card breathing room, ATC visibility, and
   overall mobile-first polish for 60%+ mobile traffic.
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
    /* Card gap: slightly more breathing room */
    .woocommerce ul.products li.product {
        margin-bottom: 16px !important;
    }

    /* Product card border radius on mobile */
    .woocommerce ul.products li.product .product-inner {
        border-radius: 12px;
    }

    /* Image container: ensure aspect ratio and padding */
    .woocommerce ul.products li.product .mf-product-thumbnail {
        border-radius: 12px 12px 0 0;
    }
    .woocommerce ul.products li.product .mf-product-thumbnail a img {
        padding: 0;
    }

    /* Details padding: compact but not cramped */
    .woocommerce ul.products li.product .mf-product-details {
        padding: 0 0 6px;
    }
    .woocommerce ul.products li.product .mf-product-content {
        padding: 10px 14px 0;
    }

    /* Price box: compact but structured on mobile */
    .woocommerce ul.products li.product .mf-product-price-box {
        padding: 10px 14px 0 !important;
    }

    /* ATC button: full-width, prominent on mobile */
    .woocommerce ul.products li.product .alandog-loop-qty-atc .alandog-atc-btn {
        min-height: 36px;
        font-size: 13px !important;
        border-radius: 6px !important;
        font-weight: 700;
    }

    /* Variant count badge: compact */
    .woocommerce ul.products li.product .alandog-variant-count {
        font-size: 10px;
        padding: 1px 6px;
    }

    /* Social badges: compact */
    .woocommerce ul.products li.product .alandog-social-badge {
        font-size: 9px;
        padding: 2px 6px;
    }
}

/* Small mobile (<=480px): 2 columns tighter */
@media (max-width: 480px) {
    .woocommerce ul.products li.product {
        width: 48% !important;
        margin-right: 4% !important;
    }
    .woocommerce ul.products li.product:nth-child(2n) {
        margin-right: 0 !important;
    }
    /* Tighter image padding */
    .woocommerce ul.products li.product .mf-product-thumbnail a img {
        padding: 0;
    }
    /* Price smaller */
    .woocommerce ul.products li.product .mf-product-price-box .price {
        font-size: 17px !important;
    }
    .woocommerce ul.products li.product .mf-product-price-box .price ins {
        font-size: 17px !important;
    }
}


/* ═══════════════════════════════════════════════════════════════════
   WCAG: FOCUS-VISIBLE STATES — SHOP GRID
   ═══════════════════════════════════════════════════════════════════ */
.alandog-atc-btn:focus-visible,
.alandog-qty-btn:focus-visible,
.alandog-load-more-btn:focus-visible,
.alandog-filter-chip:focus-visible,
.alandog-clear-all-filters:focus-visible,
.alandog-category-promo__cta:focus-visible,
.alandog-category-promo__close:focus-visible,
.alandog-empty-state__link:focus-visible {
    outline: 2px solid var(--alandog-green, #085d91);
    outline-offset: 2px;
}
.alandog-qty-input:focus-visible {
    outline: 2px solid var(--alandog-green, #085d91);
    outline-offset: -1px;
}
.woocommerce ul.products li.product .product-inner:focus-within {
    box-shadow: 0 0 0 2px var(--alandog-green, #085d91);
}
.woocommerce-ordering select:focus-visible {
    outline: 2px solid var(--alandog-green, #085d91);
    outline-offset: 1px;
}

/* WCAG 1.4.1: Links in SEO text blocks must be distinguishable by non-color means */
.alandog-seo-bottom a,
.alandog-term-description a {
    text-decoration: underline;
}
.alandog-seo-bottom a:hover,
.alandog-term-description a:hover {
    text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════════════
   2026-03 PLP REFRESH — shared shop/category/search listing
   Focus: clearer taxonomy, stronger product cards, compact mobile flow.
   ═══════════════════════════════════════════════════════════════════ */
body.mf-catalog-page .site-content {
    background: var(--ds-bg, #f7f9fc);
}

body.mf-catalog-page .woocommerce-products-header {
    display: grid;
    gap: 20px;
    margin-bottom: 26px;
}

body.mf-catalog-page .autooptimize-shop-intro,
body.mf-catalog-page .alandog-category-excerpt {
    margin: 0;
    padding: 18px 22px !important;
    max-height: none !important;
    overflow: visible !important;
    border: 1px solid #e4edf6;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 14px 34px rgba(15, 44, 84, 0.05);
    color: #4e5a69;
    font-size: 15px !important;
    line-height: 1.65 !important;
}

body.mf-catalog-page .autooptimize-shop-intro::after {
    display: none !important;
}

body.mf-catalog-page .woocommerce-products-header .page-title {
    margin: 0;
    color: var(--ds-brand-strong, #0f3554);
    font-family: 'Nunito Sans', sans-serif;
    font-size: clamp(2.55rem, 3.6vw, 3.5rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

body.mf-catalog-page #container-subcategory {
    margin: 0;
}

body.mf-catalog-page #container-subcategory ul {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
    gap: 14px;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
}

body.mf-catalog-page #container-subcategory li.sub-category {
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    flex: none !important;
}

body.mf-catalog-page #container-subcategory li.sub-category:hover {
    flex-grow: 0;
}

body.mf-catalog-page #container-subcategory li.sub-category a {
    min-height: 112px;
    padding: 16px;
    border: 1px solid #e4edf6;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 44, 84, 0.05);
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

body.mf-catalog-page #container-subcategory li.sub-category a:hover {
    transform: translateY(-2px);
    border-color: rgba(8, 93, 145, 0.22);
    box-shadow: 0 18px 40px rgba(15, 44, 84, 0.08);
}

body.mf-catalog-page #container-subcategory .image-subcategory {
    width: 74px;
    height: 74px;
    border-radius: 22px;
    background-color: #f3f8fe;
    border: 1px solid #dde8f3;
    background-position: center center;
    background-size: 74% auto;
    background-repeat: no-repeat;
    flex: 0 0 auto;
}

body.mf-catalog-page #container-subcategory .sub-category__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

body.mf-catalog-page #container-subcategory .sub-category__title {
    display: block;
    margin: 0;
    color: var(--ds-brand-strong, #0f3554);
    font-size: 15px;
    line-height: 1.25;
    font-weight: 800;
}

body.mf-catalog-page #container-subcategory .sub-category__count {
    display: block;
    color: #6c7786;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 600;
}

body.mf-catalog-page #mf-catalog-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 20px;
    padding: 14px 18px;
    border: 1px solid #e4edf6;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 44, 84, 0.05);
}

body.mf-catalog-page #mf-catalog-toolbar .mf-filter-mobile {
    display: none !important;
}

body.mf-catalog-page #mf-catalog-toolbar .woocommerce-ordering {
    display: block;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
}

body.mf-catalog-page #mf-catalog-toolbar .woocommerce-ordering > li.current {
    position: relative;
    list-style: none;
    margin: 0;
}

body.mf-catalog-page #mf-catalog-toolbar .woocommerce-ordering > li.current > span {
    min-width: 230px;
    min-height: 48px;
    padding: 0 42px 0 16px;
    border: 1px solid #dbe5ef;
    border-radius: 14px;
    background: #f8fbff;
    color: #1f2937;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    position: relative;
}

body.mf-catalog-page #mf-catalog-toolbar .woocommerce-ordering > li.current > span::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 16px;
    width: 10px;
    height: 10px;
    border-right: 2px solid #5f6b78;
    border-bottom: 2px solid #5f6b78;
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

body.mf-catalog-page #mf-catalog-toolbar .woocommerce-ordering > li.current::after {
    display: none !important;
    content: none !important;
}

body.mf-catalog-page #mf-catalog-toolbar .woocommerce-ordering > li.current > ul {
    margin-top: 10px;
    padding: 10px;
    min-width: 260px;
    border: 1px solid #dbe5ef;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(15, 44, 84, 0.12);
}

body.mf-catalog-page #mf-catalog-toolbar .woocommerce-ordering > li.current > ul > li {
    margin: 0;
}

body.mf-catalog-page #mf-catalog-toolbar .woocommerce-ordering > li.current > ul > li > a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

body.mf-catalog-page #mf-catalog-toolbar .woocommerce-ordering > li.current > ul > li > a:hover,
body.mf-catalog-page #mf-catalog-toolbar .woocommerce-ordering > li.current > ul > li > a.active {
    background: #f4f8fc;
    color: var(--ds-brand, #085d91);
}

body.mf-catalog-page #mf-catalog-toolbar .cancel-ordering {
    display: none !important;
}

body.mf-catalog-page .alandog-per-page-selector {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

body.mf-catalog-page .alandog-per-page-selector .per-page-label {
    color: #6c7786;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

body.mf-catalog-page .alandog-per-page-selector .per-page-option {
    min-width: 42px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #dbe5ef;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475468;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    background: #fff;
}

body.mf-catalog-page .alandog-per-page-selector .per-page-option.active {
    background: var(--ds-brand, #085d91);
    border-color: var(--ds-brand, #085d91);
    color: #fff;
}

body.mf-catalog-page .alandog-result-count {
    margin: 0 0 18px;
    color: #5c6775;
    font-size: 14px;
    font-weight: 700;
}

body.mf-catalog-page .alandog-result-count strong {
    color: #1f2937;
    font-weight: 800;
}

body.mf-catalog-page .woocommerce-pagination {
    position: static !important;
    clip: auto !important;
    clip-path: none !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    white-space: normal !important;
    margin: 28px 0 8px !important;
    text-align: center;
}

body.mf-catalog-page nav.woocommerce-pagination .page-numbers,
body.mf-catalog-page .woocommerce-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    list-style: none;
}

body.mf-catalog-page nav.woocommerce-pagination .page-numbers li,
body.mf-catalog-page .woocommerce-pagination .page-numbers li {
    margin: 0;
    padding: 0 !important;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.mf-catalog-page nav.woocommerce-pagination .page-numbers li .page-numbers,
body.mf-catalog-page .woocommerce-pagination .page-numbers li a,
body.mf-catalog-page .woocommerce-pagination .page-numbers li span {
    min-width: 44px;
    min-height: 44px;
    height: auto !important;
    padding: 0 14px;
    border: 1px solid #dbe5ef;
    border-radius: 999px;
    background: #fff;
    color: #29445b;
    font-size: 14px;
    font-weight: 800;
    line-height: 1 !important;
    text-decoration: none;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle;
    box-sizing: border-box;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

body.mf-catalog-page .woocommerce-pagination .page-numbers li a:hover {
    border-color: #bcd4e8;
    background: #f5faff;
    color: var(--ds-brand, #085d91);
}

body.mf-catalog-page .woocommerce-pagination .page-numbers li span.current {
    border-color: var(--ds-brand, #085d91);
    background: var(--ds-brand, #085d91);
    color: #fff;
}

body.mf-catalog-page nav.woocommerce-pagination .page-numbers li span.current::before,
body.mf-catalog-page .woocommerce-pagination .page-numbers li span.current::before,
body.mf-catalog-page nav.woocommerce-pagination .page-numbers li .page-numbers::before,
body.mf-catalog-page nav.woocommerce-pagination .page-numbers li .page-numbers::after {
    display: none !important;
    content: none !important;
}

body.mf-catalog-page .woocommerce-pagination .page-numbers li span.dots {
    min-width: 32px;
    padding: 0 6px;
    border-color: transparent;
    background: transparent;
    color: #7a8c9e;
}

body.mf-catalog-page .woocommerce ul.products li.product {
    margin-bottom: 26px !important;
}

body.mf-catalog-page .woocommerce ul.products li.product .product-inner {
    border: 1px solid #e4edf6;
    border-radius: 22px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 44, 84, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

body.mf-catalog-page .woocommerce ul.products li.product .product-inner:hover {
    transform: translateY(-2px);
    border-color: rgba(8, 93, 145, 0.18);
    box-shadow: 0 22px 54px rgba(15, 44, 84, 0.1);
}

body.mf-catalog-page .woocommerce ul.products li.product .mf-product-thumbnail {
    aspect-ratio: 1 / 1;
    padding: 18px;
    border-radius: 22px 22px 0 0;
    border-bottom: 1px solid #eef3f8;
    background: linear-gradient(180deg, #f8fbff 0%, #f4f8fc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

body.mf-catalog-page .woocommerce ul.products li.product .mf-product-thumbnail a {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

body.mf-catalog-page .woocommerce ul.products li.product .mf-product-thumbnail a img:not(.alandog-secondary-img) {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(1.1);
    padding: 0;
}

body.mf-catalog-page .woocommerce ul.products li.product .alandog-social-badges {
    padding: 18px 18px 0;
    gap: 6px;
}

body.mf-catalog-page .woocommerce ul.products li.product .alandog-loop-brand {
    margin-bottom: 8px;
    color: #6c7786;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.mf-catalog-page .woocommerce ul.products li.product .mf-product-content {
    padding: 0 18px;
}

body.mf-catalog-page .woocommerce ul.products li.product .woocommerce-loop-product__title,
body.mf-catalog-page .woocommerce ul.products li.product h2.woocommerce-loop-product__title,
body.mf-catalog-page .woocommerce ul.products li.product .mf-product-content h2 {
    color: #142438;
    font-size: 19px;
    line-height: 1.22;
    font-weight: 800;
    max-height: calc(1.22em * 2);
}

body.mf-catalog-page .woocommerce ul.products li.product .alandog-variant-count {
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    background: #f4f7fb;
    color: #667283;
    font-size: 12px;
    font-weight: 700;
}

body.mf-catalog-page .woocommerce ul.products li.product .mf-rating {
    margin: 10px 0 0;
}

body.mf-catalog-page .woocommerce ul.products li.product .mf-product-price-box {
    padding: 16px 18px 0 !important;
    gap: 5px;
}

body.mf-catalog-page .woocommerce ul.products li.product .mf-product-price-box .price,
body.mf-catalog-page .woocommerce ul.products li.product .mf-product-price-box .price ins {
    color: #142438;
    font-size: 30px !important;
    font-weight: 800;
    line-height: 1;
}

body.mf-catalog-page .woocommerce ul.products li.product .mf-product-price-box .price del {
    display: none !important;
}

body.mf-catalog-page .woocommerce ul.products li.product .mf-product-price-box > .alandog-price-per-kg {
    color: #657181;
    font-size: 12px;
    font-weight: 600;
}

body.mf-catalog-page .woocommerce ul.products li.product .alandog-sub-price {
    display: none !important;
}

body.mf-catalog-page .woocommerce ul.products li.product .alandog-loop-qty-atc--compact {
    padding: 14px 18px 0;
    margin-top: 8px;
    border-top: 0;
}

body.mf-catalog-page .woocommerce ul.products li.product .alandog-loop-qty-atc--compact .alandog-atc-btn {
    width: 100% !important;
    min-height: 48px;
    padding: 0 16px !important;
    border-radius: 14px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px !important;
    font-weight: 800;
    letter-spacing: 0.01em;
    background: var(--ds-accent, #a34723);
    color: #fff;
}

body.mf-catalog-page .woocommerce ul.products li.product .alandog-card-trust {
    padding: 12px 18px 18px;
}

body.mf-catalog-page .woocommerce ul.products li.product .alandog-card-trust__delivery {
    color: #5b6676;
    font-size: 12px;
    font-weight: 700;
    gap: 8px;
}

body.mf-catalog-page .woocommerce ul.products li.product .alandog-card-trust__delivery::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 999px;
    display: inline-block;
    background: #0d8f62;
}

body.mf-catalog-page .site-content .term-description,
body.mf-catalog-page .site-content .archive-description {
    margin-top: 34px;
    padding: 28px;
    border: 1px solid #e4edf6;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 16px 38px rgba(15, 44, 84, 0.05);
}

body.mf-catalog-page .site-content .term-description h2,
body.mf-catalog-page .site-content .archive-description h2,
body.mf-catalog-page .site-content .term-description h3,
body.mf-catalog-page .site-content .archive-description h3 {
    color: #142438;
    font-family: 'Nunito Sans', sans-serif;
    letter-spacing: -0.02em;
}

body.mf-catalog-page .site-content .term-description p,
body.mf-catalog-page .site-content .archive-description p {
    color: #4f5a69;
    line-height: 1.72;
}

body.mf-catalog-page .alandog-seo-panel {
    position: relative;
    max-height: 280px;
    overflow: hidden;
}

body.mf-catalog-page .alandog-seo-panel::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 90px;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(248,251,255,0.96) 70%, rgba(248,251,255,1) 100%);
    pointer-events: none;
}

body.mf-catalog-page .alandog-seo-panel.is-expanded {
    max-height: none;
}

body.mf-catalog-page .alandog-seo-panel.is-expanded::after,
body.mf-catalog-page .alandog-seo-panel--short::after {
    display: none;
}

body.mf-catalog-page .alandog-seo-toggle {
    margin-top: 14px;
    padding: 0 18px;
    min-height: 44px;
    border: 1px solid #dbe5ef;
    border-radius: 999px;
    background: #fff;
    color: var(--ds-brand, #085d91);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
}

body.paged.mf-catalog-page .woocommerce-products-header .autooptimize-shop-intro,
body.paged.mf-catalog-page .woocommerce-products-header .alandog-category-excerpt,
body.paged.mf-catalog-page .woocommerce-products-header #container-subcategory,
body.paged.mf-catalog-page .woocommerce-products-header .term-description,
body.paged.mf-catalog-page .woocommerce-products-header .archive-description {
    display: none !important;
}

body.paged.mf-catalog-page .woocommerce-products-header {
    gap: 10px;
    margin-bottom: 12px;
}

body.paged.mf-catalog-page .woocommerce-products-header .page-title,
body.paged.mf-catalog-page .woocommerce-products-header .mf-catalog-title {
    font-size: clamp(2.7rem, 4.2vw, 4rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

@media (max-width: 767px) {
    body.mf-catalog-page #content,
    body.mf-catalog-page #content > .martfury-container,
    body.mf-catalog-page #content .row,
    body.mf-catalog-page #primary {
        overflow: visible !important;
    }

    body.mf-catalog-page .woocommerce-products-header {
        gap: 16px;
        margin-bottom: 20px;
    }

    body.mf-catalog-page .woocommerce-products-header .page-title {
        font-size: clamp(2.2rem, 10vw, 3rem);
        line-height: 1;
    }

    body.mf-catalog-page .autooptimize-shop-intro,
    body.mf-catalog-page .alandog-category-excerpt {
        padding: 14px 16px !important;
        font-size: 14px !important;
        line-height: 1.55 !important;
        border-radius: 18px;
    }

    body.mf-catalog-page #container-subcategory ul {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px;
    }

    body.mf-catalog-page #container-subcategory li.sub-category:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    body.mf-catalog-page #container-subcategory li.sub-category a {
        min-height: 116px;
        padding: 12px;
        align-items: flex-start;
        gap: 10px;
        border-radius: 18px;
    }

    body.mf-catalog-page #container-subcategory .image-subcategory {
        width: 54px;
        height: 54px;
        border-radius: 16px;
    }

    body.mf-catalog-page #container-subcategory .sub-category__title {
        font-size: 14px;
    }

    body.mf-catalog-page #container-subcategory .sub-category__count {
        font-size: 11px;
    }

    body.mf-catalog-page #mf-catalog-toolbar {
        position: sticky;
        top: 126px;
        z-index: 60;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 96px;
        gap: 8px;
        padding: 10px;
        border-radius: 18px;
    }

    body.mf-catalog-page #mf-catalog-toolbar .woocommerce-ordering {
        width: 100%;
    }

    body.mf-catalog-page #mf-catalog-toolbar .woocommerce-ordering > li.current > span {
        width: 100%;
        min-width: 0;
        min-height: 46px;
        font-size: 16px;
    }

    body.mf-catalog-page #mf-catalog-toolbar .mf-filter-mobile {
        display: inline-flex !important;
        min-height: 44px;
        border: 1px solid #dbe5ef;
        border-radius: 14px;
        background: #f8fbff;
        color: #203348;
        align-items: center;
        justify-content: center;
        gap: 8px;
        text-decoration: none;
        font-size: 14px;
        font-weight: 800;
    }

    body.mf-catalog-page #mf-catalog-toolbar .mf-filter-mobile i {
        font-size: 14px;
    }

    body.mf-catalog-page #mf-catalog-toolbar .alandog-per-page-selector {
        display: none;
    }

    body.mf-catalog-page .alandog-result-count {
        margin: 0 0 14px;
        padding: 0 4px;
        font-size: 13px;
    }

    body.mf-catalog-page .woocommerce-pagination {
        margin-top: 22px !important;
    }

    body.mf-catalog-page .woocommerce-pagination .page-numbers {
        gap: 8px;
    }

    body.mf-catalog-page .woocommerce-pagination .page-numbers li a,
    body.mf-catalog-page .woocommerce-pagination .page-numbers li span {
        min-width: 40px;
        min-height: 40px;
        padding: 0 10px;
        font-size: 13px;
    }

    body.mf-catalog-page .woocommerce-pagination .page-numbers li a.prev,
    body.mf-catalog-page .woocommerce-pagination .page-numbers li a.next {
        min-width: auto;
        padding: 0 14px;
        font-size: 12px;
        white-space: nowrap;
    }

    body.paged.mf-catalog-page .woocommerce-products-header .page-title,
    body.paged.mf-catalog-page .woocommerce-products-header .mf-catalog-title {
        font-size: clamp(2rem, 9vw, 2.6rem);
        line-height: 1.02;
    }

    body.paged.mf-catalog-page .woocommerce-products-header {
        margin-bottom: 6px;
    }

    body.mf-catalog-page .woocommerce ul.products li.product .product-inner {
        border-radius: 18px;
    }

    body.mf-catalog-page .woocommerce ul.products li.product .mf-product-thumbnail {
        padding: 12px;
        border-radius: 18px 18px 0 0;
    }

    body.mf-catalog-page .woocommerce ul.products li.product .mf-product-thumbnail a img:not(.alandog-secondary-img) {
        transform: scale(1.14);
    }

    body.mf-catalog-page .woocommerce ul.products li.product .alandog-social-badges {
        padding: 14px 14px 0;
        gap: 4px;
    }

    body.mf-catalog-page .woocommerce ul.products li.product .mf-product-content {
        padding: 0 14px;
    }

    body.mf-catalog-page .woocommerce ul.products li.product .woocommerce-loop-product__title,
    body.mf-catalog-page .woocommerce ul.products li.product h2.woocommerce-loop-product__title,
    body.mf-catalog-page .woocommerce ul.products li.product .mf-product-content h2 {
        font-size: 16px;
        line-height: 1.28;
        max-height: calc(1.28em * 2);
    }

    body.mf-catalog-page .woocommerce ul.products li.product .mf-product-price-box {
        padding: 12px 14px 0 !important;
    }

    body.mf-catalog-page .woocommerce ul.products li.product .mf-product-price-box .price,
    body.mf-catalog-page .woocommerce ul.products li.product .mf-product-price-box .price ins {
        font-size: 24px !important;
    }

    body.mf-catalog-page .woocommerce ul.products li.product .alandog-loop-qty-atc--compact {
        padding: 12px 14px 0;
    }

    body.mf-catalog-page .woocommerce ul.products li.product .alandog-card-trust {
        padding: 10px 14px 14px;
    }

    body.mf-catalog-page .woocommerce ul.products li.product .alandog-card-trust__delivery {
        font-size: 11px;
    }

    body.mf-catalog-page .site-content .term-description,
    body.mf-catalog-page .site-content .archive-description {
        margin-top: 24px;
        padding: 18px;
        border-radius: 18px;
    }

    body.mf-catalog-page .alandog-seo-panel {
        max-height: 220px;
    }

    body.mf-catalog-page .alandog-whatsapp-btn {
        display: none;
    }

    body.mf-catalog-page #alandog-scroll-top {
        display: none !important;
    }
}

/* FIX-UI-220: restore main pet hub layout and product-card price hierarchy. */
body.term-cane.mf-catalog-page #primary-sidebar,
body.term-gatto.mf-catalog-page #primary-sidebar,
body.term-cane.mf-catalog-page .catalog-sidebar,
body.term-gatto.mf-catalog-page .catalog-sidebar {
    display: none !important;
}

body.term-cane.mf-catalog-page .site-content > .container > .row,
body.term-gatto.mf-catalog-page .site-content > .container > .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.term-cane.mf-catalog-page #primary,
body.term-gatto.mf-catalog-page #primary {
    float: none !important;
    width: 100% !important;
    max-width: 1180px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    flex: 0 0 100% !important;
}

body.term-cane.mf-catalog-page .alandog-term-description--hub,
body.term-gatto.mf-catalog-page .alandog-term-description--hub {
    max-width: none !important;
}

body.mf-catalog-page ul.products li.product .mf-product-price-box {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 4px !important;
}

body.mf-catalog-page ul.products li.product .mf-product-price-box > .footer-button {
    display: none !important;
}

body.mf-catalog-page ul.products li.product .mf-product-price-box > .price {
    order: 1 !important;
    display: block !important;
    margin: 0 !important;
    color: #0f3554 !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    line-height: 1.05 !important;
}

body.mf-catalog-page ul.products li.product .mf-product-price-box > .price ins {
    display: inline-block !important;
    color: #a61d1d !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    text-decoration: none !important;
}

body.mf-catalog-page ul.products li.product .mf-product-price-box > .price del {
    display: block !important;
    margin-top: 3px !important;
    color: #657181 !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    line-height: 1.2 !important;
    opacity: 1 !important;
}

body.mf-catalog-page ul.products li.product .mf-product-price-box > .price .woocommerce-Price-amount,
body.mf-catalog-page ul.products li.product .mf-product-price-box > .price .woocommerce-Price-amount bdi,
body.mf-catalog-page ul.products li.product .mf-product-price-box > .price .woocommerce-Price-currencySymbol {
    color: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
}

body.mf-catalog-page ul.products li.product .mf-product-price-box > .alandog-price-per-kg {
    order: 2 !important;
    display: block !important;
    margin: 2px 0 0 !important;
    color: #657181 !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    line-height: 1.25 !important;
}

body.mf-catalog-page ul.products li.product .mf-product-price-box > .alandog-price-per-kg .woocommerce-Price-amount,
body.mf-catalog-page ul.products li.product .mf-product-price-box > .alandog-price-per-kg .woocommerce-Price-amount bdi,
body.mf-catalog-page ul.products li.product .mf-product-price-box > .alandog-price-per-kg .woocommerce-Price-currencySymbol {
    color: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
}

body.mf-catalog-page ul.products li.product .mf-product-price-box > .alandog-loop-qty-atc {
    order: 3 !important;
}

@media (max-width: 767px) {
    body.term-cane.mf-catalog-page #primary,
    body.term-gatto.mf-catalog-page #primary {
        max-width: 100% !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    body.mf-catalog-page ul.products li.product .mf-product-price-box > .price {
        font-size: 20px !important;
    }

    body.mf-catalog-page ul.products li.product .mf-product-price-box > .alandog-price-per-kg {
        font-size: 11px !important;
    }
}

/* FIX-PLP-MOBILE-001: keep pet hub shortcuts, but stop them from pushing products below the fold. */
@media (max-width: 767px) {
    body.term-cane.mf-catalog-page .woocommerce-products-header,
    body.term-gatto.mf-catalog-page .woocommerce-products-header {
        gap: 10px !important;
        margin-bottom: 12px !important;
    }

    body.term-cane.mf-catalog-page .woocommerce-products-header .page-title,
    body.term-gatto.mf-catalog-page .woocommerce-products-header .page-title,
    body.term-cane.mf-catalog-page .woocommerce-products-header .mf-catalog-title,
    body.term-gatto.mf-catalog-page .woocommerce-products-header .mf-catalog-title {
        font-size: clamp(1.75rem, 7vw, 2.25rem) !important;
        line-height: 1.05 !important;
        letter-spacing: -0.025em !important;
    }

    body.term-cane.mf-catalog-page .autooptimize-shop-intro,
    body.term-gatto.mf-catalog-page .autooptimize-shop-intro,
    body.term-cane.mf-catalog-page .alandog-category-excerpt,
    body.term-gatto.mf-catalog-page .alandog-category-excerpt {
        display: -webkit-box !important;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        font-size: 14px !important;
        line-height: 1.45 !important;
    }

    body.term-cane.mf-catalog-page #container-subcategory,
    body.term-gatto.mf-catalog-page #container-subcategory {
        margin: 0 -14px 0 0 !important;
        overflow: hidden !important;
    }

    body.term-cane.mf-catalog-page #container-subcategory ul,
    body.term-gatto.mf-catalog-page #container-subcategory ul {
        display: flex !important;
        grid-template-columns: none !important;
        flex-wrap: nowrap !important;
        gap: 10px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 0 14px 4px 0 !important;
        margin: 0 !important;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    body.term-cane.mf-catalog-page #container-subcategory ul::-webkit-scrollbar,
    body.term-gatto.mf-catalog-page #container-subcategory ul::-webkit-scrollbar {
        display: none;
    }

    body.term-cane.mf-catalog-page #container-subcategory li.sub-category,
    body.term-gatto.mf-catalog-page #container-subcategory li.sub-category,
    body.term-cane.mf-catalog-page #container-subcategory li.sub-category:last-child:nth-child(odd),
    body.term-gatto.mf-catalog-page #container-subcategory li.sub-category:last-child:nth-child(odd) {
        flex: 0 0 126px !important;
        width: 126px !important;
        min-width: 126px !important;
        grid-column: auto !important;
        scroll-snap-align: start;
    }

    body.term-cane.mf-catalog-page #container-subcategory li.sub-category a,
    body.term-gatto.mf-catalog-page #container-subcategory li.sub-category a {
        min-height: 92px !important;
        padding: 10px !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        text-align: center !important;
        border-radius: 14px !important;
    }

    body.term-cane.mf-catalog-page #container-subcategory .image-subcategory,
    body.term-gatto.mf-catalog-page #container-subcategory .image-subcategory {
        width: 38px !important;
        height: 38px !important;
        border-radius: 12px !important;
    }

    body.term-cane.mf-catalog-page #container-subcategory .sub-category__meta,
    body.term-gatto.mf-catalog-page #container-subcategory .sub-category__meta {
        align-items: center !important;
        gap: 2px !important;
    }

    body.term-cane.mf-catalog-page #container-subcategory .sub-category__title,
    body.term-gatto.mf-catalog-page #container-subcategory .sub-category__title {
        display: -webkit-box !important;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden !important;
        font-size: 12px !important;
        line-height: 1.16 !important;
    }

    body.term-cane.mf-catalog-page #container-subcategory .sub-category__count,
    body.term-gatto.mf-catalog-page #container-subcategory .sub-category__count {
        font-size: 10px !important;
        line-height: 1.2 !important;
    }

    body.term-cane.mf-catalog-page #mf-catalog-toolbar,
    body.term-gatto.mf-catalog-page #mf-catalog-toolbar {
        position: static !important;
        grid-template-columns: minmax(0, 1fr) 132px !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
        padding: 8px !important;
        border-radius: 14px !important;
    }

    body.term-cane.mf-catalog-page #mf-catalog-toolbar .woocommerce-ordering > li.current > span,
    body.term-gatto.mf-catalog-page #mf-catalog-toolbar .woocommerce-ordering > li.current > span {
        min-height: 42px !important;
        padding-left: 12px !important;
        padding-right: 32px !important;
        font-size: 14px !important;
        border-radius: 12px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}
