/**
 * Product gallery, summary hierarchy and responsive purchase layout.
 */

.myc-view-product .myc-product-page {
	max-width: var(--ps-content-discovery);
	padding-top: var(--ps-space-5);
}

body.myc-layout-full.myc-view-product .myc-product-page {
	max-width: none;
}

/*
 * The product view is a flex-column shell. Give that shell an explicit inline
 * size on touch layouts, rather than relying on its automatic flex size: iOS
 * could retain the width from a child while the sticky header was shrinking,
 * leaving the header and the document on different horizontal origins.
 */
@media (max-width: 1080px) {
	body.myc-view-product,
	body.myc-view-product #page,
	body.myc-view-product .myc-app-shell,
	body.myc-view-product .myc-virtual-page,
	body.myc-view-product .myc-topbar {
		inline-size: 100%;
		max-inline-size: 100%;
		min-inline-size: 0;
	}

	body.myc-view-product .myc-topbar {
		inset-inline: 0;
	}
}

.myc-product-breadcrumb {
	margin-bottom: var(--ps-space-5);
}

.myc-product-breadcrumb a:hover,
.myc-product-breadcrumb a:focus-visible {
	color: var(--ps-color-brand-700);
}

.myc-product-layout {
	gap: clamp(var(--ps-space-6), 5vw, var(--ps-space-8));
}

/*
 * A product photo is delivered with its intrinsic dimensions. In a one-column
 * grid that intrinsic width can otherwise become the grid item's automatic
 * minimum, widening the document on iOS after the image has loaded. Keep the
 * gallery's grid track shrinkable instead: the image is already sized by the
 * gallery, so it must never be allowed to size the page itself.
 */
.myc-product-layout > *,
.myc-product-gallery,
.myc-product-gallery-viewport,
.myc-product-image-grid {
	min-width: 0;
}

.myc-product-gallery-viewport,
.myc-product-image-grid,
.myc-product-thumb picture,
.myc-product-thumb img {
	max-width: 100%;
}

.myc-product-thumb picture {
	display: block;
}

@media (min-width: 1081px) {
	/* Give the product summary a little more room on constrained layouts. */
	body.myc-layout-contained .myc-product-layout,
	body.myc-layout-wide .myc-product-layout {
		grid-template-columns: minmax(0, 1.1fr) minmax(380px, .9fr);
	}
}

.myc-product-gallery {
	gap: var(--ps-space-3);
}

.myc-product-image-grid {
	gap: var(--ps-space-3);
	transition: opacity var(--ps-transition-fast);
}

/*
 * A four-image gallery configured as one desktop column follows an editorial
 * rhythm: feature image, two-image row, then one final feature image. The
 * image-count guard keeps galleries with another count on the conventional
 * single-column layout.
 */
@media (min-width: 1081px) {
	.myc-product-image-grid[data-myc-gallery-desktop-columns="1"][data-myc-gallery-image-count="4"] {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.myc-product-image-grid[data-myc-gallery-desktop-columns="1"][data-myc-gallery-image-count="4"] .myc-product-thumb:first-child,
	.myc-product-image-grid[data-myc-gallery-desktop-columns="1"][data-myc-gallery-image-count="4"] .myc-product-thumb:nth-child(4) {
		grid-column: 1 / -1;
	}
}

/*
 * The leading image remains full width on touch layouts. Build the remaining
 * thumbnails on a 12-unit track so an incomplete final row can share the
 * available width evenly without changing the configured 2/3/4-column rhythm.
 */
/* Keep the mobile gallery composition through tablet. */
@media (max-width: 1080px) {
	.myc-product-image-grid {
		grid-template-columns: repeat(12, minmax(0, 1fr));
	}

	.myc-product-image-grid .myc-product-thumb:not(:first-child) {
		grid-column: span var(--myc-product-gallery-mobile-span);
	}

	.myc-product-image-grid[data-myc-gallery-mobile-tail="1"] .myc-product-thumb:last-child {
		grid-column: span 12;
	}

	.myc-product-image-grid[data-myc-gallery-mobile-tail="2"] .myc-product-thumb:nth-last-child(-n + 2) {
		grid-column: span 6;
	}

	.myc-product-image-grid[data-myc-gallery-mobile-tail="3"] .myc-product-thumb:nth-last-child(-n + 3) {
		grid-column: span 4;
	}
}

.myc-product-thumb,
.myc-product-thumb-placeholder {
	border-color: var(--ps-color-border);
	border-radius: var(--ps-radius-lg);
	background: var(--ps-color-surface-muted);
}

.myc-product-thumb {
	-webkit-tap-highlight-color: transparent;
}

/*
 * The discount badge over the first photo. `.myc-product-thumb` is already the
 * positioning context — it has to be, the «Ver foto» overlay sits in it too —
 * and the z-index puts this above that overlay, which covers the whole tile on
 * hover.
 *
 * The same navy and the same shape as the badge on the catalogue cards, a size
 * up: here it sits on a photo several times larger.
 */
.myc-product-flag {
	position: absolute;
	top: var(--ps-space-3);
	left: var(--ps-space-3);
	z-index: 2;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 28px;
	padding: 0 11px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 850;
	letter-spacing: .05em;
	text-transform: uppercase;
	font-variant-numeric: tabular-nums;
	pointer-events: none;
}

.myc-product-flag--sale {
	background: var(--ps-color-brand-700);
	color: #fff;
}

@media (max-width: 1080px) {
	.myc-product-flag {
		top: var(--ps-space-2);
		left: var(--ps-space-2);
		min-height: 24px;
		padding: 0 9px;
		font-size: 11px;
	}
}

.myc-product-thumb:focus-visible {
	border-color: var(--ps-color-brand-600);
	outline: none;
	box-shadow: var(--ps-shadow-focus);
}

.myc-product-thumb::after {
	background: linear-gradient(180deg, transparent 52%, rgb(15 12 13 / 72%) 100%);
}

/*
 * The «Ver foto» overlay, restated in this sheet's colours. `:not()` for the
 * same reason as in frontend.css: the discount badge is a span in that link
 * too, and this rule's right, bottom and solid ink — on top of the badge's own
 * top and left — anchored it on all four sides and spread it over the photo.
 */
.myc-product-thumb span:not(.myc-product-flag) {
	right: var(--ps-space-2);
	bottom: var(--ps-space-2);
	border-radius: var(--ps-radius-sm);
	background: var(--ps-color-ink-strong);
}

/* Same soft, dark-neutral shadow the catalog cards lift into on hover
   (rgb(20 22 31 / 9%)), but at rest rather than on interaction: lower
   opacity and a wider blur so it reads as ambient depth, not a lift. */
.myc-product-summary {
	padding: clamp(var(--ps-space-5), 3vw, var(--ps-space-6));
	border-color: var(--ps-color-border);
	border-radius: var(--ps-radius-lg);
	background: var(--ps-color-surface);
	box-shadow: 0 12px 48px rgb(20 22 31 / 6%);
}

/*
 * The notes are the last thing in this card, so the space under them is not a
 * margin of theirs — it is the card's own padding, which on a phone clamps to
 * a smaller value than the step above them and left the block nearer the
 * bottom edge than the top.
 *
 * Pinned at one value rather than left to the clamp, and equal to the step
 * above them, so the pair sits evenly between the buy buttons and the bottom
 * edge.
 *
 * Only when the notes are there: without them the card closes on the buy
 * buttons, which want the ordinary padding.
 */
.myc-product-summary:has(.myc-product-notes) {
	padding-bottom: calc(var(--ps-space-5) + var(--ps-space-3));
}

.myc-product-cats {
	display: flex;
	align-items: center;
	gap: var(--ps-space-2);
	/*
	 * The title is the biggest thing on the page and the chips above it are the
	 * smallest. Sixteen pixels between the two read as a caption stuck to a
	 * headline; the title needs room to be the first thing the eye lands on.
	 */
	margin-bottom: var(--ps-space-6);
}

.myc-product-categories,
.myc-product-tags {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ps-space-2);
}

