/* === 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: 2rem;
}

.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;
}

/* 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 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;
    }
}
