/* ==========================================================================
   Shop home sections (Artemis)

   Shared shell (.am-section) plus the merch-shop and category card grids.
   Scoped under .am-* so it does not collide with the eshop template CSS.

   Width comes from Bootstrap's .container in the markup, matching the legacy
   .shop-by-section blocks (custom.css widens .container to 1360px above 1400px
   viewport, 1560px above 1600px). Sections only own vertical rhythm.

   Paired with: resources/views/project/shop/home/includes/section-*.blade.php
   ========================================================================== */

/* ---------------------------------------------------------- Shell -------- */

.am-section {
    /* horizontal width comes from Bootstrap .container in the markup */
    padding: 46px 0 52px;
    background: #fff;
}

.am-section__inner {
    /* .container governs width; kept as a hook for section-level tweaks */
}

/* The hero already carries bottom padding — tighten the first section under it */
.am-hero + .am-section {
    padding-top: 30px;
}

.am-section__title {
    margin: 0 0 30px;
    text-align: center;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -.4px;
    color: var(--artemis-red, #ff325a);
}

/* Left-aligned section head with an action on the right */

.am-section__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.am-section__eyebrow {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    color: #111113;
}

.am-section__heading {
    margin: 0 0 10px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.5px;
    color: #111113;
}

.am-section__sub {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: #4d4d50;
}

.am-section__head .am-btn-outline {
    flex: 0 0 auto;
    margin-top: 4px;
}

.am-section__more {
    margin-top: 28px;
    text-align: center;
}

.am-section__more a,
.am-section__more a:visited {
    display: inline-block;
    padding: 9px 22px;
    border: 1px solid #dcdcdf;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: #111113;
    text-decoration: none;
    transition: border-color .18s ease, background-color .18s ease;
}

.am-section__more a:hover {
    border-color: #111113;
    background: #fafafa;
}

/* ------------------------------------------------------ Promo block ------ */

/* Two-column pitch: copy on the left, artwork on the right. */
.am-promo {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    gap: 48px;
    margin-bottom: 44px;
}

.am-promo__title {
    margin: 0 0 16px;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.3px;
    color: var(--artemis-red, #ff325a);
}

.am-promo__body {
    margin: 0 0 24px;
    max-width: 380px;
    font-size: 14.5px;
    line-height: 1.6;
    color: #4d4d50;
}

.am-promo__lead {
    margin: 0 0 10px;
    font-size: 13.5px;
    color: #4d4d50;
}

.am-promo__list {
    margin: 0 0 26px;
    padding-left: 18px;
    font-size: 13.5px;
    line-height: 1.7;
    color: #4d4d50;
}

.am-promo__cta,
.am-promo__cta:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 22px;
    border-radius: 8px;
    background: var(--artemis-red, #ff325a);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .18s ease;
}

.am-promo__cta:hover,
.am-promo__cta:focus {
    background: #e02a4d;
    color: #fff;
}

.am-promo__media {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    line-height: 0;
}

.am-promo__media img {
    display: block;
    width: 100%;
    height: auto;
}

/* Portrait artwork: give the copy the wider column and cap the image */
.am-promo--tall-media {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.am-promo--tall-media .am-promo__media {
    max-width: 420px;
    margin-left: auto;
}

/* Dark-headline variant of the promo block, used by the bulk-order section */

.am-promo__title--dark {
    color: #111113;
    font-size: 34px;
    letter-spacing: -.6px;
    margin-bottom: 14px;
}

.am-promo__sub {
    margin: 0 0 20px;
    font-size: 15px;
    color: #6f6f71;
}

.am-promo__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.am-btn-dark,
.am-btn-dark:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 20px;
    border: 1px solid #111113;
    border-radius: 4px;
    background: #111113;
    color: #fff;
    font-size: 13.5px;
    text-decoration: none;
    transition: background-color .18s ease;
}

.am-btn-dark:hover,
.am-btn-dark:focus {
    background: #000;
    color: #fff;
}

/* ------------------------------------------------------ Merch grid ------- */

.am-merch__grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 22px 18px;
}

.am-merch-card,
.am-merch-card:visited {
    display: block;
    color: inherit;
    text-decoration: none;
}

.am-merch-card__cover {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f1f3;
}

.am-merch-card__cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.am-merch-card:hover .am-merch-card__cover img {
    transform: scale(1.04);
}

.am-merch-card__body {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 9px;
    min-width: 0;
}

.am-merch-card__avatar {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    overflow: hidden;
    background: #e9e9ec;
}

.am-merch-card__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.am-merch-card__meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.am-merch-card__name {
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.3;
    color: #111113;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.am-merch-card__count {
    font-size: 11px;
    line-height: 1.3;
    color: var(--artemis-red, #ff325a);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ------------------------------------------- Create CTA + review --------- */

.am-create__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 56px;
}

.am-create__eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 600;
    color: #6f6f71;
}

.am-create__title {
    margin: 0 0 18px;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -.6px;
    color: #111113;
}

.am-create__body {
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 1.65;
    color: #4d4d50;
}

.am-create__actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.am-btn-outline,
.am-btn-outline:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 20px;
    border: 1px solid #c9c9cd;
    border-radius: 4px;
    font-size: 13.5px;
    color: #111113;
    text-decoration: none;
    transition: border-color .18s ease, background-color .18s ease;
}

