/* WooCommerce Filter — Frontend Styles
 * Version: 1.0.0
 * Prefix: wcf-
 */

/* ===== Theme variables (overridable by site owner) =====
 * These CSS custom properties define the WCF color palette.
 * To customize, override them in your theme's CSS:
 *
 *   :root {
 *       --wcf-primary: #your-brand-color;
 *       --wcf-primary-dark: #darker-shade;
 *   }
 *
 * Default values match lidus.by (electric shop brand colors).
 */
:root {
    --wcf-primary: #FF6B35;
    --wcf-primary-dark: #e55a2b;
    --wcf-primary-light: #ff8c5a;
    --wcf-primary-fg: #ffffff;
    --wcf-bg: #ffffff;
    --wcf-fg: #1A202C;
    --wcf-muted: #718096;
    --wcf-border: #e9efef;
    --wcf-radius: 0.625rem;
    --wcf-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --wcf-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --wcf-shadow-primary: 0 4px 12px rgba(255, 107, 53, 0.18);
}

/* ===== Hide default WooCommerce toolbar (we render our own) =====
 * Safety net: even if remove_action() fails (e.g. plugin load order,
 * custom themes re-adding hooks, or third-party plugins), these CSS
 * rules guarantee the default "result count" and "ordering" form do
 * NOT appear next to our custom toolbar on catalog pages.
 *
 * Scoped to body.wcf-filter-active (added via template_redirect hook)
 * so we never affect pages where the filter is intentionally disabled.
 */
body.wcf-filter-active .woocommerce-result-count,
body.wcf-filter-active .woocommerce-ordering,
body.wcf-filter-active .woocommerce-notices-wrapper,
body.wcf-filter-active .woocommerce-breadcrumb + .woocommerce-result-count {
        display: none !important;
}

/* Some themes wrap WC toolbar elements in a container row — hide it too
 * if it becomes empty after we hide its children. */
body.wcf-filter-active .woocommerce-before-shop-loop-top-row:empty,
body.wcf-filter-active .shop-toolbar-top-row:empty,
body.wcf-filter-active .base-shop-top-row:empty {
        display: none !important;
}

/* ===== Products region (the container we manage) =====
 * .wcf-products-region is the <div> we use as the AJAX target — it holds the
 * toolbar + chips + products <ul> + pagination. We reset list/inline styles
 * here so the container itself never accidentally inherits list-item or
 * inline-block behaviour from a theme (the container was sometimes a <ul>
 * in older plugin versions; convertListToDiv() now normalises it, but this
 * guard makes sure even hand-set markup renders correctly).
 *
 * IMPORTANT: we deliberately DO NOT reset .wcf-products-region's display,
 * width, padding or margin — the theme's outer layout (column grid etc.)
 * must keep working. We only neutralise list-specific properties.
 */
.wcf-products-region {
        list-style: none;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
}
.wcf-products-region ul,
.wcf-products-region .products,
.wcf-products-region .products-grid {
        list-style: none;
        margin: 0;
        padding: 0;
}
.wcf-products-region > ul {
        display: revert;
}

/* ===== Filter Sidebar ===== */
#wcf-filter-root .wcf-filter {
        font-family: inherit;
}
#wcf-filter-root .wcf-filter-widget {
        margin-bottom: 1rem;
        padding: 1rem;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        background: #fff;
        transition: box-shadow 0.15s;
}
#wcf-filter-root .wcf-filter-widget:hover {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
#wcf-filter-root .wcf-filter-widget:last-child {
        margin-bottom: 0;
}
#wcf-filter-root .wcf-filter-title {
        font-size: 0.875rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin: 0 0 0.75rem;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        user-select: none;
}
#wcf-filter-root .wcf-filter-title::after {
        content: '▼';
        font-size: 0.625rem;
        transition: transform 0.2s;
        color: #6b7280;
}
#wcf-filter-root .wcf-filter-widget.collapsed .wcf-filter-title::after {
        transform: rotate(-90deg);
}
#wcf-filter-root .wcf-filter-widget.collapsed .wcf-filter-content {
        display: none;
}
#wcf-filter-root .wcf-filter-content {
        font-size: 0.875rem;
}

/* ===== Attributes Group Wrapper ===== */
#wcf-filter-root .wcf-attributes-group {
        margin-bottom: 1rem;
        padding: 1rem;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        background: #fafafa;
        max-height: 600px;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: #cbd5e1 transparent;
}
#wcf-filter-root .wcf-attributes-group::-webkit-scrollbar {
        width: 6px;
}
#wcf-filter-root .wcf-attributes-group::-webkit-scrollbar-track {
        background: transparent;
}
#wcf-filter-root .wcf-attributes-group::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 3px;
}
#wcf-filter-root .wcf-attributes-group::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
}
#wcf-filter-root .wcf-attributes-group:last-child {
        margin-bottom: 0;
}
#wcf-filter-root .wcf-attributes-group-title {
        font-size: 0.875rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin: 0 0 0.75rem;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        user-select: none;
        color: #374151;
}
#wcf-filter-root .wcf-attributes-group-title::after {
        content: '▼';
        font-size: 0.625rem;
        transition: transform 0.2s;
        color: #6b7280;
}
#wcf-filter-root .wcf-attributes-group.collapsed .wcf-attributes-group-title::after {
        transform: rotate(-90deg);
}
#wcf-filter-root .wcf-attributes-group.collapsed .wcf-attributes-group-content {
        display: none;
}
#wcf-filter-root .wcf-attributes-group-content {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
}
/* Individual attribute inside the group */
#wcf-filter-root .wcf-attributes-group-content .wcf-filter-widget {
        margin-bottom: 0;
        padding: 0;
        border: none;
        background: transparent;
}
#wcf-filter-root .wcf-attributes-group-content .wcf-filter-widget:hover {
        box-shadow: none;
}

