/* WooCommerce Products Filter Styles */
.wc-products-filter-wrapper {
    width: 100% !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.wc-top-category-bar {
    background-color: #3f3f72 !important;
    color: white !important;
    padding: 10px 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 20px !important;
}

.wc-top-category-bar a {
    color: white !important;
    text-decoration: none !important;
    font-size: 11px !important;
    white-space: nowrap !important;
}

.wc-top-category-bar a:hover {
    text-decoration: underline !important;
}

.home-icon {
    font-size: 16px !important;
}

.wc-products-filter-container {
    display: flex !important;
    gap: 20px !important;
}

.wc-filter-sidebar {
    width: 250px !important;
    background-color: #f5f5f5 !important;
    padding: 20px !important;
    border: 1px solid #ddd !important;
}

.wc-filter-sidebar h3 {
    background-color: #333 !important;
    color: white !important;
    padding: 10px !important;
    margin: -20px -20px 20px -20px !important;
    font-size: 16px !important;
}

.wc-search-box {
    margin-bottom: 15px !important;
}

.wc-search-box input {
    width: 100% !important;
    padding: 8px 12px !important;
    border: 1px solid #ccc !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    transition: border-color 0.3s !important;
    box-sizing: border-box !important;
}

.wc-search-box input:focus {
    outline: none !important;
    border-color: #3f3f72 !important;
}

.wc-category-filters {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

.wc-category-item {
    display: flex !important;
    align-items: center !important;
    background-color: #666 !important;
    color: white !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    font-size: 14px !important;
}

.wc-category-item:hover {
    background-color: #555 !important;
    transform: translateX(2px) !important;
}

.wc-category-item input[type="checkbox"] {
    margin-right: 8px !important;
    cursor: pointer !important;
}

.wc-products-grid {
    flex: 1 !important;
}

.wc-products-header {
    background-color: #333 !important;
    color: white !important;
    padding: 15px 20px !important;
    margin-bottom: 20px !important;
}

.wc-products-header h2 {
    margin: 0 !important;
    font-size: 20px !important;
    color: white !important;
}

.wc-showing-results {
    color: #666 !important;
    font-size: 12px !important;
    margin-bottom: 20px !important;
    text-transform: uppercase !important;
}

.wc-products-list {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
}

.wc-products-list[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr) !important;
}

.wc-products-list[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr) !important;
}

.wc-product-item {
    text-align: center !important;
    background: white !important;
    padding: 20px 15px 15px 15px !important;
    border: 1px solid #e5e7eb !important;
    transition: all 0.3s !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
}

.wc-product-item:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    transform: translateY(-4px) !important;
    border-color: #d1d5db !important;
}

.wc-product-image {
    margin-bottom: 15px !important;
    position: relative !important;
    overflow: visible !important;
    border-radius: 8px !important;
}

.wc-product-image img {
    max-width: 100% !important;
    height: auto !important;
    transition: transform 0.3s !important;
    border-radius: 8px !important;
}

.wc-product-item:hover .wc-product-image img {
    transform: scale(1.05) !important;
}

/* Out of Stock Badge */
.wc-stock-badge {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    background: #ef4444 !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3) !important;
    z-index: 5 !important;
}

.wc-stock-badge.low-stock {
    background: #f59e0b !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3) !important;
}

.wc-stock-badge.on-sale {
    background: #22c55e !important;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3) !important;
    top: 10px !important;
    left: 10px !important;
    right: auto !important;
}

.wc-product-title {
    font-size: 16px !important;
    margin: 10px 0 8px 0 !important;
    flex-grow: 1 !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    min-height: 40px !important;
}

.wc-product-title a {
    color: #2c3e50 !important;
    text-decoration: none !important;
    transition: color 0.3s !important;
    display: block !important;
}

.wc-product-title a:hover {
    color: #3f3f72 !important;
}

.wc-product-price {
    color: #3f3f72 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    margin: 8px 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
}

.wc-product-price del {
    color: #999 !important;
    font-size: 16px !important;
    font-weight: 400 !important;
}

.wc-product-price ins {
    text-decoration: none !important;
}

.wc-product-stock {
    font-size: 13px !important;
    margin: 6px 0 !important;
    font-weight: 500 !important;
}

.wc-product-stock .in-stock {
    color: #22c55e !important;
}

.wc-product-stock .out-of-stock {
    color: #ef4444 !important;
}

.wc-product-category {
    font-size: 12px !important;
    color: #999 !important;
    margin: 8px 0 12px 0 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-weight: 500 !important;
}

.wc-product-category a {
    color: #999 !important;
    text-decoration: none !important;
    transition: color 0.3s !important;
}

.wc-product-category a:hover {
    color: #666 !important;
}

.wc-quick-view {
    margin: auto -15px -15px -15px !important;
    margin-top: 15px !important;
}