.myc-product-categories a {
	border-color: var(--ps-color-brand-border);
	border-radius: var(--ps-radius-sm);
	background: var(--ps-color-brand-50);
	color: var(--ps-color-brand-700);
}

.myc-product-categories a:hover,
.myc-product-categories a:focus-visible {
	border-color: var(--ps-color-brand-600);
	background: var(--ps-color-brand-100);
}

.myc-product-cats .myc-product-tags a {
	border-color: var(--ps-color-border);
	border-radius: var(--ps-radius-sm);
	background: var(--ps-color-surface-subtle);
	color: var(--ps-color-text-muted);
}

.myc-product-cats .myc-product-tags a:hover {
	border-color: var(--ps-color-text-muted);
	background: var(--ps-color-surface-muted);
	color: var(--ps-color-text);
}

.myc-product-cats .myc-product-tags a:focus-visible {
	border-color: var(--ps-color-brand-border);
	background: var(--ps-color-brand-50);
	color: var(--ps-color-brand-700);
}

/*
 * The reference closes the row from the far right. `margin-inline-start: auto`
 * rather than `justify-content: space-between` on the row: the categories and
 * the tags are two separate groups, and spreading the row would push those
 * apart from each other as well.
 *
 * The geometry is restated here because the row's own rule dresses `a`, and
 * this is a span — a reference is not a link, it leads nowhere.
 */
.myc-product-reference {
	display: inline-flex;
	align-items: center;
	min-height: 30px;
	margin-inline-start: auto;
	padding: 0 10px;
	border: 1px solid var(--ps-color-border);
	border-radius: var(--ps-radius-sm);
	background: var(--ps-color-surface-subtle);
	color: var(--ps-color-text-muted);
	font-size: 11px;
	font-weight: 850;
	letter-spacing: .08em;
	text-transform: uppercase;
	white-space: nowrap;
}

.myc-product-summary h1 {
	margin-bottom: var(--ps-space-6);
	font-family: var(--ps-font-display);
	font-size: clamp(38px, 3.75vw, 54px);
	/*
	 * Oswald runs narrower and taller than the body sans, so the tracking it
	 * ships with reads tight at this size and a line-height of exactly 1 clips
	 * its ascenders. Set in capitals it needs more room still: capitals have no
	 * ascenders or descenders to separate one letter from the next, and a
	 * condensed face without that help closes up into a block.
	 *
	 * The transform is CSS, not the product name. The title in the database
	 * keeps its own case, which is what the tab, the search results and a
	 * screen reader use.
	 */
	letter-spacing: .02em;
	line-height: 1.06;
	text-transform: uppercase;
}

.myc-product-price {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: var(--ps-space-3);
	/* The title owns the space under it now, so this one would double it. */
	margin-top: 0;
	color: var(--ps-color-brand-700);
	font-size: clamp(28px, 3vw, 40px);
	font-variant-numeric: tabular-nums;
}

/*
 * A fixed size, not one relative to the price: this was calc(1em - 4px),
 * which against a 40px price still rendered at 36px and read as part of the
 * amount rather than a footnote to it. It shares the price's baseline — see
 * align-items above — rather than its box's bottom edge, which sat the
 * suffix lower than the digits by the height of the price's descender space.
 */
.myc-product-price-suffix {
	color: var(--ps-color-text-muted);
	font-size: 14px;
	font-weight: 650;
}

/* WooCommerce wraps the suffix in <small>, which would shrink it a second
   time on top of the size set above. */
.myc-product-price-suffix small {
	font-size: inherit;
}

.myc-product-meta {
	margin: var(--ps-space-5) 0 var(--ps-space-5);
	display: grid;
	gap: var(--ps-space-2);
}