/* Attribute sub-titles ("Цвет", "Мощность", etc.) — smaller & lighter
 * than the main group title ("Атрибуты товаров") to create visual hierarchy.
 *
 * Hierarchy:
 *   h3.wcf-attributes-group-title   "АТРИБУТЫ ТОВАРОВ"  — 0.875rem, 700, uppercase
 *   h4.wcf-filter-title (inside)    "Цвет"              — 0.75rem,  500, normal-case
 *
 * The main widget titles (Категории, Цена, Бренды) keep their original bold
 * uppercase styling because they are top-level sections.
 */
#wcf-filter-root .wcf-attributes-group-content .wcf-filter-title {
        font-size: 0.75rem;
        font-weight: 500;
        text-transform: none;
        letter-spacing: 0.01em;
        margin: 0 0 0.5rem;
        padding-top: 0.5rem;
        color: #6b7280;
        border-top: 1px dashed #e5e7eb;
}

/* First sub-title in the group — no top border (it's right under the group title,
 * a divider there would look redundant).
 */
#wcf-filter-root .wcf-attributes-group-content .wcf-filter-widget:first-child .wcf-filter-title {
        border-top: none;
        padding-top: 0;
}

/* Slightly smaller collapse chevron for sub-titles to match smaller text */
#wcf-filter-root .wcf-attributes-group-content .wcf-filter-title::after {
        font-size: 0.5625rem;
        color: #9ca3af;
}

/* Tighter content spacing for attribute sub-sections */
#wcf-filter-root .wcf-attributes-group-content .wcf-filter-content {
        font-size: 0.8125rem;
}

/* ===== Filter Options ===== */
#wcf-filter-root .wcf-filter-option {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.375rem 0;
        cursor: pointer;
        transition: color 0.15s;
}
#wcf-filter-root .wcf-filter-option:hover {
        color: #d97706;
}
#wcf-filter-root .wcf-filter-option.selected {
        font-weight: 600;
        color: #d97706;
}
#wcf-filter-root .wcf-filter-option input[type="checkbox"] {
        margin: 0;
        cursor: pointer;
}
#wcf-filter-root .wcf-opt-label {
        flex: 1;
}
#wcf-filter-root .wcf-opt-count {
        color: #6b7280;
        font-size: 0.75rem;
}

/* ===== Price Filter ===== */
#wcf-filter-root .wcf-price-content {
        padding: 0;
}
#wcf-filter-root .wcf-price-inputs {
        display: flex;
        gap: 0.5rem;
        align-items: center;
        margin-bottom: 0.5rem;
}
#wcf-filter-root .wcf-price-input-wrap {
        position: relative;
        flex: 1;
}
#wcf-filter-root .wcf-price-input {
        width: 100%;
        padding: 0.375rem 2.5rem 0.375rem 0.5rem;
        border: 1px solid #d1d5db;
        border-radius: 0.375rem;
        font-size: 0.8125rem;
}
#wcf-filter-root .wcf-price-currency {
        position: absolute;
        right: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
        color: #6b7280;
        font-size: 0.75rem;
        pointer-events: none;
}
#wcf-filter-root .wcf-price-sep {
        color: #6b7280;
}
#wcf-filter-root .wcf-price-slider {
        margin: 1rem 0;
        height: 5px;
        border: none;
        border-radius: 2px;
        background: #e5e7eb;
}
#wcf-filter-root .wcf-price-range-labels {
        display: flex;
        justify-content: space-between;
        font-size: 0.6875rem;
        color: #6b7280;
}

/* ===== Category Tree ===== */
#wcf-filter-root .wcf-cat-tree-item {
        display: flex;
        align-items: center;
        gap: 0.25rem;
        margin: 0.125rem 0;
}
#wcf-filter-root .wcf-cat-toggle {
        background: none;
        border: none;
        cursor: pointer;
        font-size: 0.625rem;
        padding: 0.25rem;
        color: #6b7280;
        transition: transform 0.2s;
}
#wcf-filter-root .wcf-cat-toggle.expanded {
        color: #d97706;
}
#wcf-filter-root .wcf-cat-toggle-placeholder {
        width: 1rem;
}
#wcf-filter-root .wcf-cat-children {
        margin-left: 0.5rem;
}

/* ===== Brand Search ===== */
#wcf-filter-root .wcf-brand-search {
        width: 100%;
        padding: 0.375rem 0.5rem;
        border: 1px solid #d1d5db;
        border-radius: 0.375rem;
        font-size: 0.8125rem;
        margin-bottom: 0.5rem;
}
#wcf-filter-root .wcf-brand-list, .wcf-attr-list {
        max-height: 240px;
        overflow-y: auto;
}
#wcf-filter-root .wcf-show-more-brands, .wcf-show-more-attrs {
        background: none;
        border: none;
        color: #d97706;
        cursor: pointer;
        font-size: 0.75rem;
        padding: 0.5rem 0;
        text-decoration: underline;
}

/* ===== Filter Actions ===== */
#wcf-filter-root .wcf-filter-actions {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 1.5rem;
}
#wcf-filter-root .wcf-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem 1rem;
        border-radius: 0.375rem;
        font-size: 0.8125rem;
        font-weight: 600;
        cursor: pointer;
        text-decoration: none;
        transition: all 0.15s;
}
#wcf-filter-root .wcf-btn-primary {
        background: #d97706;
        color: #fff;
        border: 1px solid #d97706;
}
#wcf-filter-root .wcf-btn-primary:hover {
        background: #b45309;
        border-color: #b45309;
}
#wcf-filter-root .wcf-btn-outline {
        background: #fff;
        color: #374151;
        border: 1px solid #d1d5db;
}
#wcf-filter-root .wcf-btn-outline:hover {
        border-color: #d97706;
        color: #d97706;
}
#wcf-filter-root .wcf-btn-block {
        width: 100%;
}

