/* Text Alignment Classes */
.ingredacore-align-center .ingredacore-slide {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
}

.ingredacore-align-left .ingredacore-slide {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
}

.ingredacore-align-right .ingredacore-slide {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-end;
    text-align: right;
}

/* Make headings, paragraphs, and links behave predictably inside slides */
.ingredacore-slide h3,
.ingredacore-slide p,
.ingredacore-slide a {
    width: 100%;
}

.ingredacore-carousel {
    opacity: 0;
    transition: opacity 0.4s ease;
    overflow: hidden;
}

.ingredacore-carousel .flickity-slider {
    display: flex;
    flex-direction: row;
}

.ingredacore-carousel-wrapper {
    position: relative;
    margin: 20px 0;
}

.ingredacore-slide {
    width: 300px;
    margin-right: 10px;
    background: #f7f7f7;
    padding: 16px;
    box-sizing: border-box;
    border-radius: 14px;
}

.ingredacore-slide img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 12px;
    border-radius: 12px;
}

.ingredacore-ingredient-title {
    margin: 0 0 8px;
    line-height: 1.2;
}

.ingredacore-functional-class {
    font-size: 0.9em;
    color: #666;
    margin: 0 0 12px;
    line-height: 1.5;
    opacity: 0.9;
}

.ingredacore-read-more {
    display: inline-block;
    margin-top: 8px;
    text-decoration: none;
    font-weight: 600;
}

.ingredacore-carousel-title {
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Modal overlay */
.ingredacore-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

/* Upgraded modal styles */
.ingredacore-ingredient-modal {
    position: fixed;
    inset: 0;
    z-index: 10000000;
    background: rgba(0, 0, 0, 0.72);
    padding: 16px;
    overflow-y: auto;
    box-sizing: border-box;
}

.ingredacore-modal-body {
    position: relative;
    background: #ffffff;
    width: 100%;
    max-width: 760px;
    margin: 40px auto;
    padding: 24px;
    border-radius: 16px;
    box-sizing: border-box;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.ingredacore-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    color: black;
    font-size: 24px;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: background 0.3s, color 0.3s;
    z-index: 10000002;
    line-height: 1;
}

.ingredacore-modal-close:hover {
    background: #333;
    color: white;
}

.ingredacore-modal-title {
    margin: 0 32px 10px 0;
    line-height: 1.15;
}

.ingredacore-modal-body h3 {
    margin: 24px 0 10px;
    line-height: 1.25;
}

.ingredacore-modal-body p {
    margin: 0 0 14px;
    line-height: 1.7;
}

.ingredacore-modal-body ul {
    margin: 0 0 16px 20px;
    padding: 0;
}

.ingredacore-modal-body li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.ingredacore-modal-body strong {
    font-weight: 700;
}

/* Carousel arrows */
.ingredacore-arrow {
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: #333;
    font-size: 24px;
    line-height: 50px;
    text-align: center;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.ingredacore-arrow:hover {
    background: #333;
    color: #fff;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.ingredacore-prev {
    left: -60px;
}

.ingredacore-next {
    right: -60px;
}

@media (max-width: 768px) {
    .ingredacore-ingredient-modal {
        padding: 0;
        display: flex;
        align-items: flex-end;
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
    }

    .ingredacore-ingredient-modal .ingredacore-modal-body {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 20px 16px 24px;
        padding-top: 50px;
        border-radius: 18px 18px 0 0;
        min-height: auto;
        max-height: 88vh;
        overflow-y: auto;
        box-sizing: border-box;
    }

    .ingredacore-ingredient-modal .ingredacore-modal-close {
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 10000002;
    }

    .ingredacore-modal-title {
        margin-right: 36px;
        font-size: 24px;
    }

    .ingredacore-modal-body h3 {
        font-size: 18px;
    }
}

/* === QUICK FIX PATCH: modal position, close button, overlay behavior, font weight === */

.ingredacore-ingredient-modal {
    inset: auto;
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
    width: min(760px, 92vw);
    max-width: 92vw;
    max-height: 90vh;
    padding: 0;
    background: #fff;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.ingredacore-modal-body {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 24px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 16px;
    box-shadow: none;
}

.ingredacore-modal-close {
    top: 12px;
    right: 12px;
    z-index: 10000003;
}

.ingredacore-read-more {
    font-weight: 400;
}

@media (max-width: 768px) {
    .ingredacore-ingredient-modal {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        transform: none;
        width: 100vw;
        max-width: 100vw;
        max-height: 88vh;
        border-radius: 18px 18px 0 0;
    }

    .ingredacore-modal-body {
        max-height: 88vh;
        border-radius: 18px 18px 0 0;
        padding: 20px 16px 24px;
        padding-top: 50px;
    }
}

/* === Herb education modal layout === */

.ingredacore-herb-modal-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ingredacore-herb-header {
    padding-right: 36px;
}

.ingredacore-herb-headline {
    margin: 6px 0 0;
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
}

.ingredacore-herb-snapshot {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    background: #f8f8f8;
    border-radius: 14px;
}

.ingredacore-herb-overview p:last-child {
    margin-bottom: 0;
}

.ingredacore-herb-snapshot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ingredacore-herb-snapshot-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.ingredacore-herb-snapshot-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.7;
}

.ingredacore-herb-snapshot-value {
    font-size: 15px;
    line-height: 1.5;
    font-weight: 600;
}

.ingredacore-herb-quick-facts-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ingredacore-herb-mini-heading {
    margin: 0;
    font-size: 16px;
    line-height: 1.3;
}

.ingredacore-herb-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ingredacore-herb-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f2f2f2;
    font-size: 14px;
    line-height: 1.3;
}