.myc-product-meta-badges {
	display: grid;
	grid-template-columns: repeat(3, max-content);
	gap: var(--ps-space-2);
}

.myc-product-meta .myc-product-stock,
.myc-product-meta .myc-product-shipping,
.myc-product-meta .myc-product-delivery {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 0 var(--ps-space-3);
	border: 1px solid var(--ps-color-summary-border);
	border-radius: var(--ps-radius-sm);
	background: var(--ps-color-summary-fill);
	font-size: 12px;
	font-weight: 800;
}

.myc-product-meta .myc-product-stock.is-in-stock {
	border-color: #c8e6d2;
	background: #eef8f1;
	color: var(--ps-color-success);
}

/* Red, and the mirror of the green above it: a soft fill, a soft border and
   the strong colour reserved for the word itself. */
.myc-product-meta .myc-product-stock.is-out-of-stock {
	border-color: #f0c9c9;
	background: var(--ps-color-danger-soft);
	color: var(--ps-color-danger);
}

.myc-product-short {
	margin-bottom: var(--ps-space-5);
	color: var(--ps-color-text-muted);
}

/* The brand navy, so links in the copy read as ours and not as the
   user agent's default blue. */
.myc-product-short a {
	color: var(--ps-color-brand-600);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color var(--ps-transition-fast);
}

.myc-product-short a:hover,
.myc-product-short a:focus-visible {
	color: var(--ps-color-brand-800);
}

.myc-product-purchase {
	padding-top: var(--ps-space-5);
	border-top-color: var(--ps-color-border);
}

.myc-product-notes {
	gap: var(--ps-space-2);
	/*
	 * The same step the sizes leave above the buy buttons, so the column has
	 * one rhythm and not two. That step is not a single value: `form.cart` is a
	 * flex container with a 12px gap and the buttons sit in the next flex item,
	 * so the space up there is the last size row's 24px margin plus that gap.
	 * These notes are outside the form, with no gap to inherit, so the whole
	 * 24 + 12 has to be asked for here.
	 */
	margin-top: calc(var(--ps-space-5) + var(--ps-space-3));
}

.myc-product-notes div {
	padding: var(--ps-space-3) var(--ps-space-4);
	border: 0;
	border-left: 2px solid var(--ps-color-brand-600);
	border-radius: 0 var(--ps-radius-sm) var(--ps-radius-sm) 0;
	background: var(--ps-color-surface-subtle);
}

.myc-product-tabs {
	border-color: var(--ps-color-border);
	border-radius: var(--ps-radius-lg);
	box-shadow: none;
}

@media (min-width: 1200px) {
	.myc-product-meta .myc-product-stock,
	.myc-product-meta .myc-product-shipping,
	.myc-product-meta .myc-product-delivery {
		min-height: 36px;
		padding-inline: var(--ps-space-4);
		font-size: 13px;
	}
}

.myc-product-tabs-nav {
	background: var(--ps-color-surface-subtle);
}

.myc-product-tab-button.is-active {
	border-color: var(--ps-color-brand-border);
	background: var(--ps-color-brand-50);
	color: var(--ps-color-brand-700);
	box-shadow: none;
}

/*
 * The tab strip, and the accordion it becomes on a phone or a tablet.
 *
 * Three sections of prose behind three words is a lot to ask a visitor to
 * guess at, so each tab carries a mark: a ruler for the sizing, a returning
 * arrow for the returns, a sheet for the description. The titles are the
 * shopkeeper's own words, so `soto_catalog_get_product_tab_icon()` reads
 * them and every title it does not recognise still gets the information mark —
 * a row missing its tile would break the column the tiles line up on.
 *
 * The glyphs are masks painted in `currentcolor`, like the rest of the theme's
 * line icons, so a tab that turns navy takes its mark with it and no state
 * needs a second rule.
 */
.myc-product-tab-button {
	display: inline-flex;
	align-items: center;
	gap: 9px;
}

.myc-product-tab-button-icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 17px;
	height: 17px;
	transition: border-color var(--ps-transition-fast), background-color var(--ps-transition-fast);
}

.myc-product-tab-button-icon::before {
	width: 17px;
	height: 17px;
	background-color: currentcolor;
	content: "";
	transition: background-color var(--ps-transition-fast);
}

.myc-product-tab-button--sizes .myc-product-tab-button-icon::before {
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='7' width='19' height='10' rx='2'/%3E%3Cpath d='M6.6 7v3.4M10.4 7v4.8M14.2 7v3.4M18 7v4.8'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='7' width='19' height='10' rx='2'/%3E%3Cpath d='M6.6 7v3.4M10.4 7v4.8M14.2 7v3.4M18 7v4.8'/%3E%3C/svg%3E") center / contain no-repeat;
}

