﻿/* Ingredients Hero */
.ingredients-hero {
	position: relative;
	min-height: 640px;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	padding-bottom: var(--space-lg);
    /* height: 80vh; */
}

.ingredients-hero__bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-image: url('./images/2026/06/Rectangle-1-3.webp');
	background-size: cover;
	background-position: center;
	z-index: 0;
}

.ingredients-hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 115, 80, 0.8), rgba(0, 115, 80, 0.2));
}

.ingredients-hero__inner {
	position: relative;
	z-index: 2;
}



/* Filters Section */
.ingredients-filters {
    background-color: #ffffff;
}

.ingredients-filters .bio-container {
    padding-bottom: 0;
} 

.ingredients-filters__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.ingredients-pills {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width:767px){
    .ingredients-pills{
        justify-content: flex-start;
        gap: 8px;
    }
}

.ingredient-pill {
    background-color: #ffffff;
    border: 1px solid #c0c6c0;
    border-radius: 4px;
    color: #00684A;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 400;
    padding: 0.65rem 1.35rem;
    cursor: pointer;
    transition: all 0.25s ease;
    outline: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.ingredient-pill:hover,
.ingredient-pill.active {
    background-color: #00684A;
    color: #ffffff;
    border-color: #00684A;
}

/* Search Bar */
.ingredients-search-bar {
    position: relative;
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
}

.ingredients-search-input {
    background: #e0e2dd6b;
    border: none;
    border-radius: 4px 0 0 4px;
    padding: 0.65rem 1.25rem;
    font-family: inherit;
    font-size: 0.95rem;
    color: #1a1a1a;
    outline: none;
    min-width: 250px;
    transition: background 0.2s ease;
}

.ingredients-search-input::placeholder {
    color: rgba(0, 0, 0, 0.45);
}

.ingredients-search-input:focus {
    background: #d8dad5;
}

.ingredients-search-btn {
    background: #00684A;
    color: #ffffff;
    border: none;
    border-radius: 0 4px 4px 0;
    padding: 0.65rem 1.6rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ingredients-search-btn:hover {
    background: #00523a;
}

/* Suggestions Dropdown */
.ingredients-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e0e6e0;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 50, 30, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
    max-height: 320px;
    overflow-y: auto;
    z-index: 1000;
    padding: 6px;
    display: none;
}

.ingredients-suggestion-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none;
    color: inherit;
    gap: 12px;
}

.ingredients-suggestion-item:hover,
.ingredients-suggestion-item.active {
    background: #eef6f2;
}

.ingredients-suggestion-item:not(:last-child) {
    margin-bottom: 2px;
}

.ingredients-suggestion-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ingredients-suggestion-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.ingredients-suggestion-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e8f5ef;
    color: #007850;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.ingredients-suggestion-title mark,
.ingredients-suggestion-sub mark {
    background: transparent;
    color: #00684A;
    font-weight: 700;
}

.ingredients-suggestion-sub {
    font-size: 0.82rem;
    color: #00684A;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ingredients-suggestion-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00684A;
    opacity: 0.5;
    transition: opacity 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.ingredients-suggestion-item:hover .ingredients-suggestion-arrow,
.ingredients-suggestion-item.active .ingredients-suggestion-arrow {
    opacity: 1;
    transform: translateX(3px);
}

.ingredients-suggestion-empty {
    padding: 14px;
    text-align: center;
    font-size: 0.9rem;
    color: #777;
}

.ingredients-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    font-size: 1.15rem;
    color: #666;
    background: #fbfbfb;
    border: 1px dashed #d0d7d0;
    border-radius: 16px;
    margin: 1rem 0;
}

@media (max-width: 1024px) {
    .ingredients-filters__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
    }
    
    .ingredients-search-bar {
        width: 100%;
    }
    
    .ingredients-search-input {
        flex: 1;
        min-width: 0;
    }
}

.custom-dropdown {
    position: relative;
    font-family: var(--font-primary);
}

.dropdown-toggle {
    appearance: none;
    background: #E0E2DD; /* Grey default to match image closely */
    border: none;
    border-right: 1px solid rgba(0,0,0,0.1); /* Subtle separator */
    padding: 1rem 2rem 1rem 1.2rem;
    font-family: inherit;
    font-size: 1rem;
    color: #00684A;
    cursor: pointer;
    text-align: left;
    min-width: 210px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease, color 0.3s ease;
}

