/* flower_cart: the cart page (flower_cart.tpl, flower_cart_items.tpl), layout A of mockup-3.html.
 * Loaded after flower-checkout.css, which gives the tokens (.fc-page: --fc-color = var(--main-theme-color) ...), the plain top
 * (.fc-top), the "Change" sheet (.fc-sheet), .fc-submit, .fc-button, .fc-totals and hides the site's header.
 * Phone first: one column, the summary after the items; >= 992px items left, summary right (sticky). Touch targets >= 40px. */

.fcart-page { padding-bottom: 28px; min-height: 60vh; }
.fcart { margin: 0 auto; max-width: 1040px; }

/* the plain top: phones show only the lock (mockup), the text stays for screen readers */
.fcart-top__secure-text { margin-left: 4px; }

.fcart-title { margin: 14px 12px 2px; font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--fc-text); font-family: inherit; }
.fcart-title__count { font-size: 15px; font-weight: 400; color: var(--fc-muted); }

/* ---------- item cards ---------- */
.fcart-items { list-style: none; background: #fff; border: 1px solid var(--fc-border); border-radius: 12px; margin: 10px 12px; padding: 0 12px; }
.fcart-item { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; }
.fcart-item + .fcart-item { border-top: 1px solid var(--fc-border); }
.fcart-item__img { flex: none; display: block; }
.fcart-item__img img { display: block; width: 64px; height: 64px; border-radius: 8px; object-fit: cover; }
.fcart-item__body { flex: 1 1 auto; min-width: 0; }
.fcart-item__name { margin: 0 34px 0 0; font-size: 16px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.fcart-item__name a { color: var(--fc-text); text-decoration: none; }
.fcart-item__name a:hover, .fcart-item__name a:focus { color: var(--fc-color); text-decoration: underline; }
.fcart-item__when { margin: 3px 0 0; font-size: 14px; color: #374151; }
/* the time on its own line, then Change (40px tall touch target that does not stretch the line) */
.fcart-item__slot { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; margin: 1px 0 0; font-size: 14px; color: #374151; }
.fcart-change {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	margin: -8px 0;
	padding: 0 4px;
	border: 0;
	background: none;
	color: var(--fc-color);
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: underline;
	cursor: pointer;
}
.fcart-change:hover, .fcart-change:focus { color: var(--fc-color); text-decoration: none; }
.fcart-item__options { list-style: none; margin: 4px 0 0; padding: 0; font-size: 14px; color: var(--fc-muted); line-height: 1.4; }
.fcart-item__options li { overflow-wrap: anywhere; }
.fcart-item__message { margin: 6px 0 0; padding: 6px 9px; border-radius: 8px; background: #fdecea; color: var(--fc-error); font-size: 14px; line-height: 1.35; }

.fcart-item__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; margin-top: 10px; }
.fcart-stepper { display: inline-flex; align-items: stretch; border: 1.5px solid var(--fc-input); border-radius: 8px; overflow: hidden; background: #fff; }
.fcart-minus, .fcart-plus {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: #fff;
	color: var(--fc-color);
	font-family: inherit;
	font-size: 22px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}
.fcart-minus:hover, .fcart-plus:hover, .fcart-minus:focus, .fcart-plus:focus { background: var(--fc-light); outline: none; }
.fcart-minus:focus-visible, .fcart-plus:focus-visible { box-shadow: inset 0 0 0 2px var(--fc-color); }
.fcart-qty { display: flex; align-items: center; justify-content: center; min-width: 36px; padding: 0 4px; border-left: 1px solid var(--fc-border); border-right: 1px solid var(--fc-border); font-size: 17px; font-weight: 700; color: var(--fc-text); }
.fcart-item__total { margin-left: auto; font-size: 17px; font-weight: 700; white-space: nowrap; color: var(--fc-text); }

/* small ✕ top right: 40px target, the glyph sits near the card's corner */
.fcart-remove {
	position: absolute;
	top: 2px;
	right: -10px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: #9aa0a6;
	font-family: inherit;
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
}
.fcart-remove:hover, .fcart-remove:focus { background: #f1f2f4; color: var(--fc-text); outline: none; }

/* ---------- summary ---------- */
.fcart-summary { background: #fff; border: 1px solid var(--fc-border); border-radius: 12px; margin: 10px 12px; padding: 14px; }
.fcart-summary__title { margin: 0 0 6px; font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--fc-text); font-family: inherit; }
.fcart-summary .fc-totals { margin: 0; }
.fcart-summary .fc-totals__row--total { font-size: 17px; }
.fcart .fcart-checkout { margin-top: 14px; color: #fff; text-decoration: none; }
.fcart .fcart-checkout:hover, .fcart .fcart-checkout:focus { color: #fff; text-decoration: none; filter: brightness(.94); }
/* a closed day (flower_closed_days): the notice where the checkout button is */
.fcart .fcart-closed { margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; background: #fdecea; color: #a12a1f; font-weight: 600; text-align: center; }
.fcart .fcart-continue { display: block; margin-top: 6px; padding: 8px 0 2px; text-align: center; font-size: 15px; color: var(--fc-muted); text-decoration: underline; }
.fcart .fcart-continue:hover, .fcart .fcart-continue:focus { color: var(--fc-text); }

/* ---------- empty cart ---------- */
.fcart-empty { background: #fff; border: 1px solid var(--fc-border); border-radius: 12px; margin: 10px 12px; padding: 32px 16px 28px; text-align: center; }
.fcart-empty__icon { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: #f1f2f4; font-size: 30px; }
.fcart-empty__text { margin: 0; font-size: 17px; font-weight: 700; color: var(--fc-text); }
.fcart .fcart-empty__start { max-width: 280px; margin: 18px auto 0; color: #fff; text-decoration: none; }
.fcart .fcart-empty__start:hover, .fcart .fcart-empty__start:focus { color: #fff; text-decoration: none; filter: brightness(.94); }

/* ---------- remove confirmation (outside .fc-page: its own tokens, like .fc-sheet) ---------- */
.fcart-confirm { --fc-color: var(--main-theme-color, #127C35); --fc-light: #f3f8f4; --fc-input: #d5d9de; --fc-muted: #6b7280; --fc-text: #1f2328; position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .45); color: var(--fc-text); font-size: 16px; line-height: 1.4; }
.fcart-confirm[hidden] { display: none; }
.fcart-confirm *, .fcart-confirm *::before, .fcart-confirm *::after { box-sizing: border-box; }
.fcart-confirm__box { position: relative; width: 100%; max-width: 380px; max-height: 90vh; overflow-y: auto; padding: 22px 18px 18px; border-radius: 14px; background: #fff; text-align: center; }
.fcart-confirm__close { position: absolute; top: 6px; right: 6px; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: none; color: #57606a; font-size: 24px; line-height: 1; cursor: pointer; }
.fcart-confirm__close span { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #f1f2f4; }
.fcart-confirm__icon { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; margin: 0 auto 10px; border-radius: 50%; background: #f1f2f4; font-size: 28px; }
.fcart-confirm__title { margin: 0 12px 4px; font-size: 17px; font-weight: 700; line-height: 1.35; }
.fcart-confirm__line { margin: 0 0 14px; font-size: 14px; color: var(--fc-muted); overflow-wrap: anywhere; }
.fcart-confirm__line:empty { display: none; }
.fcart-confirm .fcart-confirm__keep { min-height: 46px; font-family: inherit; font-size: 17px; }
.fcart-confirm__remove { display: block; width: 100%; font-family: inherit; min-height: 46px; margin-top: 8px; padding: 11px 16px; border: 1.5px solid var(--fc-input); border-radius: 10px; background: #fff; color: var(--fc-text); font-size: 17px; font-weight: 600; cursor: pointer; }
.fcart-confirm__remove:hover, .fcart-confirm__remove:focus { border-color: #9aa0a6; outline: none; }
.fcart-confirm__keep:focus-visible, .fcart-confirm__remove:focus-visible, .fcart-confirm__close:focus-visible { box-shadow: 0 0 0 3px var(--fc-light), 0 0 0 5px var(--fc-color); }

/* ---------- phones ---------- */
@media (max-width: 479px) {
	.fcart-page .fc-top__secure { flex: 0 0 auto; }
	.fcart-top__secure-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- desktop ---------- */
@media (min-width: 992px) {
	.fcart { padding: 0 24px; }
	.fcart-title { margin: 22px 0 14px; font-size: 24px; }
	.fcart-title__count { font-size: 17px; }
	.fcart-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
	.fcart-items, .fcart-summary, .fcart-empty { margin: 0; }
	.fcart .fcart-items { padding: 0 16px; }
	.fcart-item { gap: 16px; padding: 16px 0; }
	.fcart-item__img img { width: 88px; height: 88px; }
	.fcart-item__name { font-size: 17px; }
	.fcart-summary { position: sticky; top: 16px; padding: 16px; }
}
