/* Подобрен херо секция */
.search-promo-banner {
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary) 100%);
    /* Blue Logo Gradient */
    border-radius: 0;
    margin-bottom: 30px;
    padding: 60px 20px;
    box-shadow: 0 10px 30px rgba(41, 128, 185, 0.25);
    display: block;
    border-bottom: 4px solid var(--accent);
    /* Industrial accent line */
    /* Default visible */
}

.search-promo-banner h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 800;
}

.search-promo-banner p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 25px;
}

.search-promo-banner .btn {
    background: #ffffff !important;
    /* Use background shorthand to wipe out gradient image */
    color: rgb(41, 128, 185) !important;
    /* Logo Blue for text */
    border: none !important;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.search-promo-banner .btn:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 35px;
    opacity: 0.95;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}




.search-container {
    margin-bottom: 40px;
    margin-top: 20px;
}

/* Inline Search Filters */
/* Inline Search Filters */
.search-box {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    z-index: 1001;
    border: 1px solid var(--gray-light);
    width: 100%;
}

/* .search-box.header-search {
    flex: 1;
    max-width: 500px;
    height: 44px;
    margin: 0 20px;
    flex-wrap: nowrap;
} */

.search-box.header-search {
    flex: 1;
    /* Occupies all available space between logo and login */
    height: 44px;
    margin: 0 40px;
    /* Larger side margins for better spacing */
    flex-wrap: nowrap;
    max-width: none;
}

.search-box:focus-within {
    box-shadow: var(--shadow);
    border-color: var(--gray-light);
}

.search-box input {
    flex: 1;
    min-width: 150px;
    width: auto;
    border: none;
    padding: 12px 25px;
    font-size: 15px;
    outline: none;
    font-family: 'Montserrat', sans-serif;
    background: transparent;
}

.search-box.header-search input {
    padding: 0 20px;
    height: 100%;
}

.search-box.header-search .search-query-pill {
    margin: 4px;
    padding: 6px 15px;
    font-size: 14px;
}

.search-box.header-search .search-icon-static {
    height: 44px;
    width: 44px;
}

.search-query-pill {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--light);
    margin: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    border: 2px solid #1e3a8a;
    color: #1e3a8a;
    font-weight: 700;
    font-size: 15px;
    animation: fadeInPill 0.3s ease-out;
}

@keyframes fadeInPill {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.search-query-pill span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-query-pill span::before {
    content: '\f002';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #1e3a8a;
    font-size: 14px;
}

.search-query-pill i.clear-search {
    cursor: pointer;
    color: var(--gray);
    transition: all 0.2s;
    font-size: 18px;
    margin-left: 15px;
}

.search-query-pill i.clear-search:hover {
    color: var(--danger);
    transform: scale(1.1);
}

.search-actions {
    display: flex;
    align-items: center;
    /* Center button vertically */
    flex-shrink: 0;
    /* Keep buttons fixed size */
    background: transparent;
    z-index: 20;
    /* Keep on top */
    order: 2;
    /* Ensure buttons stay on right */
    padding-right: 6px;
    /* Add some padding from the right edge */
}

.search-icon-static {
    background: transparent;
    color: var(--gray);
    border: none;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: none;
}

#searchButton:active {
    transform: translateY(0);
}


/* Suggestions Overlay Styles */
.search-suggestions-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin-top: 5px;
    padding: 20px;
    z-index: 2000;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestions-section.category-suggestions {
    background-color: #f8faff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    margin-bottom: 15px;
}

.suggestions-section.category-suggestions .section-header {
    background: #f1f5f9;
    padding: 8px 12px;
    margin: 0;
    border-bottom: 1px solid #e2e8f0;
}

.suggestions-section.category-suggestions h6 {
    margin: 0;
    color: var(--secondary-dark);
}

.category-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

.category-item:last-child {
    border-bottom: none;
}

.category-item:hover {
    background-color: #eef2ff;
}

.suggestion-content {
    display: flex;
    flex-direction: column;
}

.suggestion-text {
    font-size: 14px;
    color: var(--dark);
}

.highlight-category {
    font-weight: 700;
    color: var(--primary-color);
}

.suggestion-count {
    font-size: 0.75rem;
    color: #888;
    margin-top: 2px;
}

.category-item i.fa-search-plus {
    color: #cbd5e1;
    font-size: 14px;
}

.category-item:hover i.fa-search-plus {
    color: var(--primary);
}

.suggestions-section h6 {
    color: var(--gray);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.suggestions-section h6 i {
    color: rgb(52, 152, 219);
}

.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.suggestion-chip {
    padding: 8px 16px;
    background: var(--light);
    color: var(--primary-dark);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--gray-light);
}