#dropdown-health .dropdown-toggle {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.custom-dropdown.is-open#dropdown-health .dropdown-toggle {
    border-bottom-left-radius: 0;
}

#dropdown-benefits .dropdown-toggle {
    border-right: none;
}

.dropdown-toggle::after {
    content: "▼";
    font-size: 0.7rem;
    margin-left: 10px;
    color: inherit;
}

/* Open State */
.custom-dropdown.is-open .dropdown-toggle {
    background: #00684A;
    color: #fff;
    border-right-color: transparent;
}

.custom-dropdown.is-open .dropdown-toggle::after {1
    content: "▼";
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 100%;
    width: max-content;
    background: #00684A;
    z-index: 10;
    padding: 1.2rem 0;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 0 0 4px 4px;
}

.custom-dropdown.is-open .dropdown-menu {
    display: flex;
}

.dropdown-item {
    color: #fff;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 0.5rem 2rem 0.5rem 1.2rem;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.dropdown-item + .dropdown-item {
    border-top: 1px solid rgba(0, 0, 0, 0.15);
}

/* Custom Checkbox */
.dropdown-item input[type="checkbox"] {
    display: none;
}

.custom-checkbox {
    width: 12px;
    height: 12px;
    background-color: #e0e0e0;
    border-radius: 2px;
    display: inline-block;
    position: relative;
}

.dropdown-item input[type="checkbox"]:checked + .custom-checkbox {
    background-color: #fff;
}

/* Optional checkmark */
.dropdown-item input[type="checkbox"]:checked + .custom-checkbox::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #00684A;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Custom Dot & Hover Styles */
.custom-dot {
    width: 4px;
    height: 4px;
    background-color: #004b36;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    margin-left: 4px;
    margin-right: 4px;
    transition: background-color 0.3s ease;
}

.dropdown-item.item-dot:hover {
    background-color: #005a3f;
}

.dropdown-item.item-dot:hover .custom-dot,
.dropdown-item.item-dot input[type="checkbox"]:checked + .custom-dot {
    background-color: #C5DF55;
}

.filter-btn {
    background-color: #00684A;
    color: var(--color-white);
    border: none;
    padding: 1rem 2.5rem;
    font-family: inherit;
    font-weight: 400;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
}

.filter-btn--apply {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.filter-btn:hover {
    background-color: #005a3f;
}

.search-input {
    background: #E0E2DD;
    border: none;
    padding: 1rem 1.5rem;
    font-family: inherit;
    font-size: 1rem;
    color: #333;
    outline: none;
    min-width: 300px;
}
.search-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

/* Cards Grid */
.ingredients-grid-section {
    padding: 0 0 3rem;
    background-color: #fff;
}

/* Clinically Studied / Featured Badge */
.ingredient-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #009e60;
    color: #ffffff;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 8px 12px;
    border-radius: 6px;
    line-height: 1.2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.ingredient-badge__dot {
    width: 6px;
    height: 6px;
    background-color: #C5DF55;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.ingredient-card:hover .ingredient-badge {
    transform: translateY(-2px);
}

.ingredients-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .ingredients-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .ingredients-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .ingredients-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.ingredient-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.ingredient-card__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.ingredient-card:hover .ingredient-card__bg {
    transform: scale(1.05);
}

.ingredient-card__overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 25%, rgba(0,0,0,0) 50%, rgba(0,0,0,0.9) 100%);
    background-color: rgba(0,0,0,0);
    transition: background-color 0.5s ease-in-out;
    pointer-events: none;
    z-index: 1;
}

.ingredient-card:hover .ingredient-card__overlay {
    background-color: rgba(0,0,0,0.6);
}

.ingredient-card__number {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 400;
    z-index: 2;
}

.ingredient-card__content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    z-index: 2;
    color: #fff;
    display: flex;
    flex-direction: column;
}

.ingredient-card__icons {
    display: flex;
    gap: 8px;
    margin-bottom: 0.8rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease-in-out;
}

.ingredient-card__icons .icon-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ingredient-card__title {
    font-size: clamp(20px, 1.56vw, 30px);
    font-weight: 400;
    margin-bottom: 10px;
    line-height: 1.4;
}

