/*
 * Ojistoh — templates.css
 * Styles for single-event, single-book, single-artist, events archive.
 * Loaded via enqueue.php after main.css.
 */

/* ── SHARED PAGE HEADER ── */
.oj-page-header {
    background: var(--oj-ink);
    border-bottom: 1px solid rgba(240,230,160,0.1);
    padding-block: 56px 48px;
}
.oj-page-title {
    font-family: var(--oj-font-display);
    font-size: clamp(44px, 6vw, 72px);
    font-weight: 300;
    line-height: 1.0;
    letter-spacing: -0.02em;
}
.oj-page-title em { font-style: italic; color: var(--oj-star); }
.oj-page-intro { font-size: 15px; color: var(--oj-ash); max-width: 44ch; margin-top: 16px; }

.oj-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 36px;
    flex-wrap: wrap;
    gap: 16px;
}
.oj-section-title {
    font-family: var(--oj-font-display);
    font-size: clamp(28px, 3.5vw, 44px);
    font-weight: 300;
    color: var(--oj-white);
    line-height: 1.1;
    margin-top: 8px;
}
.oj-section-title em { font-style: italic; color: var(--oj-star); }

.oj-see-all {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--oj-ash);
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}
.oj-see-all:hover { color: var(--oj-star); opacity: 1; }

.oj-prose {
    font-size: 15px;
    color: var(--oj-ash);
    line-height: 1.8;
    max-width: 64ch;
}
.oj-prose h2 {
    font-family: var(--oj-font-display);
    font-size: 30px;
    font-weight: 300;
    color: var(--oj-white);
    margin-block: 32px 16px;
}
.oj-prose p { margin-bottom: 1em; }
.oj-prose strong { color: var(--oj-white); font-weight: 400; }

/* ── PAST BADGE ── */
.oj-past-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--oj-slate);
    border: 1px solid rgba(107,104,130,0.3);
    padding: 3px 10px;
    border-radius: var(--oj-radius-sm);
}

/* ─────────────────────────────────────────
   SINGLE EVENT
───────────────────────────────────────── */
.oj-event-single {}

.oj-event-hero {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 64px;
    align-items: start;
    padding-top: 32px;
    padding-bottom: 80px;
}

.oj-event-meta-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}
.oj-lang-pill {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--oj-ash);
    border: 1px solid rgba(184,180,204,0.2);
    padding: 3px 10px;
    border-radius: var(--oj-radius-sm);
}

.oj-event-title {
    font-family: var(--oj-font-display);
    font-size: clamp(44px, 6vw, 80px);
    font-weight: 300;
    line-height: 1.0;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}
.oj-event-tagline {
    font-family: var(--oj-font-display);
    font-style: italic;
    font-size: 18px;
    font-weight: 300;
    color: var(--oj-ash);
    line-height: 1.5;
    max-width: 48ch;
    margin-bottom: 32px;
}

/* Key info bar */
.oj-event-keyinfo {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-top: 1px solid rgba(240,230,160,0.1);
    border-bottom: 1px solid rgba(240,230,160,0.1);
    padding-block: 20px;
    margin-bottom: 32px;
    column-gap: 40px;
}
.oj-event-keyinfo__item { display: flex; flex-direction: column; gap: 3px; min-width: 140px; }
.oj-event-keyinfo__label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--oj-slate);
}
.oj-event-keyinfo__value { font-size: 14px; color: var(--oj-white); }
.oj-event-keyinfo__value a { color: var(--oj-star); }

/* Hero image */
.oj-event-hero__image {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--oj-radius-lg);
    overflow: hidden;
    margin-bottom: 40px;
}
.oj-event-hero__image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.oj-event-body { margin-bottom: 32px; }

/* Sticky right column */
.oj-event-hero__right { position: sticky; top: 84px; }

