/* =============================================================================
   allergen-advice.css
   Page-specific styles for allergen-advice.html.
   Shared styles live in shared.css.
   ============================================================================= */


/* ── Main content area ── */
.allergen-page {
    background: var(--cream);
    padding: 60px 0 80px;
}


.hero__ghost-btn {
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.55);
    border-radius: 50px;
    padding: 0.65rem 1.8rem;
    transition: background 0.25s ease, border-color 0.25s ease;
    display: inline-block;
}

.hero__ghost-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: white;
    color: white;
}

/* ── Search bar ── */
.search-wrap {
    max-width: 480px;
    margin: 0 auto 40px;
    position: relative;
}

.search-wrap input {
    width: 100%;
    padding: 0.85rem 1.2rem 0.85rem 3rem;
    border: 2px solid var(--pink-light);
    border-radius: 50px;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    background: white;
    outline: none;
    color: var(--deep);
    transition: border-color 0.25s;
}

.search-wrap input:focus {
    border-color: var(--pink);
}

.search-wrap .search-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pink);
    font-size: 0.95rem;
}


/* ── Category filter tabs ── */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
}

.cat-btn {
    border: 2px solid var(--pink-light);
    background: white;
    color: var(--muted);
    font-family: 'Lato', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0.45rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: capitalize;
}

.cat-btn:hover,
.cat-btn.active {
    background: var(--pink);
    border-color: var(--pink);
    color: white;
}


/* ── Product grid ── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.product-grid>div:only-child {
    grid-column: 1 / -1;
    text-align: center;
}


/* ── Product card ── */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(171, 29, 121, 0.12);
    border-color: var(--pink-light);
}

/* ── Card image ── */
.product-card-img-wrap {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--pink-light);
}

.product-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.product-card:hover .product-card-img-wrap img {
    transform: scale(1.04);
}

.shop-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--pink);
    font-family: 'Lato', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.shop-img-placeholder i {
    font-size: 1.8rem;
    opacity: 0.5;
}

.product-card-body {
    padding: 1.25rem 1.5rem 1.5rem;
    flex: 1;
}

.product-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.product-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: var(--deep);
    margin: 0 0 4px;
    line-height: 1.3;
}

.product-category {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pink);
    font-family: 'Lato', sans-serif;
}

.expand-icon {
    color: var(--pink);
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 4px;
}


/* ── Allergen pills ── */
.allergen-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.pill {
    font-size: 0.75rem;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
    letter-spacing: 0.04em;
}

.pill-free {
    background: #edf7f0;
    color: #1a7a3a;
    border: 1px solid #b5e2c4;
}

.pill-contains {
    background: #fff3f0;
    color: #b33a1a;
    border: 1px solid #f5c2b4;
}

.pill-may {
    background: #fffbec;
    color: #8a6400;
    border: 1px solid #f0dfa0;
}


.detail-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pink);
    font-family: 'Lato', sans-serif;
    margin-bottom: 4px;
    margin-top: 10px;
}

.detail-label:first-child {
    margin-top: 0;
}

.ingredients-list {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--body-text);
    line-height: 1.6;
    font-family: 'Lato', sans-serif;
    margin: 0;
}

.product-modal-shop-wrap {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    text-align: center;
}

.product-modal-shop-wrap .btn {
    font-weight: 700;
}


/* ── Pill legend ── */
.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-bottom: 36px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.85rem;
    font-family: 'Lato', sans-serif;
    color: var(--body-text);
}


/* ── No results state ── */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #8a6a96;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.2rem;
    display: none;
}

/* ── Product detail modal ── */
#product-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

#product-overlay.is-visible {
    display: flex;
}

#product-overlay.is-open {
    opacity: 1;
}

#product-modal {
    background: white;
    border-radius: 16px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
    transform: translateY(16px);
    transition: transform 0.35s ease;
}

#product-overlay.is-open #product-modal {
    transform: translateY(0);
}

#product-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 0 4px;
    z-index: 1;
}

#product-modal-close:hover {
    color: #333;
}

.product-modal-img-wrap {
    width: 100%;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    background: var(--pink-light);
}

.product-modal-img-wrap img {
    width: 100%;
    height: auto;
    display: block;
}

.product-modal-img-wrap.is-placeholder {
    height: 200px;
}

.product-modal-body {
    padding: 1.5rem 1.75rem 2rem;
}

.product-modal-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--deep);
    margin: 4px 0 14px;
    line-height: 1.2;
}