.woo-grid-filter-section {
    margin-bottom: 30px;
}

.filter-toggle-button {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    margin-bottom: 15px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
}

.filter-toggle-button:hover {
    background-color: #e9e9e9;
}

.filter-toggle-button.active {
    background-color: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.filter-icon {
    position: relative;
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.filter-icon:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 16px;
    height: 2px;
    background-color: currentColor;
    transform: translateY(-50%);
    box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

.woo-grid-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.woo-grid-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.filter-group {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 300px;
}

.filter-group label {
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-right: 15px;
    white-space: nowrap;
}

.filter-select {
    flex: 1;
    padding: 8px 30px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

.filter-select:hover {
    border-color: #999;
}

.filter-select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.filter-group-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-button:hover {
    background-color: #e9e9e9;
    color: #000;
}

.filter-button.active {
    background-color: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.woo-grid-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.filter-button {
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.woo-grid-container,
.woo-selected-grid-container {
    display: grid;
    gap: 20px;
    width: 100%;
}

.woo-grid-container.loading::after,
.woo-selected-grid-container.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.woo-grid-container.loading::before,
.woo-selected-grid-container.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.woo-grid-item {
    position: relative;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 0;
}

.woo-grid-item.loading {
    opacity: 0;
    transform: translateY(20px);
}

.woo-grid-item:hover {
    transform: translateY(-5px);
}

.woo-grid-item .product-image {
    display: block;
}

.woo-grid-item .product-image img {
    display: block;
    width: 100%;
    height: auto;
}

.product-buttons {
    display: flex;
    width: 100%;
    padding: 5px;
    background: #fff;
    gap: 10px;
}

.demo-button,
.pilih-button {
    flex: 1 1 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-decoration: none;
    border: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    min-width: 0;
    white-space: nowrap;
}

.infinite-scroll-trigger {
    width: 100%;
    height: 50px;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.infinite-scroll-trigger .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

.infinite-scroll-trigger.loading .loading-spinner {
    display: block;
}

/* Popular Ribbon Styles */
.woo-grid-item {
    position: relative;
    overflow: hidden;
}

.popular-ribbon {
    position: absolute;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 1;
}

.popular-ribbon.top-left {
    top: 15px;
    left: -35px;
    transform: rotate(-45deg);
    transform-origin: 50% 50%;
    width: 150px;
    text-align: center;
    background: #FF4E4E;
    color: #fff;
}

.popular-ribbon.top-right {
    top: 15px;
    right: -35px;
    transform: rotate(45deg);
    transform-origin: 50% 50%;
    width: 150px;
    text-align: center;
    background: #FF4E4E;
    color: #fff;
}

/* Add box shadow for better visibility */
.popular-ribbon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: -1;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .woo-grid-item {
        width: 100%;
    }

    .filter-group {
        min-width: 100%;
    }

    .filter-group label {
        min-width: 80px;
    }
}

@media (max-width: 767px) {
    .product-buttons {
        flex-direction: column;
    }
}