/* ── TICKET BOX ── */
.oj-ticket-box {
    background: var(--oj-ink);
    border: 1px solid rgba(240,230,160,0.14);
    border-radius: var(--oj-radius-lg);
    overflow: hidden;
}
.oj-ticket-box__header {
    background: var(--oj-dusk);
    padding: 20px 24px;
    border-bottom: 1px solid rgba(240,230,160,0.1);
}
.oj-ticket-box__event-name {
    font-family: var(--oj-font-display);
    font-size: 18px;
    font-weight: 400;
    color: var(--oj-white);
    margin-bottom: 4px;
}
.oj-ticket-box__dates {
    font-size: 12px;
    color: var(--oj-star);
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 6px;
}
.oj-ticket-box__body { padding: 24px; }
.oj-ticket-box__label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--oj-slate);
    margin-bottom: 10px;
}

/* Ticket tiers */
.oj-ticket-tiers { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.oj-ticket-tier {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--oj-dusk);
    border: 1px solid rgba(240,230,160,0.08);
    border-radius: var(--oj-radius-md);
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color 0.18s;
}
.oj-ticket-tier:has(.oj-ticket-tier__radio:checked),
.oj-ticket-tier--selected {
    border-color: var(--oj-star);
    background: rgba(240,230,160,0.05);
}
.oj-ticket-tier__radio { position: absolute; opacity: 0; pointer-events: none; }
.oj-ticket-tier__name { font-size: 14px; font-weight: 400; color: var(--oj-white); margin-bottom: 2px; }
.oj-ticket-tier__desc { font-size: 11px; color: var(--oj-slate); }
.oj-ticket-tier__price {
    font-family: var(--oj-font-display);
    font-size: 22px;
    font-weight: 300;
    color: var(--oj-white);
    flex-shrink: 0;
}

/* Qty */
.oj-ticket-qty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.oj-ticket-qty__label { font-size: 13px; color: var(--oj-ash); }
.oj-ticket-qty__control {
    display: flex;
    align-items: center;
    border: 1px solid rgba(240,230,160,0.15);
    border-radius: var(--oj-radius-md);
    overflow: hidden;
}
.oj-ticket-qty__btn {
    width: 36px;
    height: 36px;
    background: var(--oj-dusk);
    border: none;
    color: var(--oj-ash);
    font-size: 18px;
    cursor: pointer;
    font-family: var(--oj-font-sans);
    transition: background 0.15s;
}
.oj-ticket-qty__btn:hover { background: var(--oj-deep); color: var(--oj-white); }
.oj-ticket-qty__val {
    min-width: 44px;
    text-align: center;
    font-size: 14px;
    color: var(--oj-white);
    padding-inline: 8px;
    border-inline: 1px solid rgba(240,230,160,0.1);
    line-height: 36px;
}

/* Subtotal */
.oj-ticket-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-block: 16px;
    border-top: 1px solid rgba(240,230,160,0.1);
    margin-bottom: 16px;
}
.oj-ticket-subtotal__label { font-size: 13px; color: var(--oj-ash); }
.oj-ticket-subtotal__amount {
    font-family: var(--oj-font-display);
    font-size: 28px;
    font-weight: 300;
    color: var(--oj-white);
}

.oj-ticket-box__cta { width: 100%; justify-content: center; margin-bottom: 10px; }
.oj-ticket-box__note { font-size: 11px; color: var(--oj-slate); text-align: center; line-height: 1.5; }
.oj-ticket-box__note a { color: var(--oj-star); }
.oj-ticket-box__past p, .oj-ticket-box__box-office p,
.oj-ticket-box__no-tickets { font-size: 14px; color: var(--oj-ash); margin-bottom: 16px; }

/* ── CREATIVE TEAM ── */
.oj-event-team { border-top: 1px solid rgba(240,230,160,0.1); }
.oj-team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 32px;
}
.oj-team-card { text-decoration: none; display: flex; flex-direction: column; gap: 10px; }
.oj-team-card__avatar {
    aspect-ratio: 1;
    border-radius: var(--oj-radius-md);
    overflow: hidden;
    background: var(--oj-dusk);
    border: 1px solid rgba(240,230,160,0.1);
    transition: border-color 0.2s;
}
.oj-team-card:hover .oj-team-card__avatar { border-color: rgba(240,230,160,0.3); }
.oj-team-card__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.oj-team-card__avatar--placeholder {
    display: flex; align-items: center; justify-content: center;
}
.oj-team-card__avatar--placeholder span {
    font-family: var(--oj-font-display);
    font-size: 36px;
    font-weight: 300;
    color: var(--oj-ash);
}
.oj-team-card__role {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--oj-star);
}
.oj-team-card__name {
    font-family: var(--oj-font-display);
    font-size: 18px;
    font-weight: 400;
    color: var(--oj-white);
    line-height: 1.2;
}