/* ===== Shop Layout ===== */
#wcf-filter-root .wcf-shop-layout {
        display: flex;
        gap: 1.5rem;
}
#wcf-filter-root .wcf-shop-sidebar {
        width: 280px;
        flex-shrink: 0;
}
#wcf-filter-root .wcf-shop-main {
        flex: 1;
        min-width: 0;
}

/* ===== Toolbar (count + view toggle + sort) ===== */
.wcf-toolbar {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 1rem !important;
        padding: 0.75rem 1rem !important;
        background: #fff !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 0.5rem !important;
        margin-bottom: 1rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
}
.wcf-toolbar-count {
        font-size: 0.875rem !important;
        color: #666 !important;
        display: flex !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
}
.wcf-toolbar-count strong {
        color: #1A202C !important;
}

/* Separator dot between "N товаров найдено" and "отображаем X–Y" */
.wcf-toolbar-count .wcf-toolbar-sep {
        color: #cbd5e1 !important;
        font-weight: 700 !important;
        margin: 0 0.125rem !important;
        user-select: none !important;
}

/* Range text: "отображаем 13–24 из 71" — softer styling, subtle background pill */
.wcf-toolbar-count .wcf-toolbar-range {
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.25rem !important;
        font-size: 0.8125rem !important;
        color: #6b7280 !important;
        background: #f3f4f6 !important;
        padding: 0.25rem 0.625rem !important;
        border-radius: 9999px !important;
        line-height: 1.4 !important;
        white-space: nowrap !important;
}