.myc-product-tab-button--returns .myc-product-tab-button-icon::before {
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.4 12a8.4 8.4 0 1 1-2.5-6'/%3E%3Cpath d='M20.4 3.4V9h-5.6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.4 12a8.4 8.4 0 1 1-2.5-6'/%3E%3Cpath d='M20.4 3.4V9h-5.6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.myc-product-tab-button--shipping .myc-product-tab-button-icon::before {
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.6 6.4h10.9v9H2.6z'/%3E%3Cpath d='M13.5 9.4h3.8l3.1 3.2v2.8h-6.9z'/%3E%3Ccircle cx='7' cy='17.6' r='1.7'/%3E%3Ccircle cx='17' cy='17.6' r='1.7'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.6 6.4h10.9v9H2.6z'/%3E%3Cpath d='M13.5 9.4h3.8l3.1 3.2v2.8h-6.9z'/%3E%3Ccircle cx='7' cy='17.6' r='1.7'/%3E%3Ccircle cx='17' cy='17.6' r='1.7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.myc-product-tab-button--care .myc-product-tab-button-icon::before {
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.2c3.4 3.7 5.6 6.5 5.6 9.2a5.6 5.6 0 0 1-11.2 0c0-2.7 2.2-5.5 5.6-9.2z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.2c3.4 3.7 5.6 6.5 5.6 9.2a5.6 5.6 0 0 1-11.2 0c0-2.7 2.2-5.5 5.6-9.2z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.myc-product-tab-button--details .myc-product-tab-button-icon::before {
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13.4 3H7.2A1.7 1.7 0 0 0 5.5 4.7v14.6A1.7 1.7 0 0 0 7.2 21h9.6a1.7 1.7 0 0 0 1.7-1.7V8z'/%3E%3Cpath d='M13.4 3v5h5'/%3E%3Cpath d='M9 13h6M9 16.4h4'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13.4 3H7.2A1.7 1.7 0 0 0 5.5 4.7v14.6A1.7 1.7 0 0 0 7.2 21h9.6a1.7 1.7 0 0 0 1.7-1.7V8z'/%3E%3Cpath d='M13.4 3v5h5'/%3E%3Cpath d='M9 13h6M9 16.4h4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.myc-product-tab-button--info .myc-product-tab-button-icon::before {
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5.5'/%3E%3Cpath d='M12 7.6h.01'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5.5'/%3E%3Cpath d='M12 7.6h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}

/*
 * The titles are set in the display face, in capitals, because the product
 * title above them is: the strip reads as part of the same page rather than as
 * a widget that landed on it. Oswald is condensed, so the tracking capitals
 * need is bought back by the width of the face itself.
 */
.myc-product-tab-button-label {
	font-family: var(--ps-font-display);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .05em;
	text-transform: uppercase;

	/*
	 * Oswald's ascent (1193 per em) reaches further above its capitals (810)
	 * than its descent (289) falls below the baseline, so a line box centred by
	 * the flex row leaves the capitals low against a tile that is centred
	 * geometrically. The gap is (1193 - 289)/2 - 810/2 = 47 per em; padding
	 * under the text of twice that centres the capitals themselves, and in `em`
	 * it stays correct at every size the label is set in.
	 */
	padding-bottom: .094em;
}

/* The chevron belongs to the accordion; a tab row has no room for it. */
.myc-product-tab-button-chevron {
	display: none;
}

@media (min-width: 1081px) {
	/* The mark takes the room the symmetrical padding used to hold. */
	.myc-product-tab-button {
		padding: 0 15px 0 12px;
	}
}

/*
 * Phones and tablets read the tabs as an accordion.
 *
 * 1080px is the product page's own single-column breakpoint, so the block
 * changes shape at the same width as everything above it.
 *
 * The template prints the buttons and the panels as two separate loops — a
 * tablist has to be one element for the roving focus to work. `display:
 * contents` drops the nav's box on these widths, which promotes its buttons to
 * items of the section itself, and `--myc-tab-index` then orders button, panel,
 * button, panel back into pairs. One set of markup, two presentations, and no
 * duplicated headings for a screen reader to read twice.
 */
@media (max-width: 1080px) {
	.myc-product-tabs {
		display: flex;
		flex-direction: column;
		/* The block sits closer to the summary above it than on a desktop. */
		margin-top: var(--ps-space-7);
		background: var(--ps-color-surface);
	}

	.myc-product-tabs-nav {
		display: contents;
	}

	.myc-product-tab-button {
		display: flex;
		width: 100%;
		min-height: 58px;
		align-items: center;
		order: calc(var(--myc-tab-index, 0) * 2 + 1);
		gap: var(--ps-space-3);
		padding: var(--ps-space-2) var(--ps-space-4) var(--ps-space-2) var(--ps-space-5);
		border: 0;
		border-radius: 0;

		/*
		 * The hairline between two sections is drawn inside the row rather than
		 * as a border on it. A border is part of the box: one pixel of it at the
		 * top and none at the bottom leaves everything the row centres half a
		 * pixel low, and half a pixel is exactly the kind of thing that is
		 * invisible until it sits next to a tile that is centred exactly.
		 */
		box-shadow: inset 0 1px 0 var(--ps-color-border);
		background: transparent;
		color: var(--ps-color-text);
		text-align: left;
		white-space: normal;
		transition: color var(--ps-transition-fast), background-color var(--ps-transition-fast);

		/*
		 * iOS paints a grey block over the row on tap, which lands before the
		 * panel has begun to open — the open state is the feedback.
		 */
		-webkit-tap-highlight-color: transparent;
	}

	/* The first row sits against the card's own edge. */
	.myc-product-tabs-nav > .myc-product-tab-button:first-child {
		box-shadow: none;
	}

	/*
	 * Open, the row takes the same pale brand band and navy lettering the
	 * selected tab wears on a desktop, so the two shapes of this block are one
	 * component in two postures rather than two designs.
	 *
	 * A rule down the left edge was the other candidate and it is the wrong
	 * shape here: the card clips its children to a 12px radius, so a full-height
	 * rule can only ever sit inside the card's own 1px border — a hair away from
	 * the edge it is trying to be — and it would cross the rounded corner on the
	 * first row. The band has no edge to miss.
	 */
	.myc-product-tab-button.is-active {
		background: var(--ps-color-brand-50);
		box-shadow: inset 0 1px 0 var(--ps-color-border);
		color: var(--ps-color-brand-700);
	}

	.myc-product-tab-button:focus-visible {
		outline: 2px solid var(--ps-color-brand-border);
		outline-offset: -3px;
	}

	.myc-product-tab-button-label {
		min-width: 0;
		font-size: 15px;
		letter-spacing: .06em;
	}

	/*
	 * On a row the mark becomes a tile, cut from the page the way the stock and
	 * delivery chips in the summary are, and fills with navy while its section
	 * is open. That fill is what the eye finds when it comes back to the block:
	 * a chevron alone is too small to be the only sign of where you are.
	 */
	.myc-product-tab-button-icon {
		width: 34px;
		height: 34px;
		border: 1px solid var(--ps-color-summary-border);
		border-radius: var(--ps-radius-sm);
		background: var(--ps-color-summary-fill);
		color: var(--ps-color-text-muted);
	}

	.myc-product-tab-button-icon::before {
		width: 18px;
		height: 18px;
	}

	.myc-product-tab-button.is-active .myc-product-tab-button-icon {
		border-color: var(--ps-color-brand-600);
		background: var(--ps-color-brand-600);
	}

	.myc-product-tab-button.is-active .myc-product-tab-button-icon::before {
		background-color: var(--ps-color-surface);
	}

	/* Drawn in CSS, like the one on the FAQ cards, so it costs no request. */
	.myc-product-tab-button-chevron {
		display: block;
		width: 8px;
		height: 8px;
		flex: 0 0 auto;
		margin-inline: auto var(--ps-space-2);
		border-right: 2px solid var(--ps-color-text-muted);
		border-bottom: 2px solid var(--ps-color-text-muted);
		transform: translateY(-2px) rotate(45deg);
		transition: transform var(--ps-transition-base), border-color var(--ps-transition-fast);
	}

	.myc-product-tab-button.is-active .myc-product-tab-button-chevron {
		border-color: var(--ps-color-brand-600);
		transform: translateY(2px) rotate(225deg);
	}

	/*
	 * The panel opens by growing its grid row from 0fr to 1fr, rather than by a
	 * measured height: the tabs hold size tables and long care text, and
	 * measuring those on every frame stalls on a phone.
	 */
	/*
	 * A closed section has to measure zero, and for a while it did not: every
	 * closed title carried a band of empty space beneath it, which read as a
	 * title pushed to the top of an over-tall row.
	 *
	 * The cause is in how a grid sizes an `fr` track when the grid's own height
	 * is not fixed. The track is never smaller than what its item contributes,
	 * and an item contributes its padding whether or not it has any content to
	 * show — so `0fr` resolved to the padding of the box inside it, and clipping
	 * that box, or the grid around it, changed nothing: there was nothing
	 * overflowing to clip. The padding had to leave this box altogether, which
	 * is what `.myc-product-tab-panel-body` is for.
	 */
	.myc-product-tab-panel {
		display: grid;
		order: calc(var(--myc-tab-index, 0) * 2 + 2);
		grid-template-rows: 0fr;
		transition: grid-template-rows 320ms ease;
	}

	.myc-product-tab-panel.is-active {
		grid-template-rows: 1fr;
	}

	/*
	 * This box clips, and carries nothing that could give the closed track a
	 * height of its own — `min-height: 0` and no padding.
	 *
	 * `visibility` keeps the closed text out of the tab order and out of a
	 * screen reader while it is clipped, and it is the one property that can be
	 * held at `visible` for the length of the close.
	 */
	.myc-product-tab-panel-inner {
		min-height: 0;
		overflow: hidden;
		opacity: 0;
		visibility: hidden;
		transition: opacity 200ms ease, visibility 320ms;
	}

	/*
	 * The text is aligned with the tile rather than with the title: indenting it
	 * past the tile as well would leave a paragraph about half a phone wide.
	 */
	.myc-product-tab-panel-body {
		padding: var(--ps-space-4) var(--ps-space-5) var(--ps-space-5);
	}

	.myc-product-tab-panel.is-active > .myc-product-tab-panel-inner {
		opacity: 1;

		/* Slightly behind the opening, so the text arrives into a made space. */
		transition: opacity 260ms ease 60ms, visibility 320ms;
		visibility: visible;
	}
}

@media (max-width: 1080px) and (hover: hover) and (pointer: fine) {
	.myc-product-tab-button:hover {
		background: var(--ps-color-surface-subtle);
		color: var(--ps-color-text);
	}

	.myc-product-tab-button:hover .myc-product-tab-button-icon {
		border-color: var(--ps-color-brand-border);
		color: var(--ps-color-brand-600);
	}

	.myc-product-tab-button.is-active:hover {
		background: var(--ps-color-brand-50);
		color: var(--ps-color-brand-700);
	}
}

@media (max-width: 1080px) and (prefers-reduced-motion: reduce) {
	.myc-product-tab-button,
	.myc-product-tab-button-icon,
	.myc-product-tab-button-icon::before,
	.myc-product-tab-button-chevron,
	.myc-product-tab-panel,
	.myc-product-tab-panel-inner,
	.myc-product-tab-panel.is-active > .myc-product-tab-panel-inner {
		transition: none;
	}
}

@media (max-width: 760px) {
	.myc-product-tabs {
		margin-top: var(--ps-space-6);
	}

	.myc-product-tab-button {
		min-height: 54px;
		padding-inline: var(--ps-space-4) var(--ps-space-3);
	}

	.myc-product-tab-button-icon {
		width: 32px;
		height: 32px;
	}

	.myc-product-tab-button-icon::before {
		width: 17px;
		height: 17px;
	}

	.myc-product-tab-button-label {
		font-size: 14px;
	}

	.myc-product-tab-panel-body {
		padding: var(--ps-space-3) var(--ps-space-4) var(--ps-space-4);
	}
}

@media (min-width: 1200px) and (min-height: 800px) {
	.myc-product-gallery,
	.myc-product-summary {
		top: var(--ps-product-sticky-offset);
	}

}

@media (max-width: 1199px), (max-height: 799px) {
	.myc-product-gallery,
	.myc-product-summary {
		position: static;
		max-height: none;
		overflow: visible;
	}
}

@media (prefers-reduced-motion: reduce) {
	.myc-product-image-grid {
		transition: none;
	}
}

@media (max-width: 760px) {
	.myc-view-product .myc-product-page {
		padding-top: var(--ps-space-4);
	}

	.myc-product-summary {
		padding: var(--ps-space-4);
		border: 1px solid var(--ps-color-border);
		border-radius: var(--ps-radius-md);
		background: var(--ps-color-surface);
	}

	.myc-product-summary h1 {
		font-size: clamp(34px, 11vw, 46px);
	}

	.myc-product-price {
		font-size: 30px;
	}

	.myc-product-meta {
		margin-bottom: var(--ps-space-5);
	}

	.myc-product-meta .myc-product-delivery {
		grid-column: 1 / -1;
		justify-self: start;
	}

	.myc-product-cats {
		align-items: flex-start;
		flex-direction: column;
	}

	/* Stacked, there is no right-hand end to sit at. */
	.myc-product-reference {
		margin-inline-start: 0;
	}

	/*
	 * Shorter on a phone, above and below. The desktop step is measured against
	 * a column with room to breathe; on a screen this narrow the same value
	 * spends a scroll on white space, and the notes are the least of what the
	 * page has to say.
	 *
	 * 30px rather than a token: the notes need a touch more separation from the
	 * buy buttons above them than they need from the card edge below, and there
	 * is no step between 24 and 32 in the scale.
	 */
	.myc-product-notes {
		margin-top: 30px;
	}

	.myc-product-summary:has(.myc-product-notes) {
		padding-bottom: var(--ps-space-5);
	}
}

/* -------------------------------------------------- modal guía de tallas -- */

.myc-product-purchase .variations th.has-ps-size-guide {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ps-space-3);
	width: 100%;
}

.ps-size-guide-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 32px;
	margin: 0;
	padding: 3px 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--ps-color-brand-700);
	font: inherit;
	font-size: 13px;
	font-weight: 750;
	line-height: 1.2;
	text-decoration: underline;
	text-decoration-color: transparent;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: color var(--ps-transition-fast), text-decoration-color var(--ps-transition-fast);
}

