/* Global catalogue art direction: a warm ink-and-paper frame for real covers. */
.buyer-catalogue .storefront-header--global {
    --cover-ink: #152b36;
    --cover-paper: #f8f0de;
    --cover-pop: #f1a34a;
    position: relative;
    isolation: isolate;
    display: flex;
    min-height: 252px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    padding: clamp(22px, 3.2vw, 42px);
    border: 1px solid rgba(20, 38, 47, .16);
    border-radius: 18px;
    background:
        radial-gradient(ellipse at 82% 22%, rgba(241, 163, 74, .25), transparent 36%),
        linear-gradient(115deg, #f5ead2 0%, #ead8b4 58%, #e2c99d 100%);
    box-shadow: 0 18px 44px rgba(65, 52, 32, .13);
    color: var(--cover-ink);
    text-align: left;
}

.buyer-catalogue .storefront-header--global > :not(.store-header-art):not(.store-header-grain) {
    position: relative;
    z-index: 2;
}

.buyer-catalogue .storefront-header--global::after {
    position: absolute;
    z-index: 1;
    inset: 0;
    background: linear-gradient(90deg, #f5ead2 0%, rgba(245, 234, 210, .97) 31%, rgba(245, 234, 210, .74) 50%, rgba(245, 234, 210, .05) 83%);
    content: "";
    pointer-events: none;
}

.store-header-art {
    position: absolute;
    z-index: 0;
    inset: 0 0 0 37%;
    overflow: hidden;
    pointer-events: none;
}

.store-header-art::before {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(21, 43, 54, .04), rgba(21, 43, 54, .21));
    content: "";
}

.store-header-cover {
    position: absolute;
    display: block;
    width: clamp(94px, 14vw, 174px);
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 4px solid #fff9ec;
    border-radius: 5px;
    background: #c7b794;
    box-shadow: 0 12px 30px rgba(31, 37, 35, .28);
    object-fit: cover;
    opacity: 0;
    transform: translateY(12px) rotate(var(--cover-tilt, 0deg));
    transition: opacity .35s ease, transform .42s cubic-bezier(.2,.7,.2,1);
}

.store-header-cover.is-ready {
    opacity: 1;
    transform: translateY(0) rotate(var(--cover-tilt, 0deg));
}

.store-header-cover:nth-child(1) { top: -13%; left: 8%; --cover-tilt: -10deg; }
.store-header-cover:nth-child(2) { top: 13%; left: 34%; --cover-tilt: 7deg; }
.store-header-cover:nth-child(3) { top: -21%; left: 64%; --cover-tilt: 11deg; }
.store-header-cover:nth-child(4) { top: 48%; left: 5%; --cover-tilt: 7deg; }
.store-header-cover:nth-child(5) { top: 53%; left: 40%; --cover-tilt: -8deg; }
.store-header-cover:nth-child(6) { top: 39%; left: 74%; --cover-tilt: 8deg; }

.store-header-grain {
    position: absolute;
    z-index: 1;
    inset: 0;
    opacity: .13;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
}

.buyer-catalogue .store-header-kicker {
    margin-bottom: 7px;
    color: #8f4a29;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .16em;
    line-height: 1.4;
    text-transform: uppercase;
}

.buyer-catalogue .storefront-header--global h1 {
    max-width: 18ch;
    color: #172f3b;
    font-size: clamp(1.9rem, 3.8vw, 3.15rem);
    font-weight: 850;
    letter-spacing: -.055em;
    line-height: 1.02;
    text-wrap: balance;
}

.buyer-catalogue .storefront-header--global p {
    max-width: 38rem;
    color: #43555a;
    font-size: clamp(.94rem, 1.35vw, 1.06rem);
    line-height: 1.45;
    opacity: 1;
}

.store-header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-top: 13px;
}

.store-header-refresh {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 9px 14px;
    border: 1px solid rgba(21, 43, 54, .3);
    border-radius: 999px;
    background: rgba(255, 250, 238, .72);
    color: #183440;
    font: inherit;
    font-size: .87rem;
    font-weight: 750;
    cursor: pointer;
    transition: transform .18s ease, opacity .18s ease;
}

.store-header-refresh:hover {
    transform: translateY(-1px);
    border-color: #8f4a29;
    background: #fff9eb;
}

.store-header-refresh:focus-visible,
.gmc-cotd-toggle:focus-visible {
    outline: 3px solid #a64c2c;
    outline-offset: 3px;
}

.store-header-refresh:disabled {
    cursor: wait;
    opacity: .72;
}

.store-header-refresh[data-loading="true"] i {
    animation: store-cover-turn .8s linear infinite;
}

@keyframes store-cover-turn { to { transform: rotate(1turn); } }

.store-header-status {
    color: #52605b;
    font-size: .8rem;
}

/* Comic of the Day: expanded content participates in document flow. */
.gmc-cotd-wrap {
    margin: 0 0 24px;
}

.gmc-cotd {
    overflow: hidden;
    padding: clamp(18px, 3vw, 28px);
    border: 1px solid rgba(30, 49, 53, .15);
    border-radius: 16px;
    background:
        radial-gradient(circle at 92% 0%, rgba(241, 163, 74, .18), transparent 34%),
        #18343c;
    color: #f8f0de;
    box-shadow: 0 10px 26px rgba(30, 49, 53, .13);
}