/* ── ACCESSIBILITY ── */
.oj-event-access { border-top: 1px solid rgba(240,230,160,0.1); }
.oj-access-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 32px;
}
.oj-access-item {
    background: var(--oj-ink);
    border: 1px solid rgba(240,230,160,0.08);
    border-radius: var(--oj-radius-md);
    padding: 18px 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.oj-access-item__icon {
    width: 32px;
    height: 32px;
    background: rgba(240,230,160,0.08);
    border-radius: var(--oj-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.oj-access-item__title { font-size: 13px; font-weight: 500; color: var(--oj-white); margin-bottom: 3px; }
.oj-access-item__desc { font-size: 12px; color: var(--oj-slate); line-height: 1.5; }

/* ── VENUE ── */
.oj-event-venue { border-top: 1px solid rgba(240,230,160,0.1); }
.oj-venue-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    background: var(--oj-ink);
    border: 1px solid rgba(240,230,160,0.1);
    border-radius: var(--oj-radius-lg);
    overflow: hidden;
    margin-top: 32px;
}
.oj-venue-block__info { padding: 40px; }
.oj-venue-block__name {
    font-family: var(--oj-font-display);
    font-size: 28px;
    font-weight: 300;
    color: var(--oj-white);
    margin-bottom: 10px;
}
.oj-venue-block__address { font-size: 13px; color: var(--oj-slate); line-height: 1.6; margin-bottom: 20px; }
.oj-venue-block__map {
    background: var(--oj-dusk);
    display: flex;
    align-items: center;
    justify-content: center;
}
.oj-venue-block__map-link {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--oj-star);
}

/* ── ALSO ON / EVENTS GRID ── */
.oj-also-on, .oj-event-related-books { border-top: 1px solid rgba(240,230,160,0.1); }
.oj-events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ── EVENT CARDS ── */
.oj-event-card { color: inherit; }
.oj-event-card__image {
    height: 180px;
    background: var(--oj-dusk);
    position: relative;
    overflow: hidden;
}
.oj-event-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.oj-event-card__image-placeholder { width: 100%; height: 100%; background: var(--oj-deep); }
.oj-event-card__image .oj-type-pill { position: absolute; top: 12px; left: 12px; z-index: 2; }
.oj-event-card__image .oj-past-badge { position: absolute; top: 12px; right: 12px; z-index: 2; }
.oj-event-card__body { padding: 18px 18px 14px; }
.oj-event-card__date { font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--oj-star); margin-bottom: 6px; }
.oj-event-card__title { font-family: var(--oj-font-display); font-size: 20px; font-weight: 400; color: var(--oj-white); line-height: 1.2; margin-bottom: 5px; }
.oj-event-card__venue { font-size: 12px; color: var(--oj-slate); }
.oj-event-card__footer { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-top: 1px solid rgba(240,230,160,0.07); }
.oj-event-card__link { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--oj-ash); }

