/* Product page styles */
.product-page {
    padding: 2rem 0 4rem;
    min-height: 60vh;
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.breadcrumb a {
    color: var(--accent);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .sep {
    margin: 0 0.5rem;
    color: var(--border);
}

.breadcrumb .product-name-one-line {
    white-space: nowrap;
    font-size: clamp(0.82rem, 2vw, 0.9rem);
}

.product-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 3rem;
    max-width: 100%;
    margin: 0 auto;
}

.product-page:not(.refill-page) .product-layout {
    max-width: min(100%, 960px);
}

.product-page:not(.refill-page) .container {
    max-width: 1040px;
}

.product-page.refill-page .container {
    max-width: 800px;
}

@media (max-width: 960px) {
    .product-page .product-layout,
    .product-detail .product-layout {
        gap: 2rem;
    }

    .product-page .product-gallery .store-product-carousel,
    .product-page .product-gallery .refill-product-carousel {
        margin-bottom: 0.5rem;
        padding-bottom: 0.25rem;
    }

    .product-page .product-main-image {
        overflow: visible;
    }

    .product-page .product-info {
        margin-top: 0.75rem;
        padding-top: 1.35rem;
    }

    .product-page .breadcrumb {
        margin-bottom: 1.25rem;
    }
}

/* Product page layout: gallery centered on top, info below */
.product-detail .product-layout,
.product-page .product-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-detail .product-gallery,
.product-page .product-gallery {
    order: 1;
    position: static;
    width: 100%;
    max-width: 900px;
    margin: 0 auto 32px auto;
}

.product-detail .product-info,
.product-page .product-info,
.product-detail .product-content,
.product-page .product-content {
    order: 2;
    width: 100%;
    max-width: 720px;
    text-align: right;
}

/* Gallery images: large, clean, no white frame */
.product-detail .product-gallery img,
.product-page .product-gallery img,
.product-gallery img {
    width: 100%;
    height: auto;
    max-height: 650px;
    object-fit: contain;
    border: none;
    background: transparent;
    box-shadow: none;
}

@media (max-width: 768px) {
    .product-detail .product-gallery,
    .product-page .product-gallery {
        width: 100%;
        max-width: 100%;
        margin-bottom: 24px;
    }

    .product-detail .product-gallery img,
    .product-page .product-gallery img,
    .product-gallery img {
        width: 100%;
        height: auto;
        max-height: none;
    }

    .product-detail .product-info,
    .product-page .product-info,
    .product-detail .product-content,
    .product-page .product-content {
        width: 100%;
        padding: 0 16px;
    }
}

.product-main-image {
    position: relative;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    margin-bottom: 2rem;
}

.product-main-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
    background: transparent;
}

/* Refill product images: natural proportions, no white frame */
.product-page.refill-page .product-main-image {
    max-width: 100%;
    aspect-ratio: auto;
}

.product-page.refill-page .product-main-image img {
    width: 100%;
    height: auto;
    max-height: min(650px, 72vh);
    object-fit: contain;
    object-position: center;
    display: block;
    padding: 0;
    background: transparent;
}

/* Product gallery carousel: see refill-product-carousel.css (shared store-product-carousel) */

.product-gallery .store-product-carousel {
  margin-bottom: 1.5rem;
}

.product-breakdown {
  margin-top: 0.5rem;
}

@media (max-width: 960px) {
    .product-page .product-gallery .product-breakdown {
        margin-top: 1.5rem;
        padding-top: 0.35rem;
    }
}

.product-main-image .badge {
    position: absolute;
    top: 1rem;
    inset-inline-start: 1rem;
    inset-inline-end: auto;
    background: var(--accent);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.product-breakdown {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.product-breakdown h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.product-breakdown__intro {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text);
}

.product-breakdown__closing {
    margin: 1rem 0 0;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-muted);
}

.product-breakdown img {
    width: 100%;
    height: auto;
    border-radius: 0;
    margin-bottom: 1rem;
    object-fit: contain;
    object-position: center;
    background: transparent;
    display: block;
}

.component-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.component-list li {
    padding: 0.5rem 0;
    padding-right: 1.5rem;
    position: relative;
    font-size: 0.95rem;
}

.component-list li::before {
    content: "•";
    position: absolute;
    right: 0;
    color: var(--accent);
}

.product-info h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.product-name-heading {
    line-height: 1.3;
}

.product-name-one-line {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
}

.product-name-heading .product-name-one-line {
    font-size: clamp(1.05rem, 2.6vw, 1.65rem);
}

.product-page .product-name-heading .product-name-one-line,
.product-page .breadcrumb .product-name-one-line {
    white-space: nowrap;
}

@media (max-width: 380px) {
    .product-page .product-name-heading .product-name-one-line,
    .product-page .breadcrumb .product-name-one-line {
        white-space: nowrap;
        font-size: clamp(0.85rem, 3.5vw, 1.05rem);
    }
}

