/* === Product Page Shirt Mockup === */
.product-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 2rem 0 4rem;
    align-items: start;
}

.product-page__mockup {
    background: linear-gradient(160deg, #f0ece4 0%, #e5e0d6 40%, #ddd7cb 100%);
    border-radius: 12px;
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 5rem;
    align-self: start;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.04);
}

.shirt-mockup {
    width: 100%;
    max-width: 420px;
    position: relative;
}

.shirt-mockup__svg {
    width: 100%;
    height: auto;
}

.shirt-mockup__quote-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0.75rem;
    text-align: center;
    overflow: hidden;
}

.shirt-mockup__quote {
    font-size: 16px;
    line-height: 1.45;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: none;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.shirt-mockup__attribution {
    font-size: 13px;
    margin-top: 10px;
    opacity: 0.75;
    font-style: italic;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* === Product Details === */
.product-page__details {
    padding-top: 0.5rem;
}

.product-page__title {
    font-family: var(--heading-font);
    font-size: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.product-page__quote {
    font-style: italic;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.6;
    border-left: 3px solid var(--accent-color);
    padding-left: 1rem;
}

.product-page__price {
    font-family: var(--ui-font);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.3rem;
}

.tax-estimate {
    margin-bottom: 1.8rem;
    font-size: 0.9rem;
    color: #3a3a3a;            /* darker for readability on white card */
    display: flex;
    flex-direction: column;    /* stack tax line above ZIP entry/change */
    gap: 0.35rem;
    line-height: 1.4;
}

.tax-estimate__line { font-weight: 500; color: #1a1a1a; }
.tax-estimate__label { font-style: italic; color: #555; }
.tax-estimate__ship-included {
    font-size: 0.72rem;
    color: #1a1a1a;
    font-style: italic;
    margin-bottom: 0.6rem;
}

.tax-estimate button {
    background: transparent;
    border: 1px solid var(--border-color, #555);
    color: inherit;
    padding: 0.15rem 0.55rem;
    font-size: 0.78rem;
    border-radius: 3px;
    cursor: pointer;
    font-family: inherit;
}

.tax-estimate button:hover { background: var(--bg-card, rgba(255,255,255,0.05)); }

.tax-estimate__open,
.tax-estimate__change-btn {
    border: none;
    text-decoration: underline;
    padding: 0;
    font-size: 0.82rem;
    opacity: 0.9;
}

.tax-estimate__zip-input { display: inline-flex; gap: 0.3rem; align-items: center; }
.tax-estimate__zip-input input {
    width: 5.5rem;
    padding: 0.25rem 0.45rem;
    border: 1px solid var(--border-color, #555);
    background: transparent;
    color: inherit;
    font-size: 0.85rem;
    border-radius: 3px;
    font-family: inherit;
}

[hidden] { display: none !important; }

/* === Bundle discount ladder floating card (product page) === */
/* z-index 500 = below history overlay (1000) so the history panel covers it. */
.bundle-ladder--floating {
    position: fixed;
    top: 7rem;          /* below header, above the vertically-centered History tab */
    right: 1rem;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.85rem 1rem;
    background: #ffffff;
    border: 1px solid #e3d9c3;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    font-size: 0.82rem;
    width: 140px;
    color: #1a1a1a;
}
.bundle-ladder__lead {
    font-weight: 700;
    color: #c9a14a;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.7rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #e3d9c3;
    margin-bottom: 0.15rem;
    text-align: center;
}
.bundle-ladder__row {
    white-space: nowrap;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    color: #555;
}
.bundle-ladder__row strong {
    color: #1a1a1a;
    font-weight: 600;
}
.bundle-ladder__pct {
    color: #c9a14a;
    font-weight: 700;
}
.bundle-ladder__note {
    font-size: 0.7rem;
    color: #1a1a1a;
    text-align: center;
    margin-top: 0.4rem;
    padding-top: 0.4rem;
    border-top: 1px solid #efe9d8;
    line-height: 1.3;
    font-style: italic;
}
/* Hide the floating ladder on narrow screens — folds back into normal flow
   only if you want it visible; for now we just hide. */
@media (max-width: 980px) {
    .bundle-ladder--floating { display: none; }
}

/* === "More colors" trigger in the curated color list === */
.color-option--more {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
}
.color-swatch--more { display: inline-block; }
.color-swatch--more svg { width: 40px; height: 52px; }

/* === Custom-color pill (shown after a wheel pick) === */
.custom-color-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.6rem 0 0;
    padding: 0.35rem 0.7rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 999px;
    font-size: 0.85rem;
}
.custom-color-pill__swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.25);
}
.custom-color-pill__clear {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 0 0 0.2rem;
    opacity: 0.7;
}
.custom-color-pill__clear:hover { opacity: 1; }

/* === Color wheel modal === */
/* Site uses light cards (--bg-card: #fff); explicit dark text below for contrast. */
.color-wheel-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.color-wheel-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(2px);
}
.color-wheel-modal__panel {
    position: relative;
    z-index: 1;
    width: min(420px, 92vw);
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid #d0c8b5;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.color-wheel-modal__panel h3 {
    color: #1a1a1a;
    margin: 0 0 0.3rem;
}
.color-wheel-modal__panel h4 {
    color: #1a1a1a;
    margin: 0.5rem 0 0.6rem;
    font-size: 0.95rem;
}
.color-wheel-modal__close {
    position: absolute;
    top: 0.5rem;
    right: 0.7rem;
    background: transparent;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: #555;
    cursor: pointer;
}
.color-wheel-modal__close:hover { color: #000; }
.color-wheel-modal__sub {
    margin: 0.3rem 0 1rem;
    color: #555;          /* WCAG AA on white */
    font-size: 0.88rem;
}
.color-wheel-modal__wheel {
    display: flex;
    justify-content: center;
    margin: 0.5rem 0 1rem;
}
.color-wheel-modal__readout {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    justify-content: center;
    margin-bottom: 1rem;
    font-family: ui-monospace, monospace;
    font-size: 0.9rem;
    color: #1a1a1a;
}
.color-wheel-modal__chip {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid #ccc;
    transition: background 0.1s;
}
.color-wheel-modal__results {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
}
.color-wheel-modal__results li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.45rem;
    background: #faf7f0;
    border: 1px solid #e3d9c3;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #1a1a1a;
    cursor: pointer;
    transition: background 0.1s, border-color 0.1s;
    min-width: 0;
}
.color-wheel-modal__results li:hover {
    background: #f0e9d4;
    border-color: #c9a14a;
}
.color-wheel-modal__results li.is-placeholder {
    grid-column: 1 / -1;
    justify-content: center;
    color: #777;
    cursor: default;
    padding: 0.5rem;
    font-size: 0.85rem;
}
.color-wheel-modal__result-chip {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.3);
    flex-shrink: 0;
}
.color-wheel-modal__result-name {
    flex: 1;
    min-width: 0;
    color: #1a1a1a;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-page__price-float {
    position: fixed;
    z-index: 99;
    background: var(--bg-card, #fff);
    padding: 0.6rem 1.5rem;
    font-family: var(--ui-font);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    border-radius: 0 0 var(--radius, 6px) var(--radius, 6px);
    display: none;
    text-align: center;
}

.product-page__price-float.is-visible {
    display: block;
}

/* === Product Form === */
.product-form {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.product-form__group {
    margin-bottom: 1.5rem;
}

.product-form__group:last-of-type {
    margin-bottom: 1.5rem;
}

.product-form__group > label {
    display: block;
    font-family: var(--ui-font);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.color-scroll-wrapper {
    position: relative;
    max-width: 220px;
    padding: 0 20px;
}

.color-scroll-wrapper .scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    transition: background 0.15s;
}

.color-scroll-wrapper .scroll-btn:hover {
    background: #f0f0f0;
}

.color-scroll-wrapper .scroll-btn--left { left: -14px; }
.color-scroll-wrapper .scroll-btn--right { right: -14px; }

.color-options {
    display: flex;
    gap: 0.6rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 2px;
}

.color-options::-webkit-scrollbar { display: none; }

.color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.color-option input { display: none; }

.color-swatch {
    display: block;
    width: 48px;
    height: 56px;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 4px;
    background: var(--bg-primary);
}

.color-swatch svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

.color-swatch:hover {
    border-color: var(--border-color);
    transform: translateY(-2px);
}

.color-option input:checked + .color-swatch {
    border-color: var(--accent-color);
    background: #f0ece4;
    box-shadow: 0 0 0 1px var(--accent-color);
}

.color-name {
    font-family: var(--ui-font);
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 3px;
    text-align: center;
    max-width: 52px;
    line-height: 1.2;
}

.size-options {
    display: flex;
    gap: 0.5rem;
}

.size-option input { display: none; }

.size-label {
    display: block;
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-family: var(--ui-font);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.size-label:hover {
    border-color: var(--accent-color);
}

.size-option input:checked + .size-label {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: #fff;
}

.size-option--unavailable .size-label {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: auto; /* keep tooltip working */
}
.size-option--unavailable .size-label:hover {
    border-color: var(--border-color); /* no accent on hover when unavailable */
}

.size-option { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; }

.product-form__group--row { display: flex; gap: 0.75rem; align-items: flex-end; }
.text-color-flip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    background: #fff;
    font-family: var(--ui-font);
    font-weight: 600;
    font-size: 0.85rem;
    color: #1a1a1a;
    cursor: pointer;
    transition: border-color 0.2s;
}
.text-color-flip:hover { border-color: var(--accent-color); }
.text-color-flip__swatch {
    display: inline-block;
    width: 1rem; height: 1rem;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.2);
    background: #1a1a1a;
}
.size-premium {
    font-family: var(--ui-font);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 0.02em;
    line-height: 1;
    min-height: 0.8rem; /* reserve space so size buttons stay aligned */
}
.size-option--unavailable .size-premium { opacity: 0.25; }

/* Placement dropdown */
.placement-select {
    width: 100%;
    padding: 0.6rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-family: var(--ui-font);
    font-size: 0.95rem;
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    appearance: auto;
}

.placement-select:focus {
    border-color: var(--accent-color);
    outline: none;
}

/* Print side radio buttons */
.side-options {
    display: flex;
    gap: 0.5rem;
}

.side-option { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; }
.side-option input { display: none; }

.side-label {
    display: block;
    padding: 0.6rem 1.6rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-family: var(--ui-font);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.side-label:hover {
    border-color: var(--accent-color);
}

.side-option input:checked + .side-label {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: #fff;
}

.qty-input {
    width: 90px;
    padding: 0.6rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-family: var(--ui-font);
    font-size: 1rem;
    text-align: center;
}

.product-page__meta {
    font-family: var(--ui-font);
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: 1rem;
}

.product-page__meta p { margin-bottom: 0.5rem; }
.product-page__meta a { font-weight: 500; }

/* === History Bar === */
.history-bar__toggle {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    width: 48px;
    padding: 1rem 0;
    border: none;
    border-radius: 8px 0 0 8px;
    background: var(--accent-color, #8b6f47);
    color: #fff;
    cursor: pointer;
    box-shadow: -2px 2px 8px rgba(0,0,0,0.2);
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.history-bar__toggle:hover {
    background: #6d563a;
}

.history-bar__toggle-icon {
    font-family: Georgia, serif;
    font-weight: bold;
    font-size: 1.4rem;
}

.history-bar__toggle-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-family: var(--ui-font, 'Inter', sans-serif);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.history-bar {
    position: fixed;
    top: 0;
    right: -380px;
    width: 360px;
    height: 100vh;
    z-index: 1001;
    background: var(--bg-card, #fff);
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    transition: right 0.3s ease;
    overflow-y: auto;
}

.history-bar.is-open {
    right: 0;
}

.history-bar__overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.history-bar__overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.history-bar__inner {
    padding: 2rem 1.5rem;
}

.history-bar__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-muted, #999);
    line-height: 1;
    padding: 0.2rem 0.5rem;
}

.history-bar__close:hover {
    color: var(--text-primary, #333);
}

.history-bar__silhouette {
    width: 140px;
    height: 180px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #e8e2d8, #d4cdc0);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.history-bar__silhouette img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    opacity: 0.7;
}

.history-bar__name {
    font-family: var(--heading-font, 'Cinzel', serif);
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.history-bar__dates {
    text-align: center;
    font-family: var(--ui-font, 'Inter', sans-serif);
    font-size: 0.9rem;
    color: var(--text-muted, #888);
    margin-bottom: 1rem;
}

.history-bar__tags {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.history-bar__tags a {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--bg-primary, #f5f2ec);
    border-radius: 20px;
    font-family: var(--ui-font, 'Inter', sans-serif);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary, #555);
    text-decoration: none;
    transition: background 0.2s;
}

.history-bar__tags a:hover {
    background: var(--accent-color, #8b6f47);
    color: #fff;
}

.history-bar__bio {
    border-top: 1px solid var(--border-color, #e0dbd3);
    padding-top: 1.25rem;
    margin-bottom: 1.5rem;
}

.history-bar__bio p {
    font-family: var(--body-font, 'Lora', serif);
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary, #555);
}

.history-bar__bio a {
    color: var(--accent-color, #8b6f47);
    text-decoration: underline;
    text-decoration-color: rgba(139,111,71,0.3);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.2s;
}

.history-bar__bio a:hover {
    text-decoration-color: var(--accent-color, #8b6f47);
}

.history-bar__link {
    display: block;
    text-align: center;
    font-family: var(--ui-font, 'Inter', sans-serif);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--accent-color, #8b6f47);
    text-decoration: none;
    padding: 0.75rem;
    border: 2px solid var(--accent-color, #8b6f47);
    border-radius: var(--radius, 6px);
    transition: all 0.2s;
}

.history-bar__link:hover {
    background: var(--accent-color, #8b6f47);
    color: #fff;
}

/* === Responsive === */
@media (max-width: 768px) {
    .product-page {
        grid-template-columns: 1fr;
    }

    .product-page__mockup {
        position: static;
    }

    .shirt-mockup__quote { font-size: 14px; }

    .history-bar {
        width: 300px;
        right: -320px;
    }
}