.am-btn-outline:hover {
    border-color: #111113;
    background: #fafafa;
}

.am-btn-link,
.am-btn-link:visited {
    font-size: 13.5px;
    color: #111113;
    text-decoration: none;
}

.am-btn-link:hover {
    color: var(--artemis-red, #ff325a);
}

/* Review card, with a stacked-paper effect behind it */

.am-review {
    position: relative;
}

.am-review::before,
.am-review::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid #d6d6da;
    background: #fff;
    border-radius: 2px;
}

.am-review::before {
    transform: translate(14px, -14px);
}

.am-review::after {
    transform: translate(7px, -7px);
}

.am-review__card {
    position: relative;
    z-index: 1;
    padding: 22px 24px;
    border: 1px solid #111113;
    border-radius: 2px;
    background: #fff;
}

.am-review__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.am-review__avatar {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    background: #e9e9ec;
}

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

.am-review__who {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.am-review__name {
    font-size: 15px;
    font-weight: 700;
    color: #111113;
}

.am-review__stars {
    font-size: 14px;
    letter-spacing: 2px;
    color: var(--artemis-red, #ff325a);
}

.am-review__title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
    color: #111113;
}

.am-review__body {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: #4d4d50;
}

/* ------------------------------------------------------ Artists ---------- */

.am-featgrid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.am-featgrid__feature,
.am-featgrid__feature:visited {
    position: relative;
    grid-column: span 2;
    grid-row: span 2;
    display: block;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

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

.am-artist-card,
.am-artist-card:visited {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f1f1f3;
    text-decoration: none;
    color: inherit;
}

.am-artist-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.am-artist-card:hover img {
    transform: scale(1.04);
}

.am-artist-card__meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    padding: 8px 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0));
    color: #fff;
}

