/* Matjari option: the `focus` product page (4.4). Every selector starts with .pdp--focus (O1),
   and the file is sent only to a page that draws it (docs/DESIGN-SYSTEM.md 5.4). */
/* ==========================================================================
   focus on a phone: the head first, a contained photo with its thumbs, then
   the buy panel in its frame. The frame is drawn ON THE GRID (::after), so
   one element is the panel at every width and a Look restyles one selector;
   from 900 it takes the head in. Where display: contents is missing the page
   falls back to source order.
   ========================================================================== */
.pdp--focus .m-product { padding-block-start: var(--m-sp-4); }
.pdp--focus .m-product__info { display: contents; }
.pdp--focus .m-product__head { grid-area: 1 / 1; z-index: 1; }
.pdp--focus .m-product__gallery { grid-area: 2 / 1; margin-inline: 0; }
.pdp--focus .m-product__buy { grid-area: 3 / 1; z-index: 1; padding: var(--m-pad-panel); }
.pdp--focus .m-product__details { grid-area: 4 / 1; }
.pdp--focus .m-product::after {
	content: "";
	grid-area: 3 / 1;
	align-self: stretch;
	border: var(--m-card-bw) solid var(--m-card-edge);
	border-radius: var(--m-r-panel);
	background-color: var(--m-card-bg);
	box-shadow: var(--m-card-shadow);
	pointer-events: none;
}
.pdp--focus .m-product__frame { max-height: none; border-radius: var(--m-r-card); }
.pdp--focus .m-product__count { display: none; }
.pdp--focus .m-product__thumbs { display: flex; }
/* ==========================================================================
   From 600: two columns, so a tablet in portrait is not a stretched phone.
   The photo stays beside the page while it scrolls, and never outgrows the
   screen it is stuck to.
   ========================================================================== */
@media (min-width: 600px) {
	/* focus: the head across the top, then the photo and the panel side by
	   side. The panel is as tall as what it holds, never stretched to the
	   photo: the third row is the slack between the two. */
	.pdp--focus .m-product { grid-template-rows: auto auto 1fr auto; }
	.pdp--focus .m-product__head { grid-area: 1 / 1 / 2 / -1; }
	.pdp--focus .m-product__gallery { grid-area: 2 / 1 / 4 / 2; position: relative; top: auto; }
	.pdp--focus .m-product__buy, .pdp--focus .m-product::after { grid-area: 2 / 2; }
	.pdp--focus .m-product__details { grid-area: 4 / 1 / 5 / -1; }
}
/* ==========================================================================
   From 900: nothing is fixed to the screen, so THE BUY PANEL is what stays
   in view (3.3), under the scrolled header, and scrolls inside itself if it
   must. The head, the panel and the details become cells of the page grid:
   the details go under the photo, never under the panel, so an open
   accordion cannot push the button out of reach or slide beneath it.
   ========================================================================== */
@media (min-width: 900px) {
	/* showcase: every photo at once, in two columns, beside a narrow column.
	   The track is a grid that does not scroll: the one place it has a gap.
	   An odd count gives the first photo both columns, so no cell is empty. */
	.pdp--focus .m-product { grid-template-columns: minmax(0, 1fr) var(--m-summary-w); }
	/* focus: the frame takes the head in, still as tall as what it holds. The
	   details are a spread across the page beneath. */
	.pdp--focus .m-product__gallery { grid-area: 1 / 1 / 4 / 2; justify-self: center; width: 100%; max-inline-size: var(--m-container-narrow); }
	.pdp--focus .m-product__head { grid-area: 1 / 2; padding: var(--m-pad-panel) var(--m-pad-panel) 0; }
	.pdp--focus .m-product__buy { grid-area: 2 / 2; position: relative; top: auto; max-height: none; margin: 0; padding: 0 var(--m-pad-panel) var(--m-pad-panel); overflow: visible; }
	.pdp--focus .m-product::after { grid-area: 1 / 2 / 3 / 3; }
	.pdp--focus .m-product__details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; column-gap: var(--m-sp-11); margin-block-start: var(--m-sp-6); }
	.pdp--focus .m-product__acc--desc { grid-row: 1 / span 3; }
}
/* From 1200 the thumbs are a column at the photo's start, as tall as the
   photo and no taller: the first of focus's three zones. */
@media (min-width: 1200px) {
	.pdp--focus .m-product__gallery--many { grid-template-columns: var(--m-sp-12) minmax(0, 1fr); column-gap: var(--m-sp-4); }
	.pdp--focus .m-product__gallery--many .m-product__track, .pdp--focus .m-product__gallery--many .m-product__zoom { grid-area: 1 / 2; }
	.pdp--focus .m-product__gallery--many .m-product__thumbs { grid-area: 1 / 1; flex-direction: column; height: 0; min-height: 100%; margin: 0; overflow-y: auto; }
	.pdp--focus .m-product__gallery--many .m-product__thumb { width: var(--m-sp-12); height: var(--m-sp-12); margin: 0 0 var(--m-sp-2); }
}