/* Numbers inside range — slightly bolder & darker for readability */
.wcf-toolbar-count .wcf-toolbar-range strong {
        color: var(--wcf-primary, #FF6B35) !important;
        font-weight: 700 !important;
        font-variant-numeric: tabular-nums !important;
}
.wcf-toolbar-controls {
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
}
.wcf-view-toggle {
        display: flex !important;
        gap: 0.25rem !important;
}
.wcf-view-toggle button {
        width: 2rem !important;
        height: 2rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 0.375rem !important;
        background: #fff !important;
        color: #666 !important;
        cursor: pointer !important;
        transition: all 0.15s !important;
}
.wcf-view-toggle button.active {
        background: var(--wcf-primary, #FF6B35) !important;
        color: #fff !important;
        border-color: var(--wcf-primary, #FF6B35) !important;
}
.wcf-view-toggle button:hover {
        border-color: var(--wcf-primary, #FF6B35) !important;
}
.wcf-sort-select {
        padding: 0.375rem 0.75rem !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 0.375rem !important;
        font-size: 0.875rem !important;
        background: #fff !important;
}

/* List view mode — horizontal card: image left (140px square) + content right */
.products.list-view,
.products-grid.list-view {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
}
.products.list-view > li,
.products-grid.list-view > li {
        width: 100% !important;
}
/* List view: force the INNER card container to be horizontal.
 * aspros cards have inline style="flex-direction:column" — we must override with !important. */
.products.list-view > li > *,
.products.list-view > li > .product-card-category,
.products-grid.list-view > li > *,
.products-grid.list-view > li > .product-card-category {
        display: flex !important;
        flex-direction: row !important;
        align-items: stretch !important;
        gap: 1rem !important;
}
/* Image container — min 250×280, NOT cropped (contain shows whole product) */
.products.list-view .product-img-container,
.products.list-view .pc-image,
.products.list-view .archive-image-wrap,
.products.list-view .woocommerce-loop-product__link,
.products-grid.list-view .product-img-container,
.products-grid.list-view .pc-image,
.products-grid.list-view .archive-image-wrap,
.products-grid.list-view .woocommerce-loop-product__link {
        min-width: 250px !important;
        min-height: 280px !important;
        width: 250px !important;
        max-width: 250px !important;
        height: 280px !important;
        max-height: 280px !important;
        overflow: hidden !important;
        flex-shrink: 0 !important;
        aspect-ratio: auto !important;
        background: #f9fafb !important;
        border-radius: 0.375rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
}
.products.list-view .product-img-container img,
.products.list-view .pc-image img,
.products.list-view .archive-image-wrap img,
.products-grid.list-view .product-img-container img,
.products-grid.list-view .pc-image img,
.products-grid.list-view .archive-image-wrap img {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;  /* contain = whole product visible, no crop */
        object-position: center !important;
        padding: 0.25rem !important;
        box-sizing: border-box !important;
}
/* Content takes remaining space */
.products.list-view .product-info,
.products.list-view .pc-body,
.products.list-view .product-details,
.products-grid.list-view .product-info,
.products-grid.list-view .pc-body,
.products-grid.list-view .product-details {
        flex: 1 !important;
        width: auto !important;
        min-width: 0 !important;
}

/* ===== Mobile: 1 product per row — VERTICAL card, image FULL WIDTH =====
 * On mobile (1 column), the card is vertical: image on TOP (full width),
 * content BELOW. This makes the product image prominent and easy to tap.
 *
 * The image container takes the FULL card width, with a square aspect-ratio
 * (1/1) — standard for product cards (Amazon, Wildberries, Ozon).
 * The image uses object-fit: contain so the whole product is visible.
 */
@media (max-width: 649px) {
        /* Grid → 1 column */
        #wcfProductsWrapper,
        #wcfProductsWrapper .products,
        #wcfProductsWrapper .products-grid,
        #wcfProductsWrapper ul.products.columns-2,
        #wcfProductsWrapper ul.products.columns-3,
        #wcfProductsWrapper ul.products.columns-4,
        #wcfProductsWrapper ul.products.columns-5,
        #wcfProductsWrapper ul.products.columns-6 {
                display: grid !important;
                grid-template-columns: 1fr !important;
                gap: 0.625rem !important;
                width: 100% !important;
                max-width: 100% !important;
                box-sizing: border-box !important;
                padding: 0 !important;
                margin: 0 !important;
        }

        /* Card <li> — full width, NO forced flex direction (let card be natural) */
        #wcfProductsWrapper > ul > li,
        #wcfProductsWrapper > .products > li,
        #wcfProductsWrapper > .products-grid > li,
        #wcfProductsWrapper > .products-grid > .product-card,
        #wcfProductsWrapper > .products-grid > .product,
        #wcfProductsWrapper > ul.products > .product,
        #wcfProductsWrapper > .product-card,
        #wcfProductsWrapper > .product {
                width: 100% !important;
                max-width: 100% !important;
                grid-column: 1 / -1 !important;
                box-sizing: border-box !important;
                /* DON'T force flex-direction: row — let the card use its own layout.
                 * aspros cards have flex-direction: column (inline) — perfect for vertical. */
        }

        /* IMAGE container — FULL WIDTH, square aspect ratio (1/1) */
        #wcfProductsWrapper li .product-img-container,
        #wcfProductsWrapper li .pc-image,
        #wcfProductsWrapper li .archive-image-wrap,
        #wcfProductsWrapper li .woocommerce-loop-product__link,
        #wcfProductsWrapper li .product-card__image,
        #wcfProductsWrapper li .product-image,
        #wcfProductsWrapper .product-card .product-img-container,
        #wcfProductsWrapper .product-card .pc-image,
        #wcfProductsWrapper .product-card .archive-image-wrap,
        #wcfProductsWrapper .product-card .woocommerce-loop-product__link,
        #wcfProductsWrapper .product-card .product-card__image,
        #wcfProductsWrapper .product-card .product-image {
                width: 100% !important;
                max-width: 100% !important;
                min-width: 0 !important;
                flex: none !important;
                height: auto !important;
                max-height: none !important;
                aspect-ratio: 1 / 1 !important;       /* square — standard product card */
                box-sizing: border-box !important;
                overflow: hidden !important;
                border-radius: 0.375rem 0.375rem 0 0 !important;  /* top corners only */
                background: #f9fafb !important;
                display: flex !important;
                align-items: center !important;
                justify-content: center !important;
        }

        /* Image — fill the container, show whole product (contain, no crop) */
        #wcfProductsWrapper img {
                width: 100% !important;
                height: 100% !important;
                max-width: 100% !important;
                max-height: 100% !important;
                object-fit: contain !important;        /* contain = whole product visible */
                object-position: center !important;
                display: block !important;
                margin: 0 !important;
                padding: 0.5rem !important;            /* breathing room inside the box */
                box-sizing: border-box !important;
        }

        /* CONTENT — full width below image (natural block flow) */
        #wcfProductsWrapper li .product-info,
        #wcfProductsWrapper li .pc-body,
        #wcfProductsWrapper li .product-details,
        #wcfProductsWrapper li .product-card__body,
        #wcfProductsWrapper li .product-card__content,
        #wcfProductsWrapper .product-card .product-info,
        #wcfProductsWrapper .product-card .pc-body,
        #wcfProductsWrapper .product-card .product-details,
        #wcfProductsWrapper .product-card .product-card__body,
        #wcfProductsWrapper .product-card .product-card__content,
        #wcfProductsWrapper > ul > li > *:not(.product-img-container):not(.pc-image):not(.archive-image-wrap):not(.woocommerce-loop-product__link):not(.product-card__image):not(.product-image):not(img):not(.onsale):not(.badges) {
                width: 100% !important;
                max-width: 100% !important;
                box-sizing: border-box !important;
                overflow: visible !important;
                word-wrap: break-word !important;
                overflow-wrap: break-word !important;
                hyphens: auto !important;
        }

        /* Title — clamp to 2 lines */
        #wcfProductsWrapper .product-card .pc-title,
        #wcfProductsWrapper .woocommerce-loop-product__title,
        #wcfProductsWrapper .product-title,
        #wcfProductsWrapper h2.woocommerce-loop-product__title,
        #wcfProductsWrapper .product-title-category {
                font-size: 0.9375rem !important;
                line-height: 1.35 !important;
                margin: 0 0 0.375rem !important;
                display: -webkit-box !important;
                -webkit-line-clamp: 2 !important;
                -webkit-box-orient: vertical !important;
                overflow: hidden !important;
                text-overflow: ellipsis !important;
                word-wrap: break-word !important;
                overflow-wrap: break-word !important;
        }

        /* Price — fully visible, wraps if needed */
        #wcfProductsWrapper .price,
        #wcfProductsWrapper .woocommerce-price-amount,
        #wcfProductsWrapper .pc-price,
        #wcfProductsWrapper .product-price {
                font-size: 0.9375rem !important;
                font-weight: 700 !important;
                white-space: normal !important;     /* allow wrapping for long prices */
                margin: 0.25rem 0 !important;
                display: block !important;
        }

        /* Add to cart button — full width of content column on mobile */
        #wcfProductsWrapper .button,
        #wcfProductsWrapper .add_to_cart_button,
        #wcfProductsWrapper .ajax_add_to_cart,
        #wcfProductsWrapper .pc-add-to-cart,
        #wcfProductsWrapper .product-card__add-to-cart {
                width: 100% !important;
                max-width: 100% !important;
                box-sizing: border-box !important;
                font-size: 0.8125rem !important;
                padding: 0.5rem 0.75rem !important;
                margin-top: 0.5rem !important;
                white-space: normal !important;
                overflow-wrap: break-word !important;
        }

        /* SALE badge — positioned inside the image container, doesn't overflow */
        #wcfProductsWrapper .onsale,
        #wcfProductsWrapper .badges {
                position: absolute !important;
                top: 0.25rem !important;
                left: 0.25rem !important;
                z-index: 2 !important;
                font-size: 0.6875rem !important;
                padding: 0.125rem 0.375rem !important;
        }

        /* Card needs position: relative for absolute sale badge */
        #wcfProductsWrapper > ul > li,
        #wcfProductsWrapper > .products > li,
        #wcfProductsWrapper .product-card {
                position: relative !important;
        }

        /* Constrain the wrapper itself — final defense against horizontal scroll */
        #wcfProductsWrapper {
                max-width: 100vw !important;
                overflow-x: hidden !important;
        }

        /* ===== LIST VIEW on mobile — 1 COLUMN (vertical card) =====
         * On mobile, list-view uses the SAME 1-column vertical layout as the
         * normal grid view: image on TOP (full width, square), content BELOW.
         * The horizontal list-view (image left + content right) is a DESKTOP-only
         * feature — on mobile screens it would make the image too narrow.
         *
         * We DON'T need to add any rules here — the mobile rules above already
         * apply to .products.list-view because the selectors target #wcfProductsWrapper
         * universally (both .products and .products.list-view match). We just
         * must NOT override them with horizontal layout here.
         *
         * Previous version forced list-view back to horizontal on mobile with
         * 100px image — that looked cramped. Removed.
         */
}