/* Featured event card */
.oj-featured-event-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid rgba(240,230,160,0.14);
    border-radius: var(--oj-radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: var(--oj-ink);
    transition: border-color 0.2s;
}
.oj-featured-event-card:hover { border-color: rgba(240,230,160,0.3); opacity: 1; }
.oj-featured-event-card__image { position: relative; overflow: hidden; min-height: 320px; }
.oj-featured-event-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.oj-featured-event-card__image-placeholder { width: 100%; height: 100%; background: var(--oj-deep); }
.oj-featured-event-card__image .oj-type-pill { position: absolute; top: 14px; left: 14px; z-index: 2; }
.oj-featured-event-card__body { padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; }
.oj-featured-event-card__kicker { font-size: 10px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--oj-star); display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.oj-featured-event-card__title { font-family: var(--oj-font-display); font-size: clamp(32px, 4vw, 48px); font-weight: 300; color: var(--oj-white); line-height: 1.05; margin-bottom: 12px; }
.oj-featured-event-card__tagline { font-family: var(--oj-font-display); font-style: italic; font-size: 17px; color: var(--oj-ash); line-height: 1.5; margin-bottom: 28px; max-width: 38ch; }
.oj-featured-event-card__meta { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.oj-featured-event-card__meta-row { display: flex; gap: 12px; align-items: baseline; }
.oj-featured-event-card__meta-row dt { font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--oj-slate); width: 60px; flex-shrink: 0; }
.oj-featured-event-card__meta-row dd { font-size: 14px; color: var(--oj-ash); }
.oj-featured-event-card__footer { display: flex; justify-content: space-between; align-items: flex-end; padding-top: 24px; border-top: 1px solid rgba(240,230,160,0.1); }
.oj-featured-event-card__from { font-family: var(--oj-font-display); font-size: 30px; font-weight: 300; color: var(--oj-white); }
.oj-featured-event-card__community { font-size: 11px; color: var(--oj-sage); display: block; margin-top: 2px; }

/* ─────────────────────────────────────────
   EVENTS ARCHIVE
───────────────────────────────────────── */
.oj-filter-bar {
    background: var(--oj-ink);
    border-bottom: 1px solid rgba(240,230,160,0.1);
    position: sticky;
    top: 64px;
    z-index: 90;
}
.oj-filter-bar__inner {
    display: flex;
    align-items: center;
    padding-block: 0;
    overflow-x: auto;
    gap: 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.oj-filter-bar__inner::-webkit-scrollbar { display: none; }
.oj-filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-block: 14px;
    flex-shrink: 0;
    margin-right: 24px;
}
.oj-filter-group__label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--oj-slate);
    margin-right: 6px;
    white-space: nowrap;
}
.oj-filter-pill {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--oj-ash);
    background: transparent;
    border: 1px solid rgba(184,180,204,0.2);
    padding: 5px 14px;
    border-radius: 20px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.18s;
}
.oj-filter-pill:hover { border-color: rgba(240,230,160,0.3); color: var(--oj-white); opacity: 1; }
.oj-filter-pill--active { background: var(--oj-star); color: var(--oj-night); border-color: var(--oj-star); font-weight: 500; }
.oj-filter-bar__divider { width: 1px; height: 24px; background: rgba(240,230,160,0.1); margin-inline: 8px; flex-shrink: 0; }

.oj-events-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 48px;
    align-items: start;
    padding-block: 48px 96px;
}
.oj-events-sidebar { position: sticky; top: 120px; }
.oj-sidebar-block {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.oj-sidebar-title {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--oj-slate-text);
    margin-right: 6px;
    white-space: nowrap;
    /* Remove the old trailing rule — not needed in horizontal layout */
    display: inline;
}
.oj-sidebar-title::after { display: none; }

.oj-nation-filter-list {
    display: contents; /* chips flow directly into .oj-sidebar-block flex row */
}
.oj-nation-filter-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--oj-ash);
    background: rgba(184, 180, 204, 0.12);
    padding: 4px 12px;
    border-radius: var(--oj-radius-sm);
    border-bottom: none;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    white-space: nowrap;
}
.oj-nation-filter-item:hover {
    background: rgba(240, 230, 160, 0.12);
    color: var(--oj-white);
    opacity: 1;
}
.oj-nation-filter-item--active {
    background: var(--oj-star);
    color: var(--oj-night);
}
.oj-nation-filter-item--active:hover {
    background: var(--oj-star);
    color: var(--oj-night);
    opacity: 0.88;
}
/* Hide the old checkbox square — chips don't need it */
.oj-nation-filter-check { display: none; }
/* Count shown inline after the label */
.oj-nation-filter-count {
    margin-left: 2px;
    font-size: 10px;
    color: inherit;
    opacity: 0.55;
}

