/* Homepage. Structure follows the v2 mockups. */

.igm-hero {
    padding: 30px 0 34px;
    background: var(--gradient-hero-navy, linear-gradient(135deg, var(--navy-700), var(--navy-800)));
    color: var(--white);
}

.igm-hero__title {
    max-width: 20ch;
    margin-bottom: 12px;
    color: var(--white);
    font-size: clamp(28px, 5vw, 40px);
    letter-spacing: var(--ls-tight);
}

.igm-hero__lede {
    max-width: 56ch;
    margin-bottom: 20px;
    font: 16px/1.65 var(--font-body);
    color: rgba(255, 255, 255, .85);
}

/* The header search is white-on-white; on the navy hero it needs its own frame. */
.igm-hero__search .igm-search {
    max-width: 560px;
    border-color: transparent;
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
}

/*
 * Hero layout is a grid so the four blocks can be placed independently of
 * their source order. On a phone the copy and the artwork share the top row
 * — the image reads as part of the message rather than an afterthought
 * stranded below it — and the search bar spans the full width underneath,
 * where it stays comfortably tappable.
 */
.igm-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.62fr);
    grid-template-areas:
        "copy    visual"
        "search  search"
        "actions actions";
    align-items: end;
    column-gap: 12px;
    row-gap: 18px;
}

.igm-hero__copy    { grid-area: copy; min-width: 0; }
.igm-hero__visual  { grid-area: visual; }
.igm-hero__search  { grid-area: search; }
.igm-hero__actions { grid-area: actions; }

/*
 * The hero visual shows at every width. It used to be display:none below
 * 900px, which hid it on every phone and tablet — the whole hero image, on
 * the viewport where most traffic lands. It is decorative (the wrapper
 * carries aria-hidden), so it is free to be sized purely for composition.
 */
.igm-hero__visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

.igm-hero__visual svg,
.igm-hero__visual img {
    width: auto;
    max-width: 100%;
    height: auto;
    display: block;
}

/*
 * The cutout does not end at a natural silhouette: the figure is chopped by
 * a hard horizontal line running across 56% of the asset's width, so against
 * flat navy it read as half a photograph rather than as artwork.
 *
 * The bottom is faded out so the figure dissolves into the hero instead of
 * stopping dead, and a soft elliptical wash sits beneath it so it is seated
 * rather than floating. Applied to the image only — the SVG placeholder is a
 * closed shape and needs neither.
 *
 * mask-image is progressive: without support the image simply renders as it
 * did before, so nothing breaks, it just stops being disguised.
 */
.igm-hero__visual img {
    position: relative;
    z-index: 1;
    -webkit-mask-image: linear-gradient(
        to bottom,
        #000 0%,
        #000 68%,
        rgba(0, 0, 0, .82) 82%,
        rgba(0, 0, 0, .35) 93%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        #000 0%,
        #000 68%,
        rgba(0, 0, 0, .82) 82%,
        rgba(0, 0, 0, .35) 93%,
        transparent 100%
    );
}

/* Ground wash: sits under the figure, never over it. */
.igm-hero__visual::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    z-index: 0;
    width: 88%;
    height: 34%;
    transform: translateX(-50%);
    background: radial-gradient(
        58% 100% at 50% 100%,
        rgba(255, 255, 255, .13),
        rgba(255, 255, 255, .05) 45%,
        transparent 72%
    );
    pointer-events: none;
}

/*
 * Phone/tablet. The artwork sits in the top row beside the headline, so the
 * two are read together, and both end on the same baseline.
 *
 * The title drops a step here because the copy column is now roughly 60% of
 * the width rather than all of it; left at the full-width clamp it wrapped to
 * five or six very short lines beside the figure.
 */
