/* Product detail page (single-product.php). Carbon rules: square corners, 1px lines, no shadows. */

.rp-product { overflow-x: clip; }
.rp-product .rp-breadcrumb { padding: var(--s5) var(--gutter) 0; }
.rp-product .rp-breadcrumb span[aria-current] { color: var(--ink); }

/* ---------------------------------------------------------------- first screen */
.rp-pd-hero { padding: var(--s6) 0 var(--s8); }
.rp-pd-hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s7); align-items: start; }
.rp-pd-hero h1 { font-size: clamp(32px, 3.6vw, 48px); margin-bottom: var(--s5); }
.rp-pd-answer { margin-bottom: var(--s6); }
.rp-pd-hero__more { margin: var(--s4) 0 0; font-size: 14px; }

.rp-pd-gallery__main { aspect-ratio: 3 / 2; background: var(--surface-1); }
.rp-pd-gallery__main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.rp-pd-gallery__thumbs { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s2); }
.rp-pd-gallery__thumbs button { display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; border: 1px solid var(--line); background: var(--surface-1); cursor: pointer; border-radius: 0; overflow: hidden; }
.rp-pd-gallery__thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rp-pd-gallery__thumbs button:hover { border-color: var(--ink-subtle); }
.rp-pd-gallery__thumbs button.is-active { border: 2px solid var(--brand); }

.rp-pd-keyspecs { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 var(--s6); }
.rp-pd-keyspecs .rp-keyspec { display: flex; flex-direction: column; padding: var(--s4) var(--s5); }
.rp-pd-keyspecs dd { margin: 0; }
.rp-pd-keyspecs .rp-keyspec__value { font-size: clamp(28px, 3vw, 40px); color: var(--brand); white-space: nowrap; }
.rp-pd-keyspecs .rp-keyspec__label { order: 2; font-size: 14px; letter-spacing: var(--track); }
.rp-pd-hero .rp-actions .rp-btn { min-width: 180px; }

/* ---------------------------------------------------------------- in-page nav */
.rp-pd-nav { position: sticky; top: 0; z-index: 20; background: var(--canvas); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.admin-bar .rp-pd-nav { top: 32px; }
.rp-pd-nav ul { list-style: none; margin: 0; padding: 0; display: flex; overflow-x: auto; scrollbar-width: none; }
.rp-pd-nav ul::-webkit-scrollbar { display: none; }
.rp-pd-nav a { display: block; padding: 14px 20px; font-size: 14px; color: var(--ink-muted); white-space: nowrap; border-bottom: 2px solid transparent; }
.rp-pd-nav li:first-child a { padding-left: 0; }
.rp-pd-nav a:hover { color: var(--ink); border-bottom-color: var(--ink-subtle); }
.rp-pd-nav li:last-child { margin-left: auto; }
.rp-pd-nav li:last-child a { color: var(--brand); }
.rp-product section[id], .rp-product #inquiry { scroll-margin-top: 56px; }

/* ---------------------------------------------------------------- overview */
.rp-pd-overview { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s7); align-items: start; }
.rp-pd-prose { max-width: 720px; }
.rp-pd-prose h3 { font-size: 20px; font-weight: 600; margin: var(--s6) 0 var(--s3); }
.rp-pd-prose ul { margin: 0 0 var(--s4); padding-left: 1.2em; }
.rp-pd-prose li { margin-bottom: var(--s2); }
.rp-pd-aside__media { margin: 0 0 var(--s6); }
.rp-pd-aside__media .rp-media { aspect-ratio: 4 / 3; }
.rp-pd-aside__media figcaption { padding-top: var(--s2); }
.rp-pd-aside__title { font-size: 14px; font-weight: 600; letter-spacing: var(--track); margin-bottom: var(--s3); }
.rp-pd-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.rp-pd-tags .rp-tag { font-size: 14px; padding: 4px 12px; background: var(--surface-1); border: 1px solid var(--surface-1); }

/* ---------------------------------------------------------------- features */
.rp-pd-features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); counter-reset: feat; }
.rp-pd-feature { counter-increment: feat; padding: var(--s5) var(--s5) var(--s6); border-bottom: 1px solid var(--surface-2); background: var(--canvas); }
.rp-pd-feature:not(:nth-child(3n+1)) { border-left: 1px solid var(--surface-2); }
.rp-pd-feature::before { content: counter(feat, decimal-leading-zero); display: block; font-size: 14px; color: var(--brand); margin-bottom: var(--s5); }
.rp-pd-feature h3 { font-size: 18px; font-weight: 600; line-height: 1.35; margin-bottom: var(--s2); }
.rp-pd-feature p { font-size: 14px; color: var(--ink-muted); margin: 0; }

