/* components/tabs.css
   Product detail tabs and specification rows.

   Part of assets/css/. The load order lives in
   inc/setup.php - add new files there, not with @import. */

/* Stacked and open by default. .is-ready is added by site.js, and only then does this
   turn into tabs - so with no JS the content is all still on the page. */
/* 20px left the soft band's top edge sitting right under the last line of the panel. */
.ptabs { padding-bottom: 88px; }

.ptabs-nav { display: none; }

.ptabs-panel + .ptabs-panel { margin-top: 34px; }

.ptabs-panel-title {
	font-size: 22px;
	font-weight: 700;
	margin-bottom: 14px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--line);
}

.ptabs.is-ready .ptabs-nav {
	display: flex;
	gap: 4px;
	border-bottom: 1px solid var(--line-2);
	overflow-x: auto;
	scrollbar-width: none;
}

.ptabs.is-ready .ptabs-nav::-webkit-scrollbar { display: none; }

.ptabs-tab {
	position: relative;
	flex: none;
	background: none;
	border: 0;
	cursor: pointer;
	padding: 15px 20px;
	font-size: 13.5px;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: var(--ink-3);
	white-space: nowrap;
	transition: color 0.18s ease;
}

.ptabs-tab:hover { color: var(--ink); }

/* Same centre-out red line as the header nav, so the two read as one system. */
/* Full tab width, sitting on the nav's bottom border. Insetting this to the label read
   worse: the tab carries 15px of vertical padding, so a text-width line floats below the
   word instead of underlining the tab. */
.ptabs-tab::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 2px;
	background: var(--red);
	transform: scaleX(0);
	transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.ptabs-tab:hover::after,
.ptabs-tab:focus-visible::after,
.ptabs-tab.is-active::after { transform: scaleX(1); }

.ptabs-tab.is-active { color: var(--ink); font-weight: 600; }

.ptabs-tab:focus-visible { outline: 2px solid var(--blue); outline-offset: -3px; }

.ptabs.is-ready .ptabs-panel { display: none; padding-top: 30px; margin-top: 0; }

.ptabs.is-ready .ptabs-panel.is-active { display: block; }

.ptabs.is-ready .ptabs-panel-title { display: none; }

.spec-block { margin-top: 14px; border-top: 1px solid var(--line); }

.spec-head {
	padding: 22px 0 12px;
	font-size: 12px;
	letter-spacing: 0.18em;
	font-weight: 600;
	color: var(--navy);
	display: block;
}

.spec-row {
	display: grid;
	grid-template-columns: 210px 1fr;
	gap: 20px;
	padding: 13px 0;
	border-bottom: 1px solid #EEF0F5;
}

.spec-k { font-size: 13.5px; font-weight: 300; color: var(--ink-3); }

.spec-v { font-size: 13.5px; font-weight: 500; color: var(--ink); }

@media (max-width: 680px) {
	/* Tighter tabs so more than two headings fit before the row has to be scrolled. */
	.ptabs-tab { padding: 13px 14px; font-size: 13px; }

	.ptabs.is-ready .ptabs-panel { padding-top: 24px; }
}

@media (max-width: 980px) {
	/* The tab panel only ever scaled at 680px, so on a tablet it kept the desktop 88px
		   and sat 144px above "Related products". */
	.ptabs { padding-bottom: 56px; }
}

@media (max-width: 680px) {
	.spec-row { grid-template-columns: 1fr; gap: 4px; }

	.ptabs { padding-bottom: 44px; }
}
