/**
 * ModeoKids Professional Shop Page Styles
 * Modern e-commerce design with sidebar filters and product grid
 */

/* CRITICAL: Override global container styles that break grid layout */
.modeokids-shop-container .container,
.modeokids-shop-layout {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
}

/* Pagination - explicit margin */
.woocommerce-pagination {
    margin-top: 3rem !important;
}

/* Breadcrumbs - Professional Styling - Spójne z produktem */
.woocommerce-breadcrumb {
    padding: 6px 0;
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
}

@media (max-width: 991px) {
    .woocommerce-breadcrumb {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 767px) {
    .woocommerce-breadcrumb {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 575px) {
    .woocommerce-breadcrumb {
        padding-left: 10px;
        padding-right: 10px;
    }
}

.woocommerce-breadcrumb a {
    color: var(--primary, #cc1616);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 600;
}

.woocommerce-breadcrumb a:hover {
    color: var(--primary-hover, #b31313);
    text-decoration: underline;
}

.woocommerce-breadcrumb .breadcrumb-separator {
    margin: 0 8px;
    color: #ccc;
}

/* Main Shop Container */
.modeokids-shop-container {
    padding: 50px 0;
    background: #f8f9fa;
    min-height: 100vh;
}

/* Product Grid */
.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* Tablet - 3 columns */
@media (max-width: 1200px) {
    .products {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

/* Mobile landscape - 2 columns */
@media (max-width: 768px) {
    .products {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Small mobile - keep 2 columns but smaller gap */
@media (max-width: 480px) {
    .products {
        grid-template-columns: repeat(2, 1fr);
        /* enforce 2 columns on very small screens */
        gap: 15px;
    }
}

/* Additional breakpoint for extra small devices */
@media (max-width: 640px) {
    .products {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Shop Layout Grid - Sidebar + Products */
.modeokids-shop-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 1199px) {
    .modeokids-shop-layout {
        grid-template-columns: 280px 1fr;
        gap: 30px;
    }
}

@media (max-width: 991px) {
    .modeokids-shop-layout {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .modeokids-shop-sidebar {
        order: 2;
    }

    .modeokids-shop-main {
        order: 1;
    }
}

/* ===========================
   SIDEBAR - FILTERS
   =========================== */

.modeokids-shop-sidebar {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 0;
    height: fit-content;
    position: sticky;
    top: 100px;
    align-self: flex-start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* Scrollbar styling for sidebar */
.modeokids-shop-sidebar::-webkit-scrollbar {
    width: 6px;
}

.modeokids-shop-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modeokids-shop-sidebar::-webkit-scrollbar-thumb {
    background: var(--primary, #cc1616);
    border-radius: 3px;
}

.modeokids-shop-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover, #b31313);
}

.modeokids-shop-filters {
    padding: 0;
}

/* Filters Title */
.modeokids-filters-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    padding: 25px 25px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, var(--primary, #cc1616) 0%, var(--primary-hover, #b31313) 100%);
    color: white;
}

.modeokids-filters-title .material-icons {
    font-size: 26px;
}

/* Filter Group */
.modeokids-filter-group {
    padding: 25px;
    border-bottom: 1px solid #e8e8e8;
}

.modeokids-filter-group:last-child {
    border-bottom: none;
}

.modeokids-filter-group__title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #2c2c2c;
    margin: 0 0 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

/* Category Filters */
.modeokids-category-filter {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modeokids-category-filter li {
    margin-bottom: 6px;
}

.modeokids-category-filter__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #4a4a4a;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fafafa;
    border: 2px solid transparent;
    font-weight: 500;
}

.modeokids-category-filter__item:hover {
    background: #e3f2fd;
    color: var(--primary, #cc1616);
    border-color: var(--primary, #cc1616);
    transform: translateX(4px);
}

.modeokids-category-filter__item.active {
    background: linear-gradient(135deg, var(--primary, #cc1616) 0%, var(--primary-hover, #b31313) 100%);
    color: #ffffff;
    border-color: var(--primary, #cc1616);
    box-shadow: 0 4px 12px rgba(26, 157, 240, 0.3);
}

.modeokids-category-filter__name {
    font-weight: 600;
    font-size: 0.9375rem;
}

.modeokids-category-filter__count {
    font-size: 0.8125rem;
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.1);
    padding: 3px 9px;
    border-radius: 12px;
    font-weight: 600;
}

.modeokids-category-filter__item.active .modeokids-category-filter__count {
    background: rgba(255, 255, 255, 0.25);
}

/* Price Filter */
.modeokids-price-filter {
    margin-top: 15px;
    width: 100%;
    overflow-x: hidden;
}

.modeokids-price-filter form {
    width: 100%;
}

/* Price Slider Widget */
.modeokids-price-slider-widget,
#modeokids-price-slider {
    margin: 20px 0 25px;
    padding: 12px 0;
    min-height: 40px;
    height: 40px;
    width: 100%;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
}

/* noUiSlider base styles for #modeokids-price-slider */
#modeokids-price-slider .noUi-base {
    width: 100%;
    height: 8px;
    position: relative;
    background: #e0e0e0;
    border-radius: 8px;
}

#modeokids-price-slider .noUi-connects {
    border-radius: 8px;
    height: 8px;
}

#modeokids-price-slider .noUi-connect {
    background: linear-gradient(135deg, var(--primary, #cc1616) 0%, var(--primary-hover, #b31313) 100%);
    height: 8px;
}

#modeokids-price-slider .noUi-handle {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    border: 3px solid var(--primary, #cc1616) !important;
    box-shadow: 0 2px 8px rgba(204, 22, 22, 0.3) !important;
    cursor: pointer !important;
    top: -5px !important;
    right: -9px !important;
}

#modeokids-price-slider .noUi-handle:before,
#modeokids-price-slider .noUi-handle:after {
    display: none !important;
}

#modeokids-price-slider .noUi-handle:hover {
    background: #fee2e2 !important;
    box-shadow: 0 4px 12px rgba(204, 22, 22, 0.5) !important;
}

#modeokids-price-slider .noUi-handle:active {
    box-shadow: 0 4px 12px rgba(204, 22, 22, 0.6) !important;
}

/* noUiSlider custom styling */
.modeokids-price-slider-widget .noUi-base {
    width: 100%;
    height: 8px;
}

.modeokids-price-slider-widget .noUi-connects {
    border-radius: 8px;
}

.modeokids-price-slider-widget .noUi-connect {
    background: linear-gradient(135deg, var(--primary, #cc1616) 0%, var(--primary-hover, #b31313) 100%);
}

.modeokids-price-slider-widget .noUi-handle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--primary, #cc1616);
    box-shadow: 0 2px 8px rgba(26, 157, 240, 0.3);
    cursor: pointer;
    top: -5px;
    right: -9px;
}

.modeokids-price-slider-widget .noUi-handle:before,
.modeokids-price-slider-widget .noUi-handle:after {
    display: none;
}

.modeokids-price-slider-widget .noUi-handle:hover {
    background: #e3f2fd;
}

.modeokids-price-slider-widget .noUi-handle:active {
    box-shadow: 0 4px 12px rgba(26, 157, 240, 0.5);
}

.modeokids-price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
    width: 100%;
}

.modeokids-price-input {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.modeokids-price-input label {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modeokids-price-input input {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    /* border-gray-200 - unified with other inputs */
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    /* text-gray-700 */
    background: #ffffff;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.modeokids-price-input input:hover {
    border-color: #d1d5db;
    /* border-gray-300 */
}

.modeokids-price-input input:focus {
    outline: none;
    border-color: var(--primary, #cc1616) !important;
    box-shadow: 0 0 0 3px rgba(204, 22, 22, 0.1) !important;
    /* ring-primary/10 */
}

/* Override any green/success colors for price inputs - high specificity */
#min_price:focus,
#max_price:focus,
input[name="min_price"]:focus,
input[name="max_price"]:focus,
.modeo-filter-content #min_price:focus,
.modeo-filter-content #max_price:focus,
.modeo-filter-section #min_price:focus,
.modeo-filter-section #max_price:focus {
    border-color: var(--primary, #cc1616) !important;
    box-shadow: 0 0 0 3px rgba(204, 22, 22, 0.1) !important;
    outline: none !important;
}

/* Remove any green border colors from price inputs - override WooCommerce validation styles */
#min_price,
#max_price,
input[name="min_price"],
input[name="max_price"],
.modeo-filter-content #min_price,
.modeo-filter-content #max_price,
.modeo-filter-section #min_price,
.modeo-filter-section #max_price,
#min_price.woocommerce-validated,
#max_price.woocommerce-validated,
input[name="min_price"].woocommerce-validated,
input[name="max_price"].woocommerce-validated {
    border-color: #e5e7eb !important;
    /* border-gray-200 */
}

#min_price:hover,
#max_price:hover,
input[name="min_price"]:hover,
input[name="max_price"]:hover {
    border-color: #d1d5db !important;
    /* border-gray-300 */
}

/* Override WooCommerce validated green border on focus */
#min_price.woocommerce-validated:focus,
#max_price.woocommerce-validated:focus,
input[name="min_price"].woocommerce-validated:focus,
input[name="max_price"].woocommerce-validated:focus {
    border-color: var(--primary, #cc1616) !important;
    box-shadow: 0 0 0 3px rgba(204, 22, 22, 0.1) !important;
}

.modeokids-price-apply {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary, #cc1616) 0%, var(--primary-hover, #b31313) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modeokids-price-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 157, 240, 0.4);
}

/* Shop Filters - Checkbox Styling (Override default blue to use primary color) */
.modeo-shop-filters input[type="checkbox"],
.modeo-category-filter input[type="checkbox"],
.modeo-stock-featured-filter input[type="checkbox"],
.modeo-shop-filters .modeo-category-checkbox,
.modeo-shop-filters .modeo-in-stock-checkbox,
.modeo-shop-filters .modeo-featured-checkbox {
    accent-color: var(--primary, #cc1616) !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.modeo-shop-filters input[type="checkbox"]:checked,
.modeo-category-filter input[type="checkbox"]:checked,
.modeo-stock-featured-filter input[type="checkbox"]:checked,
.modeo-shop-filters .modeo-category-checkbox:checked,
.modeo-shop-filters .modeo-in-stock-checkbox:checked,
.modeo-shop-filters .modeo-featured-checkbox:checked {
    background-color: var(--primary, #cc1616) !important;
    border-color: var(--primary, #cc1616) !important;
}

/* Hide loading indicator in search - not needed */
.modeo-search-loading {
    display: none !important;
}

/* Search Input - Ensure text color is dark even on focus */
/* High specificity to override any global styles */
.modeo-search-filter .modeo-search-input,
.modeo-search-filter input.modeo-search-input,
.modeo-search-filter #modeo-search-input,
.modeo-search-filter .modeo-search-input:focus,
.modeo-search-filter .modeo-search-input:active,
.modeo-search-filter .modeo-search-input:focus-visible,
.modeo-search-filter .modeo-search-input:-webkit-autofill,
.modeo-search-filter .modeo-search-input:-webkit-autofill:focus,
.modeo-search-filter .modeo-search-input:-webkit-autofill:hover,
.modeo-search-filter .modeo-search-input:-webkit-autofill:active,
.modeo-search-filter input.modeo-search-input:focus,
.modeo-search-filter input#modeo-search-input:focus {
    color: #030712 !important;
    /* text-gray-950 */
    -webkit-text-fill-color: #030712 !important;
    /* Override autofill text color */
    caret-color: #030712 !important;
    /* Cursor color */
}

.modeo-search-filter .modeo-search-input::placeholder,
.modeo-search-filter input.modeo-search-input::placeholder {
    color: #9ca3af !important;
    /* placeholder-gray-400 */
}

/* Ensure text stays dark when typing - highest specificity */
.modeo-search-filter:focus-within .modeo-search-input,
.modeo-search-filter:focus-within input.modeo-search-input,
.modeo-search-filter:focus-within #modeo-search-input {
    color: #030712 !important;
    -webkit-text-fill-color: #030712 !important;
}

/* Clear Filters Button */
.modeokids-clear-filters {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: #fff;
    border: 2px solid #dc3545;
    border-radius: 8px;
    color: #dc3545;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9375rem;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modeokids-clear-filters:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
}

/* ===========================
   SHOP MAIN - PRODUCTS
   =========================== */

.modeokids-shop-main {
    min-height: 600px;
}

/* Shop Header - Top Bar */
.modeokids-shop-header {
    background: #ffffff;
    padding: 22px 28px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    flex-wrap: wrap;
    gap: 18px;
}

.modeokids-shop-header__left,
.modeokids-shop-header__right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.woocommerce-result-count {
    color: #666;
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0;
}

/* WooCommerce Ordering Select - Unified neutral styling */
.woocommerce-ordering select,
select.orderby {
    padding: 11px 40px 11px 16px;
    border: 1px solid #e5e7eb;
    /* border-gray-200 */
    border-radius: 8px;
    background: #ffffff;
    color: #374151;
    /* text-gray-700 */
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23374151'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25em;
}

.woocommerce-ordering select:hover,
select.orderby:hover {
    border-color: #d1d5db;
    /* border-gray-300 */
}

.woocommerce-ordering select:focus,
select.orderby:focus {
    outline: none;
    border-color: var(--primary, #cc1616);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(204, 22, 22, 0.1);
    /* ring-primary/10 */
}


/* Product Card - Modern Design */
.products .product {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    border: 2px solid transparent;
}

.products .product:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    transform: translateY(-6px);
    border-color: var(--primary, #cc1616);
}

.products .product .woocommerce-loop-product__link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none !important;
    color: inherit;
}

/* Product Image Container */
.products .product .woocommerce-loop-product__link>a {
    text-decoration: none !important;
}

.products .product img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    transition: transform 0.4s;
}

.products .product:hover img {
    transform: scale(1.08);
}

/* Product Info */
.products .product .woocommerce-loop-product__title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #2c2c2c;
    padding: 18px 18px 12px;
    margin: 0;
    flex: 1;
    line-height: 1.5;
    min-height: 65px;
    text-decoration: none !important;
}

.products .product h2.woocommerce-loop-product__title {
    text-decoration: none !important;
}

/* Product Price */
.products .product .price {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--primary, #cc1616);
    padding: 0 18px 16px;
    margin: 0;
}

.products .product .price del {
    color: #999;
    font-size: 1rem;
    opacity: 0.7;
    margin-right: 8px;
}

.products .product .price ins {
    text-decoration: none;
}

/* Add to Cart Button */
.products .product .button,
.products .product a.button {
    margin: 0 15px 15px;
    background: linear-gradient(135deg, var(--primary, #cc1616) 0%, var(--primary-hover, #b31313) 100%);
    color: #ffffff !important;
    border: none;
    padding: 14px 22px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9375rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none !important;
    display: block;
}

.products .product .button:hover,
.products .product a.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26, 157, 240, 0.4);
    text-decoration: none !important;
}

/* Out of Stock Badge */
.products .product.outofstock {
    opacity: 0.7;
}

.products .product.outofstock::after {
    content: 'Brak na stanie';
    position: absolute;
    top: 15px;
    left: 15px;
    background: #dc3545;
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 800;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.products .product.outofstock .button {
    background: #6c757d;
    cursor: not-allowed;
}

.products .product.outofstock .button:hover {
    transform: none;
    box-shadow: none;
}

/* Sale Badge */
.products .product .onsale {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ff6b6b 0%, #dc3545 100%);
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 800;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* No Products Found - Beautiful Empty State */
.modeo-no-products-found {
    padding: 60px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.modeo-no-products-found__container {
    max-width: 600px;
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modeo-no-products-found__icon {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.modeo-no-products-found__icon svg {
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
}

.modeo-no-products-found__title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 16px;
    line-height: 1.3;
}

.modeo-no-products-found__description {
    font-size: 1.0625rem;
    color: #666;
    line-height: 1.6;
    margin: 0 0 40px;
}

.modeo-no-products-found__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

@media (min-width: 640px) {
    .modeo-no-products-found__actions {
        flex-direction: row;
        justify-content: center;
    }
}

.modeo-no-products-found__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.modeo-no-products-found__button .material-icons {
    font-size: 20px;
}

.modeo-no-products-found__button--primary {
    background: linear-gradient(135deg, var(--primary, #cc1616) 0%, var(--primary-hover, #b31313) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(204, 22, 22, 0.3);
}

.modeo-no-products-found__button--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(204, 22, 22, 0.4);
}

.modeo-no-products-found__button--secondary {
    background: white;
    color: var(--primary, #cc1616);
    border-color: var(--primary, #cc1616);
}

.modeo-no-products-found__button--secondary:hover {
    background: var(--primary, #cc1616);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(204, 22, 22, 0.2);
}

/* Mobile Filter Button - Ensure it's only visible on mobile */
#mobile-filter-button {
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(204, 22, 22, 0.4);
}

#mobile-filter-button:hover {
    box-shadow: 0 12px 32px rgba(204, 22, 22, 0.5);
}

#mobile-filter-button:active {
    transform: translate(-50%, -2px) scale(0.95);
}

/* Filter counter badge */
#mobile-filter-button .filter-count-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

@media (min-width: 1024px) {
    #mobile-filter-button {
        display: none !important;
    }
}

/* Mobile Sidebar - Slide up from bottom */
@media (max-width: 1023px) {
    #filters-sidebar {
        border-top-left-radius: 24px;
        border-top-right-radius: 24px;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* When open - slide up (remove translate-y-full) */
    #filters-sidebar:not(.translate-y-full) {
        transform: translateY(0) !important;
    }

    /* When closed - slide down (has translate-y-full) */
    #filters-sidebar.translate-y-full {
        transform: translateY(100%) !important;
    }

    /* Ensure sidebar content is scrollable and visible */
    /* Note: div:last-child is the search button, so we don't add padding here */

    /* Make sure first filter section (search) is visible - ensure it's not hidden */
    #filters-sidebar .modeo-shop-filters {
        padding-top: 0;
        margin-top: 0;
    }

    /* Ensure search filter section is fully visible */
    #filters-sidebar .modeo-filter-section:first-of-type {
        margin-top: 0;
        padding-top: 0;
    }

    /* Ensure active filters section is visible if present */
    #filters-sidebar .modeo-shop-filters>div:first-of-type {
        margin-top: 0;
        padding-top: 0;
    }

    /* Make sure sticky header doesn't overlap content */
    #filters-sidebar .lg\\:hidden.sticky {
        position: sticky;
        top: 0;
        z-index: 50;
        flex-shrink: 0;
        /* Don't shrink header */
    }

    /* Ensure scrollable content starts right after header */
    #filters-sidebar>div:nth-child(2) {
        flex: 1;
        min-height: 0;
        /* Allow flex child to shrink */
        overflow-y: auto;
    }

    /* Mobile Search Button - Fixed at bottom of screen (only on mobile) */
    @media (max-width: 1023px) {
        #filters-sidebar>div:last-child {
            position: fixed !important;
            bottom: 20px !important;
            left: 20px !important;
            right: 20px !important;
            z-index: 10000 !important;
            /* Above everything */
            margin: 0 !important;
            width: calc(100% - 40px) !important;
            /* Account for left/right margins */
            max-width: calc(100% - 40px) !important;
            border-radius: 12px !important;
            /* Rounded corners */
        }

        /* Add padding to scrollable content so button doesn't cover it */
        #filters-sidebar>div:nth-child(2) {
            padding-bottom: 100px !important;
            /* Space for fixed button with margins */
        }
    }

    /* Make sure first visible element (search) is not hidden */
    #filters-sidebar .modeo-shop-filters>div:not(.hidden) {
        position: relative;
        z-index: 1;
    }

    /* Mobile Search Button Styles */
    #mobile-apply-filters {
        box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1), 0 -2px 4px -2px rgba(0, 0, 0, 0.1);
    }

    #mobile-apply-filters:hover {
        box-shadow: 0 -10px 15px -3px rgba(204, 22, 22, 0.3), 0 -4px 6px -4px rgba(204, 22, 22, 0.2);
    }
}

/* Pagination */
.modeokids-shop-pagination {
    margin-top: 50px;
}

.woocommerce-pagination {
    text-align: center;
}

.woocommerce-pagination ul {
    display: inline-flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-pagination a,
.woocommerce-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 14px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9375rem;
    transition: all 0.3s;
}

.woocommerce-pagination a:hover {
    background: var(--primary, #cc1616);
    color: #ffffff;
    border-color: var(--primary, #cc1616);
    transform: translateY(-2px);
}

.woocommerce-pagination span.current {
    background: linear-gradient(135deg, var(--primary, #cc1616) 0%, var(--primary-hover, #b31313) 100%);
    color: #ffffff;
    border-color: var(--primary, #cc1616);
    box-shadow: 0 4px 12px rgba(26, 157, 240, 0.3);
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .modeokids-shop-container {
        padding: 30px 0;
    }

    .modeokids-shop-layout {
        padding: 0 15px;
    }

    .modeokids-shop-sidebar {
        position: static;
        margin-bottom: 25px;
    }

    .modeokids-shop-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px 20px;
    }

    .modeokids-shop-header__left,
    .modeokids-shop-header__right {
        width: 100%;
    }

    .products {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .products .product .woocommerce-loop-product__title {
        font-size: 0.9375rem;
        padding: 12px;
        min-height: auto;
    }

    .products .product .price {
        font-size: 1.125rem;
        padding: 0 12px 12px;
    }
}

@media (max-width: 480px) {
    .products {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===========================
   SEO CONTENT - Category SEO Text
   =========================== */

/* Full-width SEO Content Wrapper - Modern E-commerce Style */
.category-seo-content-wrapper {
    width: 100%;
    margin-top: 2rem;
}

@media (min-width: 1024px) {
    .category-seo-content-wrapper {
        margin-top: 3rem;
    }
}

.category-seo-content-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.category-seo-content-container:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Krótki opis kategorii (na górze, przed produktami) */
.category-short-description {
    margin-bottom: 0;
    padding: 1.5rem;
}

@media (min-width: 1024px) {
    .category-short-description {
        padding: 2rem;
    }
}

.category-short-description .prose {
    color: #4a5568;
    line-height: 1.7;
}

.category-short-description .prose p {
    margin-bottom: 1rem;
}

.category-short-description .prose p:last-child {
    margin-bottom: 0;
}

/* Długa treść SEO - Zaawansowana struktura */
.category-seo-content {
    margin-top: 0;
    margin-bottom: 0;
    padding: 1.5rem;
}

@media (min-width: 1024px) {
    .category-seo-content {
        padding: 2rem;
    }
}

/* Border separator between short description and SEO content */
.category-short-description+.category-seo-content {
    border-top: 1px solid #e8e8e8;
    padding-top: 2rem;
    margin-top: 0;
}

@media (min-width: 1024px) {
    .category-short-description+.category-seo-content {
        padding-top: 2.5rem;
    }
}

/* Ensure proper spacing when only one section exists */
.category-seo-content-container>.category-short-description:only-child,
.category-seo-content-container>.category-seo-content:only-child {
    border: none;
}

.category-seo-content-inner {
    color: #4a5568;
    line-height: 1.8;
    font-size: 1.0625rem;
    max-width: 100%;
}

/* Nagłówki H2 - Główne sekcje */
.category-seo-content-inner h2 {
    color: #1a202c;
    font-size: 1.875rem;
    font-weight: 800;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary, #cc1616);
}

.category-seo-content-inner h2:first-child {
    margin-top: 0;
}

/* Nagłówki H3 - Podsekcje */
.category-seo-content-inner h3 {
    color: #1a202c;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    line-height: 1.4;
    padding-left: 1rem;
    border-left: 4px solid var(--primary, #cc1616);
}

/* Nagłówki H4 - Pod-podsekcje */
.category-seo-content-inner h4 {
    color: #2d3748;
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* Paragrafy */
.category-seo-content-inner p {
    margin-bottom: 1.5rem;
    color: #4a5568;
    line-height: 1.8;
    text-align: justify;
    text-justify: inter-word;
}

.category-seo-content-inner p:last-child {
    margin-bottom: 0;
}

/* Wypunktowania (ul) */
.category-seo-content-inner ul {
    margin: 2rem 0;
    padding-left: 2.5rem;
    color: #4a5568;
    list-style-type: disc;
}

.category-seo-content-inner ul li {
    margin-bottom: 1rem;
    line-height: 1.8;
    padding-left: 0.5rem;
}

.category-seo-content-inner ul li:last-child {
    margin-bottom: 0;
}

/* Listy zagnieżdżone */
.category-seo-content-inner ul ul {
    margin: 1rem 0;
    padding-left: 2rem;
    list-style-type: circle;
}

.category-seo-content-inner ul ul ul {
    list-style-type: square;
}

/* Listy numerowane (ol) */
.category-seo-content-inner ol {
    margin: 2rem 0;
    padding-left: 2.5rem;
    color: #4a5568;
    list-style-type: decimal;
}

.category-seo-content-inner ol li {
    margin-bottom: 1rem;
    line-height: 1.8;
    padding-left: 0.5rem;
}

.category-seo-content-inner ol li:last-child {
    margin-bottom: 0;
}

/* Listy numerowane zagnieżdżone */
.category-seo-content-inner ol ol {
    margin: 1rem 0;
    padding-left: 2rem;
    list-style-type: lower-alpha;
}

.category-seo-content-inner ol ol ol {
    list-style-type: lower-roman;
}

/* Linki */
.category-seo-content-inner a {
    color: var(--primary, #cc1616);
    text-decoration: underline;
    font-weight: 600;
    transition: all 0.2s;
    border-bottom: 1px solid transparent;
}

.category-seo-content-inner a:hover {
    color: var(--primary-hover, #b31313);
    border-bottom-color: var(--primary-hover, #b31313);
}

/* Pogrubienie, kursywa */
.category-seo-content-inner strong,
.category-seo-content-inner b {
    color: #1a202c;
    font-weight: 700;
}

.category-seo-content-inner em,
.category-seo-content-inner i {
    font-style: italic;
}

/* Obrazy */
.category-seo-content-inner img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem auto;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Blockquote (cytat) */
.category-seo-content-inner blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: #f7fafc;
    border-left: 4px solid var(--primary, #cc1616);
    border-radius: 4px;
    font-style: italic;
    color: #2d3748;
}

.category-seo-content-inner blockquote p {
    margin-bottom: 0.5rem;
}

.category-seo-content-inner blockquote p:last-child {
    margin-bottom: 0;
}

/* Wyrównanie tekstu */
.category-seo-content-inner p[style*="text-align: left"],
.category-seo-content-inner p[style*="text-align:center"],
.category-seo-content-inner p[style*="text-align: right"] {
    text-align: inherit;
}

/* Responsive - poprawki dla małych ekranów */
@media (max-width: 767px) {
    .category-seo-content-wrapper {
        margin-bottom: 1.5rem;
    }

    .category-seo-content-container {
        border-radius: 12px;
    }

    .category-short-description,
    .category-seo-content {
        padding: 1.25rem !important;
    }

    .category-short-description+.category-seo-content {
        padding-top: 1.5rem;
    }

    .category-seo-content-inner {
        font-size: 1rem;
    }

    .category-seo-content-inner h2 {
        font-size: 1.5rem;
        margin-top: 2rem;
    }

    .category-seo-content-inner h3 {
        font-size: 1.25rem;
        margin-top: 1.5rem;
        padding-left: 0.75rem;
    }

    .category-seo-content-inner h4 {
        font-size: 1.125rem;
        margin-top: 1.5rem;
    }

    .category-seo-content-inner ul,
    .category-seo-content-inner ol {
        padding-left: 1.5rem;
        margin: 1.5rem 0;
    }

    .category-seo-content-inner blockquote {
        padding: 1rem 1.5rem;
        margin: 1.5rem 0;
    }
}

/* Additional responsive optimizations for SEO content */
@media (max-width: 480px) {
    .category-seo-content-wrapper {
        margin-bottom: 1rem;
    }

    .category-short-description,
    .category-seo-content {
        padding: 1rem !important;
    }

    .category-seo-content-inner {
        font-size: 0.9375rem;
    }

    .category-seo-content-inner h2 {
        font-size: 1.375rem;
        margin-top: 1.5rem;
    }

    .category-seo-content-inner h3 {
        font-size: 1.125rem;
        margin-top: 1.25rem;
    }

    .category-seo-content-inner h4 {
        font-size: 1rem;
        margin-top: 1rem;
    }
}