/* Vending Machines — storefront */

/* "Collect from …" label under the product name.
   A quiet tinted chip rather than glowing text: the homepage grid sits on a
   photographic background, where a glow competes with the imagery instead of
   reading as information. */
.bigm-collect {
	display: inline-flex;
	align-items: flex-start;
	gap: 0.4em;
	margin: 0.35em 0 0.6em;
	padding: 0.35em 0.65em;
	max-width: 100%;
	border: 1px solid rgba(15, 138, 79, 0.28);
	border-radius: 4px;
	background: rgba(15, 138, 79, 0.07);
	color: #0b6b3c;
	font-size: 0.72em;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: 0.01em;
	text-align: left;
	text-transform: none;
	text-shadow: none;
}

.bigm-collect__icon {
	flex: 0 0 auto;
	/* Nudge the pin onto the first line's baseline rather than its box top. */
	margin-top: 0.12em;
	opacity: 0.85;
}

.bigm-collect__text {
	min-width: 0;
}

/* ---------------------------------------------------------------------------
   Single product page
--------------------------------------------------------------------------- */

.bigm-pdp__pin {
	flex: 0 0 auto;
	margin-top: 0.2em;
	color: #0f8a4f;
}

.bigm-pdp-collect {
	margin: 0 0 1.1em;
}

.bigm-pdp-collect__line {
	display: flex;
	align-items: flex-start;
	gap: 0.5em;
	margin: 0 0 0.45em;
	font-size: 0.95em;
	line-height: 1.5;
}

.bigm-pdp-collect__where {
	display: block;
}

/* Address drops to its own line, smaller and quieter than the location line. */
.bigm-pdp-collect__address {
	display: block;
	margin-top: 0.15em;
	font-size: 0.85em;
	line-height: 1.45;
	color: #6a6a6a;
}

.bigm-pdp-collect__directions {
	display: inline-block;
	margin-top: 0.15em;
	font-size: 0.82em;
	text-decoration: underline;
}

/* The one-hour window is the single most important thing on this page: miss it
   and the customer has paid for flowers they cannot collect. */
.bigm-pdp-collect__window {
	margin: 0;
	color: #c0261f;
	font-weight: 700;
	font-size: 0.92em;
	line-height: 1.4;
}

.bigm-pdp-map {
	margin: 1em 0 0;
	border: 1px solid #e3e3e3;
	border-radius: 8px;
	overflow: hidden;
	line-height: 0;
}

.bigm-pdp-map iframe {
	display: block;
	width: 100%;
	height: 180px;
	border: 0;
}

.bigm-pdp-howto {
	margin: 1.6em 0 0;
}

.bigm-pdp-howto h3 {
	margin: 0 0 0.6em;
	font-size: 1.05em;
}

.bigm-pdp-howto__steps {
	margin: 0;
	padding-left: 1.2em;
	font-size: 0.9em;
	line-height: 1.6;
}

.bigm-pdp-howto__steps li {
	margin: 0 0 0.45em;
}

.bigm-pdp-imagenote {
	margin: 0.6em 0 0;
	font-size: 0.85em;
	line-height: 1.5;
	text-align: center;
	color: #4a4a4a;
}

/* ---------------------------------------------------------------------------
   Card layout.

   Flatsome does NOT put WooCommerce's product_cat-* classes on the grid column,
   so vending cards cannot be targeted by category. They are instead identified
   by the presence of our own label, via :has() — which also means the rules
   simply do not apply on a browser without :has() support, leaving Flatsome's
   default layout intact rather than a broken half-applied one.

   Two groups, 0.8rem apart throughout:
     Group 1  category + title + collect label   — pinned to the top
     Group 2  price + button                     — pushed to the bottom
   so a long title pushes nothing down and prices line up across a row.
--------------------------------------------------------------------------- */

/* Scope to the CARD, never an ancestor. Flatsome's shop puts every product box
   inside a single `col large-12` wrapper, so a `.col:has(.bigm-collect)` rule
   matches that one wrapper and applies to all 12 cards — which collapsed the
   whole grid. The box itself is the only safe anchor.

   No percentage height either: `height: 100%` needs a definite height on every
   ancestor, and supplying one is what broke the layout. `align-self: stretch`
   is the default in a flex/grid row, so the card already fills the row height
   where the parent is one, and simply sizes to content where it is not. */
.product-small.box:has(.bigm-collect) {
	display: flex;
	flex-direction: column;
}

/* width:100% is load-bearing, not cosmetic.

   Flatsome sizes .box-image with a percentage `padding-top` aspect-ratio trick
   and positions the <img> absolutely, so the element's natural content width is
   0. As a block child it inherited the card's width; as a flex item it shrinks
   to that 0 and the image vanishes while still reporting HTTP 200. Note that
   `align-items: stretch` does NOT fix it — measured in-browser, it still
   computes to 0 — so an explicit width is the only reliable answer. */
.product-small.box:has(.bigm-collect) > .box-image {
	flex: 0 0 auto;
	width: 100%;
}

.box-text:has(.bigm-collect) {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
}

/* Gap owns the spacing now; the themes own margins would double it up. */
.box-text:has(.bigm-collect) > *,
.box-text:has(.bigm-collect) .title-wrapper > * {
	margin: 0;
}

/* Group 1 */
.box-text:has(.bigm-collect) .title-wrapper {
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
}

/* The category text is blanked in PHP, but Flatsome still prints the element.
   Left in place it would contribute a phantom 0.8rem gap above the title. */
.box-text:has(.bigm-collect) .category,
.box-text:has(.bigm-collect) .product-cat {
	display: none !important;
}

/* The chip should hug its content rather than stretch the full card width. */
.box-text:has(.bigm-collect) .bigm-collect {
	align-self: flex-start;
}

.box-text.text-center:has(.bigm-collect) .bigm-collect {
	align-self: center;
}

/* Group 2 — everything from the price down sits at the bottom. */
.box-text:has(.bigm-collect) .price-wrapper {
	margin-top: auto;
}
