/* Rhystic Bazaar — improvements requested in July 2026. */

.rhystic-home__deck-cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 32px;
    margin: 42px 0 8px;
    padding: clamp(28px, 5vw, 52px);
    border: 1px solid rgba(var(--rb-primary-rgb), 0.24);
    background:
        radial-gradient(circle at 90% 10%, rgba(var(--rb-primary-light-rgb), 0.26), transparent 32%),
        var(--rb-gradient-card);
    box-shadow: var(--rb-shadow-soft);
}

.rhystic-home__deck-cta-eyebrow,
.rhystic-deck-builder__eyebrow,
.rhystic-store-catalog__eyebrow,
.rhystic-institutional__eyebrow,
.rhystic-checkout-accessories__eyebrow {
    display: block;
    margin: 0 0 8px;
    color: var(--rb-primary-dark);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.rhystic-home__deck-cta h2 {
    margin: 0;
    color: var(--rb-text);
    font-size: clamp(1.75rem, 3.5vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.rhystic-home__deck-cta p {
    max-width: 690px;
    margin: 14px 0 0;
    color: var(--rb-text-secondary);
    font-size: 1rem;
    line-height: 1.65;
}

.rhystic-home__deck-cta-button,
.rhystic-store-catalog__empty a,
.rhystic-deck-builder__primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: var(--rb-gradient-primary);
    color: var(--rb-text-on-primary);
    font-weight: 800;
    text-decoration: none;
    box-shadow: var(--rb-shadow-soft);
    cursor: pointer;
}

.rhystic-home__deck-cta-button:hover,
.rhystic-store-catalog__empty a:hover,
.rhystic-deck-builder__primary:hover {
    color: var(--rb-text-on-primary);
    box-shadow: var(--rb-glow-cyan);
    transform: translateY(-1px);
}

.rhystic-deck-builder,
.rhystic-store-catalog,
.rhystic-institutional {
    width: min(1080px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 48px 0 96px;
    color: var(--rb-text);
}

.rhystic-deck-builder__intro,
.rhystic-store-catalog__header,
.rhystic-institutional__header {
    max-width: 780px;
    margin-bottom: 30px;
}

.rhystic-deck-builder__intro h1,
.rhystic-store-catalog__header h1,
.rhystic-institutional__header h1 {
    margin: 0;
    color: var(--rb-text);
    font-size: clamp(2.15rem, 5vw, 4.3rem);
    line-height: 1;
    letter-spacing: -0.055em;
}

.rhystic-deck-builder__intro > p:last-child,
.rhystic-store-catalog__header > p:last-child {
    max-width: 680px;
    margin: 18px 0 0;
    color: var(--rb-text-secondary);
    font-size: 1.04rem;
    line-height: 1.7;
}

.rhystic-deck-builder__form {
    padding: clamp(20px, 4vw, 34px);
    border: 1px solid var(--rb-border-soft);
    background: var(--rb-gradient-card);
    box-shadow: var(--rb-shadow-card);
}

.rhystic-deck-builder__form label {
    display: block;
    margin-bottom: 10px;
    color: var(--rb-text);
    font-weight: 800;
}

.rhystic-deck-builder__form textarea {
    width: 100%;
    min-height: 280px;
    resize: vertical;
    border: 1px solid var(--rb-border);
    border-radius: 8px;
    background: var(--rb-input-bg);
    color: var(--rb-text);
    font: 500 0.96rem/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.rhystic-deck-builder__form textarea:focus {
    border-color: var(--rb-primary-dark);
    outline: 3px solid rgba(var(--rb-primary-rgb), 0.24);
}

.rhystic-deck-builder__form-footer,
.rhystic-deck-results__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 18px;
}

.rhystic-deck-builder__form-footer p,
.rhystic-deck-results__header p {
    max-width: 620px;
    margin: 0;
    color: var(--rb-text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.rhystic-deck-builder__primary:disabled {
    cursor: not-allowed;
    filter: grayscale(0.7);
    opacity: 0.62;
}

.rhystic-deck-builder__primary.is-loading {
    cursor: wait;
}

.rhystic-deck-builder__primary--secondary {
    border: 1px solid var(--rb-primary-dark);
    background: transparent;
    color: var(--rb-primary-dark);
    box-shadow: none;
}

.rhystic-deck-builder__primary--secondary:hover {
    background: rgba(var(--rb-primary-rgb), 0.08);
    color: var(--rb-primary-dark);
    box-shadow: none;
}

.rhystic-deck-builder__status {
    min-height: 28px;
    margin: 18px 0 0;
    color: var(--rb-text-secondary);
    font-weight: 700;
}

.rhystic-deck-builder__results {
    margin-top: 34px;
    scroll-margin-top: 144px;
}

.rhystic-deck-results__header {
    align-items: flex-end;
    margin-bottom: 18px;
}

.rhystic-deck-results__header h2 {
    margin: 0 0 6px;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.rhystic-deck-results__missing {
    margin: 0 0 34px;
    padding: 18px 20px;
    border: 1px solid rgba(228, 91, 91, 0.24);
    border-radius: 12px;
    background: rgba(228, 91, 91, 0.06);
}

.rhystic-deck-results__missing h3,
.rhystic-deck-results__matched > h3 {
    margin: 0;
    color: var(--rb-text);
    font-size: 1.12rem;
}

.rhystic-deck-results__missing > p {
    margin: 5px 0 14px;
    color: var(--rb-text-muted);
    font-size: 0.88rem;
}

.rhystic-deck-results__missing-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 24px;
    margin: 0;
    padding: 0;
    color: var(--rb-text-secondary);
    list-style: none;
}

.rhystic-deck-results__missing-list li {
    min-width: 0;
    overflow-wrap: anywhere;
}

.rhystic-deck-results__missing-list strong {
    color: #8d2020;
}

.rhystic-deck-results__matched > h3 {
    margin-bottom: 8px;
}

.rhystic-deck-results__list {
    border-top: 1px solid var(--rb-border-soft);
}

.rhystic-deck-result {
    padding: 22px 0;
    border-bottom: 1px solid var(--rb-border-soft);
}

.rhystic-deck-result__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.rhystic-deck-result h4 {
    margin: 0;
    color: var(--rb-text);
    font-size: 1.08rem;
}

.rhystic-deck-result__badge {
    flex: 0 0 auto;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(var(--rb-primary-rgb), 0.12);
    color: var(--rb-primary-dark);
    font-size: 0.72rem;
    font-weight: 800;
}

.rhystic-deck-result.is-partial .rhystic-deck-result__badge {
    background: rgba(242, 184, 75, 0.18);
    color: #6b4300;
}

.rhystic-deck-result.is-match-partial .rhystic-deck-result__badge {
    background: rgba(var(--rb-primary-rgb), 0.12);
    color: var(--rb-primary-dark);
}

.rhystic-deck-result.is-added {
    opacity: 0.68;
}

.rhystic-deck-result.is-added .rhystic-deck-result__badge {
    background: rgba(66, 139, 96, 0.15);
    color: #23633e;
}

.rhystic-deck-result__match-note {
    margin: 8px 0 0;
    color: var(--rb-text-muted);
    font-size: 0.9rem;
}

.rhystic-deck-result__variants {
    display: grid;
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    border: 0;
}

.rhystic-deck-result__variants legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.rhystic-deck-result__variant {
    display: grid;
    grid-template-columns: auto 82px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px 14px 12px 12px;
    border: 1px solid transparent;
    background: rgba(var(--rb-surface-elevated-rgb), 0.7);
}

.rhystic-deck-result__variant:has(input:checked) {
    border-color: var(--rb-primary-dark);
    background: rgba(var(--rb-primary-rgb), 0.08);
}

.rhystic-deck-result__variant input {
    margin: 0;
    accent-color: var(--rb-primary-dark);
}

.rhystic-deck-result__variant-image {
    display: grid;
    width: 82px;
    aspect-ratio: 0.72;
    place-items: center;
    overflow: hidden;
    border-radius: 7px;
    background: rgba(var(--rb-primary-rgb), 0.08);
    color: var(--rb-text-muted);
    font-size: 0.68rem;
    text-align: center;
}

.rhystic-deck-result__variant-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rhystic-deck-result__variant-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.rhystic-deck-result__variant-name {
    color: var(--rb-text);
    font-weight: 700;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.rhystic-deck-result__variant-meta {
    color: var(--rb-text-muted);
    font-size: 0.82rem;
}

.rhystic-deck-result__variant-price {
    color: var(--rb-primary-dark);
    font-weight: 800;
}

.rhystic-deck-result__add {
    min-height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 9px;
    background: var(--rb-gradient-primary);
    color: var(--rb-text-on-primary);
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.rhystic-deck-result__add:hover {
    color: var(--rb-text-on-primary);
    transform: translateY(-1px);
}

.rhystic-deck-result__add:disabled {
    cursor: not-allowed;
    filter: grayscale(0.7);
    opacity: 0.62;
}

.rhystic-deck-result__add.is-loading {
    cursor: wait;
}

.rhystic-store-catalog {
    width: min(1240px, calc(100vw - 32px));
}

.rhystic-store-catalog__empty {
    max-width: 720px;
    padding: clamp(32px, 7vw, 70px);
    border: 1px solid rgba(var(--rb-primary-rgb), 0.22);
    background: var(--rb-gradient-card);
    box-shadow: var(--rb-shadow-soft);
}

.rhystic-store-catalog__empty h2 {
    margin: 0 0 10px;
    color: var(--rb-text);
}

.rhystic-store-catalog__empty p {
    margin: 0 0 22px;
    color: var(--rb-text-secondary);
    line-height: 1.65;
}

.rhystic-store-catalog .rhystic-home__product-copy h2 {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.2;
}

.rhystic-store-catalog .rhystic-home__product-copy h2 a {
    color: var(--rb-text);
    text-decoration: none;
}

.rhystic-institutional {
    max-width: 900px;
}

.rhystic-institutional__article {
    padding: clamp(26px, 6vw, 62px);
    border-top: 5px solid var(--rb-primary-dark);
    background: var(--rb-gradient-card);
    box-shadow: var(--rb-shadow-card);
}

.rhystic-institutional__content {
    color: var(--rb-text-secondary);
    font-size: 1rem;
    line-height: 1.75;
}

.rhystic-institutional__content h2 {
    margin: 34px 0 8px;
    color: var(--rb-text);
    font-size: 1.4rem;
}

.rhystic-institutional__content a,
.rhystic-institutional__nav a {
    color: var(--rb-primary-dark);
    font-weight: 700;
}

.rhystic-institutional__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 26px;
    margin-top: 24px;
}

.rhystic-checkout-accessories {
    margin: 24px 0;
    padding: 20px;
    border-top: 3px solid var(--rb-primary-dark);
    background: rgba(var(--rb-surface-rgb), 0.92);
}

.rhystic-checkout-accessories__heading h3 {
    margin: 0 0 14px;
    color: var(--rb-text);
    font-size: 1.15rem;
}

.rhystic-checkout-accessories__grid {
    display: grid;
    gap: 10px;
}

.rhystic-checkout-accessories__item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--rb-border-soft);
}

.rhystic-checkout-accessories__image img {
    display: block;
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.rhystic-checkout-accessories__copy h4 {
    margin: 0 0 4px;
    font-size: 0.9rem;
}

.rhystic-checkout-accessories__copy h4 a {
    color: var(--rb-text);
    text-decoration: none;
}

.rhystic-checkout-accessories__price {
    color: var(--rb-primary-dark);
    font-size: 0.86rem;
    font-weight: 800;
}

.rhystic-checkout-accessories__item .button {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 8px;
}

.rhystic-store-footer-links {
    border-top: 1px solid rgba(var(--rb-primary-rgb), 0.2);
    border-bottom: 1px solid rgba(var(--rb-primary-rgb), 0.14);
    background: var(--rb-surface);
}

.rhystic-store-footer-links__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 26px;
    width: min(1240px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 18px 0;
}

.rhystic-store-footer-links a {
    color: var(--rb-primary-dark);
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
}

.rhystic-store-footer-links a:hover {
    text-decoration: underline;
}

.rhystic-home__deck-cta-button:focus-visible,
.rhystic-deck-builder__primary:focus-visible,
.rhystic-store-catalog__empty a:focus-visible,
.rhystic-deck-result__variant:has(input:focus-visible),
.rhystic-deck-result__add:focus-visible,
.rhystic-store-footer-links a:focus-visible {
    outline: 3px solid var(--rb-primary);
    outline-offset: 3px;
}

@media (max-width: 720px) {
    .rhystic-home__deck-cta,
    .rhystic-deck-builder__form-footer,
    .rhystic-deck-results__header {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .rhystic-home__deck-cta {
        display: grid;
        gap: 22px;
        padding: 28px 22px;
    }

    .rhystic-deck-builder__form-footer,
    .rhystic-deck-results__header {
        display: grid;
    }

    .rhystic-home__deck-cta-button,
    .rhystic-deck-builder__primary {
        width: 100%;
    }

    .rhystic-deck-results__missing-list {
        grid-template-columns: 1fr;
    }

    .rhystic-deck-result__variant {
        grid-template-columns: auto 68px minmax(0, 1fr);
        gap: 10px;
        padding: 11px;
    }

    .rhystic-deck-result__variant-image {
        width: 68px;
    }

    .rhystic-deck-result__add {
        grid-column: 2 / -1;
        width: 100%;
    }

    .rhystic-checkout-accessories__item {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .rhystic-checkout-accessories__image img {
        width: 48px;
        height: 48px;
    }

    .rhystic-checkout-accessories__item .button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .rhystic-deck-builder,
    .rhystic-store-catalog,
    .rhystic-institutional {
        width: min(100vw - 24px, 1080px);
        padding-top: 28px;
    }

    .rhystic-deck-result__title-row {
        align-items: flex-start;
    }

    .rhystic-deck-result__variant {
        grid-template-columns: auto 62px minmax(0, 1fr);
    }

    .rhystic-deck-result__variant-image {
        width: 62px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rhystic-home__deck-cta-button,
    .rhystic-store-catalog__empty a,
    .rhystic-deck-builder__primary,
    .rhystic-deck-result__add {
        transition: none;
    }

    .rhystic-home__deck-cta-button:hover,
    .rhystic-store-catalog__empty a:hover,
    .rhystic-deck-builder__primary:hover,
    .rhystic-deck-result__add:hover {
        transform: none;
    }
}