.gmc-cotd-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-bottom: 18px;
}

.gmc-cotd-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 11px;
    border: 1px solid rgba(255, 245, 221, .22);
    border-radius: 4px;
    background: #ef9d49;
    color: #29353a;
    font-size: .75rem;
    font-weight: 850;
    letter-spacing: .065em;
    text-transform: uppercase;
}

.gmc-cotd-date {
    color: rgba(248, 240, 222, .7);
    font-size: .84rem;
}

.gmc-cotd-toggle {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 9px;
    margin-left: auto;
    padding: 8px 12px;
    border: 1px solid rgba(248, 240, 222, .34);
    border-radius: 5px;
    background: transparent;
    color: #fff6e5;
    font: inherit;
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform .18s ease, opacity .18s ease;
}

.gmc-cotd-toggle:hover { background: rgba(255, 255, 255, .09); border-color: #ef9d49; }
.gmc-cotd-toggle i { transition: transform .2s ease; }
.gmc-cotd-toggle[aria-expanded="true"] i { transform: rotate(180deg); }

.gmc-cotd-body {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    align-items: start;
    gap: clamp(16px, 3vw, 26px);
}

.gmc-cotd-cover-link { display: block; }
.gmc-cotd-cover {
    display: block;
    width: 132px;
    aspect-ratio: 2 / 3;
    border: 3px solid rgba(255, 246, 224, .9);
    border-radius: 4px;
    background: rgba(255, 255, 255, .1);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .24);
    object-fit: cover;
}
.gmc-cotd-cover--blank { width: 132px; }
.gmc-cotd-content { min-width: 0; }
.gmc-cotd-title {
    margin: 0 0 5px;
    color: #fff8e9;
    font-size: clamp(1.2rem, 2.5vw, 1.7rem);
    font-weight: 850;
    letter-spacing: -.025em;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.gmc-cotd-creator {
    margin: 0 0 14px;
    color: rgba(248, 240, 222, .76);
    font-size: .9rem;
    line-height: 1.5;
}
.gmc-cotd-creator strong { color: #fff8e9; }
.gmc-cotd-review {
    max-width: 76ch;
    margin: 0 0 18px;
    color: rgba(255, 248, 233, .92);
    font-size: .98rem;
    line-height: 1.75;
    overflow-wrap: anywhere;
}
.gmc-cotd-review.is-collapsed {
    position: relative;
    max-height: 8.75em;
    overflow: hidden;
}
.gmc-cotd-review.is-collapsed.has-overflow::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2.5em;
    background: linear-gradient(to bottom, rgba(24, 52, 60, 0), #18343c);
    content: "";
    pointer-events: none;
}
.gmc-cotd-review.is-expanded {
    max-height: none;
    overflow: visible;
}
.gmc-cotd-review.is-expanded::after { display: none; }
.gmc-cotd-review p { margin: 0 0 .85em; }
.gmc-cotd-review p:last-child { margin-bottom: 0; }
.gmc-cotd-review strong { color: #ffc078; }
.gmc-cotd-review em { color: #fff8e9; }
.gmc-cotd-cta {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 8px;
    padding: 10px 17px;
    border-radius: 5px;
    background: #ef9d49;
    color: #263b40;
    font-size: .9rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform .18s ease, opacity .18s ease;
}
.gmc-cotd-cta:hover { transform: translateY(-1px); background: #ffc078; color: #263b40; }

@media (max-width: 700px) {
    .buyer-catalogue .storefront-header--global {
        min-height: 224px;
        padding: 22px;
    }
    .buyer-catalogue .storefront-header--global::after {
        background: linear-gradient(90deg, rgba(245, 234, 210, .98), rgba(245, 234, 210, .84) 62%, rgba(245, 234, 210, .5));
    }
    .store-header-art { left: 23%; opacity: .8; }
    .store-header-cover { width: clamp(82px, 22vw, 136px); }
    .gmc-cotd-header { align-items: flex-start; }
    .gmc-cotd-toggle { flex-basis: 100%; justify-content: center; margin-left: 0; }
    .gmc-cotd-body { grid-template-columns: 88px minmax(0, 1fr); }
    .gmc-cotd-cover, .gmc-cotd-cover--blank { width: 88px; }
    .gmc-cotd-review { font-size: .94rem; }
}

@media (max-width: 390px) {
    .buyer-catalogue .storefront-header--global {
        min-height: 216px;
        padding: 20px 17px;
    }
    .store-header-actions { gap: 10px; }
    .gmc-cotd { padding: 16px; }
    .gmc-cotd-body { grid-template-columns: 70px minmax(0, 1fr); gap: 12px; }
    .gmc-cotd-cover, .gmc-cotd-cover--blank { width: 70px; }
}

@media (prefers-reduced-motion: reduce) {
    .store-header-cover,
    .store-header-refresh,
    .gmc-cotd-toggle,
    .gmc-cotd-toggle i,
    .gmc-cotd-cta { transition: none !important; }
    .store-header-refresh[data-loading="true"] i { animation: none; }
}
