/* ========================================
   PRODUCT FILTER STYLES
   ======================================== */

/* Filter Sidebar */
.product-filter-sidebar {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

/* Filter Sections */
.filter-section {
    margin-bottom: 0;
}

.filter-section h4 {
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
    color: #333;
}

.filter-section label {
    display: block;
    padding: 8px 0;
    cursor: pointer;
    transition: color 0.2s ease;
    color: #666;
    font-size: 14px;
}

.filter-section label:hover {
    color: #1e87f0;
}

/* Category filter links */
.filter-section .uk-list-divider > li {
    padding: 0;
    border-top-color: #f0f0f0;
}

.filter-section .uk-list-divider > li:first-child {
    border-top: none;
}

.filter-section .uk-list-divider > li a {
    display: block;
    padding: 10px 0;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
}

.filter-section .uk-list-divider > li a:hover {
    color: #1e87f0;
    padding-left: 5px;
}

.filter-section .uk-list-divider > li.uk-active a {
    color: #1e87f0;
    font-weight: 600;
    padding-left: 5px;
}

.filter-section input[type="radio"],
.filter-section input[type="checkbox"] {
    margin-right: 10px;
}

.filter-section input[type="radio"]:checked + label,
.filter-section input[type="checkbox"]:checked + label {
    color: #1e87f0;
    font-weight: 500;
}

/* Price Range Inputs */
.filter-section input[type="number"] {
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
}

.filter-section input[type="number"]:focus {
    border-color: #1e87f0;
    outline: none;
    box-shadow: 0 0 0 2px rgba(30, 135, 240, 0.1);
}

/* ========================================
   PRODUCT CARD ENHANCEMENTS
   ======================================== */

.product-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1) !important;
}

.product-card-wrapper {
    margin-bottom: 20px;
}

/* Product Badges */
.offer-discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f0506e;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    z-index: 1;
}

/* Pricing */
.offer-price-old {
    text-decoration: line-through;
    color: #999;
    margin-right: 10px;
    font-size: 14px;
}

.offer-price-new {
    color: #f0506e;
    font-weight: bold;
    font-size: 1.2em;
}

.price-pro {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* ========================================
   LOADING STATES
   ======================================== */

[wire\:loading] {
    opacity: 0.6;
    pointer-events: none;
}

.uk-spinner {
    margin-right: 10px;
}

/* Loading overlay for grid */
[wire\:loading].uk-alert-primary {
    background-color: #d8eafc;
    border: 1px solid #1e87f0;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* ========================================
   TOOLBAR & FILTERS
   ======================================== */

.uk-button-secondary {
    background-color: #222;
    color: white;
    border: none;
    padding: 0 20px;
    height: 40px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.uk-button-secondary:hover {
    background-color: #1e87f0;
    color: white;
}

.uk-select,
.uk-input {
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 0 15px;
    height: 40px;
    transition: border-color 0.2s ease;
}

.uk-select:focus,
.uk-input:focus {
    border-color: #1e87f0;
    outline: none;
}

/* Search Input */
.uk-input[type="text"] {
    width: 100%;
}

/* ========================================
   PAGINATION
   ======================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background-color: #1e87f0;
    color: white;
    border-color: #1e87f0;
}

.pagination .active span {
    background-color: #1e87f0;
    color: white;
    border-color: #1e87f0;
}

.pagination .disabled span {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   EMPTY STATE
   ======================================== */

.uk-card-default.uk-text-center {
    padding: 60px 20px;
    border: 2px dashed #e5e5e5;
    border-radius: 8px;
}

.uk-card-default.uk-text-center [uk-icon] {
    color: #999;
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */

@media (max-width: 960px) {
    .product-filter-sidebar {
        position: static;
        margin-bottom: 30px;
        max-height: none;
    }

    .filter-section {
        margin-bottom: 20px;
    }

    .product-card {
        margin-bottom: 15px;
    }
}

@media (max-width: 640px) {
    .uk-grid-small > * {
        padding-left: 10px;
    }

    .uk-grid-small {
        margin-left: -10px;
    }

    .filter-section h4 {
        font-size: 16px;
    }

    .filter-section label {
        font-size: 13px;
        padding: 6px 0;
    }
}

/* ========================================
   CLEAR FILTERS BUTTON
   ======================================== */

.uk-button-default {
    background-color: #f8f8f8;
    color: #666;
    border: 1px solid #e5e5e5;
    transition: all 0.2s ease;
}

.uk-button-default:hover {
    background-color: #666;
    color: white;
    border-color: #666;
}

/* ========================================
   RESULTS COUNT
   ======================================== */

.uk-text-muted {
    color: #999;
    font-size: 14px;
}

/* ========================================
   SMOOTH TRANSITIONS
   ======================================== */

.product-card-wrapper,
.filter-section label,
.uk-button {
    transition: all 0.2s ease-in-out;
}

/* Wire Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

[wire\:loading] .product-card {
    animation: pulse 1.5s ease-in-out infinite;
}