@media (max-width: 899px) {
    .igm-hero__visual {
        align-items: flex-end;
    }

    /*
     * The image fills its column WIDTH and lets height follow. Height-capping
     * it here (the earlier approach) made width the slack dimension, so the
     * figure shrank to a thumbnail and left dead navy above it while the
     * column sat half empty. The source asset is now cropped to the figure —
     * it previously carried 440px, 27.5% of its width, of transparent padding
     * down the left edge, which is what made it look small and off-centre no
     * matter what the CSS asked for.
     */
    .igm-hero__visual svg,
    .igm-hero__visual img {
        width: 100%;
        max-height: none;
    }

    .igm-hero__title {
        font-size: clamp(22px, 6.2vw, 30px);
        max-width: none;
    }

    .igm-hero__lede {
        margin-bottom: 0;
        font-size: 14.5px;
    }

    .igm-hero__search .igm-search {
        margin-bottom: 0;
    }
}

@media (max-width: 400px) {
    /*
     * Below ~400px two equal-ish columns leave the headline too narrow to
     * read, so the figure steps back to a supporting share.
     */
    .igm-hero__inner {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.5fr);
    }
}

/*
 * Tablet needs a ceiling that phones do not. The column is a share of the
 * width, so by ~768px filling it outright makes the figure taller than the
 * copy beside it — the row grows to the image, the headline is pushed to the
 * bottom and a band of empty navy opens above the text. Capping the height
 * hands row height back to the copy, which is what should govern it.
 */
@media (min-width: 560px) and (max-width: 899px) {
    .igm-hero__visual svg,
    .igm-hero__visual img {
        width: auto;
        max-width: 100%;
        max-height: 250px;
    }
}

@media (min-width: 900px) {
    /*
     * Desktop keeps the original composition: the copy, search and actions
     * stack in the left column while the artwork spans all three rows on the
     * right.
     */
    .igm-hero__inner {
        grid-template-columns: 1.15fr 0.85fr;
        grid-template-areas:
            "copy    visual"
            "search  visual"
            "actions visual";
        align-items: center;
        column-gap: 48px;
        row-gap: 0;
    }

    .igm-hero__visual {
        align-self: center;
    }

    /*
     * `img` is listed alongside `svg` deliberately: the hero art is now a
     * PNG cutout, and a selector naming only svg left it completely unsized.
     *
     * Constrained by HEIGHT, not width. The cropped asset is portrait
     * (0.771 w/h) where the original was square, so the previous
     * max-width:340px resolved to ~440px tall and grew the whole hero band
     * by about a hundred pixels. Capping the height keeps the band the size
     * the layout was designed around whatever the artwork's aspect is.
     */
    .igm-hero__visual svg,
    .igm-hero__visual img {
        width: auto;
        max-width: 100%;
        max-height: 360px;
    }
}

.igm-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.igm-btn--on-brand {
    border-color: var(--border-on-brand, rgba(255, 255, 255, .5));
    color: var(--white);
}

.igm-btn--on-brand:hover {
    background: rgba(255, 255, 255, .1);
    border-color: var(--white);
    color: var(--white);
}

/* Promises strip ---------------------------------------------------------- */

/* Sections ---------------------------------------------------------------- */

.igm-home-section {
    padding: 34px 0;
}

.igm-home-section + .igm-home-section {
    border-top: 1px solid var(--gray-200);
}

.igm-home-section__title {
    margin-bottom: 6px;
    font-size: clamp(20px, 3vw, 26px);
}

.igm-home-section__lede {
    max-width: 62ch;
    margin-bottom: 18px;
    font: 14.5px/1.7 var(--font-body);
    color: var(--gray-600);
}

/*
 * shop.css's auto-fill grid only fits 5 of the design brief's 210px cards in
 * this section's container width, so the rail's 6th product wrapped onto its
 * own orphaned row. There is no sidebar here to protect against — unlike the
 * shop grid, which auto-fills so a 260px filter rail never squeezes cards
 * below their content's minimum — so the rail is pinned to exactly 6 columns
 * instead.
 */