.ingredient-card__title sup {
    font-size: 0.5em;
    position: relative;
    top: -0.4em;
    font-weight: 300;
}

.ingredient-card__subtitle {
    font-size: clamp(14px, 1.56vw, 16px);
    font-style: normal;
    margin-bottom: 0;
}

.ingredient-card__hover-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    /* transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); */
    transition: all 0.5s ease-in-out;
}

.ingredient-card__desc {
    font-size: clamp(12px, 1.56vw, 14px) !important;
    line-height: 1.2;
    margin-top: 1.2rem;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.5s ease-in-out;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ingredient-card:hover .ingredient-card__icons {
    opacity: 1;
    transform: translateY(0);
}

.ingredient-card:hover .ingredient-card__hover-content {
    max-height: 250px;
    opacity: 1;
}

.ingredient-card__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    padding: 0.8rem 10px 0px 0px;
    margin-top: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    max-height: 50px;
    opacity: 1;
    visibility: visible;
}

/* On hover ONLY: hide Learn More and prevent click when no valid link is available */
.ingredient-card:hover .ingredient-card__link[href="#"],
.ingredient-card:hover .ingredient-card__link[href=""],
.ingredient-card:hover .ingredient-card__link[href="javascript:void(0)"],
.ingredient-card:hover .ingredient-card__link[href="javascript:;"],
.ingredient-card:hover .ingredient-card__link:not([href]),
.ingredient-card--no-link:hover .ingredient-card__link {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    max-height: 0;
    margin-top: 0;
    padding: 0;
    transform: translateY(10px);
}

.ingredient-card:hover:has(.ingredient-card__link[href="#"]),
.ingredient-card:hover:has(.ingredient-card__link[href=""]),
.ingredient-card:hover:has(.ingredient-card__link[href="javascript:void(0)"]),
.ingredient-card:hover:has(.ingredient-card__link[href="javascript:;"]),
.ingredient-card:hover:has(.ingredient-card__link:not([href])),
.ingredient-card--no-link:hover {
    cursor: default;
}

.ingredient-card:hover .ingredient-card__link {
    margin-top: 15px;
}

.ingredient-card__link .arrow {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #fff;
    -webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M12.175 9H0V7H12.175L6.575 1.4L8 0L16 8L8 16L6.575 14.6L12.175 9Z' fill='white'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M12.175 9H0V7H12.175L6.575 1.4L8 0L16 8L8 16L6.575 14.6L12.175 9Z' fill='white'/%3E%3C/svg%3E");
    mask-size: contain;
    mask-position: center;
    mask-repeat: no-repeat;
    transition: all 0.5s ease-in-out;
}

.ingredient-card__link svg {
    width: 20px;
    height: 20px;
    transition: all 0.5s ease-in-out;
}

.ingredient-card:hover .ingredient-card__link .arrow,
.ingredient-card:hover .ingredient-card__link svg {
    transform: translateX(5px);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .ingredients-filters__inner {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group, .search-group {
        flex-direction: column;
        width: 100%;
    }

    /* Reset desktop border-radius and apply mobile border-radius */
    #dropdown-health .dropdown-toggle {
        border-radius: 8px 8px 0 0;
    }
    
    .custom-dropdown.is-open#dropdown-health .dropdown-toggle {
        border-radius: 8px 8px 0 0;
    }

    .filter-btn--apply {
        border-radius: 0 0 8px 8px;
    }

    .dropdown-toggle {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(0,0,0,0.1);
        min-width: 0;
    }

    .search-input {
        min-width: 0;
        width: 100%;
        border-radius: 8px 8px 0 0;
    }
    
    .filter-btn {
        width: 100%;
        justify-content: center;
    }
    
    .search-group .filter-btn {
        border-radius: 0 0 8px 8px;
    }

    .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        padding: 1rem;
    }
    
    .ingredients-hero {
        min-height: 500px;
    }
    
    .ingredient-card__content {
        padding: 1rem;
    }
    
    .ingredient-card__title {
        font-size: 22px;
        margin-bottom: 6px;
    }
    
    .ingredient-card__subtitle {
        font-size: 14px;
    }
    
    .ingredient-card__desc {
        font-size: 12px;
        margin-top: 0.8rem;
        margin-bottom: 1rem;
    }
}



