/* =====================================================
   CodeFreeHub V2 - Offers & Category Page Styles
   Full-width, centered, airy filter bar
   ===================================================== */

/* -----------------------------------------------------
   FILTER BAR — Full width, single row
   ----------------------------------------------------- */
.offers-filter-bar {
    max-width: 720px;
    margin: 0 auto 32px;
}

.offers-filter-form {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
}

/* Search input wrapper */
.offers-search-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

.offers-search-wrap::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E");
    background-size: contain;
    pointer-events: none;
    z-index: 2;
}

.offers-search-input {
    width: 100%;
    padding: 14px 140px 14px 48px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    font-family: inherit;
    font-size: 16px;
    color: var(--gray-800);
    background: var(--white);
    transition: var(--transition);
    outline: none;
}

.offers-search-input::placeholder {
    color: var(--gray-400);
}

.offers-search-input:hover {
    border-color: var(--gray-300);
}

.offers-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* Sort dropdown — inside the search bar (right side) */
.offers-sort-wrap {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    padding-right: 4px;
    z-index: 2;
}

.offers-sort-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--gray-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12' fill='none' stroke='%2364748B' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5'/%3E%3C/svg%3E") no-repeat right 10px center;
    background-size: 10px;
    padding: 8px 28px 8px 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
}

.offers-sort-select:hover {
    border-color: var(--gray-300);
    background-color: var(--gray-100);
}

.offers-sort-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Search button — attached to the right of input */
.offers-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border: 2px solid var(--primary);
    border-left: none;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    background: var(--primary);
    color: white;
}

.offers-search-btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Clear link — small, under the bar */
.offers-clear-wrap {
    text-align: center;
    margin-top: 10px;
}

.offers-clear-link {
    font-size: 13px;
    color: var(--gray-400);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.offers-clear-link:hover {
    color: var(--danger);
}

/* -----------------------------------------------------
   CATEGORY PILLS — centered, airy
   ----------------------------------------------------- */
.category-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 36px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    border: 1.5px solid var(--gray-200);
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    background: var(--white);
    color: var(--gray-600);
}

.category-pill:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
    color: var(--gray-800);
    transform: translateY(-1px);
}

.category-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 3px 12px rgba(59, 130, 246, 0.3);
}

.category-pill.active:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* -----------------------------------------------------
   EMPTY STATE
   ----------------------------------------------------- */
.offers-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--gray-500);
}

.offers-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-lg);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
}

.offers-empty-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.offers-empty-text {
    font-size: 15px;
    color: var(--gray-400);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* -----------------------------------------------------
   PAGINATION
   ----------------------------------------------------- */
.offers-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 48px;
}

.offers-pagination-info {
    display: flex;
    align-items: center;
    padding: 0 20px;
    color: var(--gray-500);
    font-size: 14px;
    font-weight: 500;
}

/* -----------------------------------------------------
   CATEGORY HERO
   ----------------------------------------------------- */
.category-hero {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.category-hero-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

/* -----------------------------------------------------
   RESPONSIVE
   ----------------------------------------------------- */
@media (max-width: 640px) {
    .offers-filter-form {
        flex-direction: column;
        gap: 10px;
    }

    .offers-search-input {
        border-radius: var(--radius-lg);
        padding-right: 130px;
    }

    .offers-search-btn {
        border-radius: var(--radius-lg);
        border-left: 2px solid var(--primary);
        width: 100%;
    }

    .category-pills {
        gap: 8px;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .category-pills::-webkit-scrollbar {
        display: none;
    }

    .category-pill {
        padding: 6px 14px;
        font-size: 12px;
        flex-shrink: 0;
    }
}