.suggestion-chip:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.suggestions-separator {
    height: 1px;
    background: var(--gray-light);
    margin: 15px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.btn-clear-recent {
    background: none;
    border: none;
    color: rgb(52, 152, 219);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.btn-clear-recent:hover {
    background: var(--light);
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.recent-item {
    padding: 10px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
    color: var(--dark);
    font-size: 15px;
}

.recent-item:hover {
    background: var(--light);
}

.recent-item i {
    color: var(--gray);
    font-size: 14px;
}

/* Подобрени секционни заглавия */
.section-title {
    font-size: 1.15rem;
    margin: 20px 0 10px;
    font-weight: 600;
    color: var(--dark);
    position: relative;
    padding-bottom: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}


.section-title i {
    color: rgb(52, 152, 219);
}

/* Подобрени карточки за продукти */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Специален стил за търсени продукти - 4 колони, хоризонтално "залепени", вертикално с разстояние */
.search-results-grid {
    grid-template-columns: repeat(4, 1fr);
    row-gap: 10px;
    column-gap: 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
    margin-bottom: 50px;
}

.search-results-grid .product-card {
    position: relative;
    border-radius: 0;
    box-shadow: none;
    height: 100%;
    margin-right: -1px;
    /* Застъпване за перфектни 1px линии хоризонтално */
    display: flex;
    flex-direction: column;
    border: 1px solid #cbd5e1;
}

.search-results-grid .product-card:hover {
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    /* По-дискретна сянка */
    transform: none;
}


@media (max-width: 1200px) {
    .search-results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .search-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .search-results-grid {
        grid-template-columns: 1fr;
    }
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-card-hover);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 0;
    background: rgb(52, 152, 219);
    color: white;
    padding: 3px 18px 7px 12px;
    border-radius: 0;
    font-size: 10px;
    font-weight: 700;
    z-index: 2;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 2px 2px 8px rgba(52, 152, 219, 0.25);
    transform: rotate(-90deg) translateX(-100%);
    transform-origin: 0 0;
    white-space: nowrap;
    /* Наклон само от дясната страна (външната), лявата (към бордюра) е права */
    clip-path: polygon(0% 0%, 100% 0%, 100% 75%, 0% 100%);
}

.product-badge.slow {
    background: var(--gradient-primary);
    color: white;
    border: none;
}

.product-badge.fast {
    background: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%);
    box-shadow: 2px 2px 8px rgba(239, 68, 68, 0.25);
    color: white;
    border: none;
}

.product-image {
    height: 160px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

/* .product-card:hover .product-image img {
    transform: scale(1.05);
} */

.product-info {
    padding: 15px;
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-title {
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark);
    font-size: 1.1rem;
}

.product-description {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.price-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price-footer {
    margin-top: auto;
    padding-top: 15px;
}

.current-price {
    font-weight: 700;
    color: rgb(255, 102, 0);
    font-size: 16px;
}

.original-price {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 13px;
}

.price-drop {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--danger);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.timer {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(80, 70, 229, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--warning);
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 14px;
}

.progress-container {
    margin-bottom: 15px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 5px;
}

.progress-bar {
    height: 8px;
    background: var(--gray-light);
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
}

.product-stats {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    color: var(--gray);
}

.product-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-light);
}

.product-details-link {
    color: rgb(52, 152, 219);
    text-decoration: none;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s ease;
    cursor: pointer;
    line-height: 1;
}

.product-details-link:hover {
    color: rgb(41, 128, 185);
    text-decoration: none;
    /* Ensure no underline on hover */
    opacity: 0.8;
}

.product-details-link .details-icon {
    width: 13px;
    height: 13px;
    fill: currentColor;
}

.btn-watch {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    color: rgb(52, 152, 219);
    border: none;
    font-size: 18px;
    z-index: 25;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    outline: none;
    box-shadow: none;
}

.btn-watch:hover,
.btn-watch.active {
    background: rgba(52, 152, 219, 0.1);
    transform: scale(1.1);
    color: rgb(52, 152, 219);
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
    grid-column: 1 / -1;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-card);
}

.no-results i {
    font-size: 60px;
    margin-bottom: 20px;
    color: var(--secondary-dark);
}

/* Футър с подобрен дизайн */
footer {
    margin-top: 80px;
    background: var(--dark);
    color: white;
    padding: 50px 0 30px;
}

/* Sidebar and Facets */
/* Sidebar and Facets */
/* .search-results-layout removed - replaced by pds-sidebar-layout */

.facets-sidebar {
    background: rgb(231, 239, 247);
    padding: 15px;
    border-radius: 0;
    border: 1px solid #cbd5e1;
    height: fit-content;
}

.category-header i,
.fa-layer-group {
    color: rgb(52, 152, 219) !important;
}

/* Price Inputs Row */
.price-inputs-row {
    display: flex;
    gap: 10px;
    padding: 10px 5px;
}

