/* ============================================================
   LUCA SEARCH PANEL - Responsive & Optimized
   ============================================================ */

.luca-search-trigger { 
    cursor: pointer; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    padding: 10px; 
    height: 100%; 
}

.luca-search-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    background: rgba(0, 0, 0, 0.6); 
    z-index: 99998; 
    opacity: 0; 
    visibility: hidden; 
    transition: all 0.3s ease; 
}

.luca-search-overlay.active { 
    opacity: 1; 
    visibility: visible; 
}

.luca-search-panel { 
    position: fixed; 
    top: 0; 
    bottom: 0; 
    right: -450px; 
    width: 450px; 
    max-width: 100%; 
    background: #fff; 
    z-index: 99999; 
    transition: right 0.4s ease; 
    display: flex; 
    flex-direction: column; 
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1); 
}

.luca-search-panel.active { 
    right: 0; 
}

.search-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 20px 20px; 
    border-bottom: 1px solid #eee; 
    flex-wrap: wrap;
    gap: 10px;
}

.search-header h2 { 
    margin: 0; 
    font-size: 24px; 
    font-weight: bold; 
    flex: 1;
    min-width: 0;
}

.close-search { 
    background: none; 
    border: none; 
    font-size: 18px; 
    font-weight: bold; 
    cursor: pointer; 
    color: #333; 
    padding: 5px; 
    margin: 0; 
    flex-shrink: 0;
    transition: color 0.2s;
}

.close-search:hover {
    color: #000;
}

.search-form-wrap { 
    padding: 20px; 
    position: relative; 
}

.search-form-wrap input { 
    width: 100%; 
    padding: 12px 35px; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    font-size: 15px; 
    outline: none; 
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.search-form-wrap input:focus { 
    border-color: #000; 
}

.search-icon-input { 
    position: absolute; 
    left: 30px; 
    top: 50%; 
    transform: translateY(-50%); 
    display: flex;
    align-items: center;
}

.clear-input { 
    position: absolute; 
    right: 30px; 
    top: 50%; 
    transform: translateY(-50%); 
    background: none; 
    border: none; 
    font-size: 18px; 
    color: #999; 
    cursor: pointer; 
    display: none; 
    padding: 0;
    transition: color 0.2s;
}

.clear-input:hover {
    color: #333;
}

.clear-input.show { 
    display: block; 
}

.popular-searches { 
    padding: 0 20px 20px; 
}

.popular-searches span { 
    font-size: 12px; 
    color: #777; 
    margin-bottom: 10px; 
    display: block; 
    font-weight: 500;
}

.search-tags { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px;
}

.search-tags a { 
    display: inline-block; 
    padding: 6px 12px; 
    background: #f5f5f5; 
    color: #333; 
    text-decoration: none; 
    font-size: 13px; 
    border-radius: 3px; 
    transition: all 0.2s;
}

.search-tags a:hover {
    background: #e0e0e0;
}

.results-title { 
    padding: 0 20px; 
    font-size: 18px; 
    font-weight: bold; 
    margin-bottom: 15px; 
    color: #333;
}

.search-results-grid { 
    padding: 0 20px 30px; 
    overflow-y: auto; 
    flex-grow: 1; 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
}

.luca-product-card { 
    border: 1px solid #eee; 
    position: relative; 
    transition: box-shadow 0.2s;
}

.luca-product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.luca-product-image { 
    position: relative; 
    display: block; 
    overflow: hidden; 
    background: #f9f9f9;
    aspect-ratio: 3/4;
}

.luca-product-image img { 
    width: 100%; 
    height: 100%;
    object-fit: cover;
    display: block; 
}

.luca-badge { 
    position: absolute; 
    top: 10px; 
    left: 10px; 
    background: #000; 
    color: #fff; 
    font-size: 10px; 
    padding: 4px 8px; 
    border-radius: 20px; 
    font-weight: bold; 
    z-index: 2; 
    text-transform: uppercase;
}

.luca-badge.limited { 
    background: #e09f3e; 
    color: #000; 
}

.luca-wishlist { 
    position: absolute; 
    top: 10px; 
    right: 10px; 
    background: none; 
    border: none; 
    font-size: 18px; 
    cursor: pointer; 
    z-index: 2; 
    padding: 5px;
    transition: transform 0.2s;
}

.luca-wishlist:hover {
    transform: scale(1.2);
}

.luca-product-info { 
    padding: 12px; 
    text-align: left; 
}

.luca-product-title { 
    font-size: 12px; 
    font-weight: bold; 
    color: #333; 
    text-transform: uppercase; 
    margin-bottom: 5px; 
    text-decoration: none; 
    display: block; 
    line-height: 1.4;
}

.luca-product-cat { 
    font-size: 11px; 
    color: #999; 
    margin-bottom: 8px; 
    text-transform: uppercase;
}

.luca-price { 
    font-size: 14px; 
    font-weight: bold; 
    color: #000;
}

.luca-price del { 
    color: #999; 
    font-weight: normal; 
    margin-right: 8px; 
    font-size: 12px; 
    text-decoration: line-through;
}

.luca-loader { 
    text-align: center; 
    grid-column: span 2; 
    padding: 20px; 
    color: #666;
}

/* ════════════════════════════════════════
   RESPONSIVE DESIGN
   ════════════════════════════════════════ */

/* Tablet & Small Desktop (max-width: 1024px) */
@media (max-width: 1024px) {
    .luca-search-panel {
        width: 100%;
        right: -100%;
    }
    
    .search-results-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Tablet (max-width: 768px) */
@media (max-width: 768px) {
    .search-header {
        padding: 16px;
    }
    
    .search-header h2 {
        font-size: 20px;
    }
    
    .search-form-wrap {
        padding: 16px;
    }
    
    .search-icon-input {
        left: 25px;
    }
    
    .clear-input {
        right: 24px;
    }
    
    .popular-searches,
    .results-title {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .search-results-grid {
        padding: 0 16px 20px;
        gap: 12px;
    }
    
    .luca-product-info {
        padding: 10px;
    }
    
    .luca-loader {
        font-size: 14px;
    }
}

/* Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .luca-search-panel {
        width: 100%;
        right: -100%;
    }
    
    .search-header {
        padding: 14px;
    }
    
    .search-header h2 {
        font-size: 18px;
    }
    
    .close-search {
        font-size: 16px;
    }
    
    .search-form-wrap {
        padding: 14px;
    }
    
    .search-form-wrap input {
        font-size: 16px;
        padding: 11px 30px;
    }
    
    .search-icon-input {
        left: 25px;
    }
    
    .clear-input {
        right: 14px;
    }
    
    .popular-searches,
    .results-title {
        padding-left: 14px;
        padding-right: 14px;
        font-size: 14px;
    }
    
    .search-results-grid {
        grid-template-columns: 2fr 50%;
        padding: 0 14px 20px;
        gap: 12px;
    }
    
    .luca-loader {
        grid-column: span 1;
    }
    
    .search-tags a {
        font-size: 12px;
        padding: 5px 10px;
    }
}
