/**
 * FastFold UK - Header Icons, Expandable Live Search, & Navigation Styling
 */

/* ============================================================
   1. HEADER ICONS (USER, SEARCH, CART) & CART BADGE
   ============================================================ */
.elementor-element-bbb6e3c,
.elementor-element-bbb6e3c *,
.elementor-element-fe0a1fb,
.elementor-element-fe0a1fb *,
.elementor-element-087ce89,
.elementor-element-087ce89 *,
.elementor-element-655b658,
.elementor-element-655b658 *,
.elementor-element-2f8626b,
.elementor-element-2f8626b *,
.elementor-element-8e258cb,
.elementor-element-8e258cb *,
.elementor-widget-icon,
.elementor-widget-icon *,
.elementor-icon-wrapper,
.elementor-icon-wrapper *,
.elementor-icon,
.elementor-icon *,
.fa-user,
.fa-search,
.fa-shopping-bag,
a:has(.fa-user),
a:has(.fa-search),
a:has(.fa-shopping-bag) {
    cursor: pointer !important;
}

.elementor-element-bbb6e3c,
.elementor-element-fe0a1fb,
.elementor-element-087ce89,
.elementor-element-655b658,
.elementor-element-2f8626b,
.elementor-element-8e258cb,
.elementor-widget-icon {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease !important;
}

.elementor-element-bbb6e3c:hover,
.elementor-element-fe0a1fb:hover,
.elementor-element-087ce89:hover,
.elementor-element-655b658:hover,
.elementor-element-2f8626b:hover,
.elementor-element-8e258cb:hover {
    transform: translateY(-2px) scale(1.08) !important;
}

.elementor-element-bbb6e3c:hover i,
.elementor-element-bbb6e3c:hover svg,
.elementor-element-fe0a1fb:hover i,
.elementor-element-fe0a1fb:hover svg,
.elementor-element-087ce89:hover i,
.elementor-element-087ce89:hover svg,
.elementor-element-655b658:hover i,
.elementor-element-655b658:hover svg,
.elementor-element-2f8626b:hover i,
.elementor-element-2f8626b:hover svg,
.elementor-element-8e258cb:hover i,
.elementor-element-8e258cb:hover svg {
    color: #0CBB07 !important;
    fill: #0CBB07 !important;
    transition: color 0.25s ease, fill 0.25s ease;
}


/* Cart Badge */
.fastfold-cart-count-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #0CBB07;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 6px rgba(12, 187, 7, 0.4);
    border: 1.5px solid #000000;
    pointer-events: none;
    animation: fastfoldPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fastfold-cart-count-badge.has-items,
.fastfold-cart-count-badge:not(:empty):not([data-count="0"]) {
    display: inline-flex;
}

@keyframes fastfoldPopIn {
    0% { transform: scale(0); }
    80% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ============================================================
   2. SEARCH OVERLAY & EXPANDABLE MODAL
   ============================================================ */
.fastfold-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px 20px 40px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.fastfold-search-overlay.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.fastfold-search-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.fastfold-search-modal {
    position: relative;
    width: 100%;
    max-width: 820px;
    margin-top: 50px;
    background: #111417;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(12, 187, 7, 0.2);
    overflow: hidden;
    transform: translateY(-20px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    z-index: 2;
}

.fastfold-search-overlay.is-active .fastfold-search-modal {
    transform: translateY(0) scale(1);
}

.fastfold-search-modal-inner {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Search Header */
.fastfold-search-header {
    position: relative;
    display: flex;
    align-items: center;
    background: #1a1e23;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px 14px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.fastfold-search-header:focus-within {
    border-color: #0CBB07;
    box-shadow: 0 0 0 3px rgba(12, 187, 7, 0.25);
}

.fastfold-search-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0CBB07;
    margin-right: 12px;
}

.fastfold-search-form {
    flex: 1;
    margin: 0;
    padding: 0;
}

.fastfold-search-input-field {
    width: 100%;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #ffffff !important;
    font-size: 17px !important;
    font-weight: 500 !important;
    padding: 10px 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.fastfold-search-input-field::placeholder {
    color: #8a96a3;
    font-size: 15px;
    font-weight: 400;
}

.fastfold-search-clear-btn,
.fastfold-search-close-btn {
    background: transparent;
    border: none;
    color: #9aa5b1;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fastfold-search-clear-btn:hover,
.fastfold-search-close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.fastfold-search-close-btn {
    margin-left: 6px;
}

/* Quick Tags */
.fastfold-search-quick-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
}

.fastfold-quick-tag-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7785;
    font-weight: 600;
    margin-right: 4px;
}

.fastfold-quick-tag {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #b0bcc8;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fastfold-quick-tag:hover {
    background: rgba(12, 187, 7, 0.15);
    border-color: #0CBB07;
    color: #ffffff;
    transform: translateY(-1px);
}

/* Results Area */
.fastfold-search-results-wrapper {
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #2a313a #111417;
    margin-top: 4px;
}

.fastfold-search-results-wrapper::-webkit-scrollbar {
    width: 6px;
}
.fastfold-search-results-wrapper::-webkit-scrollbar-thumb {
    background-color: #2a313a;
    border-radius: 4px;
}

.fastfold-search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #8a96a3;
    gap: 12px;
}

.fastfold-search-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #0CBB07;
    border-radius: 50%;
    animation: fastfoldSpin 0.8s linear infinite;
}

