/* Product Page Styles - Matching Live Site */

/* Breadcrumb */
.breadcrumb {
    background-color: var(--color-bg);
    padding: var(--space-md) 0;
    font-size: 0.9rem;
}

.breadcrumb .container {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.breadcrumb a {
    color: var(--color-text-muted);
    transition: color var(--transition);
}

.breadcrumb a:hover {
    color: var(--color-green);
}

.breadcrumb span {
    color: var(--color-text-muted);
}

.breadcrumb span:last-child {
    color: var(--color-text);
}

/* Prev/Next Navigation */
.product-nav {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    font-size: 0.85rem;
}

.product-nav a {
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color var(--transition);
}

.product-nav a:hover {
    color: var(--color-green);
}

/* Product Page Layout */
.product-page {
    padding: var(--space-xl) 0 var(--space-3xl);
    background-color: var(--color-bg);
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: start;
}

/* Product Gallery */
.product-gallery {
    position: sticky;
    top: calc(var(--header-height) + var(--space-lg));
}

.main-image {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--color-bg-white);
    margin-bottom: var(--space-md);
    border: 1px solid var(--color-border-light);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product videos (2026-11-20): in the main spot, a silent loop; the whole
   frame shows (contain). */
.main-image { position: relative; }
.main-image .product-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--color-bg-white);
    display: block;
}
.main-image .product-video[hidden],
.main-image img[hidden] { display: none; }
.video-sound {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}
.video-sound[hidden] { display: none; }
.thumbnail-video { position: relative; }
.thumbnail-video .thumb-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
    background: rgba(0, 0, 0, 0.18);
}
.thumb-video-blank { display: block; width: 100%; height: 100%; background: #222; }

.thumbnail-grid {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.thumbnail {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    transition: border-color var(--transition);
    background: var(--color-bg-white);
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--color-purple);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Details */
.product-details {
    padding-top: var(--space-sm);
}

.product-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
    line-height: 1.3;
}

.product-reviews-link {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
    display: block;
}

.product-reviews-link a {
    color: var(--color-purple-light);
    text-decoration: underline;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.compare-price {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.compare-price s {
    margin-right: var(--space-sm);
}

.compare-price .discount {
    color: var(--color-red);
    font-weight: 600;
}

.stock-status {
    font-size: 0.85rem;
    margin-bottom: var(--space-lg);
    font-weight: 500;
}

.stock-status.in-stock {
    color: var(--color-green);
}

.stock-status.out-of-stock {
    color: var(--color-red);
}

.stock-status.low-stock {
    color: var(--color-red);
}

/* Pre-order (js/product-choices.js): her message, in a warm amber. */
.stock-status.pre-order {
    color: #9a6b1f;
}

.product-description {
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-border-light);
    font-size: 0.95rem;
}

.product-description p {
    margin-bottom: var(--space-md);
}

/* Variants - Size Pills */
.product-variants {
    margin-bottom: var(--space-lg);
}

.product-variants label,
.variant-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.product-variants select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    background-color: var(--color-bg-white);
}

.size-pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.size-pill {
    padding: 10px 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--color-bg-white);
    color: var(--color-text);
}

.size-pill:hover {
    border-color: var(--color-text);
}

.size-pill.active {
    background-color: var(--color-text);
    color: white;
    border-color: var(--color-text);
}

.size-pill.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.size-pill.disabled:hover {
    border-color: var(--color-border);
}

.variant-label .variant-selected {
    font-weight: 400;
    color: var(--color-text-muted);
    margin-left: var(--space-sm);
}

.btn-buy-now:disabled,
.btn-buy-now:disabled:hover {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: var(--color-purple);
}

/* Color Swatches */
.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    cursor: pointer;
    padding: 0;
    transition: all var(--transition);
    position: relative;
}

.color-swatch:hover,
.color-swatch.active {
    border-color: var(--color-text);
    box-shadow: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-text);
}

/* Quantity Selector */
.quantity-selector {
    margin-bottom: var(--space-lg);
}

.quantity-selector label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
}

.qty-controls {
    display: flex;
    align-items: center;
    width: fit-content;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

.qty-controls button {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    color: var(--color-text);
    background-color: var(--color-bg-white);
    transition: background-color var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-controls button:hover {
    background-color: var(--color-bg);
}

.qty-controls button:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    border-right: 1px solid var(--color-border);
}

.qty-controls button:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    border-left: 1px solid var(--color-border);
}