.price-input-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.price-input-container label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--dark-light);
    font-weight: 600;
}

.price-input-container input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    color: var(--dark-main);
    background: white;
    transition: border-color 0.2s;
}

.price-input-container input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

/* Hide spin buttons for numeric inputs */
.price-input-container input::-webkit-outer-spin-button,
.price-input-container input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.price-input-container input[type=number] {
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    appearance: textfield;
}

.facet-option.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
    filter: grayscale(1);
}




@media (max-width: 992px) {
    /* .search-results-layout logic removed */
}

.footer-minimal {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-identity {
    flex: 1;
    max-width: 480px;
}

.footer-description {
    color: var(--gray);
    font-size: 15px;
    line-height: 1.6;
    margin-top: 15px;
}

.footer-reach {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 20px;
}

.footer-contact-minimal {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-contact-minimal a {
    color: var(--gray);
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

.footer-contact-minimal a:hover {
    color: white;
}

.footer-contact-minimal i {
    color: rgb(52, 152, 219);
    font-size: 14px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 28px;
    color: white;
    letter-spacing: -0.5px;
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
}

.social-icon:hover {
    background: rgb(52, 152, 219);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray);
    font-size: 13px;
}

@media (max-width: 768px) {
    .footer-minimal {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }

    .footer-reach {
        align-items: center;
    }

    .footer-contact-minimal a {
        justify-content: center;
    }

    .footer-logo {
        justify-content: center;
    }
}

@media (max-width: 576px) and (orientation: portrait) {
    .footer-logo {
        justify-content: center;
    }
}

/* Мобилна адаптация */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .section-title {
        font-size: 1rem;
        margin: 15px 0 10px;
    }

    .search-promo-banner h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {

    .hero h1 {
        font-size: 2.3rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .filters {
        flex-direction: column;
    }

    .filter-group {
        justify-content: center;
    }

    .price-drop-indicator {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .filter-group {
        flex-direction: column;
    }

    select {
        width: 100%;
    }
}

/* --- Mobile Layout Overrides --- */
@media (max-width: 991.98px) {
    .header-container {
        flex-wrap: wrap;
        padding-bottom: 10px;
    }

    /* Logo takes remaining space on first row, pushes ☰ to right */
    .header-logo-row {
        flex: 1;
        margin-bottom: 0;
    }

    /* Hamburger stays on first row, right side */
    .mobile-menu-btn {
        order: 2;
    }

    /* Search wraps to second row, full width */
    .header-search {
        order: 3;
        width: 100% !important;
        margin: 10px 0 0 0 !important;
    }

    /* Sidebar & Filters */
    .mobile-filter-btn {
        display: flex !important;
        width: 100%;
        padding: 12px;
        margin-bottom: 15px;
        background: white;
        border: 1px solid var(--gray-light);
        border-radius: 8px;
        justify-content: center;
        align-items: center;
        gap: 8px;
        font-weight: 600;
        color: var(--dark);
        cursor: pointer;
    }
}

@media (min-width: 992px) {

    .mobile-filter-btn,
    .filter-backdrop,
    .mobile-only {
        display: none !important;
    }
}

/* =========================================
   Nested Facets Styling
   ========================================= */

/* Category Main Header */
.category-header {
    font-size: 17px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    margin-top: 10px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.category-header i {
    color: var(--primary);
    margin-right: 8px;
    font-size: 1rem;
}

/* .category-header .badge removed - replaced by .count-badge in facets.css */

/* Indented Container for Properties */
.category-facets {
    margin-left: 2px;
    padding-left: 6px;
    border-left: 1px solid #e5e7eb;
}

/* Sub-Facet (Property) Group */
.facet-group.sub-facet {
    margin-bottom: 4px;
}

/* Sub-Facet Title */
.facet-group.sub-facet .facet-title {
    font-size: 0.7rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.2;
}

/* Adjust options within sub-facet */
.facet-group.sub-facet .facet-option {
    padding: 0;
    font-size: 0.75rem;
    line-height: 1.1;
    color: #4b5563;
    min-height: 16px;
    display: flex;
    align-items: center;
}

.facet-group.sub-facet .facet-option:hover {
    color: var(--primary);
    background-color: transparent;
}

.facet-group.sub-facet .facet-option i.facet-checkbox {
    width: 15px;
    height: 15px;
    font-size: 10px;
    margin-right: 6px;
    margin-top: 0;
    border-radius: 3px;
    /* softer look */
}

/* Simple Title Fix */
.product-title {
    font-size: 14px !important;
}

/* Item Details Drawer */

/* Promoted listing styles */
.card-promoted {
    border: 2px solid #f59e0b !important;
}

.badge-featured {
    position: absolute;
    top: 0;
    left: 0;
    background: #f59e0b;
    color: #000;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
}