/* ===== Mobile Filter Toggle Button (hidden on desktop, visible on mobile) ===== */
.wcf-mobile-filter-btn {
        display: none !important;
        align-items: center;
        gap: 0.375rem;
        padding: 0.5rem 1rem;
        margin-bottom: 1rem;
        border: 1px solid #d1d5db;
        border-radius: 0.375rem;
        background: #fff;
        color: #374151;
        font-size: 0.875rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.15s;
}
.wcf-mobile-filter-btn:hover {
        border-color: var(--wcf-primary, #FF6B35);
        color: var(--wcf-primary, #FF6B35);
}
@media (max-width: 1024px) {
        .wcf-mobile-filter-btn {
                display: inline-flex !important;
        }
}

/* ===== Mobile Filter Drawer =====
 * PLUGIN-INDEPENDENT: All drawer rules are scoped to .wcf-sidebar-mounted
 * (a class added by the plugin's JS to whatever container the filter lives in)
 * and .wcf-filter-overlay (plugin's own overlay element). This means the
 * drawer works regardless of whether the host theme uses .shop-sidebar,
 * #shopSidebar, .wcf-shop-sidebar, or any other class name.
 *
 * The plugin's JS adds .wcf-sidebar-mounted to the sidebar container on init,
 * and toggles .wcf-sidebar-open (NOT .open, which may collide with theme classes).
 */

/* Overlay — uses plugin's own class so it works without any theme cooperation */
.wcf-filter-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
        opacity: 0;
        transition: opacity 0.3s ease;
}
.wcf-filter-overlay.open {
        display: block;
        opacity: 1;
}

/* Desktop: sidebar is part of normal layout.
 * .wcf-sidebar-mounted is added by JS to the sidebar container (any selector). */
.wcf-sidebar-mounted {
        /* default: no special positioning; theme controls layout on desktop */
}

/* Mobile drawer (≤1024px): turn the mounted sidebar into a slide-in drawer.
 * This works for ANY container (.wcf-shop-sidebar, .shop-sidebar, aside, etc.)
 * because the JS adds .wcf-sidebar-mounted to it.
 */
@media (max-width: 1024px) {
        .wcf-shop-layout {
                flex-direction: column;
        }

        .wcf-sidebar-mounted {
                position: fixed !important;
                top: 0;
                left: 0;
                width: 85%;
                max-width: 360px;
                height: 100%;
                height: 100dvh; /* dynamic viewport height — handles mobile browser chrome */
                background: #fff;
                z-index: 9999;
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
                transform: translateX(-100%);
                transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
                padding: 1rem !important;
                box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
                box-sizing: border-box !important;
        }

        /* When JS adds .wcf-sidebar-open → slide in */
        .wcf-sidebar-mounted.wcf-sidebar-open {
                transform: translateX(0);
        }

        /* Close button visible only when drawer is mounted (mobile) */
        .wcf-sidebar-mounted #wcfFilterClose {
                display: flex;
        }
}

/* Close button (hidden on desktop, visible on mobile drawer) */
#wcfFilterClose {
        display: none;
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
        width: 36px;
        height: 36px;
        align-items: center;
        justify-content: center;
        background: #f3f4f6;
        border: 1px solid #d1d5db;
        border-radius: 50%;
        cursor: pointer;
        font-size: 1.25rem;
        line-height: 1;
        color: #374151;
        z-index: 10000;
        transition: all 0.15s;
}
#wcfFilterClose:hover {
        background: #e5e7eb;
        color: #111827;
        transform: rotate(90deg);
}

/* ===== Toolbar ===== */
#wcf-filter-root .wcf-shop-toolbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid #e5e7eb;
}
#wcf-filter-root .wcf-count {
        font-size: 0.875rem;
        color: #6b7280;
}
#wcf-filter-root .wcf-count strong {
        color: #111827;
}
#wcf-filter-root .wcf-sort-select {
        padding: 0.375rem 0.5rem;
        border: 1px solid #d1d5db;
        border-radius: 0.375rem;
        font-size: 0.8125rem;
}