.ps-size-guide-trigger svg {
	width: 16px;
	height: 16px;
	fill: none;
	flex: 0 0 auto;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

.ps-size-guide-trigger:hover {
	color: var(--ps-color-brand-900);
	text-decoration-color: currentColor;
}

.ps-size-guide-trigger:focus,
.ps-size-guide-modal__close:focus {
	box-shadow: none;
	outline: none;
}

.ps-size-guide-trigger:focus-visible {
	box-shadow: none;
	outline: 2px solid var(--ps-color-brand-600);
	outline-offset: 3px;
}

html.ps-size-guide-is-open {
	overflow: hidden;
}

body.ps-size-guide-is-open {
	position: fixed;
	top: var(--ps-size-guide-scroll-offset, 0);
	right: 0;
	left: 0;
	width: 100%;
	overflow: hidden;
	overscroll-behavior: none;
}

.ps-size-guide-modal__close:focus-visible {
	box-shadow: none;
	outline: 2px solid rgb(255 255 255 / 92%);
	outline-offset: 3px;
}

.ps-size-guide-modal {
	width: min(940px, calc(100vw - 32px));
	max-width: none;
	max-height: min(780px, calc(100svh - 32px));
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: var(--ps-radius-lg);
	background: var(--ps-color-surface);
	box-shadow: 0 24px 64px rgb(23 19 21 / 28%);
	color: var(--ps-color-text);
	overflow: hidden;
}

.ps-size-guide-modal::backdrop {
	background: rgb(23 19 21 / 58%);
	backdrop-filter: blur(3px);
}

.ps-size-guide-modal[open] {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	animation: ps-size-guide-enter var(--ps-transition-base) both;
}

.ps-size-guide-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ps-space-4);
	padding: var(--ps-space-3) var(--ps-space-5);
	background: var(--ps-color-brand-800);
	color: var(--ps-color-surface);
}