.ingredacore-herb-sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ingredacore-herb-section {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.ingredacore-herb-section-summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 18px;
    font-weight: 700;
    position: relative;
}

.ingredacore-herb-section-summary::-webkit-details-marker {
    display: none;
}

.ingredacore-herb-section-summary::after {
    content: '+';
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    line-height: 1;
    opacity: 0.75;
}

.ingredacore-herb-section[open] .ingredacore-herb-section-summary::after {
    content: '−';
}

.ingredacore-herb-section-body {
    padding: 0 18px 18px;
}

.ingredacore-herb-section-body p:last-child,
.ingredacore-herb-section-body ul:last-child {
    margin-bottom: 0;
}

.ingredacore-herb-list {
    margin: 0 0 0 18px;
    padding: 0;
}

.ingredacore-herb-list li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.ingredacore-herb-note-box,
.ingredacore-herb-summary-box {
    padding: 14px 16px;
    border-radius: 12px;
    background: #f8f8f8;
}

@media (max-width: 768px) {
    .ingredacore-herb-snapshot-grid {
        grid-template-columns: 1fr;
    }

    .ingredacore-herb-section-summary {
        padding: 15px 16px;
    }

    .ingredacore-herb-section-body {
        padding: 0 16px 16px;
    }
}

/* === Herb modal V2 tile menu === */

.ingredacore-herb-modal-v2 {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ingredacore-herb-menu-screen {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ingredacore-herb-tile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ingredacore-herb-tile {
    appearance: none;
    border: 0;
    border-radius: 0;
    min-height: 190px;
    padding: 20px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    font-size: clamp(18px, 2.2vw, 30px);
    font-weight: 800;
    line-height: 1.04;
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.ingredacore-herb-tile:hover {
    transform: translateY(-1px);
    opacity: 0.96;
}

.ingredacore-herb-tile-red {
    background: #8f0000;
}

.ingredacore-herb-tile-black {
    background: #000000;
}

.ingredacore-herb-section-screen {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ingredacore-herb-section-screen-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ingredacore-herb-back-button {
    appearance: none;
    border: 0;
    background: #f2f2f2;
    color: #111;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    align-self: flex-start;
}

.ingredacore-herb-section-screen-title {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
    font-weight: 800;
}

.ingredacore-herb-section-screen-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ingredacore-herb-section-screen-body>*:first-child {
    margin-top: 0;
}

.ingredacore-herb-section-screen-body>*:last-child {
    margin-bottom: 0;
}

.ingredacore-herb-headline {
    margin: 6px 0 0;
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
}

.ingredacore-herb-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ingredacore-herb-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f2f2f2;
    font-size: 14px;
    line-height: 1.3;
}

.ingredacore-herb-list {
    margin: 0 0 0 18px;
    padding: 0;
}

.ingredacore-herb-list li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.ingredacore-herb-note-box,
.ingredacore-herb-summary-box {
    padding: 14px 16px;
    border-radius: 12px;
    background: #f8f8f8;
}

@media (max-width: 768px) {
    .ingredacore-herb-tile {
        min-height: 150px;
        padding: 16px 12px;
        font-size: 16px;
    }

    .ingredacore-herb-section-screen-title {
        font-size: 22px;
    }

    .ingredacore-herb-back-button {
        padding: 9px 12px;
        font-size: 13px;
    }
}

/* === Herb Traditional Uses & Benefits labeled blocks === */

.ingredacore-herb-labeled-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #f8f8f8;
}

.ingredacore-herb-labeled-block-title {
    margin: 0;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 800;
}

.ingredacore-herb-labeled-block-body>*:first-child {
    margin-top: 0;
}

.ingredacore-herb-labeled-block-body>*:last-child {
    margin-bottom: 0;
}

/* === Herb How to Use It delivery cards === */

.ingredacore-herb-delivery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ingredacore-herb-delivery-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
}

.ingredacore-herb-delivery-card-label {
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.72;
}

.ingredacore-herb-delivery-card-value {
    font-size: 15px;
    line-height: 1.5;
    font-weight: 700;
}

@media (max-width: 768px) {
    .ingredacore-herb-delivery-grid {
        grid-template-columns: 1fr;
    }
}

/* === What You Can Create CTA + companion products === */

.ingredacore-herb-cta-band {
    display: block;
    width: 100%;
    margin-top: 6px;
    min-height: 0;
    padding: 18px 20px;
    background: #b8860b;
    color: #fff;
    text-align: center;
    font-size: clamp(18px, 2vw, 26px);
    font-weight: 800;
    line-height: 1.15;
    border: 0;
    border-radius: 0;
    cursor: pointer;
}

.ingredacore-herb-companion-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ingredacore-herb-companion-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 88px;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    text-align: center;
}

.ingredacore-herb-companion-name {
    font-size: 15px;
    line-height: 1.4;
    font-weight: 700;
}

@media (max-width: 768px) {
    .ingredacore-herb-cta-band {
        padding: 16px 14px;
        font-size: 18px;
    }

    .ingredacore-herb-companion-grid {
        grid-template-columns: 1fr;
    }
}

.ingredacore-herb-companion-card {
    appearance: none;
    border: 1px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    font-family: inherit;
}

.ingredacore-herb-companion-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    background: #fafafa;
}