/* ===== Filter Chips (rendered outside filter sidebar, in main content) ===== */
.wcf-filter-chips {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        margin-bottom: 1rem !important;
}
.wcf-filter-chip {
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.25rem !important;
        background: #EDF2F7 !important;
        color: #2D3748 !important;
        padding: 0.25rem 0.5rem !important;
        border-radius: 0.375rem !important;
        font-size: 0.75rem !important;
        border: 1px solid #e9efef !important;
}
.wcf-chip-x {
        background: none !important;
        border: none !important;
        color: #718096 !important;
        cursor: pointer !important;
        font-size: 1rem !important;
        line-height: 1 !important;
        padding: 0 !important;
}
.wcf-chip-x:hover {
        color: #ef4444 !important;
}
.wcf-clear-all {
        background: #fee2e2 !important;
        color: #991b1b !important;
        border: 1px solid #fecaca !important;
}

/* ===== Products Grid ===== */
/* Reset UL/LI styles for products grid (no bullets, no left margin) */
.wcfProductsWrapper ul,
#wcfProductsWrapper ul,
#wcf-filter-root .wcf-shop-main ul,
#shopMain ul {
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
}
.wcfProductsWrapper ul li,
#wcfProductsWrapper ul li,
#wcf-filter-root .wcf-shop-main ul li,
#shopMain ul li {
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
}

#wcf-filter-root .wcf-products-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
}
#wcf-filter-root .wcf-product-card {
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        padding: 1rem;
        text-align: center;
        transition: box-shadow 0.15s, border-color 0.15s;
        background: #fff;
        display: flex;
        flex-direction: column;
}
#wcf-filter-root .wcf-product-card:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        border-color: #d97706;
}
#wcf-filter-root .wcf-product-link {
        display: block;
        text-decoration: none;
        color: inherit;
        flex: 1;
}
#wcf-filter-root .wcf-product-img-wrap {
        position: relative;
        margin-bottom: 0.75rem;
        aspect-ratio: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f9fafb;
        border-radius: 0.375rem;
        overflow: hidden;
}
#wcf-filter-root .wcf-product-img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
}
#wcf-filter-root .wcf-product-no-img {
        color: #d1d5db;
        display: flex;
        align-items: center;
        justify-content: center;
}
#wcf-filter-root .wcf-product-badge {
        position: absolute;
        top: 0.5rem;
        left: 0.5rem;
        padding: 0.125rem 0.5rem;
        border-radius: 0.25rem;
        font-size: 0.6875rem;
        font-weight: 700;
        text-transform: uppercase;
}
#wcf-filter-root .wcf-sale-badge {
        background: #dc2626;
        color: #fff;
}
#wcf-filter-root .wcf-stock-badge {
        background: #6b7280;
        color: #fff;
        left: auto;
        right: 0.5rem;
}
#wcf-filter-root .wcf-product-brand {
        font-size: 0.75rem;
        color: #6b7280;
        margin-bottom: 0.25rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
}
#wcf-filter-root .wcf-product-title {
        font-size: 0.875rem;
        margin: 0 0 0.5rem;
        min-height: 2.5rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
}
#wcf-filter-root .wcf-product-rating {
        font-size: 0.75rem;
        color: #6b7280;
        margin-bottom: 0.5rem;
}
#wcf-filter-root .wcf-stars {
        color: #f59e0b;
        font-weight: 600;
}
#wcf-filter-root .wcf-product-price {
        font-weight: 700;
        color: #d97706;
        font-size: 1rem;
        margin-bottom: 0.75rem;
}
#wcf-filter-root .wcf-product-price del {
        color: #9ca3af;
        font-weight: 400;
        font-size: 0.875rem;
        margin-right: 0.25rem;
}
#wcf-filter-root .wcf-product-price ins {
        text-decoration: none;
}
#wcf-filter-root .wcf-product-card.out-of-stock {
        opacity: 0.7;
}
#wcf-filter-root .wcf-product-card.out-of-stock .wcf-product-price {
        color: #6b7280;
}

/* ===== Empty State ===== */
#wcf-filter-root .wcf-empty-state {
        text-align: center;
        padding: 3rem 1rem;
}
#wcf-filter-root .wcf-empty-state .icon {
        font-size: 3rem;
        margin-bottom: 1rem;
}

/* ===== Pagination =====
 * Beautiful, accessible pagination with:
 *  - Smooth hover transitions (lift + shadow)
 *  - Clear active state (gradient + shadow ring)
 *  - Properly styled disabled state (no pointer, faded)
 *  - Ellipsis (...) as distinct styled element
 *  - SVG chevrons for prev/next with optional text labels
 *  - Mobile-friendly: hides text labels under 640px (icons only)
 *  - Page counter ("Страница 2 из 12") below the buttons
 *  - Keyboard-accessible focus rings
 */
.wcf-pagination {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.875rem;
}

.wcf-pagination .wcf-page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.wcf-pagination .wcf-page-numbers li {
    list-style: none;
}

/* Base button (link or current span) */
.wcf-pagination .wcf-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.625rem;
    background: #fff;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    user-select: none;
    white-space: nowrap;
}

.wcf-pagination .wcf-page-link svg {
    flex-shrink: 0;
    transition: transform 0.18s ease;
}