.oj-sidebar-next {
    background: var(--oj-dusk);
    border: 1px solid rgba(240,230,160,0.1);
    border-radius: var(--oj-radius-md);
    padding: 20px;
}
.oj-sidebar-next__label { font-size: 10px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--oj-star); margin-bottom: 10px; }
.oj-sidebar-next__day { font-family: var(--oj-font-display); font-size: 36px; font-weight: 300; color: var(--oj-white); line-height: 1; }
.oj-sidebar-next__month { font-size: 11px; color: var(--oj-slate); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px; }
.oj-sidebar-next__title { font-family: var(--oj-font-display); font-size: 18px; font-weight: 400; color: var(--oj-white); line-height: 1.2; margin-bottom: 6px; }
.oj-sidebar-next__venue { font-size: 12px; color: var(--oj-slate); margin-bottom: 16px; }
.oj-sidebar-next__btn { display: block; text-align: center; }

.oj-month-group { margin-bottom: 40px; }
.oj-month-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--oj-font-display);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: var(--oj-slate);
    text-transform: uppercase;
    padding-bottom: 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(240,230,160,0.1);
}
.oj-month-heading__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--oj-star); flex-shrink: 0; }
.oj-month-heading__count { font-size: 11px; color: var(--oj-deep); margin-left: auto; }

/* ─────────────────────────────────────────
   SINGLE ARTIST — Pagelayer-first layout
   Theme renders: breadcrumb, name header, data sections.
   Pagelayer renders: portrait + bio (the_content()).
───────────────────────────────────────── */
.oj-artist-single { background: var(--oj-night); }

/* ── Name header ── */
.oj-artist-header {
    background: var(--oj-ink);
    border-bottom: 1px solid rgba(240,230,160,0.08);
    padding-block: 48px 48px;
}
.oj-artist-header__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}
.oj-artist-header__nation {
    font-size: 12px;
    color: var(--oj-slate-text);
    letter-spacing: 0.04em;
}
.oj-artist-header__name {
    font-family: var(--oj-font-display);
    font-size: clamp(40px, 5.5vw, 80px);
    font-weight: 300;
    /* 1.0 minimum — Safari clips descenders below 1.0 on large display fonts */
    line-height: 1.0;
    letter-spacing: -0.02em;
    color: var(--oj-white);
    margin-bottom: 20px;
    /* Improves kerning consistency between Chrome and Safari */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
.oj-artist-header__pronouns {
    /* Absolute size — avoids inheriting 80px parent and ballooning */
    font-size: 18px;
    font-weight: 300;
    color: var(--oj-slate-text);
    letter-spacing: 0.01em;
    margin-left: 8px;
    vertical-align: baseline;
    display: inline;
}
.oj-artist-header__links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.oj-artist-header__links a {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--oj-ash);
    text-decoration: none;
    transition: color 0.15s;
}
.oj-artist-header__links a:hover { color: var(--oj-star); }

/* ── Pagelayer content area ── */
.oj-artist-body {
    padding-block: 0;
}
/* Let Pagelayer rows go full width */
.oj-artist-body .pl-row,
.oj-artist-body > [class*="pagelayer"] {
    max-width: 100%;
}
/* Constrain Pagelayer content to site max-width with standard padding */
.oj-artist-body .pl-row-holder {
    max-width: var(--oj-max-width);
    margin-inline: auto;
    padding-inline: 40px;
}

/* ── Data sections ── */
.oj-artist-section {
    padding-block: 64px 80px;
    border-top: 1px solid rgba(240,230,160,0.08);
}
.oj-artist-media-section { }

/* ─────────────────────────────────────────
   BOOK CARD
/* ─────────────────────────────────────────
   BOOK CARD
───────────────────────────────────────── */
.oj-book-card {
    display: flex;
    flex-direction: column;
    background: var(--oj-ink);
    border: 1px solid rgba(240,230,160,0.08);
    border-radius: var(--oj-radius-lg);
    overflow: hidden;
    transition: border-color 0.2s;
}
.oj-book-card:hover { border-color: rgba(240,230,160,0.25); }

