/* =======================================================================
   Ingredients Page
   ======================================================================= */

.ingredients-page {
    background: var(--bg-white);
    padding: 80px 0 100px;
}

/* -----------------------------------------------------------------------
   Intro content (page body copy)
   ----------------------------------------------------------------------- */

.ingredients-intro {
    /* max-width: 760px;
    margin: -20px auto 40px; */
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.8;
}

.ingredients-intro p:last-child {
    margin-bottom: 0;
}

/* -----------------------------------------------------------------------
   Filters
   ----------------------------------------------------------------------- */

.ingredients-filters {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    align-items: flex-end;
}

.ingredients-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 220px;
    min-width: 200px;
    max-width: 320px;
}

.ingredients-filter-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-light);
}

.ingredients-search-input,
.ingredients-use-select {
    width: 100%;
    padding: 11px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 15px;
    color: var(--text-dark);
    background: var(--bg-white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.ingredients-search-input:focus,
.ingredients-use-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.12);
}

.ingredients-select-wrap {
    position: relative;
}

/* Custom dropdown chevron */
.ingredients-select-wrap::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    pointer-events: none;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--text-light);
}

.ingredients-select-wrap select {
    cursor: pointer;
    padding-right: 36px;
}

/* -----------------------------------------------------------------------
   Table
   ----------------------------------------------------------------------- */

.ingredients-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.ingredients-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

/* Header row */
.ingredients-table thead tr {
    background: var(--primary-color);
}

.ingredients-table thead th {
    padding: 16px 20px;
    text-align: left;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: #ffffff;
    white-space: nowrap;
}

/* Body rows */
.ingredients-table tbody .ingredient-row {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.15s ease;
}

.ingredients-table tbody .ingredient-row:last-child {
    border-bottom: none;
}

.ingredients-table tbody .ingredient-row:nth-child(even) {
    background: var(--bg-light);
}

.ingredients-table tbody .ingredient-row:hover {
    background: rgba(255, 107, 53, 0.05);
}

.ingredients-table td {
    padding: 16px 20px;
    vertical-align: top;
    color: var(--text-dark);
    line-height: 1.6;
}

.ingredient-name {
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
    min-width: 160px;
}

.ingredient-use {
    color: var(--text-dark);
    min-width: 180px;
}

.ingredient-benefits {
    color: var(--text-light);
}

/* Hidden rows when filtered */
.ingredient-row[hidden] {
    display: none;
}

/* -----------------------------------------------------------------------
   Empty / no-results states
   ----------------------------------------------------------------------- */

.ingredients-no-results,
.ingredients-empty {
    text-align: center;
    color: var(--text-light);
    font-size: 16px;
    padding: 60px 0;
}

/* -----------------------------------------------------------------------
   Responsive
   ----------------------------------------------------------------------- */

@media (max-width: 768px) {
    .ingredients-page {
        padding: 50px 0 70px;
    }

    .ingredients-filters {
        flex-direction: column;
        gap: 16px;
    }

    .ingredients-filter-group {
        max-width: 100%;
    }

    .ingredients-table thead th,
    .ingredients-table td {
        padding: 12px 14px;
    }

    .ingredient-name {
        white-space: normal;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .ingredients-table {
        font-size: 13px;
    }
}