/* ---------------------------------------------------------------- workflow */
.rp-pd-steps { list-style: none; margin: 0; padding: 0; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.rp-pd-steps .rp-step + .rp-step { padding-left: var(--s5); border-left: 1px solid var(--line); }

/* ---------------------------------------------------------------- specs */
.rp-spec { background: var(--canvas); }
.rp-spec .rp-table { min-width: 860px; }
.rp-spec .rp-table th, .rp-spec .rp-table td { white-space: nowrap; }
.rp-spec thead th { text-align: right; }
.rp-spec td { text-align: right; font-variant-numeric: tabular-nums; }
.rp-spec thead th.rp-spec__corner, .rp-spec tbody th { position: sticky; left: 0; z-index: 1; text-align: left; }
.rp-spec thead th.rp-spec__corner { background: var(--surface-2); }
.rp-spec tbody th { background: var(--canvas); color: var(--ink); box-shadow: inset -1px 0 0 var(--line); }
.rp-spec tbody tr:hover th { background: var(--surface-1); }
.rp-spec td.rp-out strong { display: block; font-size: 18px; font-weight: 400; line-height: 1.2; color: var(--ink); }
.rp-spec td.rp-out .rp-unit { display: block; margin-top: 2px; }
.rp-spec tbody tr:nth-child(2) td.rp-out strong { color: var(--brand); }
.rp-pd-subhead { font-size: 20px; margin: var(--s7) 0 var(--s4); }

/* ---------------------------------------------------------------- sample bottles */
.rp-pd-bottles { display: grid; gap: var(--s5); }
.rp-pd-bottles figure { margin: 0; }
.rp-pd-bottles .rp-media { aspect-ratio: 21 / 9; }
.rp-pd-bottles figcaption { padding-top: var(--s2); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1024px) {
	.rp-pd-hero__grid, .rp-pd-overview { grid-template-columns: 1fr; gap: var(--s6); }
	.rp-pd-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rp-pd-feature:not(:nth-child(3n+1)) { border-left: 0; }
	.rp-pd-feature:nth-child(even) { border-left: 1px solid var(--surface-2); }
	.rp-pd-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rp-pd-steps .rp-step + .rp-step { padding-left: 0; border-left: 0; }
	.rp-pd-steps .rp-step:nth-child(even) { padding-left: var(--s5); border-left: 1px solid var(--line); }
	.rp-pd-steps .rp-step:nth-child(n+3) { border-top: 1px solid var(--line); }
	.rp-pd-aside { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); align-items: start; }
	.rp-pd-aside__media { margin: 0; grid-row: span 2; }
}
@media (max-width: 760px) {
	.rp-pd-hero { padding: var(--s5) 0 var(--s7); }
	.rp-pd-gallery__thumbs { gap: var(--s1); }
	.rp-pd-features, .rp-pd-steps { grid-template-columns: 1fr; }
	.rp-pd-feature, .rp-pd-feature:nth-child(even) { border-left: 0; padding: var(--s5) 0; background: transparent; }
	.rp-pd-steps .rp-step, .rp-pd-steps .rp-step:nth-child(even) { padding: var(--s5) 0; border-left: 0; border-top: 1px solid var(--line); }
	.rp-pd-aside { display: block; }
	.rp-pd-aside__media { margin-bottom: var(--s5); }
	.rp-pd-hero .rp-actions { display: grid; grid-template-columns: 1fr; }
	.rp-pd-bottles .rp-media { aspect-ratio: 4 / 3; }
	.rp-pd-nav li:last-child { margin-left: 0; }
	.admin-bar .rp-pd-nav { top: 0; }
	/* Spec table on phones: narrow wrapping label column so model columns get the room */
	.rp-spec .rp-table { min-width: 0; }
	.rp-spec tbody th, .rp-spec thead th.rp-spec__corner { white-space: normal; width: 120px; min-width: 120px; max-width: 120px; font-size: 13px; padding: 12px; }
	.rp-spec td, .rp-spec thead th { padding: 12px; }
	.rp-spec td.rp-out strong { font-size: 16px; }
	/* Phones: one-line breadcrumb (Home / Products / this page…); the full trail stays in BreadcrumbList data */
	.rp-product .rp-breadcrumb ol { flex-wrap: nowrap; }
	.rp-product .rp-breadcrumb li { flex: none; white-space: nowrap; }
	.rp-product .rp-breadcrumb li:nth-child(3), .rp-product .rp-breadcrumb li:nth-child(4) { display: none; }
	.rp-product .rp-breadcrumb li:last-child { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
	body.rp-dark .rp-product .rp-pd-hero { margin-top: -64px; padding-top: 80px; }
}