.product-tagline {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.product-description {
    margin-bottom: 2rem;
}

.product-description p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.product-description .highlight {
    background: rgba(92, 124, 92, 0.12);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border-right: 4px solid var(--accent);
}

.parent-workbook-section {
    background: var(--cream);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.parent-workbook-section h3 {
    font-size: 1.15rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.parent-workbook-section ul {
    margin: 0.75rem 0 1rem 1.5rem;
}

.parent-workbook-section li {
    margin-bottom: 0.5rem;
}

.product-purchase {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.product-purchase .product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.purchase-option-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.purchase-option-note {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.product-purchase-premium {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px dashed var(--accent);
    background: rgba(92, 124, 92, 0.05);
    border-radius: 8px;
    padding: 1.25rem;
}

.product-price-premium {
    color: var(--accent) !important;
}

.product-purchase .product-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.product-purchase .btn {
    padding: 12px 24px;
}

/* Refill product page - simpler layout */
.product-page.refill-page .product-breakdown {
    display: none;
}

.product-page.refill-page .product-main-image .badge {
    display: none;
}

.product-options {
    margin-bottom: 1rem;
}

.product-options label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.product-select {
    width: 100%;
    max-width: 320px;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}

/* Refill badge wrapper — corner tag over carousel / image */
.product-main-image--refill-badge {
    position: relative;
}

.product-page.refill-page .product-main-image--refill-badge .refill-badge {
    top: 10px;
    inset-inline-start: 10px;
    inset-inline-end: auto;
}

/* refill-badge: global styles in styles.css */

/* Full kit standard — title + links, then carousel right / text left (RTL), purchase below */
.product-page--full-kit-standard .container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    max-width: 1100px;
}

.product-page--full-kit-standard .breadcrumb {
    width: 100%;
    margin-bottom: 1.25rem;
}

.product-page--full-kit-standard .product-hero-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0;
}

.product-page--full-kit-standard .product-page-intro {
    width: 100%;
    margin-bottom: 1.5rem;
    text-align: start;
}

.product-page--full-kit-standard .product-page-intro .product-name-heading {
    margin-bottom: 0.5rem;
}

.product-page--full-kit-standard .product-page-intro .product-section-links--text {
    justify-content: flex-start;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.product-page--full-kit-standard .product-hero-split {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
    width: 100%;
}

.product-page--full-kit-standard .product-hero-split .product-page-header {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    max-width: 650px;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.product-page--full-kit-standard .product-breakdown--hero-col {
    flex: 0 0 400px;
    width: 400px;
    max-width: 400px;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.product-page--full-kit-standard .product-purchase-block {
    width: 100%;
    margin-top: 2rem;
}

.product-page--full-kit-standard .product-page-header .store-product-carousel {
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.product-page--full-kit-standard .product-page-header .store-product-carousel__frame {
    margin-bottom: 0.35rem;
    position: relative;
}

.product-page--full-kit-standard .product-page-header .store-product-carousel__viewport {
    width: 650px;
    max-width: 100%;
    height: 360px;
    max-height: min(360px, 56vw);
    aspect-ratio: 650 / 360;
    min-height: 0;
    margin: 0 auto;
}

.product-page--full-kit-standard .product-page-header .store-product-carousel__slide {
    padding-inline: 2.75rem;
}

.product-page--full-kit-standard .product-page-header .store-product-carousel__slide img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    border: none;
    background: transparent;
    box-shadow: none;
}

.product-page--full-kit-standard .product-page-header .store-product-carousel__nav {
    opacity: 1;
    z-index: 3;
}

.product-page--full-kit-standard .product-page-header .store-product-carousel__nav--prev {
    inset-inline-end: 0;
}

.product-page--full-kit-standard .product-page-header .store-product-carousel__nav--next {
    inset-inline-start: 0;
}

.product-page--full-kit-standard .product-page-header .store-product-carousel__caption {
    margin-top: 0.35rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.product-page--full-kit-standard .product-page-header .store-product-carousel__dots {
    padding-bottom: 0.25rem;
    margin-bottom: 0;
    justify-content: center;
}

.product-page--full-kit-standard .product-gallery {
    display: none;
}

@media (max-width: 960px) {
    .product-page--full-kit-standard .product-hero-split {
        flex-direction: column;
        gap: 1.75rem;
    }

    .product-page--full-kit-standard .product-hero-split .product-page-header {
        flex: none;
        width: 100%;
        max-width: 100%;
        order: 1;
    }

    .product-page--full-kit-standard .product-breakdown--hero-col {
        flex: none;
        width: 100%;
        max-width: 100%;
        order: 2;
    }

    .product-page--full-kit-standard .product-hero-split .product-page-header .store-product-carousel__viewport {
        width: 100%;
        max-width: 650px;
        height: auto;
        max-height: min(calc(100vw * 360 / 650), 56vh);
        aspect-ratio: 650 / 360;
        min-height: 0;
    }
}

@media (max-width: 768px) {
    .product-page--full-kit-standard .product-hero-split .product-page-header {
        max-width: 100%;
    }

    .product-page--full-kit-standard .product-hero-split .product-page-header .store-product-carousel__viewport {
        width: 100%;
        height: auto;
        max-height: min(calc(100vw * 360 / 650), 56vh);
        aspect-ratio: 650 / 360;
    }

    .product-page--full-kit-standard .product-hero-split .product-page-header .store-product-carousel__slide {
        padding-inline: 2.25rem;
    }
}

/* Product page section links — simple text links */
.product-section-links--text {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.5rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.product-section-links--text a {
    color: var(--accent, #c45c26);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.product-section-links--text a:hover {
    color: var(--primary, #2d5a4a);
}

.product-section-links--text .product-section-links__sep {
    color: var(--text-muted, #888);
    font-weight: 400;
    user-select: none;
}