.wc-quick-view .button {
    background: linear-gradient(135deg, #3f3f72 0%, #0052a3 100%) !important;
    color: white !important;
    padding: 14px 20px !important;
    text-decoration: none !important;
    display: block !important;
    width: calc(100% + 30px) !important;
    margin-left: -15px !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    font-weight: 600 !important;
    letter-spacing: 1px !important;
    box-sizing: border-box !important;
    position: relative !important;
    overflow: hidden !important;
}

.wc-quick-view .button:before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent) !important;
    transition: left 0.5s !important;
}

.wc-quick-view .button:hover:before {
    left: 100% !important;
}

.wc-quick-view .button:hover {
    background: linear-gradient(135deg, #0052a3 0%, #003d7a 100%) !important;
    color: white !important;
    transform: scale(1.02) !important;
}

/* Pagination Styles */
.wc-pagination {
    margin: 30px 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.wc-pagination-top {
    margin-bottom: 40px !important;
}

.wc-pagination-bottom {
    margin-top: 40px !important;
    padding-bottom: 20px !important;
}

.wc-pagination-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 20px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.wc-page-link,
.wc-page-current {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    border: 1px solid transparent !important;
    position: relative !important;
}

.wc-page-link {
    color: #6b7280 !important;
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

.wc-page-link:hover {
    background: #f9fafb !important;
    color: #0066cc !important;
    border-color: #3f3f72 !important;
    transform: translateY(-1px) !important;
}

.wc-page-link:active {
    transform: translateY(0) !important;
}

.wc-page-current {
    background: #3f3f72 !important;
    color: white !important;
    border-color: #3f3f72 !important;
    cursor: default !important;
}

/* Previous/Next buttons special styling */
.wc-page-link:first-child,
.wc-page-link:last-child {
    min-width: auto !important;
    padding: 0 16px !important;
    font-weight: 500 !important;
    gap: 6px !important;
}

.wc-page-link:first-child:hover,
.wc-page-link:last-child:hover {
    background: #f9fafb !important;
    color: #3f3f72 !important;
}

/* Add dots for long pagination */
.wc-page-dots {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    height: 38px !important;
    color: #9ca3af !important;
    font-weight: 400 !important;
    cursor: default !important;
}

/* Mobile Filter Toggle Button */
.wc-mobile-filter-toggle {
    display: none !important;
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    background: #3f3f72 !important;
    color: white !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 15px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.35) !important;
    cursor: pointer !important;
    z-index: 100 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.3s !important;
}

.wc-mobile-filter-toggle:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.45) !important;
}

.toggle-icon {
    font-size: 18px !important;
}

.wc-close-sidebar {
    display: none !important;
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    background: transparent !important;
    border: none !important;
    font-size: 28px !important;
    color: #666 !important;
    cursor: pointer !important;
    width: 35px !important;
    height: 35px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: all 0.3s !important;
}

.wc-close-sidebar:hover {
    background: #f0f0f0 !important;
    color: #333 !important;
}

/* Mobile overlay */
body.filter-open::before {
    content: "" !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 998 !important;
}

/* Mobile menu styles */
@media (max-width: 768px) {
    .wc-mobile-filter-toggle {
        display: flex !important;
    }
    
    .wc-close-sidebar {
        display: flex !important;
    }
    
    .wc-filter-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 80% !important;
        max-width: 300px !important;
        height: 100vh !important;
        background: white !important;
        z-index: 999 !important;
        transition: left 0.3s ease !important;
        overflow-y: auto !important;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1) !important;
    }
    
    .wc-filter-sidebar.active {
        left: 0 !important;
    }
    
    .wc-filter-sidebar h3 {
        margin-top: 50px !important;
    }
    
    body.filter-open {
        overflow: hidden !important;
    }
}

/* Hide mobile elements on desktop */
@media (min-width: 769px) {
    .wc-mobile-filter-toggle,
    .wc-close-sidebar {
        display: none !important;
    }
    
    body.filter-open::before {
        display: none !important;
    }
}

