﻿/* e-druk AI Search â€” Frontend Styles */

.edruk-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 400px;
}

.edruk-search-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #d8d8d8;
    border-radius: 8px 0 0 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
}

.edruk-search-input:focus {
    border-color: #2c2d33;
}

.edruk-search-btn {
    padding: 10px 14px;
    background: #2c2d33;
    color: #fff;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edruk-search-btn:hover {
    background: #1a1b20;
}

.edruk-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    max-height: 500px;
    overflow-y: auto;
    z-index: 9999;
    margin-top: 4px;
}

.edruk-search-section {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.edruk-search-section:last-child {
    border-bottom: none;
}

.edruk-search-section-label {
    display: block;
    padding: 4px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 0.5px;
}

.edruk-search-cat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    text-decoration: none;
    color: #2c2d33;
    font-size: 14px;
    transition: background 0.15s;
}

.edruk-search-cat-item:hover {
    background: #f8f9fa;
}

.edruk-search-cat-count {
    font-size: 11px;
    color: #999;
}

.edruk-search-product-item,
.edruk-search-suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    text-decoration: none;
    color: #2c2d33;
    transition: background 0.15s;
}

.edruk-search-product-item:hover,
.edruk-search-suggestion-item:hover {
    background: #f8f9fa;
}

.edruk-search-product-item img,
.edruk-search-suggestion-item img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.edruk-search-product-info,
.edruk-search-suggestion-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.edruk-search-product-name,
.edruk-search-suggestion-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edruk-search-product-price,
.edruk-search-suggestion-price {
    font-size: 13px;
    color: #2e7d32;
    font-weight: 700;
}

.edruk-search-suggestion-reason {
    font-size: 11px;
    color: #999;
}

.edruk-search-suggestions {
    background: #f8fff8;
}

.edruk-search-empty {
    padding: 24px 16px;
    text-align: center;
    color: #666;
}

.edruk-search-empty p {
    margin: 0 0 8px;
}

.edruk-search-all {
    color: #2271b1;
    font-size: 13px;
    text-decoration: none;
}

.edruk-search-footer {
    padding: 10px 16px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.edruk-search-footer a {
    color: #2271b1;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.edruk-search-footer a:hover {
    text-decoration: underline;
}

.edruk-search-loading {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

@media (max-width: 768px) {
    .edruk-search-wrap {
        max-width: 100%;
    }
    .edruk-search-results {
        max-height: 400px;
    }
}