.ps-size-guide-modal__header p {
	margin: 0;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .12em;
	line-height: 1.2;
	text-transform: uppercase;
}

.ps-size-guide-modal__close {
	display: inline-grid;
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 1px solid rgb(255 255 255 / 20%);
	border-radius: 50%;
	place-items: center;
	background: rgb(255 255 255 / 9%);
	box-shadow: none;
	color: var(--ps-color-surface);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background-color var(--ps-transition-fast), border-color var(--ps-transition-fast);
}

.ps-size-guide-modal__close:hover {
	border-color: rgb(255 255 255 / 38%);
	background: rgb(255 255 255 / 16%);
}

.ps-size-guide-modal__close:active {
	border-color: rgb(255 255 255 / 28%);
	background: rgb(255 255 255 / 12%);
	box-shadow: none;
	outline: none;
}

.ps-size-guide-modal__close svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-width: 2.2;
}

.ps-size-guide-modal__body {
	min-height: 0;
	padding: var(--ps-space-6);
	overflow: auto;
	overscroll-behavior: contain;
}

/*
 * Read top to bottom: how to measure, what the measurement means, and the
 * caveat last. The table takes the full width, which is the one dimension four
 * numeric columns actually need — squeezed into two thirds of the dialog it was
 * spending the space on a drawing that does not need it.
 */
.ps-size-guide-figure {
	display: grid;
	grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
	gap: var(--ps-space-5);
	align-items: center;
	margin: 0 0 var(--ps-space-5);
	padding: var(--ps-space-4);
	border-radius: var(--ps-radius-md);
	background: var(--ps-color-surface-subtle);
}

.ps-size-guide-figure img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
}

/*
 * The instructions read against the drawing they describe, so they keep the
 * same optical centre rather than sitting on the top edge of a tall image.
 */
.ps-size-guide-figure figcaption {
	margin: 0;
	color: var(--ps-color-text-muted);
	font-size: 14px;
	line-height: 1.6;
}

/*
 * Between a laptop and a phone the drawing gives ground before the text does.
 * Two columns still read well here; what does not is a 440px illustration next
 * to a paragraph squeezed into what is left of a tablet.
 */