.am-artist-card__name {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.am-artist-card__count {
    font-size: 10.5px;
    line-height: 1.3;
    opacity: .85;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ------------------------------------------------- Theme tiles ----------- */

.am-theme-card,
.am-theme-card:visited {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f1f1f3;
    text-decoration: none;
    color: inherit;
}

.am-theme-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.am-theme-card:hover img {
    transform: scale(1.04);
}

/* No THEME_THUMBNAIL upload — stable placeholder instead of a per-load random photo */
.am-theme-card--noimg {
    background-color: #241f2e;
    background-image:
        radial-gradient(circle at 30% 28%, rgba(255, 50, 90, .5) 0 26%, transparent 26.5%),
        radial-gradient(circle at 76% 74%, rgba(96, 180, 240, .42) 0 22%, transparent 22.5%);
}

.am-theme-card__label {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 12px;
    padding: 5px 8px;
    border-radius: 4px;
    background: var(--artemis-red, #ff325a);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: .3px;
    text-align: center;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ------------------------------------------------ Shop-by tiles ---------- */

.am-shopby__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px 18px;
}

.am-shopby-card,
.am-shopby-card:visited {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f1f3;
    text-decoration: none;
    color: inherit;
}

.am-shopby-card__img {
    position: absolute;
    inset: 0;
}

.am-shopby-card__img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.am-shopby-card:hover .am-shopby-card__img img {
    transform: scale(1.04);
}

/* No artwork uploaded yet — a deliberate placeholder beats a broken <img> */
.am-shopby-card--noimg {
    background-color: #2b2b30;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(255, 50, 90, .55) 0 28%, transparent 28.5%),
        radial-gradient(circle at 78% 70%, rgba(255, 170, 60, .45) 0 24%, transparent 24.5%);
}

.am-shopby-card__label {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    padding: 12px 10px;
    background: rgba(255, 50, 90, .88);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .3px;
}

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

.am-cat__grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px 16px;
}

.am-cat-card,
.am-cat-card:visited {
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f1f3;
    text-decoration: none;
    color: inherit;
}

.am-cat-card__img {
    aspect-ratio: 1 / 1;
}

.am-cat-card__img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.am-cat-card:hover .am-cat-card__img img {
    transform: scale(1.04);
}

.am-cat-card__label {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 5px 8px;
    border-radius: 4px;
    background: var(--artemis-red, #ff325a);
    color: #fff;
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: .2px;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --------------------------------------------------- Breakpoints --------- */

@media (max-width: 1199px) {
    .am-merch__grid,
    .am-cat__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    /* Create CTA stacks; the review card drops below the copy */
    .am-create__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 46px 0;
    }

    /* Promo stacks: copy above, artwork below */
    .am-promo,
    .am-promo--tall-media {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        margin-bottom: 32px;
    }

    .am-promo__title {
        font-size: 25px;
    }

    .am-promo__title--dark {
        font-size: 27px;
    }

    .am-promo__body {
        max-width: none;
    }

    .am-promo--tall-media .am-promo__media {
        margin-left: 0;
    }

    .am-create__title {
        font-size: 27px;
    }

    /* Feature tile goes full width above the artist tiles */
    .am-featgrid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .am-featgrid__feature {
        grid-column: 1 / -1;
        grid-row: auto;
        aspect-ratio: 16 / 7;
    }

    .am-shopby__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .am-shopby-card__label {
        font-size: 13px;
        padding: 10px 8px;
    }
}

@media (max-width: 575px) {
    .am-create__title {
        font-size: 22px;
    }

    .am-promo__title {
        font-size: 21px;
    }

    .am-promo__title--dark {
        font-size: 22px;
    }

    /* Drop the stacked-paper layers — no room for the offset on a phone */
    .am-review::before,
    .am-review::after {
        display: none;
    }

    .am-review__card {
        padding: 18px 16px;
    }

    .am-featgrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .am-shopby__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 12px;
    }

    .am-shopby-card__label {
        font-size: 11.5px;
        padding: 8px 6px;
    }
}

@media (max-width: 991px) {
    .am-section {
        padding: 36px 0 40px;
    }

    .am-section__title {
        font-size: 28px;
        margin-bottom: 24px;
    }

    .am-merch__grid,
    .am-cat__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    /* Promo stacks: text above, media below */
    .am-section__head {
        flex-direction: column;
        gap: 14px;
    }

    .am-section__heading {
        font-size: 24px;
    }
}

@media (max-width: 575px) {
    .am-section {
        padding: 28px 0 32px;
    }

    .am-hero + .am-section {
        padding-top: 20px;
    }

    .am-section__title {
        font-size: 22px;
        margin-bottom: 18px;
    }

    .am-merch__grid,
    .am-cat__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 12px;
    }

    .am-cat-card__label {
        font-size: 9px;
        padding: 4px 6px;
    }

    .am-section__more {
        margin-top: 20px;
    }
}

@media (max-width: 400px) {
    .am-section {
        padding: 22px 0 26px;
    }

    .am-merch__grid {
        gap: 14px 10px;
    }

    .am-merch-card__avatar {
        width: 22px;
        height: 22px;
    }

    .am-merch-card__name {
        font-size: 11.5px;
    }

    .am-merch-card__count {
        font-size: 10px;
    }
}
