﻿/* =============================================================================
   APACKS - SEARCH OVERLAY CSS - v2.0 (Full Screen & Scrollable Body)
   ============================================================================= */

/* Containerul principal - Full Screen */
/* Containerul principal - Full Screen */
.search-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: -webkit-fill-available !important;
    background: linear-gradient(180deg, #000000 0%, #1a1a1a 100%) !important;
    z-index: 9999 !important;
    /* NU ARE SCROLL - doar conținutul interior */
    overflow: hidden !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: scale(1.05) !important;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s !important;
    /* Force GPU acceleration */
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    will-change: transform, opacity !important;
}

    .search-overlay.active {
        opacity: 1 !important;
        visibility: visible !important;
        transform: scale(1) !important;
    }

/* Clasă adăugată pe <body> pentru a bloca scroll-ul paginii */
body.no-scroll {
    overflow: hidden;
}

.search-overlay-content {
    width: 100% !important;
    height: 100vh !important;
    height: -webkit-fill-available !important;
    display: flex !important;
    flex-direction: column !important;
    background-color: #ffffff !important;
    overflow: hidden !important; /* Împiedică scroll pe wrapper */
}

/* Părțile fixe din partea de sus */
.search-header-overlay,
.urgency-banner,
.search-input-container {
    flex-shrink: 0; /* Nu se vor micșora */
}



/*
 * STILURI SPECIFICE PENTRU ELEMENTELE INTERIOARE
 * Adaptate pentru un look premium
 */

/* Header-ul ferestrei de căutare */
.search-header-overlay {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background: linear-gradient(180deg, #000000 0%, #1a1a1a 100%) !important;
    color: #ffffff !important;
    padding: 20px 16px !important;
    border-bottom: 3px solid #C10206 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    width: 100% !important;
    flex-shrink: 0 !important;
    /* iOS Safari support */
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
}



.search-title-section {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    min-width: 0 !important;
    padding-right: px !important; /* Spațiu pentru butonul close */
}

    .search-title-section h2 {
        font-family: 'Black Ops One', sans-serif !important;
        font-size: 20px !important;
        margin: 0 !important;
        color: #ffffff !important;
    }

.search-subtitle {
    font-size: 13px !important;
    color: #cccccc !important;
    margin-top: 5px !important;
    width: 100% !important;
    display: block !important;
}

.btn-close-search {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    cursor: pointer !important;
    width: 50px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
    /* POZIȚIONARE ABSOLUTĂ ÎN COLȚUL DREAPTA SUS */
    position: absolute !important;
    top: 0px !important;
    right: 10px !important;
    z-index: 1001 !important;
    /* Touch optimization */
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation !important;
}

    .btn-close-search:hover,
    .btn-close-search:active {
        background-color: #C10206 !important;
        transform: rotate(90deg) !important;
    }

/* Câmpul de input */
.search-input-container {
    padding: 24px 16px;
    background-color: #111;
    border-bottom: 1px solid #333;
}

.search-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 500;
    border: 2px solid #555;
    background-color: #222;
    color: #fff;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
    -webkit-appearance: none;
}

    .search-input:focus {
        border-color: #C10206;
        box-shadow: 0 0 15px rgba(193, 2, 6, 0.5);
    }

    .search-input::placeholder {
        color: #888;
    }

/* Conținutul scrollabil */
.search-suggestions,
.search-results,
.search-no-results {
    padding: 24px 16px;
}

    .search-suggestions h3,
    .search-results h3 {
        font-family: 'Black Ops One', sans-serif;
        font-size: 16px;
        text-transform: uppercase;
        color: #333;
        margin-bottom: 20px;
    }

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.suggestion-tag {
    background: #f7f7f7;
    border: 1px solid #e5e5e5;
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s ease;
    text-decoration: none;
    color: #333;
    display: block;
}

    .suggestion-tag:hover {
        border-color: #C10206;
        background-color: #fff;
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    }

.tag-icon {
    font-size: 22px;
    margin-bottom: 8px;
}

.tag-text {
    font-weight: 700;
    font-size: 16px;
}

.tag-stats {
    font-size: 13px;
    color: #777;
    margin-top: 4px;
}

.suggestion-tag:hover .tag-stats {
    color: #555;
}

.products-list,
.results-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background-color: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 12px;
    transition: all 0.25s ease;
}

    .product-item:hover {
        border-color: #ddd;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
        transform: translateY(-2px);
    }

.product-image {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.product-details {
    flex-grow: 1;
}

    .product-details h4 {
        font-weight: 600;
        margin: 0 0 4px;
    }

    .product-details p {
        font-size: 14px;
        color: #666;
        margin: 0;
    }

.product-actions {
    text-align: right;
}

.product-price {
    font-weight: 700;
    font-size: 16px;
    color: #C10206;
    margin-bottom: 8px;
}

.btn-add {
    background-color: #C10206;
    color: #fff;
    border: none;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.2s ease;
}

    .btn-add:hover {
        background-color: #a10205;
    }

.search-no-results {
    text-align: center;
    padding: 40px 16px;
    color: #888;
}

/* SPECIAL OFFER SIDEBAR în Search Overlay */
.special-offer-sidebar {
    position: relative !important;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%) !important;
    padding: 20px !important;
    margin: 24px 16px !important;
    border-radius: 12px !important;
    text-align: center !important;
    box-shadow: 0 6px 24px rgba(193, 2, 6, 0.4) !important;
    overflow: hidden !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
}

.badge-sidebar {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    color: white !important;
    padding: 4px 8px !important;
    border-radius: 16px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    z-index: 10 !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.badge-discount-sidebar {
    background: radial-gradient(ellipse at center, #ff6b35 0%, #C10206 40%, #8b0000 70%, #2d0000 100%) !important;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.8) !important;
}

.offer-header-sidebar {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
}

.offer-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #ffffff !important;
}

.offer-product-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    margin-bottom: 12px !important;
    color: #ffffff !important;
    line-height: 1.2 !important;
}

.pricing-details-sidebar {
    display: flex !important;
    justify-content: center !important;
    align-items: baseline !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    margin-bottom: 16px !important;
}

.price-old-sidebar {
    color: #9ca3af !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    text-decoration: line-through 2px !important;
    text-decoration-color: #ff4500 !important;
}

.price-new-sidebar {
    color: #ffffff !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
}

.price-unit-sidebar {
    color: #e5e7eb !important;
    font-size: 12px !important;
    font-weight: 400 !important;
}

.offer-btn-sidebar {
    width: 100% !important;
    background: linear-gradient(135deg, #C10206 0%, #aa0205 100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    box-shadow: 0 3px 12px rgba(193, 2, 6, 0.4) !important;
    border: none !important;
    font-size: 16px !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    display: block !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
}

    .offer-btn-sidebar:hover {
        background: linear-gradient(135deg, #aa0205 0%, #C10206 100%) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 20px rgba(193, 2, 6, 0.5) !important;
        color: #ffffff !important;
    }

/* QUICK CONTACT în Search Overlay */
.quick-contact {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 24px 16px !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-top: 1px solid #e5e7eb !important;
}

.btn-whatsapp {
    background: #25d366 !important;
    color: white !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    font-size: 14px !important;
}

    .btn-whatsapp:hover {
        background: #20ba5a !important;
        color: white !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4) !important;
    }

.btn-phone {
    background: transparent !important;
    color: #333333 !important;
    border: 2px solid #333333 !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    font-size: 14px !important;
}

    .btn-phone:hover {
        background: #333333 !important;
        color: #ffffff !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 2px 8px rgba(51, 51, 51, 0.3) !important;
    }