/* Responsive - Tablet */
@media (max-width: 768px) {
    .wc-top-category-bar {
        padding: 8px 15px !important;
        gap: 8px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .wc-top-category-bar a {
        font-size: 12px !important;
    }
    
    .wc-products-filter-container {
        flex-direction: column !important;
    }
    
    .wc-filter-sidebar {
        width: 100% !important;
        margin-bottom: 20px !important;
        border-radius: 8px !important;
    }
    
    .wc-filter-sidebar h3 {
        font-size: 14px !important;
    }
    
    .wc-category-filters {
        max-height: 300px !important;
        overflow-y: auto !important;
    }
    
    .wc-products-grid {
        width: 100% !important;
    }
    
    .wc-products-header {
        padding: 12px 15px !important;
    }
    
    .wc-products-header h2 {
        font-size: 18px !important;
    }
    
    .wc-products-list {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    
    .wc-product-item {
        padding: 15px 10px 10px 10px !important;
    }
    
    .wc-product-title {
        font-size: 14px !important;
        min-height: 35px !important;
    }
    
    .wc-product-price {
        font-size: 18px !important;
    }
    
    .wc-quick-view .button {
        font-size: 13px !important;
        padding: 12px 15px !important;
    }
    
    .wc-pagination-wrapper {
        gap: 6px !important;
        padding: 10px 12px !important;
    }
    
    .wc-page-link,
    .wc-page-current {
        min-width: 34px !important;
        height: 34px !important;
        font-size: 13px !important;
    }
    
    .wc-page-link:first-child,
    .wc-page-link:last-child {
        padding: 0 10px !important;
        font-size: 12px !important;
    }
    
    .wc-stock-badge {
        padding: 4px 8px !important;
        font-size: 10px !important;
        top: 5px !important;
        right: 5px !important;
    }
    
    .wc-stock-badge.on-sale {
        left: 5px !important;
    }
}

/* Responsive - Mobile */
@media (max-width: 480px) {
    .wc-top-category-bar {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: scroll !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    
    .wc-top-category-bar::-webkit-scrollbar {
        display: none !important;
    }
    
    .wc-top-category-bar a {
        font-size: 11px !important;
        padding: 2px 5px !important;
    }
    
    .home-icon {
        font-size: 14px !important;
    }
    
    .wc-filter-sidebar {
        padding: 15px !important;
    }
    
    .wc-search-box input {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
    
    .wc-category-item {
        font-size: 13px !important;
        padding: 10px !important;
    }
    
    .wc-products-header {
        padding: 10px 15px !important;
        margin-bottom: 15px !important;
    }
    
    .wc-products-header h2 {
        font-size: 16px !important;
    }
    
    .wc-showing-results {
        font-size: 11px !important;
        margin-bottom: 15px !important;
    }
    
    .wc-products-list {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    .wc-product-item {
        border-radius: 10px !important;
    }
    
    .wc-product-image {
        margin-bottom: 12px !important;
    }
    
    .wc-product-title {
        font-size: 15px !important;
        margin: 8px 0 6px 0 !important;
    }
    
    .wc-product-price {
        font-size: 18px !important;
        margin: 6px 0 !important;
    }
    
    .wc-product-price del {
        font-size: 14px !important;
    }
    
    .wc-product-stock {
        font-size: 12px !important;
    }
    
    .wc-product-category {
        font-size: 11px !important;
        margin: 6px 0 10px 0 !important;
    }
    
    .wc-quick-view {
        margin: auto -10px -10px -10px !important;
    }
    
    .wc-quick-view .button {
        width: calc(100% + 20px) !important;
        margin-left: -10px !important;
        padding: 14px 10px !important;
        font-size: 13px !important;
        letter-spacing: 0.5px !important;
    }
    
    .wc-pagination {
        margin: 20px 0 !important;
    }
    
    .wc-pagination-top {
        margin-bottom: 25px !important;
    }
    
    .wc-pagination-bottom {
        margin-top: 25px !important;
    }
    
    .wc-pagination-wrapper {
        gap: 4px !important;
        padding: 8px 10px !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    
    .wc-page-link,
    .wc-page-current {
        min-width: 32px !important;
        height: 32px !important;
        font-size: 12px !important;
    }
    
    .wc-page-link:first-child,
    .wc-page-link:last-child {
        padding: 0 8px !important;
        font-size: 11px !important;
    }
    
    .wc-page-dots {
        width: 25px !important;
        height: 32px !important;
        font-size: 12px !important;
    }
}

/* Very small mobile devices */
@media (max-width: 360px) {
    .wc-top-category-bar a {
        font-size: 10px !important;
    }
    
    .wc-filter-sidebar {
        padding: 12px !important;
    }
    
    .wc-category-item {
        font-size: 12px !important;
        padding: 8px !important;
    }
    
    .wc-products-header h2 {
        font-size: 14px !important;
    }
    
    .wc-product-item {
        padding: 12px 8px 8px 8px !important;
    }
    
    .wc-product-title {
        font-size: 14px !important;
    }
    
    .wc-product-price {
        font-size: 16px !important;
    }
    
    .wc-quick-view .button {
        font-size: 12px !important;
        padding: 12px 8px !important;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .wc-category-item {
        min-height: 44px !important; /* iOS touch target size */
    }
    
    .wc-page-link,
    .wc-page-current {
        min-width: 44px !important;
        min-height: 44px !important;
    }
    
    .wc-quick-view .button {
        min-height: 44px !important;
    }
}