/* Inner link wraps cover + body */
.oj-book-card__inner {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

/* Cover — padding-bottom ratio technique: works in every browser,
   immune to external img { height: auto } resets (WooCommerce, WordPress core).
   2:3 portrait = padding-bottom 150% (height ÷ width × 100 = 3÷2×100). */
.oj-book-card__cover {
    width: 100%;
    background: var(--oj-dusk);
    border-bottom: 1px solid rgba(240,230,160,0.08);
    position: relative;
    overflow: hidden;
    display: block;
    height: 0;
    padding-bottom: 150%;
    flex-shrink: 0;
}

/* Image fills the ratio container absolutely —
   height: 100% !important overrides WC/WP global img resets */
.oj-book-card__cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

/* Placeholder shown when no featured image is set */
.oj-book-card__cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 2 / 3;
    background: var(--oj-dusk);
    background-image: url('../patterns/diamond-star.svg');
    background-repeat: repeat;
    background-size: 24px 24px;
    padding: 16px;
    box-sizing: border-box;
    font-family: var(--oj-font-display);
    font-size: 14px;
    color: var(--oj-ash);
    text-align: center;
    line-height: 1.3;
}

.oj-book-card__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: var(--oj-radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.oj-book-card__badge--pick { background: var(--oj-star); color: var(--oj-night); }
.oj-book-card__badge--oos  { background: var(--oj-deep); color: var(--oj-slate-text); }

/* Body */
.oj-book-card__body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.oj-book-card__title {
    font-family: var(--oj-font-display);
    font-size: 17px;
    font-weight: 400;
    color: var(--oj-white);
    line-height: 1.2;
}
.oj-book-card__author { font-size: 12px; color: var(--oj-slate-text); }

/* Buy row — outside the anchor, below the card */
/* Buy row — price pinned left, button pinned right */
.oj-book-card__buy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid rgba(240,230,160,0.08);
    background: rgba(240,230,160,0.03);
    min-height: 52px;
}
.oj-book-card__price {
    font-family: var(--oj-font-display);
    font-size: 18px;
    font-weight: 300;
    color: var(--oj-white);
    flex-shrink: 0;
    min-width: 0;
}
.oj-book-card__price del { color: var(--oj-slate-text); font-size: 14px; margin-left: 4px; }
.oj-book-card__price ins { text-decoration: none; }
.oj-book-card__buy-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}
.oj-book-card__atc-form { display: flex; }
.oj-book-card__atc-btn,
.oj-book-card__buy-btn { font-size: 11px; padding: 9px 16px; white-space: nowrap; }
.oj-book-card__oos-label { font-size: 11px; color: var(--oj-slate-text); letter-spacing: 0.04em; }

/* ─────────────────────────────────────────
   SINGLE BOOK — updated three-column layout
   (cover | details | sticky buy sidebar)
/* ─────────────────────────────────────────
   SINGLE BOOK — updated three-column layout
───────────────────────────────────────── */
.oj-book-hero {
    display: grid;
    grid-template-columns: 360px 1fr 300px;
    gap: 48px;
    align-items: start;
    padding-block: 40px 80px;
}

.oj-book-hero__cover {
    position: sticky;
    top: 84px;
}
/* Padding-bottom ratio container — 2:3 portrait = 150% */
.oj-book-hero__cover__ratio {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 150%;
    border-radius: var(--oj-radius-md);
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0,0,0,0.45);
}
.oj-book-hero__cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    display: block;
    border-radius: var(--oj-radius-md);
}
/* Fallback if no ratio wrapper (direct img output) */
.oj-book-hero__cover > img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--oj-radius-md);
    box-shadow: 0 16px 48px rgba(0,0,0,0.45);
}

.oj-book-hero__details { min-width: 0; }

/* Sticky buy sidebar */
.oj-book-hero__buy { position: sticky; top: 84px; }

.oj-book-buy-box {
    background: var(--oj-ink);
    border: 1px solid rgba(240,230,160,0.14);
    border-radius: var(--oj-radius-lg);
    overflow: hidden;
}
.oj-book-buy-box__header {
    background: var(--oj-dusk);
    padding: 20px 24px;
    border-bottom: 1px solid rgba(240,230,160,0.1);
}
.oj-book-buy-box__title {
    font-family: var(--oj-font-display);
    font-size: 18px;
    font-weight: 400;
    color: var(--oj-white);
    margin-bottom: 6px;
    line-height: 1.2;
}
.oj-book-buy-box__price {
    font-family: var(--oj-font-display);
    font-size: 26px;
    font-weight: 300;
    color: var(--oj-white);
}
.oj-book-buy-box__price del { color: var(--oj-slate-text); font-size: 18px; margin-left: 6px; }
.oj-book-buy-box__price ins { text-decoration: none; }