@media (min-width: 761px) and (max-width: 1024px) {
	.ps-size-guide-figure {
		grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
		gap: var(--ps-space-4);
	}

	.ps-size-guide-figure figcaption {
		font-size: 13px;
	}
}

/*
 * Whose chart this is — several brands size differently, and «36 = US 4» only
 * means something once you know. It is the table's own caption, seated on its
 * head: the same navy as the column names, parted from them by a slightly
 * lighter rule, so the brand belongs to the grid of numbers rather than
 * floating above it.
 */
.ps-size-guide-chart {
	margin: 0;
	padding: 10px var(--ps-space-4);
	border: 1px solid var(--ps-color-brand-500);
	border-radius: var(--ps-radius-md) var(--ps-radius-md) 0 0;
	background: var(--ps-color-brand-700);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .14em;
	line-height: 1.3;
	text-align: center;
	text-transform: uppercase;
}

.ps-size-guide-modal__content .ps-size-table-wrap {
	margin: 0;
	border: 1px solid var(--ps-color-border);
	border-radius: var(--ps-radius-md);
	overflow: hidden;
}

/*
 * Only the brand keeps the navy. The column names sit a shade below it, on the
 * same grey the table's own frame is drawn in — darker than the striped rows,
 * so the line that names the columns is still the heaviest thing in the grid
 * without competing with the brand.
 */
.ps-size-guide-modal__content .ps-size-table thead th {
	background: var(--ps-color-border);
	color: var(--ps-color-ink);
}

/*
 * Each band draws its own sides, because a frame around the wrap plus a line
 * inside it just reads as the frame. The cells collapse their borders with the
 * table, so every edge stays a single hairline.
 */
.ps-size-guide-modal__content .ps-size-table thead th:first-child {
	border-left: 1px solid var(--ps-color-border);
}

.ps-size-guide-modal__content .ps-size-table thead th:last-child {
	border-right: 1px solid var(--ps-color-border);
}

/* In the pop-up the size reads like its equivalences, not as a heading. */
.ps-size-guide-modal__content .ps-size-table tbody th[scope='row'] {
	font-weight: 400;
}

.ps-size-guide-modal__content .ps-size-table tbody :is(th, td):first-child {
	border-left: 1px solid var(--ps-color-border);
}

.ps-size-guide-modal__content .ps-size-table tbody :is(th, td):last-child {
	border-right: 1px solid var(--ps-color-border);
}

.ps-size-guide-modal__content .ps-size-table tbody tr:last-child :is(th, td) {
	border-bottom: 1px solid var(--ps-color-border);
}

/*
 * Capped by the brand band, the table keeps only its lower corners, and gives
 * up its own frame: the cells draw the edges now, each in its own colour.
 */
.ps-size-guide-chart + .ps-size-guide-modal__content .ps-size-table-wrap {
	border: 0;
	border-radius: 0 0 var(--ps-radius-md) var(--ps-radius-md);
}

/* The tab can keep its introductory copy; the modal stays diagram-first. */
.ps-size-guide-modal__content > p:not(.ps-size-guide-note) {
	display: none;
}

.ps-size-guide-modal__content .ps-size-table {
	font-size: 14px;
}

.ps-size-guide-modal__content .ps-size-table :is(th, td) {
	padding: 11px var(--ps-space-3);
	text-align: center;
}

.ps-size-guide-modal__content .ps-size-table :is(th, td):first-child {
	text-align: center;
}

.ps-size-guide-note {
	margin: var(--ps-space-5) 0 0;
	padding: var(--ps-space-3) var(--ps-space-4);
	border-left: 3px solid var(--ps-color-brand-600);
	background: var(--ps-color-surface-subtle);
	color: var(--ps-color-text-muted);
	font-size: 14px;
	line-height: 1.55;
}