.qty-controls input {
    width: 60px;
    height: 44px;
    text-align: center;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    background: var(--color-bg-white);
    -moz-appearance: textfield;
}

.qty-controls input::-webkit-outer-spin-button,
.qty-controls input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Action Buttons */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.btn-add-to-cart {
    width: 100%;
    padding: 14px var(--space-xl);
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid var(--color-text);
    background: transparent;
    color: var(--color-text);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.02em;
}

.btn-add-to-cart:hover {
    background: var(--color-text);
    color: white;
}

.btn-add-to-cart:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-buy-now {
    width: 100%;
    padding: 14px var(--space-xl);
    font-size: 1rem;
    font-weight: 600;
    background-color: var(--color-purple);
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.02em;
}

.btn-buy-now:hover {
    background-color: var(--color-purple-light);
}

/* Product Tabs */
.product-tabs {
    margin-top: var(--space-xl);
    border-top: 1px solid var(--color-border-light);
}

.product-tabs .tab-headers {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--color-border-light);
}

.product-tabs .tab-header {
    padding: var(--space-md) var(--space-xl);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
    background: none;
}

.product-tabs .tab-header:hover,
.product-tabs .tab-header.active {
    color: var(--color-text);
    border-bottom-color: var(--color-text);
}

.product-tabs .tab-content {
    padding: var(--space-lg) 0;
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.8;
    display: none;
}

.product-tabs .tab-content.active {
    display: block;
}

/* Product Meta */
.product-sku {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

.product-categories {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.product-categories a {
    color: var(--color-green);
}

.product-categories a:hover {
    text-decoration: underline;
}

/* Error Message */
.error-message {
    text-align: center;
    padding: var(--space-3xl);
    grid-column: 1 / -1;
}

.error-message h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

.error-message p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

/* Related Products */
.related-products {
    background-color: var(--color-bg);
    padding-bottom: var(--space-3xl);
}

/* Responsive */
@media (max-width: 900px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .product-gallery {
        position: static;
    }

    .product-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .thumbnail-grid {
        gap: var(--space-xs);
    }

    .thumbnail {
        width: 56px;
        height: 56px;
    }

    .product-title {
        font-size: 1.3rem;
    }

    .product-price {
        font-size: 1.25rem;
    }

    .size-pill {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .product-actions {
        position: sticky;
        bottom: 0;
        background: var(--color-bg);
        padding: var(--space-md) 0;
        z-index: 10;
    }
}

/* Option rows (Johanna, 2026-11-08, as on Wix): one row per option, Sizes
   as pills, Colors as round swatches. A choice that cannot go with the
   others is faded and crossed; choosing it moves them. */
.option-row { margin-bottom: var(--space-lg); }
.option-row:last-child { margin-bottom: 0; }
.option-required { font-weight: 400; color: var(--color-text-muted); }
.option-chosen { font-weight: 400; color: var(--color-text-muted); margin-left: 6px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
    position: relative;
    width: 34px;
    height: 34px;
    padding: 3px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-bg-white);
    cursor: pointer;
    transition: border-color var(--transition);
}
.swatch-dot {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--swatch, #cccccc);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.swatch:hover { border-color: var(--color-text-muted); }
.swatch.active { border: 2px solid var(--color-text); padding: 2px; }
.swatch:focus-visible, .size-pill:focus-visible { outline: 2px solid var(--color-purple); outline-offset: 2px; }
.swatch.unavailable .swatch-dot { opacity: 0.35; }
.swatch.unavailable::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 3px;
    bottom: 3px;
    width: 1.5px;
    background: var(--color-text-muted);
    transform: rotate(45deg);
}
.size-pill.unavailable { opacity: 0.45; text-decoration: line-through; }

/* The gallery as on Wix: thumbnails down the left of the main picture on
   wide screens (they scroll when there are many); under it on phones. */
@media (min-width: 901px) {
    .product-gallery.has-thumbs {
        display: grid;
        grid-template-columns: 72px minmax(0, 1fr);
        gap: var(--space-md);
        align-items: stretch;
    }
    .product-gallery.has-thumbs .main-image { grid-column: 2; grid-row: 1; margin-bottom: 0; }
    .product-gallery.has-thumbs .thumbnail-grid {
        grid-column: 1;
        grid-row: 1;
        flex-direction: column;
        flex-wrap: nowrap;
        height: 0;
        min-height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
        scrollbar-width: thin;
    }
    .product-gallery.has-thumbs .thumbnail { flex: none; width: 100%; height: auto; aspect-ratio: 1; }
}
