/* Products-specific styles */
.products-grid {
    margin-top: 20px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;  /* Compensate for column padding */
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

p.related-description {
    margin-bottom: 0;
}

/* Filter Slideout */
.filter-slideout {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100%;
    background: #fff;
    z-index: 1100;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    overflow-y: auto;
}

.filter-slideout.active {
    right: 0;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.filter-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.filter-actions {
    display: flex;
    align-items: center;
}

.clear-btn {
    margin-right: 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.close-filter-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.filter-section {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.filter-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: normal;
}

.filter-form {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.filter-form .form-group {
    margin-bottom: 15px;
    width: 100%;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-separator {
    display: inline-block;
    margin: 0 5px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    box-sizing: border-box;
}

.filter-apply {
    padding: 20px;
    text-align: center;
}

.button-primary {
    background-color: #333;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    letter-spacing: 1px;
    font-size: 14px;
}

.column-6 {
    width: 25%;
    padding: 0 15px;
    margin-bottom: 30px;
    box-sizing: border-box;
}

.product-card {
    height: 100%;
    padding: 0;
    padding-bottom: 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
    border-radius: 0;
    background-color: #fff;
    box-shadow: none;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.product-link {
    display: block;
    color: var(--color-text);
    text-decoration: none;
}

.product-image {
    height: auto;
    aspect-ratio: 1/1;
    overflow: hidden;
    position: relative;
    background-color: #f9f9f9;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.product-image .primary-image {
    opacity: 1;
    z-index: 1;
    transition: opacity 0.5s ease;
}

.product-image .secondary-image {
    opacity: 0;
    z-index: 0;
    transition: opacity 0.5s ease;
}

.product-card:hover .product-image .primary-image {
    opacity: 0;
}

.product-card:hover .product-image .secondary-image {
    opacity: 1;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.placeholder-image {
    background-color: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-details {
    position: relative;
    padding: 12px 15px;
    text-align: left;
    min-height: 80px;
}

.product-title {
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: normal;
    color: #333;
    text-align: left;
}

.product-price {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 0;
    text-align: left;
}

.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--color-text-light);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .column-6 {
        width: 33.333%;
    }

    .filter-slideout {
        width: 300px;
    }
}

@media (max-width: 768px) {
    .column-6 {
        width: 50%;  /* 2 columns on tablet */
    }

    .filter-slideout {
        width: 280px;
    }
}

@media (max-width: 480px) {
    .container {
        width: 100%;
        max-width: 1200px;
        margin: 0;
        padding: 0 20px;
    }

    .column-6 {
        width: 100%;  /* 1 column on mobile */
    }

    .filter-slideout {
        width: 100%;
        right: -100%;
        top: 0;
        bottom: 0;
        left: auto;
        height: 100vh;
    }
    
    .filter-slideout.active {
        right: 0;
    }
    
    .filter-header {
        padding: 15px;
    }
    
    .filter-section {
        padding: 15px;
    }
    
    .price-input .field {
        width: 45%;
    }
    
    .filter-apply {
        padding: 15px;
        position: sticky;
        bottom: 0;
        background: #fff;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }

    .quick-add-btn {
        opacity: 1 !important;
    }

    .product-card-footer {
        padding-top: 10px;
    }
}

/* Price slider improvements */
.price-slider-container {
    width: 100%;
    background: #fff;
    padding: 10px 0;
}

.price-input {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}

.price-input .field {
    display: flex;
    width: calc(50% - 10px);
    height: 40px;
    align-items: center;
    margin-bottom: 0;
}

.field span {
    font-weight: 500;
    margin-right: 8px;
    width: 30px;
    color: var(--color-text);
    font-size: 13px;
}

.field input {
    width: 100%;
    height: 100%;
    outline: none;
    font-size: 14px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 0 12px;
    transition: border-color 0.2s;
}

.field input:focus {
    border-color: var(--color-primary);
}

.price-input .separator {
    font-size: 18px;
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider {
    height: 5px;
    position: relative;
    background: #ddd;
    border-radius: 5px;
}

.slider .progress {
    height: 100%;
    left: 0%;
    right: 0%;
    position: absolute;
    border-radius: 5px;
    background: #333;
}

.range-input {
    position: relative;
}

.range-input input {
    position: absolute;
    width: 100%;
    height: 5px;
    top: -5px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.range-input input::-webkit-slider-thumb {
    height: 17px;
    width: 17px;
    border-radius: 50%;
    background: #333;
    pointer-events: auto;
    -webkit-appearance: none;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
}

.range-input input::-moz-range-thumb {
    height: 17px;
    width: 17px;
    border: none;
    border-radius: 50%;
    background: #333;
    pointer-events: auto;
    -moz-appearance: none;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

@media (max-width: 480px) {
    .price-input {
        flex-wrap: wrap;
    }
    
    .price-input .field {
        width: 100%;
    }
    
    .price-input .separator {
        display: none;
    }
}

.filter-sidebar {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.filter-title {
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.filter-subtitle {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 0.95em;
}

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

.filter-options {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.filter-option {
    margin-bottom: 8px;
    width: 100%;
}

.filter-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

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

/* Custom radio button styling */
.filter-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid #ddd;
    border-radius: 50%;
    outline: none;
    margin-right: 8px;
    position: relative;
    cursor: pointer;
    transition: opacity 0.3s ease, border-color 0.3s ease;
}

.filter-option input[type="radio"]:checked {
    border-color: #333;
}

.filter-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    background-color: #333;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.filter-option input[type="radio"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #ccc;
}

.filter-option input[type="radio"]:disabled + .category-label-text {
    opacity: 0.5;
}

.filter-option label.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sorting-indicator {
    margin-bottom: 15px;
}

.current-sort {
    display: inline-block;
    font-size: 14px;
    color: #666;
    background-color: #f5f5f5;
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #eee;
    margin-right: 10px;
}

.current-category {
    display: inline-block;
    font-size: 14px;
    color: #666;
    background-color: #f5f5f5;
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #eee;
    margin-right: 10px;
}

.remove-filter {
    color: #333;
    text-decoration: none;
    margin-left: 5px;
}

.filter-header-collapsible {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0;
}

.toggle-icon {
    font-size: 18px;
    font-weight: bold;
    transition: transform 0.3s;
}

.filter-content {
    display: none;
    padding-top: 10px;
}

.collapsible.active .toggle-icon {
    transform: rotate(45deg);
}

.collapsible.active .filter-content {
    display: block;
}

.filter-subtitle {
    display: none;
}

.filter-header {
    background-color: #f5f5f5;
}

.filter-apply {
    background-color: #f5f5f5;
    margin-top: 10px;
    padding: 15px;
    position: sticky;
    bottom: 0;
    border-top: 1px solid #e0e0e0;
}

.button-primary {
    background-color: #333;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    letter-spacing: 1px;
    font-size: 14px;
}

/* Quick Add to Cart button */
.quick-add-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.low-stock-warning {
    max-height: 25px;
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: #e67e22; /* Orange color for warning */
    color: white;
    border: none;
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 12px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 2;
}

.product-card:hover .quick-add-btn {
    opacity: 1;
}

.quick-add-btn:hover {
    background-color: #555;
}

/* Category radio button transition effects */
.category-label-text {
    transition: opacity 0.3s ease;
}

.filter-option label.disabled .category-label-text {
    opacity: 0.5;
}

.filter-option input[type="radio"]:disabled + .category-label-text {
    opacity: 0.5;
}

/* Custom Pagination Styling */
.paginator {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
    font-family: 'Poppins', sans-serif;
}

.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
    gap: 8px;
}

.pagination li {
    margin: 0;
}

.pagination li a,
.pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 14px;
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.2s ease;
    background-color: var(--color-white);
}

.pagination li a:hover {
    background-color: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.pagination .active a {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    font-weight: 500;
}

.pagination .disabled a,
.pagination .disabled span {
    color: var(--color-text-light);
    pointer-events: none;
    background-color: #f9f9f9;
    border-color: var(--color-border);
}

.paginator p {
    font-size: 13px;
    color: var(--color-text-light);
    margin-top: 5px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .pagination {
        flex-wrap: wrap;
    }
    
    .pagination li a,
    .pagination li span {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }
}

.search-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    width: 100%;
    margin: 0 auto 2rem auto;
}

.search-input {
    flex: 1;
    font-size: 1.2rem;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #cbb3ad;
    background: #ffffff; /* changed from #e9dbd7 to white */
    color: #000;
    width: 1010px;
    margin-top: 90px;
}

.search-btn {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 90px;
}
.search-btn:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}
