{"version":3,"file":"blocks/ProductTemplate/style-index.css","mappings":";;;AAAA,gBAAgB;ACAhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;AAkDA;EACC;;;;IAAA;EAKA;EAIA;EACA;;;GAAA;EAKA;EArBA;EACA;EACA;EAsBA;EACA;;;IAAA;EAIA;EACA;ADRD;ACUC;EACC;EACA;EACA;EAEA;EAEA;EACA;;;IAAA;EAIA;ADVF;ACeC;EA5CD;IA6CE;EDZA;AACF;ACcC;EAhDD;IAiDE;EDXA;AACF;ACvCA;EAoDC;;;;;IAAA;ADLD;ACWC;EACC;ADTF;ACWE;EACC;ADTH;ACaC;EAvEA;EACA;EACA;EAuEC;EACA;ADTF;AC5DA;EAwEC;;;;;;;;;;;;;;;;IAAA;ADOD;ACUC;EACC;ADRF;ACUE;EAEC;ADTH;ACYE;EACC;ADVH;ACCC;EAYC;;;;;;IAAA;ADJF;ACWE;EAjHD;EACA;EACA;EAiHE;EACA;ADPH;ACSG;EACC;ADPJ;;AAtJA;EACE;EAWA;EACA;EACA;EACA;EACA;AA+IF;AA7IE;EAlBF;IAmBI;EAgJF;AACF;AA9IE;EAtBF;IAuBI;EAiJF;AACF;AA7IE;EACE;EACA;AA+IJ;AA7II;EACE;EACA;EACA;AA+IN;;AA1IA;EACE;EACA;EACA;AA6IF;;AA/HA;;EAEE;AAkIF;;AA3HA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;AA4HF;AA1HE;EACE;AA4HJ;;AAtHA;EACE;EACA;EACA;EACA;EACA;EACA;AAyHF,C","sources":["webpack://brandy-blocks/./src/blocks/ProductTemplate/style.scss","webpack://brandy-blocks/./src/blocks/_shared/_loop-grid-lines.scss"],"sourcesContent":["// Layout wrapper for the repeated product items (shared editor + frontend).\n// Column counts per breakpoint come from CSS custom properties set inline by the\n// block render (desktop/tablet/mobile), configurable in the block inspector —\n// which is what makes responsive columns a setting here rather than a CSS patch\n// over WooCommerce's columns-N classes.\n@use \"../_shared/loop-grid-lines\";\n\n.wp-block-brandy-product-template {\n  display: grid;\n  // --bpc-gap is the block's own \"Block spacing\" value, written inline by the\n  // render (see get_gap_style() — core's flow layout would otherwise turn it\n  // into sibling margins, which a grid ignores). The fallbacks are the block's\n  // own defaults, deliberately not the global block gap: that one is tuned for\n  // stacked content and reads as cramped between product cards.\n  //\n  // Rows are looser than columns (42/30), which is what the theme applied to\n  // WooCommerce's product grid before this block existed — a card is much taller\n  // than it is wide, so equal gaps read as tight rows. Setting \"Block spacing\"\n  // explicitly collapses both axes onto that one value.\n  gap: var(--bpc-row-gap, 42px) var(--bpc-gap, 30px);\n  grid-template-columns: repeat(var(--bpc-columns, 4), minmax(0, 1fr));\n  margin: 0;\n  padding: 0;\n  list-style: none;\n\n  @media (max-width: 780px) {\n    grid-template-columns: repeat(var(--bpc-columns-tablet, 2), minmax(0, 1fr));\n  }\n\n  @media (max-width: 480px) {\n    grid-template-columns: repeat(var(--bpc-columns-mobile, 1), minmax(0, 1fr));\n  }\n\n  // Slider mode: Embla owns the layout, so the wrapper drops the grid and the\n  // .embla__container inside it becomes the flex track.\n  &.is-slider {\n    display: block;\n    grid-template-columns: none;\n\n    .embla__container {\n      margin: 0;\n      padding: 0;\n      list-style: none;\n    }\n  }\n}\n\n.wp-block-brandy-product {\n  min-width: 0;\n  margin: 0 !important;\n  list-style: none;\n}\n\n// Quick actions stacked over the product image.\n//\n// The reveal itself is the theme's HoverAnimation setting (`fade-in` with\n// trigger `parent`); what was missing is somewhere for the icons to sit. An\n// author adds this class to a group of action blocks — Quick View, Share,\n// Wishlist — inside the group that also holds the image, and the column pins\n// itself to the image's top corner.\n//\n// `position: relative` goes on the card's own hover trigger rather than on a\n// dedicated wrapper, because that trigger is the element the reveal already\n// keys off, so the two cannot be attached to different ancestors.\n.wp-block-brandy-product .is-hover-trigger,\n.wp-block-brandy-product .wp-block-group:has(> .brandy-card-actions) {\n  position: relative;\n}\n\n// Scoped to the product item rather than left as a bare class: the editor gives\n// every block wrapper `position: relative` to hang its outline off, at the same\n// specificity, so an unscoped rule loses in the canvas and the column drops back\n// into the flow — the author edits a layout the frontend does not have.\n.wp-block-brandy-product .brandy-card-actions {\n  position: absolute;\n  top: var(--brandy-card-actions-offset, 12px);\n  right: var(--brandy-card-actions-offset, 12px);\n  z-index: 2;\n  display: flex;\n  flex-direction: column;\n  gap: var(--brandy-card-actions-gap, 8px);\n  // The column only frames its buttons; clicks between them belong to the card\n  // link underneath, not to a transparent box sitting over the image.\n  pointer-events: none;\n\n  > * {\n    pointer-events: auto;\n  }\n}\n\n// Editor-only hint shown when the query matches nothing yet. (Slider mode has\n// its own preview bar, in editor.scss.)\n.wp-block-brandy-product-template__notice {\n  margin: 0 0 0.75em;\n  padding: 6px 10px;\n  font-size: 12px;\n  color: #50575e;\n  background: #f0f0f1;\n  border-radius: 4px;\n}\n","/**\n * Collapsed grid lines for loop blocks.\n *\n * Each item carries a border, adjacent items share one line, and the outer edge\n * is one line — the look a table gets from `border-collapse: collapse`, which CSS\n * grid has no equivalent for.\n *\n * WHY NOT COUNT COLUMNS\n * ---------------------\n * The obvious approach — strip the trailing border off every `:nth-child(4n)` —\n * is wrong at two of the three breakpoints, because the column count changes with\n * `--bpc-columns-tablet` and `--bpc-columns-mobile`. Knowing the number does not\n * help either: CSS will not accept `var()` inside `:nth-child()`. So the rule has\n * to be blind to position.\n *\n * It is: every item draws its right and bottom edge, and the container draws the\n * top and left. Each interior line is then drawn exactly once, by the item above\n * and left of it; the outer top and left come from the container and the outer\n * right and bottom from whichever items happen to end a row or a column. Nothing\n * counts, nothing doubles, and a short final row simply stops where it stops.\n *\n * Rejected on the way here, so the next reader does not retry it: painting the\n * container in the line colour and letting a 1px gap show through looks right\n * until the last row is short — the empty grid tracks still belong to the\n * container, so its background shows through them as solid blocks of colour.\n *\n * THE OUTER TOP LINE IS THE EXCEPTION\n * -----------------------------------\n * A container is as wide as all of its columns whether or not they hold\n * anything, so a line it draws across its own width runs on into empty space\n * when there are fewer items than columns. The item-drawn lines never do this —\n * they stop with the items — so the outer top edge, the only one left on the\n * container, is the only one that needs help.\n *\n * That is the one place a count is unavoidable. It arrives as\n * `--brandy-grid-count`, and the line is drawn to\n * `min(count, columns) / columns` of the width: at or above a full row the\n * fraction is 1 and nothing changes.\n *\n * The count is written by PHP, so anything that swaps the items afterwards has\n * to correct it — brandy/collection-filter does. A stale count shows up as\n * exactly the overhang this exists to remove.\n */\n\n@mixin brandy-grid-line {\n\tborder-style: var(--brandy-grid-line-style, solid);\n\tborder-color: var(--brandy-grid-line-color, currentColor);\n\tborder-width: 0;\n}\n\n.brandy-has-grid-lines {\n\t/*\n\t * Collapsed lines need the cells to touch, so spacing has nothing left to\n\t * act on. Important because the gap arrives inline from the block's own\n\t * \"Block spacing\" control, which outranks anything declared here.\n\t */\n\tgap: 0 !important;\n\n\t// The column count the container's lines measure against, resolved at the\n\t// same two breakpoints the grid itself changes at.\n\t--brandy-grid-cols: var(--bpc-columns, 4);\n\t--brandy-grid-line-span: calc(\n\t\t100% * min(var(--brandy-grid-count, 0), var(--brandy-grid-cols)) /\n\t\t\tvar(--brandy-grid-cols)\n\t);\n\n\tposition: relative;\n\n\t@include brandy-grid-line;\n\tborder-left-width: var(--brandy-grid-line-width, 1px);\n\t/*\n\t * Still reserved, so the first row sits exactly where it always did — but\n\t * drawn by ::before instead, which can stop short of the full width.\n\t */\n\tborder-top-width: var(--brandy-grid-line-width, 1px);\n\tborder-top-color: transparent;\n\n\t&::before {\n\t\tcontent: \"\";\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\t// As wide as the items reach, never wider.\n\t\twidth: var(--brandy-grid-line-span);\n\t\t// Back over the transparent border this element still reserves.\n\t\ttop: calc(-1 * var(--brandy-grid-line-width, 1px));\n\t\t/*\n\t\t * A border rather than a background, so the author's dashed or dotted\n\t\t * choice reaches this line the same way it reaches every other one.\n\t\t */\n\t\tborder-top: var(--brandy-grid-line-width, 1px)\n\t\t\tvar(--brandy-grid-line-style, solid)\n\t\t\tvar(--brandy-grid-line-color, currentColor);\n\t}\n\n\t@media (max-width: 780px) {\n\t\t--brandy-grid-cols: var(--bpc-columns-tablet, 2);\n\t}\n\n\t@media (max-width: 480px) {\n\t\t--brandy-grid-cols: var(--bpc-columns-mobile, 1);\n\t}\n\n\t/*\n\t * Nothing to outline. Reachable on the front end because the items can be\n\t * replaced after load — brandy/collection-filter on a term with no products\n\t * leaves the list standing and empty — and without this the container went\n\t * on drawing an L of leftover lines around nothing.\n\t */\n\t&:empty {\n\t\tborder-width: 0;\n\n\t\t&::before {\n\t\t\tcontent: none;\n\t\t}\n\t}\n\n\t> li {\n\t\t@include brandy-grid-line;\n\t\tborder-right-width: var(--brandy-grid-line-width, 1px);\n\t\tborder-bottom-width: var(--brandy-grid-line-width, 1px);\n\t}\n\n\t/*\n\t * A slider is one horizontal row, and every line it needs comes from the\n\t * slides themselves — the container draws nothing at all.\n\t *\n\t * That is not symmetry with the grid, it is what the track requires. The\n\t * slides scroll under the container, so any edge the container drew would\n\t * sit still while the row it belongs to moved away from it; the outer left\n\t * edge has to travel with the first slide. And a bottom edge on the\n\t * container lands below the arrows and dots, which are inside it, instead of\n\t * under the slides.\n\t *\n\t * One row also means top and bottom cannot double: each slide draws its own\n\t * segment and the neighbours' segments meet. Left is the only shared edge,\n\t * so only the first slide draws one — every interior line is then the right\n\t * edge of the slide before it. No count is involved, and a track holding\n\t * fewer slides than it shows simply stops where they stop.\n\t */\n\t&.is-slider {\n\t\tborder-width: 0;\n\n\t\t&::before,\n\t\t&::after {\n\t\t\tcontent: none;\n\t\t}\n\n\t\t.embla__container {\n\t\t\tgap: 0 !important;\n\t\t}\n\n\t\t/*\n\t\t * The grid's `> li` rule cannot reach these: a slider wrapper's only\n\t\t * child is `.embla`, with the slides two levels below that. Without\n\t\t * their own copy the slides had no border-style either, so even the\n\t\t * first-slide rule that did name them drew nothing, and the slider came\n\t\t * out with no cells at all.\n\t\t */\n\t\t.embla__container > li {\n\t\t\t@include brandy-grid-line;\n\t\t\tborder-width: var(--brandy-grid-line-width, 1px);\n\t\t\tborder-left-width: 0;\n\n\t\t\t&:first-child {\n\t\t\t\tborder-left-width: var(--brandy-grid-line-width, 1px);\n\t\t\t}\n\t\t}\n\t}\n}\n"],"names":[],"sourceRoot":""}