@media (min-width: 1024px) {
    .igm-home-rail .igm-products {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

/* Category grid ----------------------------------------------------------- */

.igm-cat-grid {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/*
 * With an odd number of categories the final card left a hole beside it in
 * the two-column phone layout. Rather than padding the curated list with a
 * category that has no icon — which would put a placeholder square next to
 * nine real ones — the odd card out stretches across the row.
 *
 * :nth-child(odd) on :last-child means this only fires when the count is
 * actually odd, so an even list is unaffected and nothing needs changing here
 * if a category is added or removed later.
 */
.igm-cat-grid__item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

@media (min-width: 780px) {
    .igm-cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    /* Three columns divide the nine cards evenly; no stretch needed. */
    .igm-cat-grid__item:last-child:nth-child(odd) {
        grid-column: auto;
    }
}

.igm-cat-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
    padding: 16px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    background: var(--gradient-product-frame);
    text-decoration: none;
    transition: var(--transition-fast);
}

.igm-cat-card:hover {
    border-color: var(--navy-700);
    box-shadow: var(--shadow-card);
    text-decoration: none;
}

.igm-cat-card__name {
    font: 600 15px/1.35 var(--font-display);
    color: var(--navy-700);
}

.igm-cat-card__count {
    font: 13px/1.4 var(--font-meta, var(--font-body));
    color: var(--gray-600);
}

/* Trust grid -------------------------------------------------------------- */

.igm-trust-grid {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 780px) {
    .igm-trust-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.igm-trust-card {
    padding: 18px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    background: var(--white);
}

.igm-trust-card__title {
    margin-bottom: 6px;
    font-size: 16px;
}

.igm-trust-card__body {
    margin: 0;
    font: 14px/1.7 var(--font-body);
    color: var(--gray-700);
}

/* Country guidelines + customer stories row -------------------------------- */

.igm-info-row {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 900px) {
    .igm-info-row {
        flex-direction: row;
        align-items: stretch;
    }

    .igm-import-guidelines {
        flex: 1.3;
    }

    .igm-customer-stories {
        flex: 1;
    }
}

.igm-import-guidelines {
    border: 1px solid var(--navy-700);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.igm-import-guidelines__head {
    background: var(--navy-700);
    color: var(--white);
    padding: 20px 24px;
}

.igm-import-guidelines__head h2 {
    margin: 0 0 6px;
    font-size: 22px;
    color: var(--white);
}

.igm-import-guidelines__head p {
    margin: 0;
    font: 14px/1.5 var(--font-body);
    color: rgba(255, 255, 255, .8);
}

.igm-import-guidelines__body {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 22px 24px;
}

.igm-import-guidelines__list {
    flex: 1;
    min-width: 220px;
    margin: 0;
    padding: 0;
    list-style: none;
    font: 14.5px/1.9 var(--font-body);
    color: var(--gray-700);
}

.igm-import-guidelines__list li::before {
    content: "\2713";
    margin-right: 8px;
    color: var(--success-700);
    font-weight: 700;
}

.igm-import-guidelines__form {
    flex: 0 0 260px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.igm-customer-stories {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.igm-customer-stories h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

.igm-customer-story {
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--gray-200);
}

.igm-customer-story:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.igm-customer-story__stars {
    color: var(--star-filled);
    font-size: 13px;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.igm-customer-story__quote {
    margin: 0 0 9px;
    font: 15px/1.65 var(--font-body);
    color: var(--gray-900);
}

.igm-customer-story__author {
    font: 600 13px/1 var(--font-body);
    color: var(--navy-700);
}

/* How ordering works ------------------------------------------------------- */

.igm-howto {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

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

@media (min-width: 1000px) {
    .igm-howto { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.igm-howto__step {
    position: relative;
    padding: 20px 18px 18px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    background: var(--white);
}

.igm-howto__num {
    display: flex;
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-pill);
    background: var(--navy-700);
    color: var(--white);
    font: 700 14px/1 var(--font-display);
}

.igm-howto__title {
    margin-bottom: 6px;
    font-size: 15.5px;
}

.igm-howto__title a {
    text-decoration: none;
}

.igm-howto__title a:hover {
    text-decoration: underline;
}

.igm-howto__body {
    margin: 0;
    font: 13.5px/1.65 var(--font-body);
    color: var(--gray-700);
}

/* Payment methods row ------------------------------------------------------ */

.igm-payrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 20px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    background: var(--gray-50);
}

.igm-payrow__label {
    font: 600 13px/1.4 var(--font-body);
    color: var(--gray-700);
}

.igm-payrow__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.igm-payrow__item {
    padding: 6px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background: var(--white);
    font: 600 12.5px/1.3 var(--font-body);
    color: var(--navy-700);
}

/* FAQ ---------------------------------------------------------------------- */

.igm-faq {
    display: grid;
    gap: 10px;
    max-width: 820px;
}

.igm-faq__item {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    background: var(--white);
}

.igm-faq__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 44px;
    padding: 14px 18px;
    font: 600 14.5px/1.45 var(--font-body);
    color: var(--navy-700);
    cursor: pointer;
    list-style: none;
}

/* Replace the default marker with one that reflects open/closed state. */
.igm-faq__q::-webkit-details-marker { display: none; }

.igm-faq__q::after {
    content: "\002B";
    flex: none;
    color: var(--color-accent);
    font-size: 18px;
    line-height: 1;
}

.igm-faq__item[open] .igm-faq__q::after { content: "\2212"; }

.igm-faq__a {
    padding: 0 18px 16px;
}

.igm-faq__a p {
    margin: 0;
    font: 14px/1.75 var(--font-body);
    color: var(--gray-700);
}

/* Latest resources --------------------------------------------------------- */

.igm-posts {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 780px) {
    .igm-posts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.igm-postcard {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 18px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    background: var(--white);
}

/*
 * 2.5/1, not 16/9. Measured across every cover attachment on the site: 81%
 * are 2.5:1 — the house banner shape the Canva master and the production
 * covers are all drawn at — and 19% are 16:9. A 16/9 box with object-fit
 * cover was therefore cropping about 29% off the WIDTH of four covers in
 * five, and because these are banners with headline type, the part it cut
 * was the words.
 */
.igm-postcard__media {
    display: block;
    margin: -20px -18px 4px;
    aspect-ratio: 2.5 / 1;
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.igm-postcard__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.igm-postcard__title {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
}

.igm-postcard__title a { text-decoration: none; }
.igm-postcard__title a:hover { text-decoration: underline; }

.igm-postcard__excerpt {
    margin: 0;
    font: 13.5px/1.65 var(--font-body);
    color: var(--gray-700);
}

.igm-postcard__meta {
    margin-top: auto;
    padding-top: 4px;
    font: 12.5px/1.4 var(--font-meta, var(--font-body));
    color: var(--gray-600);
}

.igm-home-posts__more {
    margin: 20px 0 0;
}

/* Mission band + headline figures ------------------------------------------ */

.igm-home-mission {
    background: var(--gradient-hero-navy, linear-gradient(135deg, var(--navy-700), var(--navy-800)));
    color: var(--white);
}

.igm-mission__title {
    max-width: 24ch;
    margin: 0 0 10px;
    color: var(--white);
    font-size: clamp(22px, 3.2vw, 30px);
    line-height: 1.2;
}

.igm-mission__lede {
    max-width: 62ch;
    margin: 0;
    font: 15px/1.7 var(--font-body);
    color: rgba(255, 255, 255, .82);
}

.igm-stats {
    display: grid;
    gap: 18px;
    margin: 26px 0 0;
    padding: 24px 0 0;
    border-top: 1px solid rgba(255, 255, 255, .2);
    list-style: none;
}

@media (min-width: 640px) {
    .igm-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.igm-stat__figure {
    display: block;
    color: var(--color-accent);
    font: 800 clamp(28px, 4vw, 38px)/1 var(--font-display);
}

.igm-stat__label {
    display: block;
    margin-top: 6px;
    font: 700 12.5px/1.4 var(--font-body);
    letter-spacing: var(--ls-caps);
    text-transform: uppercase;
    color: rgba(255, 255, 255, .78);
}

/* Four trust cards once the privacy card is present. */
@media (min-width: 780px) {
    .igm-trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1040px) {
    .igm-trust-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Payment method icons ----------------------------------------------------- */

.igm-payrow__item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.igm-payrow__icon {
    width: 18px;
    height: 18px;
    flex: none;
    color: var(--navy-700);
}

/* Trust bar --------------------------------------------------------------
 * Sits directly under the hero and carries the two compliance statements
 * alongside the review scores. Statements read left, scores right: the
 * claims are scanned, the scores are looked for. */

.igm-trustbar {
    padding: 18px 0;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.igm-trustbar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
}

.igm-trustbar__points {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    min-width: 0;
}

.igm-trustbar__point {
    display: flex;
    align-items: center;
    gap: 10px;
    font: 14px/1.5 var(--font-body);
    color: var(--gray-900);
}

.igm-trustbar__check {
    width: 20px;
    height: 20px;
    flex: none;
}

.igm-trustbar__reviews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.igm-review-card {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    background: var(--white);
    text-decoration: none;
    transition: var(--transition-fast);
}

a.igm-review-card:hover {
    border-color: var(--navy-700);
    box-shadow: var(--shadow-card);
    text-decoration: none;
}

.igm-review-card__mark {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    flex: none;
}

.igm-review-card__mark svg { width: 22px; height: 22px; }

.igm-review-card__top {
    display: flex;
    align-items: center;
    gap: 6px;
}

.igm-review-card__score {
    font: 800 17px/1 var(--font-display);
    color: var(--navy-700);
}

.igm-review-card__stars {
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--star-filled);
}

/* Trustpilot's scale is its own green, not a gold star. */
.igm-review-card__stars--trustpilot { color: #00B67A; }

.igm-review-card__label {
    font: 700 11.5px/1 var(--font-body);
    color: var(--success-700);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.igm-review-card__meta {
    display: block;
    margin-top: 3px;
    font: 11.5px/1.35 var(--font-body);
    color: var(--gray-600);
}

@media (max-width: 720px) {
    .igm-trustbar__inner { flex-direction: column; align-items: flex-start; }
    .igm-review-card { flex: 1 1 auto; }
}

/* Branded vs. generic carousel ---------------------------------------------
 * A scroll-snap track rather than a JS slider: the cards remain real,
 * scrollable content, so a trackpad swipe, a touch drag, Tab and the arrow
 * keys all work before theme.js has loaded — and still work if it never does.
 * The buttons are progressive enhancement layered on top. */

.igm-carousel {
    position: relative;
}

.igm-carousel__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    /* Room for the card shadow, and for the focus ring not to be clipped. */
    padding: 4px;
    margin: -4px;
    /* Firefox / standards; the WebKit rule follows. */
    scrollbar-width: none;
}

.igm-carousel__track::-webkit-scrollbar { display: none; }

.igm-carousel__track > * {
    scroll-snap-align: start;
    min-width: 0;
}

.igm-carousel__track:focus-visible {
    outline: 3px solid var(--brand-tint-30, rgba(0, 26, 50, .3));
    outline-offset: 2px;
}

@media (min-width: 1180px) {
    .igm-carousel__track { grid-auto-columns: calc(50% - 8px); }
}

/* Controls sit under the track on narrow screens and float over its edges on
   wide ones, where there is gutter to spare. */
.igm-carousel__controls {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

.igm-carousel__nav {
    display: grid;
    place-items: center;
    width: 44px;   /* pointer-target floor */
    height: 44px;
    border: 1px solid var(--gray-400);
    border-radius: var(--radius-pill);
    background: var(--white);
    color: var(--navy-700);
    font: 400 22px/1 var(--font-body);
    cursor: pointer;
    transition: var(--transition-fast);
}

.igm-carousel__nav:hover:not(:disabled) {
    background: var(--navy-700);
    border-color: var(--navy-700);
    color: var(--white);
}

.igm-carousel__nav:disabled {
    opacity: .35;
    cursor: default;
}

@media (prefers-reduced-motion: reduce) {
    .igm-carousel__track { scroll-behavior: auto; }
}