@keyframes fastfoldSpin {
    to { transform: rotate(360deg); }
}

.fastfold-search-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Search Product Item Card */
.fastfold-search-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #181d22;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px 16px;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.fastfold-search-item:hover,
.fastfold-search-item.is-selected {
    background: #20272e;
    border-color: rgba(12, 187, 7, 0.4);
    transform: translateX(4px);
}

.fastfold-search-item-thumb {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 8px;
    background: #0f1215;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fastfold-search-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.fastfold-search-item:hover .fastfold-search-item-thumb img {
    transform: scale(1.08);
}

.fastfold-search-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fastfold-search-item-badge {
    align-self: flex-start;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    background: rgba(12, 187, 7, 0.15);
    color: #0CBB07;
    border-radius: 4px;
}

.fastfold-search-item-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fastfold-search-item-excerpt {
    color: #8a96a3;
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fastfold-search-item-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.fastfold-search-item-price {
    font-size: 15px;
    font-weight: 700;
    color: #0CBB07;
}

.fastfold-search-item-btn {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 6px;
    background: #0CBB07;
    color: #ffffff !important;
    text-decoration: none;
    transition: background 0.2s ease;
}

.fastfold-search-item:hover .fastfold-search-item-btn {
    background: #0ea809;
}

.fastfold-search-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #8a96a3;
}

.fastfold-search-no-results h4 {
    color: #ffffff;
    font-size: 18px;
    margin-bottom: 8px;
}

.fastfold-search-view-all {
    display: block;
    text-align: center;
    padding: 14px;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    color: #0CBB07 !important;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.fastfold-search-view-all:hover {
    background: rgba(12, 187, 7, 0.15);
    color: #ffffff !important;
}

/* ============================================================
   3. HERO SECTION BUTTON FIXES
   ============================================================ */
.elementor-element-9afc7ca a.elementor-button,
.elementor-element-49dcd35 a.elementor-button {
    cursor: pointer !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease !important;
}

.elementor-element-9afc7ca a.elementor-button:hover,
.elementor-element-49dcd35 a.elementor-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 20px rgba(12, 187, 7, 0.3) !important;
}

/* Smooth Scrolling Offset */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

@media (max-width: 768px) {
    .fastfold-search-modal {
        margin-top: 20px;
    }
    .fastfold-search-modal-inner {
        padding: 16px;
    }
    .fastfold-search-item {
        gap: 12px;
        padding: 10px;
    }
    .fastfold-search-item-thumb {
        width: 55px;
        height: 55px;
    }
    .fastfold-search-item-title {
        font-size: 14px;
    }
    .fastfold-search-item-action {
        align-items: flex-end;
    }
    .fastfold-search-item-btn {
        padding: 4px 10px;
        font-size: 11px;
    }
}
