/* =============================================
   PRODUCTS PAGE - Search + Layout Styles
   ============================================= */

.products-index {
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* ---- Search Hero ---- */
.search-hero {
    position: relative;
    background: linear-gradient(135deg, #ff9a3d 0%, #FF6B35 55%, #e8522a 100%);
    padding: 3.5rem 1.5rem 7rem;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

/* Dot texture overlay */
.search-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.13) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
    z-index: 0;
}

/* Wave bottom edge */
.search-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #f8f9fa;
    clip-path: ellipse(55% 100% at 50% 100%);
    z-index: 1;
}

/* Breadcrumb inside hero */
.search-hero__breadcrumb {
    position: relative;
    z-index: 2;
    background: none;
    margin: 0 auto 16px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
}

.search-hero__breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    text-decoration: none;
}

.search-hero__breadcrumb a:hover {
    color: #fff;
    text-decoration: underline;
}

.search-hero__breadcrumb span {
    color: rgba(255, 255, 255, 0.6);
}

.search-hero__title {
    position: relative;
    z-index: 2;
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
    letter-spacing: -0.5px;
    line-height: 1.25;
    animation: sh-fadein 0.55s ease both;
}

.search-hero__subtitle {
    position: relative;
    z-index: 2;
    font-size: 1.05rem;
    opacity: 0.9;
    margin: 0 0 1.75rem;
    font-weight: 400;
    animation: sh-fadein 0.55s 0.1s ease both;
}

.search-hero__bar {
    position: relative;
    z-index: 2;
    display: flex;
    max-width: 640px;
    margin: 0 auto 1.75rem;
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    direction: ltr;
    animation: sh-fadein 0.55s 0.2s ease both;
}

.search-hero__input {
    flex: 1;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-family: inherit;
    color: #333;
    outline: none;
    background: transparent;
    text-align: left;
    min-width: 0;
}

.search-hero__input::placeholder {
    color: #767676;
}

.search-hero__btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 1.5rem;
    background: linear-gradient(135deg, #ff9a3d, #FF6B35);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.search-hero__btn:hover {
    background: linear-gradient(135deg, #e88830, #e55a2b);
}

.search-hero__btn svg {
    flex-shrink: 0;
}

/* Stats strip */
.search-hero__stats {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50px;
    padding: 0.4rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    animation: sh-fadein 0.55s 0.3s ease both;
}

.search-hero__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.25rem 1.25rem;
}

.search-hero__stat-sep {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.search-hero__stat-value {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.2;
}

.search-hero__stat-label {
    font-size: 0.72rem;
    opacity: 0.88;
    white-space: nowrap;
    margin-top: 1px;
}

@keyframes sh-fadein {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Category Chips ---- */
.category-chips {
    background: #fff;
    border-bottom: 1px solid #efefef;
    padding: 0.8rem 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.category-chips::-webkit-scrollbar {
    display: none;
}

.category-chips__wrap {
    display: flex;
    gap: 0.5rem;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
    flex-wrap: wrap;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 1rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 20px;
    background: #fff;
    color: #555;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.category-chip:hover {
    border-color: #c45200;
    color: #c45200;
    background: #fff8f5;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(255,107,53,0.15);
}

.category-chip--active {
    background: linear-gradient(135deg, #ff9a3d, #FF6B35);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(255,107,53,0.3);
}

.category-chip--active:hover {
    background: linear-gradient(135deg, #e88830, #e55a2b);
    color: #fff;
    border-color: transparent;
}

.category-chip__icon {
    font-size: 1rem;
    line-height: 1;
}

/* ---- Main Content ---- */
.products-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

/* ---- Products Section ---- */
.products-section {
    margin-bottom: 3rem;
}

.products-section__header {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.products-section__title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.65rem;
    border-bottom: 3px solid #FF6B35;
}

.products-section__count {
    font-size: 0.95rem;
    color: #767676;
    font-weight: 500;
}

.products-section--live .products-section__title {
    color: #1a1a1a;
    border-bottom-color: #e53935;
}

.product-card--live {
    border: 1px solid rgba(255, 107, 53, 0.15);
}

/* ---- Empty State ---- */
.products-empty {
    text-align: center;
    padding: 3.5rem 1.5rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.products-empty h3 {
    color: #333;
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
}

.products-empty p {
    color: #767676;
    margin: 0;
}

/* ---- Loading Spinner ---- */
.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    gap: 1rem;
}

.search-loading__spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #eee;
    border-top-color: #c45200;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.search-loading__text {
    font-size: 1rem;
    color: #767676;
    margin: 0;
}

/* ---- No Results ---- */
.search-empty {
    text-align: center;
    padding: 4rem 1.5rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.search-empty__icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.search-empty__title {
    color: #333;
    font-size: 1.3rem;
    margin: 0 0 0.5rem;
}

.search-empty__text {
    color: #767676;
    margin: 0;
    font-size: 1rem;
}

.search-empty__wa {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 1.25rem;
    padding: 11px 24px;
    background: #25d366;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 100px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.search-empty__wa:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(37, 211, 102, 0.4);
    filter: brightness(1.05);
    color: #fff;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .search-hero::after {
        height: 20px;
    }

    .search-hero {
        padding: 2.5rem 1rem 6rem;
    }

    .search-hero__title {
        font-size: 1.9rem;
    }

    .search-hero__subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
    }

    .search-hero__bar {
        flex-direction: column;
        border-radius: 16px;
    }

    .search-hero__input {
        border-bottom: 1px solid #eee;
        padding: 0.9rem 1.25rem;
        font-size: 1rem;
        text-align: center;
    }

    .search-hero__btn {
        justify-content: center;
        padding: 0.85rem 1rem;
        border-radius: 0;
    }

    .search-hero__stat-value {
        font-size: 1.1rem;
    }

    .search-hero__stat {
        padding: 0.25rem 0.9rem;
    }

    .category-chips {
        padding: 0.65rem 0.75rem;
    }

    .category-chips__wrap {
        justify-content: flex-start;
        flex-wrap: nowrap;
    }

    .products-main {
        padding: 1.25rem 1rem 2rem;
    }

    .products-section__title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .search-hero__title {
        font-size: 1.6rem;
    }

    .search-hero__input {
        font-size: 0.95rem;
    }

    .search-hero__stats {
        padding: 0.35rem 0.25rem;
    }

    .search-hero__stat {
        padding: 0.2rem 0.65rem;
    }

    .search-hero__stat-label {
        font-size: 0.65rem;
    }
}
