/* Brand Slider */
.brand-slider {
    overflow: hidden;
    position: relative;
}

.slider-container {
    width: 100%;
    overflow: hidden;
}

.brand-slide-track {
    display: flex;
    animation: scroll 20s linear infinite;
    width: calc(250px * <?php echo count($brand_images) * 2; ?>);
}

.brand-slide {
    width: 250px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
}

.brand-slide img {
    max-height: 80px;
    max-width: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.brand-slide img:hover {
    filter: grayscale(0%);
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-250px * <?php echo count($brand_images); ?>)); }
}

/* Product Cards */
.product-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    padding: 15px;
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 1rem;
    margin-bottom: 10px;
    height: 40px;
    overflow: hidden;
}

.product-price {
    margin-bottom: 10px;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
    margin-right: 8px;
}

.discounted-price {
    color: #dc3545;
    font-weight: bold;
}

.current-price {
    font-weight: bold;
}




















/* Autocomplete styles */
.ui-autocomplete {
    position: absolute;
    z-index: 1000;
    cursor: default;
    padding: 0;
    margin-top: 2px;
    list-style: none;
    background-color: #ffffff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%; /* Match input width */
    max-width: 600px; /* Maximum width */
}

.ui-autocomplete .ui-menu-item {
    padding: 0;
    margin: 0;
}

.ui-autocomplete .ui-menu-item-wrapper {
    padding: 8px 12px;
    display: block;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.ui-autocomplete .ui-menu-item-wrapper.ui-state-active {
    background-color: #f8f9fa;
    border-color: #ddd;
    color: #333;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 50px;
}

.autocomplete-image-container {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 4px;
    overflow: hidden;
}

.autocomplete-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.autocomplete-text {
    flex: 1;
    min-width: 0; /* Prevent text overflow */
}

.autocomplete-title {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.autocomplete-price {
    font-size: 0.85em;
    color: #28a745;
    font-weight: bold;
}

.autocomplete-category {
    font-size: 0.75em;
    color: #6c757d;
    margin-top: 2px;
}

.ui-helper-hidden-accessible {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .autocomplete-item {
        gap: 8px;
    }
    
    .autocomplete-image-container {
        width: 40px;
        height: 40px;
    }
    
    .autocomplete-title {
        font-size: 0.9em;
    }
}