﻿.search-container {
    width: 100%;
    max-width: 900px;
    position: relative;
}

#searchBox {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    box-sizing: border-box;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    z-index: 1000;
    padding: 12px;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.section-title {
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: bold;
    color: #666;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.product-tile {
    display: block;
    padding: 10px;
    color: inherit;
    text-decoration: none;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

    .product-tile:hover,
    .product-tile.active {
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
        transform: translateY(-1px);
    }

    .product-tile:focus {
        outline: none;
    }

    .product-tile:focus-visible {
        outline: 2px solid #007bff;
        outline-offset: 2px;
    }

.product-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    background: #fafafa;
}

.product-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: none;
    outline: none;
}

.product-info {
    width: 100%;
}

.product-name {
    min-height: 36px;
    font-size: 14px;
    line-height: 1.3;
}

.product-price {
    margin-top: 8px;
    font-size: 15px;
    font-weight: bold;
}

.loading {
    padding: 10px;
    font-style: italic;
    color: #666;
}

.price-discounted {
    font-size: 16px;
    font-weight: bold;
    color: #c60000;
}

.price-normal {
    font-size: 15px;
    font-weight: bold;
}

.price-meta {
    margin-top: 3px;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.price-original {
    font-size: 12px;
    color: #777;
    text-decoration: line-through;
}

.discount-badge {
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    background: #c60000;
    border-radius: 4px;
    padding: 2px 5px;
}

.search-input-wrapper {
    display: flex;
    width: 100%;
}

#searchBox {
    flex: 1;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-right: none;
    outline: none;
}

#searchButton {
    width: 44px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 18px;
}

    #searchButton:hover {
        background: #e5e5e5;
    }

@media (max-width: 600px) {
    .search-dropdown {
        position: static;
        margin-top: 8px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-tile {
        display: flex;
        gap: 12px;
        align-items: center;
    }

    .product-image-wrap {
        width: 80px;
        min-width: 80px;
        height: 80px;
        margin-bottom: 0;
        aspect-ratio: auto;
    }

    .product-name {
        min-height: auto;
    }
}
