/* ══════════════════════════════════════════════════════
   Ticket Card — Figma node 1365-7133
   ──────────────────────────────────────────────────────
   Sizing policy (matches site-wide CSS units guide):
     • Typography: rem font-sizes, UNITLESS line-heights (scale with font)
     • Title sized as a mid-level heading (1.5rem max), NOT a hero title.
       All other text scales down from there.
     • Spacing: rem throughout; outer padding/gap use `clamp()` so the
       card breathes between tablet and desktop
     • Image: square aspect-ratio on all viewports
     • px retained ONLY for borders and small detail radii (per policy)
   ══════════════════════════════════════════════════════ */

.guild-ticket-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    /* 16 → 32px fluid — trimmed from the old 50px so the card is compact. */
    padding: clamp(1rem, 2.5vw, 2rem);
    background: #fff;
    /* 650px comes from proportional scaling of the original design:
       970px / 1440px viewport → 1200px base → 80% = ~647px.
       Keeps the card feeling like a card, not a page-wide hero. */
    max-width: 650px;
    /* Centered in its parent container. `margin-inline: auto` works
       correctly regardless of direction (LTR/RTL). */
    margin-inline: auto;
}

.guild-ticket-card__grid {
    display: grid;
    /* Image column is fixed at 250px; content column takes the rest.
       This hard-caps the image at 250×250 (with aspect-ratio: 1/1) no
       matter how wide the card's parent container gets. */
    grid-template-columns: 250px 1fr;
    gap: clamp(1rem, 2.5vw, 2rem);
    align-items: stretch;
}

/* ── Content column: vertical flow, CTA pushed to bottom ── */
.guild-ticket-card__content {
    display: flex;
    flex-direction: column;
}

/* ── 1. Title — mid-level heading, plum #4B2D45, 20–24px fluid ── */
.guild-ticket-card__title {
    margin: 0 0 0.75rem 0;
    font-size: clamp(1.25rem, 1.8vw, 1.5rem);
    line-height: 1.3;
    font-weight: 700;
    color: #4B2D45;
}

/* ── 2. Member price row — teal #225D73, 16–20px fluid ── */
.guild-ticket-card__member-row {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.guild-ticket-card__price-label,
.guild-ticket-card__price--member {
    font-weight: 700;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    line-height: 1.2;
    color: #225D73;
}

/* ── 3. Purchase row: qty picker + price/stock ── */
.guild-ticket-card__cart {
    display: flex;
    flex-direction: column;
    flex: 1;                 /* fills remaining column height so CTA sits at bottom */
    justify-content: space-between;
    gap: 1rem;
}

.guild-ticket-card__purchase-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    direction: rtl;
}

.guild-ticket-card__price-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Current price — matches member price sizing */
.guild-ticket-card__price {
    font-weight: 700;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    line-height: 1.2;
    color: #2E404A;
}

.guild-ticket-card__price--struck {
    text-decoration: line-through;
    opacity: 0.45;
    font-weight: 400;
    font-size: 0.875rem;
}

/* Stock / "X seats remaining" — small caption */
.guild-ticket-card__remaining {
    color: #6b6b6b;
    font-size: 0.8125rem;   /* 13px */
    font-weight: 500;
    line-height: 1.5;
}

/* ── Quantity picker — compact (72×48), r10, stroke #2E404A ────────
   Sized down from the original 89×61 so it matches the mid-sized text. */
.guild-ticket-card__qty {
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: center;
    border: 2px solid #2E404A;
    border-radius: 10px;
    overflow: hidden;
    height: 3rem;            /* 48px */
    min-width: 4.5rem;       /* 72px */
    flex-shrink: 0;
}

/* Number input */
.guild-ticket-card__qty input[type="number"] {
    width: 2rem;             /* 32px */
    height: 100%;
    text-align: center;
    border: 0;
    outline: none;
    font-weight: 400;
    font-size: 1.125rem;
    line-height: 1.2;
    font-family: inherit;
    color: #2E404A;
    background: transparent;
    padding: 0;
    -moz-appearance: textfield;
}

.guild-ticket-card__qty input[type="number"]::-webkit-outer-spin-button,
.guild-ticket-card__qty input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.guild-ticket-card__qty .qty-arrows {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.guild-ticket-card__qty .qty-btn {
    flex: 1;
    width: 2rem;             /* 32px */
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #2E404A;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s;
}

.guild-ticket-card__qty .qty-btn svg {
    width: 0.625rem;         /* 10px */
    height: auto;
}

.guild-ticket-card__qty .qty-btn:hover {
    background: rgba(0, 57, 68, 0.06);
}

/* ── 4. CTA Button — gold, 16–18px fluid, modest padding ── */
.guild-ticket-card__cta {
    background: #F9C466;
    border: 0;
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    line-height: 1.2;
    color: #003944;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: background 0.2s;
    margin-top: auto;        /* bottom-anchors in the flex column */
}

.guild-ticket-card__cta:hover {
    background: #e8b550;
}

.guild-ticket-card__cta--ended {
    opacity: 0.8;
}

.guild-ticket-card__cta--disabled {
    background: #eee;
    color: #999;
    cursor: default;
}

/* ── Image — forced SQUARE on every breakpoint ── */
.guild-ticket-card__media {
    display: flex;
    justify-content: flex-start;
    order: -1;
}

.guild-ticket-card__img {
    width: 100%;
    height: auto;
    max-width: 250px;        /* hard cap — matches fixed image column */
    max-height: 250px;
    aspect-ratio: 1 / 1;     /* always square, regardless of source image */
    object-fit: cover;
    border-radius: 16px;
}

.guild-ticket-card__notice {
    padding: 0.875rem;
    border-radius: 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    font-weight: 600;
    text-align: center;
    font-size: 0.8125rem;
}

/* ── Mobile (≤767px) ──────────────────────────────────
   Fluid base handles text sizing; mobile only tweaks layout:
   single column, tighter padding/gap, centered alignment.
   ════════════════════════════════════════════════════ */
@media (max-width: 767px) {
    .guild-ticket-card {
        padding: 1rem;
    }

    .guild-ticket-card__grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Center the 250px-capped image when it's stacked above the content. */
    .guild-ticket-card__media {
        justify-content: center;
    }

    .guild-ticket-card__title {
        text-align: center;
    }

    .guild-ticket-card__member-row {
        justify-content: center;
    }

    .guild-ticket-card__purchase-row {
        justify-content: center;
    }

    .guild-ticket-card__remaining {
        text-align: center;
    }
}