.oj-book-buy-box__body { padding: 20px 24px; }
.oj-book-buy-box__footer {
    padding: 14px 24px;
    border-top: 1px solid rgba(240,230,160,0.08);
    text-align: center;
}
.oj-book-buy-box__shop-link {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: var(--oj-slate-text);
    text-decoration: none;
}
.oj-book-buy-box__shop-link:hover { color: var(--oj-star); opacity: 1; }

/* Buy wrap inside box */
.oj-book-buy-wrap { display: flex; flex-direction: column; gap: 12px; }

.oj-book-price {
    font-family: var(--oj-font-display);
    font-size: 28px;
    font-weight: 300;
    color: var(--oj-white);
}
.oj-book-price del { color: var(--oj-slate-text); font-size: 20px; margin-left: 6px; }
.oj-book-price ins { text-decoration: none; }

/* Qty row inside buy wrap */
.oj-book-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.oj-book-qty-label {
    font-size: 13px;
    color: var(--oj-ash);
}
/* qty input — share the ticket box control styles */
.oj-book-qty-input {
    background: transparent;
    border: none;
    border-left: 1px solid rgba(240,230,160,0.1);
    border-right: 1px solid rgba(240,230,160,0.1);
    color: var(--oj-white);
    font-family: var(--oj-font-sans);
    font-size: 14px;
    text-align: center;
    width: 44px;
    height: 36px;
    -moz-appearance: textfield;
}
.oj-book-qty-input::-webkit-inner-spin-button,
.oj-book-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.oj-book-qty-input:focus-visible {
    outline: 3px solid var(--oj-star);
    outline-offset: 0;
}

.oj-book-atc-form { display: flex; flex-direction: column; gap: 10px; }
.oj-book-atc-btn {
    width: 100%;
    justify-content: center;
    font-size: 13px;
    padding: 15px;
}

.oj-book-view-in-shop {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: var(--oj-slate-text);
    text-decoration: none;
    text-align: center;
    display: block;
}
.oj-book-view-in-shop:hover { color: var(--oj-star); opacity: 1; }

/* Out of stock states */
.oj-book-buy-btn--unavailable { display: flex; flex-direction: column; gap: 10px; }
.oj-book-out-of-stock {
    font-size: 13px;
    color: var(--oj-slate-text);
    text-align: center;
}
.oj-book-notify-btn { width: 100%; justify-content: center; }

/* Stock status in specs */
.oj-book-stock { font-weight: 400; }
.oj-book-stock--instock     { color: var(--oj-sage-text); }
.oj-book-stock--outofstock  { color: var(--oj-ember); }
.oj-book-stock--onbackorder { color: var(--oj-star); }

/* Related books section */
.oj-book-related { border-top: 1px solid rgba(240,230,160,0.1); }

/* ─────────────────────────────────────────
   BOOKS GRID — updated for new card structure
   Grid needs to account for the fact cards now
   have a buy row — align them consistently
───────────────────────────────────────── */
.oj-books-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 8px;
    align-items: start; /* not stretch — cards vary in height */
}
.oj-books-grid-full {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: start;
}

/* ─────────────────────────────────────────
   RESPONSIVE UPDATES
───────────────────────────────────────── */
@media ( max-width: 1100px ) {
    .oj-book-hero {
        grid-template-columns: 300px 1fr;
        grid-template-rows: auto auto;
    }
    /* Buy box drops below details on tablet */
    .oj-book-hero__buy {
        grid-column: 1 / -1;
        position: static;
    }
    .oj-book-buy-box { max-width: 480px; }
}

@media ( max-width: 768px ) {
    .oj-book-hero {
        grid-template-columns: 1fr;
    }
    .oj-book-hero__cover { position: static; max-width: 320px; margin: 0 auto; }
    .oj-books-row,
    .oj-books-grid-full { grid-template-columns: repeat(2, 1fr); }
    .oj-book-buy-box { max-width: 100%; }
}