@keyframes ps-size-guide-enter {
	from {
		opacity: 0;
		transform: translateY(8px) scale(.985);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* Let the guide follow its content on touch devices without exceeding the viewport. */
@media (max-width: 1024px) {
	.ps-size-guide-modal {
		height: fit-content;
		max-height: min(780px, calc(100dvh - 40px));
		touch-action: none;
		overscroll-behavior: none;
	}

	.ps-size-guide-modal[open] {
		display: flex;
		flex-direction: column;
		animation: ps-size-guide-enter var(--ps-transition-base) both;
	}

	.ps-size-guide-modal__header {
		flex: 0 0 auto;
	}

	body.ps-size-guide-is-open .ps-size-guide-modal__body {
		flex: 0 1 auto;
		touch-action: pan-y;
		overscroll-behavior: contain;
	}

}

@media (max-width: 1024px) and (hover: none) and (pointer: coarse) {
	.ps-size-guide-modal__close:is(:focus, :focus-visible, :active) {
		border-color: rgb(255 255 255 / 28%);
		background: rgb(255 255 255 / 12%);
		box-shadow: none !important;
		outline: none !important;
	}
}

@media (max-width: 760px) {
	.myc-product-purchase .variations th.has-ps-size-guide {
		align-items: center;
	}

	.ps-size-guide-trigger {
		min-height: 28px;
		font-size: 12px;
	}

	.ps-size-guide-trigger svg {
		width: 15px;
		height: 15px;
	}

	.ps-size-guide-modal {
		width: min(100vw - 32px, 620px);
		max-height: calc(100dvh - 48px);
		border-radius: var(--ps-radius-md);
	}

	.ps-size-guide-modal__header {
		padding: 15px var(--ps-space-4);
	}

	.ps-size-guide-modal__body {
		padding: var(--ps-space-4);
	}

	/*
	 * Side by side, neither half survives half of a phone, so they stack — and
	 * a stacked drawing does not need the full width either: at 100% it pushes
	 * the instructions below the fold, which is where they stop being read.
	 */
	.ps-size-guide-figure {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--ps-space-3);
		justify-items: center;
		margin-bottom: var(--ps-space-4);
		padding: var(--ps-space-3);
	}

	.ps-size-guide-figure img {
		max-width: 300px;
	}

	.ps-size-guide-figure figcaption {
		font-size: 13px;
	}

	/*
	 * The same 13px the guide's own page uses, for every cell: the size in the
	 * first column was reading a third larger than the equivalences beside it,
	 * because the sheet shrank the values here and left that column alone.
	 */
	.ps-size-guide-modal__content .ps-size-table {
		font-size: 13px;
	}

	.ps-size-guide-modal__content .ps-size-table :is(th, td) {
		padding: 9px 4px;
	}

	.ps-size-guide-modal__content .ps-size-table :is(th, td):first-child {
		padding-left: 4px;
	}

	.ps-size-guide-note {
		font-size: 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ps-size-guide-modal[open] {
		animation: none;
	}
}

/* ------------------------------------- two-photo gallery slider, mobile --- */

.myc-product-gallery-viewport {
	position: relative;
}

/*
 * Two photos on a phone used to stack full width, one under the other, so half
 * the gallery was a scroll away and the page ran twice as long for it. Below
 * this width they become one slide each.
 *
 * Keyed on the photo count the grid already publishes.
 */
@media (max-width: 760px) {
	.myc-product-image-grid[data-myc-gallery-image-count="2"] {
		display: flex;
		gap: 0;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-behavior: smooth;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior-x: contain;
	}

	.myc-product-image-grid[data-myc-gallery-image-count="2"]::-webkit-scrollbar {
		display: none;
	}

	.myc-product-image-grid[data-myc-gallery-image-count="2"] .myc-product-thumb {
		width: 100%;
		flex: 0 0 100%;
		scroll-snap-align: center;
		scroll-snap-stop: always;
	}
}

@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
	.myc-product-image-grid[data-myc-gallery-image-count="2"] {
		scroll-behavior: auto;
	}
}

/* The arrows are added by script and only ever shown for this case. */
.myc-gallery-arrow {
	position: absolute;
	top: 50%;
	display: none;
	width: 36px;
	height: 36px;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid var(--ps-color-border);
	border-radius: 50%;

	/*
	 * Opaque, and no backdrop-filter. A blurred backdrop over a scroll container
	 * whose opacity changes in one frame is a known way to make Safari on iOS
	 * flash: the layer has to be rebuilt at the moment the arrow disappears. The
	 * 160ms fade used to hide that; going instant exposed it.
	 *
	 * It costs nothing to drop — the surface was already 82% white, so the blur
	 * behind it was barely visible.
	 */
	background: var(--ps-color-surface);
	color: var(--ps-color-text);
	cursor: pointer;
	transform: translateY(-50%);
	transition: opacity var(--ps-transition-fast), background-color var(--ps-transition-fast);
	-webkit-tap-highlight-color: transparent;
}

.myc-gallery-arrow--prev {
	left: var(--ps-space-3);
}

.myc-gallery-arrow--next {
	right: var(--ps-space-3);
}

.myc-gallery-arrow svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentcolor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
}

/*
 * Kept in the layout rather than removed, so the photo does not shift when the
 * slide reaches an end.
 *
 * It leaves at once and comes back gently: fading out over the same 160ms it
 * fades in by left the arrow hanging over a photo that had already changed.
 *
 * `disabled` alone holds the interaction. `pointer-events: none` would also let
 * the touch through to whatever is beneath — here the photo's lightbox link —
 * so an arrow vanishing under a finger could hand that finger to the photo.
 */
.myc-gallery-arrow[disabled] {
	opacity: 0;
	transition: none;
}

@media (max-width: 760px) {
	.myc-product-gallery-viewport:has(.myc-product-image-grid[data-myc-gallery-image-count="2"]) .myc-gallery-arrow {
		display: flex;
	}
}

/*
 * Stacked, the gallery and the summary are one column, and the gap between them
 * was growing with the viewport — 32px on a phone, 51px by 1024 — while the
 * space above the photo stayed at 12–16px. Read down the page that put far more
 * air under the photo than over it. The clamp above is for the two-column
 * layout, where the gap is the space between the columns and wants to breathe.
 */
@media (max-width: 1080px) {
	.myc-product-layout {
		gap: var(--ps-space-4);
	}
}

/*
 * Outside the slider the radius is on the thumb, which clips to it — except
 * Safari drops that clip while a scroller is moving. The image carrying its own
 * radius survives that, because there is no clip left to lose.
 *
 * The <picture> is listed too: `inherit` reads the parent, and the mobile main
 * image sits inside one, so without it that image would inherit a zero.
 */
.myc-product-thumb picture,
.myc-product-thumb img,
.myc-product-thumb::after {
	border-radius: inherit;
}

/*
 * In the slider the rounding belongs to the frame, not to the photos.
 *
 * Rounding each photo meant two rounded rectangles travelling past each other,
 * with the curves moving and a square-cornered join passing through the middle
 * of the swipe. A rounded window with the photos sliding behind it holds the
 * same four corners still from beginning to end.
 *
 * The clip sits on the viewport, which does not scroll. That is also why it
 * survives on iOS: what Safari drops is the rounded clip of the element doing
 * the scrolling, and here that element is inside the frame rather than being
 * it. The arrows are inset well within the corners, so clipping does not reach
 * them.
 */
@media (max-width: 760px) {
	.myc-product-gallery-viewport:has(.myc-product-image-grid[data-myc-gallery-image-count="2"]) {
		overflow: hidden;
		border-radius: var(--ps-radius-lg);
	}

	/*
	 * The border goes with the radius. Left on, it kept drawing its own square
	 * corner a pixel inside the round one, and the frame read as not quite
	 * curved. It is there to separate a photo from the ones beside it in the
	 * grid; in the slider the frame does that, and there is nothing beside it.
	 */
	.myc-product-image-grid[data-myc-gallery-image-count="2"] .myc-product-thumb {
		border: 0;
		border-radius: 0;
	}
}