/* Hover state — lift + colored border + subtle shadow */
.wcf-pagination a.wcf-page-link:hover {
    border-color: var(--wcf-primary, #FF6B35);
    color: var(--wcf-primary, #FF6B35);
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.18);
}

/* Prev/Next chevron nudge on hover */
.wcf-pagination a.wcf-page-prev:hover svg {
    transform: translateX(-2px);
}
.wcf-pagination a.wcf-page-next:hover svg {
    transform: translateX(2px);
}

/* Active (current) page — gradient + shadow ring */
.wcf-pagination .wcf-page-link.current {
    background: linear-gradient(135deg, var(--wcf-primary, #FF6B35) 0%, var(--wcf-primary-dark, #e55a2b) 100%);
    color: #fff;
    border-color: var(--wcf-primary, #FF6B35);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.35), 0 0 0 3px rgba(255, 107, 53, 0.12);
    cursor: default;
    transform: translateY(-1px);
}

/* Disabled state (prev on page 1 / next on last page) */
.wcf-pagination .wcf-page-link.is-disabled {
    color: #cbd5e1;
    background: #f9fafb;
    border-color: #f3f4f6;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.7;
    pointer-events: none;
}

/* Ellipsis (...) — distinct, not just inherited link styles */
.wcf-pagination .wcf-page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 2.5rem;
    color: #9ca3af;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    user-select: none;
    cursor: default;
}

/* Focus ring for keyboard navigation (accessibility) */
.wcf-pagination a.wcf-page-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.35), 0 1px 2px rgba(0, 0, 0, 0.04);
    border-color: var(--wcf-primary, #FF6B35);
}

/* Page counter meta below buttons */
.wcf-pagination-meta {
    font-size: 0.8125rem;
    color: #6b7280;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.wcf-pagination-meta .wcf-pagination-current {
    color: var(--wcf-primary, #FF6B35);
    font-weight: 700;
}

.wcf-pagination-meta .wcf-pagination-total {
    color: #374151;
    font-weight: 600;
}

/* ===== Mobile: hide text labels, keep icons only ===== */
@media (max-width: 640px) {
    .wcf-pagination {
        margin-top: 1.75rem;
        gap: 0.625rem;
    }

    .wcf-pagination .wcf-page-numbers {
        gap: 0.25rem;
    }

    .wcf-pagination .wcf-page-link {
        min-width: 2.25rem;
        height: 2.25rem;
        padding: 0 0.5rem;
        font-size: 0.8125rem;
    }

    /* Hide text labels on prev/next — icons only for compact mobile */
    .wcf-pagination .wcf-page-text {
        display: none;
    }

    .wcf-pagination-meta {
        font-size: 0.75rem;
    }
}

/* ===== Tablet & desktop: prev/next get wider hit area with text ===== */
@media (min-width: 641px) {
    .wcf-pagination .wcf-page-prev,
    .wcf-pagination .wcf-page-next {
        padding: 0 1rem;
    }
}

/* ===== Print: simplify pagination ===== */
@media print {
    .wcf-pagination {
        margin-top: 1rem;
    }
    .wcf-pagination .wcf-page-link {
        border: none;
        box-shadow: none;
        background: transparent;
        color: #000;
    }
    .wcf-pagination .wcf-page-link.current {
        color: #000;
        font-weight: 800;
        background: transparent;
        box-shadow: none;
        text-decoration: underline;
    }
    .wcf-pagination .wcf-page-prev,
    .wcf-pagination .wcf-page-next,
    .wcf-pagination-meta {
        display: none;
    }
}

/* ===== Mobile Filter Toggle ===== */
#wcf-filter-root .wcf-mobile-filter-toggle {
        display: none;
        margin-bottom: 1rem;
}
@media (max-width: 1024px) {
        .wcf-mobile-filter-toggle {
                display: inline-flex;
        }
}

/* ===== Toolbar mobile adaptation =====
 * PLUGIN-INDEPENDENT: scoped to .wcf-toolbar (plugin's own class).
 * On small screens the toolbar stacks vertically:
 *   Row 1: "71 товар найдено · отображаем 13–24 из 71"
 *   Row 2: [grid|list]  [sort]
 * The range text wraps to a new line naturally thanks to flex-wrap above.
 *
 * Anti-overflow measures:
 *   - box-sizing: border-box (so padding doesn't add to width)
 *   - max-width: 100% on all children
 *   - min-width: 0 on flex children (allows them to shrink below content size)
 *   - overflow: hidden on toolbar itself (no horizontal scroll)
 *   - select + view-toggle sized to fit comfortably side-by-side
 */
@media (max-width: 640px) {
        .wcf-toolbar {
                flex-direction: column !important;
                align-items: stretch !important;
                gap: 0.625rem !important;
                padding: 0.625rem 0.75rem !important;
                box-sizing: border-box !important;
                max-width: 100% !important;
                width: 100% !important;
                overflow: hidden !important; /* prevent horizontal page scroll */
        }

        .wcf-toolbar-count {
                font-size: 0.8125rem !important;
                gap: 0.375rem !important;
                min-width: 0 !important; /* allow shrinking */
                overflow-wrap: break-word !important;
                word-break: break-word !important;
        }

        /* On mobile, the range pill takes its own row for readability */
        .wcf-toolbar-count .wcf-toolbar-range {
                font-size: 0.75rem !important;
                padding: 0.2rem 0.5rem !important;
        }

        .wcf-toolbar-controls {
                justify-content: space-between !important;
                gap: 0.5rem !important;
                min-width: 0 !important;
                flex-wrap: nowrap !important; /* keep grid+sort on one row */
        }

        /* View toggle buttons — fixed compact size, don't grow */
        .wcf-toolbar-controls .wcf-view-toggle {
                flex-shrink: 0 !important;
        }
        .wcf-toolbar-controls .wcf-view-toggle button {
                width: 2rem !important;
                height: 2rem !important;
        }

        /* Sort select — takes remaining space, doesn't overflow */
        .wcf-toolbar-controls .wcf-sort-select,
        #wcfSortSelect {
                flex: 1 1 auto !important;
                min-width: 0 !important;
                max-width: 70% !important;
                padding: 0.375rem 0.5rem !important;
                font-size: 0.75rem !important;
                box-sizing: border-box !important;
        }

        /* Prevent any child of toolbar from causing horizontal scroll */
        .wcf-toolbar > * {
                max-width: 100% !important;
                box-sizing: border-box !important;
                min-width: 0 !important;
        }
}

/* ===== Scrollbar ===== */
#wcf-filter-root .wcf-brand-list::-webkit-scrollbar,
#wcf-filter-root .wcf-attr-list::-webkit-scrollbar {
        width: 6px;
}
#wcf-filter-root .wcf-brand-list::-webkit-scrollbar-track,
#wcf-filter-root .wcf-attr-list::-webkit-scrollbar-track {
        background: #f3f4f6;
}
#wcf-filter-root .wcf-brand-list::-webkit-scrollbar-thumb,
#wcf-filter-root .wcf-attr-list::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 3px;
}

/* ===== Native Range Slider (dual handle) ===== */
#wcf-filter-root .wcf-range-wrapper {
        position: relative;
        height: 32px;
        margin: 0.5rem 0;
}
#wcf-filter-root .wcf-range-track {
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 5px;
        transform: translateY(-50%);
        background: #e5e7eb;
        border-radius: 3px;
        z-index: 1;
}
#wcf-filter-root .wcf-range-fill {
        position: absolute;
        top: 50%;
        height: 5px;
        transform: translateY(-50%);
        background: #d97706;
        border-radius: 3px;
        z-index: 2;
        left: 0;
        width: 100%;
}
#wcf-filter-root .wcf-range {
        position: absolute;
        top: -7px;
        left: 0;
        width: 100%;
        height: 32px;
        margin: 0;
        background: none;
        pointer-events: none;
        -webkit-appearance: none;
        appearance: none;
        z-index: 3;
}
#wcf-filter-root .wcf-range::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        pointer-events: auto;
        width: 19px;
        height: 19px;
        border-radius: 50%;
        background: #fff;
        border: 2px solid #d97706;
        box-shadow: 0 1px 3px rgba(0,0,0,0.15);
        cursor: pointer;
        transition: transform 0.15s, box-shadow 0.15s;
        margin-top: 0;
}
#wcf-filter-root .wcf-range::-webkit-slider-thumb:hover {
        transform: scale(1.15);
        box-shadow: 0 2px 6px rgba(217,119,6,0.3);
}
#wcf-filter-root .wcf-range::-moz-range-thumb {
        pointer-events: auto;
        width: 19px;
        height: 19px;
        border-radius: 50%;
        background: #fff;
        border: 2px solid #d97706;
        box-shadow: 0 1px 3px rgba(0,0,0,0.15);
        cursor: pointer;
        transition: transform 0.15s, box-shadow 0.15s;
}
#wcf-filter-root .wcf-range::-moz-range-thumb:hover {
        transform: scale(1.15);
        box-shadow: 0 2px 6px rgba(217,119,6,0.3);
}
#wcf-filter-root .wcf-range::-webkit-slider-runnable-track {
        height: 5px;
        background: transparent;
}
#wcf-filter-root .wcf-range::-moz-range-track {
        height: 5px;
        background: transparent;
}

/* ===== ASPROS.BY PRODUCT CARDS ===== */
.faby-products-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; list-style: none; padding: 0; margin: 0; }
@media (max-width: 1199px) { .faby-products-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 768px) { .faby-products-grid { grid-template-columns: repeat(2,1fr); gap: 1rem; } }
@media (max-width: 480px) { .faby-products-grid { grid-template-columns: 1fr; } }

.product-item.faby-product-card { list-style: none; margin: 0; padding: 0; }
.product-card-category { background: #fff; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: box-shadow .2s, border-color .2s; }
.product-card-category:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); border-color: var(--wcf-primary, #FF6B35); }
.product-img-container { position: relative; overflow: hidden; aspect-ratio: 1; background: #f8f9fa; }
.product-img-container img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.product-card-category:hover .product-img-container img { transform: scale(1.05); }
/* Badges stack vertically in the top-left corner. Up to 3 badges can appear:
 * Акция (sale) + Хит (featured) + По запросу (out of stock).
 * Each badge gets incremental top offset so they don't overlap. */
.product-badge { position: absolute; top: .5rem; left: .5rem; z-index: 2; background: var(--wcf-primary, #FF6B35); color: #fff; font-size: .6875rem; font-weight: 700; padding: .125rem .5rem; border-radius: .25rem; display: block; line-height: 1.4; }
.product-badge + .product-badge { top: 2rem; }
.product-badge + .product-badge + .product-badge { top: 3.5rem; }
.product-badge-hit { background: #fbbf24; color: #1a1a1a; }
.product-badge-stock { background: #6c757d; }
.product-info { padding: 15px; flex: 1; display: flex; flex-direction: column; }
.rating-category { color: #fbbf24; font-size: .75rem; margin-bottom: .5rem; display: flex; align-items: center; flex-wrap: wrap; gap: .125rem; }
.rating-category .text-muted { font-size: .75rem; }
.product-title-category { font-size: 16px; margin: 0 0 10px; }
.product-title-category a { color: #1A202C; text-decoration: none; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-title-category a:hover { color: var(--wcf-primary, #FF6B35); }
.product-price-category { font-size: 1.125rem; font-weight: 800; color: var(--wcf-primary, #FF6B35); }
.discount-badge-category { background: rgba(239,68,68,.1); color: #ef4444; font-size: .75rem; font-weight: 700; padding: .125rem .5rem; border-radius: .25rem; margin-left: .5rem; }
.stock-preorder { color: #6c757d !important; }
.btn-orange { background: var(--wcf-primary, #FF6B35); color: #fff; border: none; cursor: pointer; transition: all .3s; }
.btn-orange:hover { background: var(--wcf-primary-dark, #e55a2b); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,107,53,0.3); }
.btn-orange:focus { outline: 2px solid rgba(255,107,53,0.4); outline-offset: 2px; }

/* ===== ORDER MODAL ===== */
.wcf-order-submit { background: var(--wcf-primary, #FF6B35); color: #fff; border: none; padding: 12px; font-size: 16px; font-weight: 600; transition: all .3s; }
.wcf-order-submit:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(255,107,53,0.3); }
.wcf-order-submit:disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; }
