/* Commerce Platform storefront features. Theme tokens with safe fallbacks. */

/* Wishlist heart */
.pc-wish {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
	border: 0; background: none; padding: 0; cursor: pointer; color: var(--wp--preset--color--heading, #222);
	font: inherit; font-weight: 600;
}
.pc-wish svg { width: 22px; height: 22px; }
.pc-wish svg path { fill: transparent; stroke: currentColor; stroke-width: 1.7; transition: fill 0.15s ease; }
.pc-wish[aria-pressed="true"] svg path { fill: var(--wp--preset--color--sale, #c0392b); stroke: var(--wp--preset--color--sale, #c0392b); }
.pc-wish--icon {
	width: 2.5rem; height: 2.5rem; border-radius: 50%;
	background: color-mix(in srgb, var(--wp--preset--color--surface, #fff) 92%, transparent);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.pc-wish__label { font-size: 0.875rem; }

/* Header wishlist link */
.pc-wishlist-link { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; color: var(--wp--preset--color--heading, #222); }
.pc-wishlist-link svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.pc-wishlist-link__count {
	position: absolute; top: 2px; right: 0; min-width: 1.1rem; height: 1.1rem; padding: 0 0.25rem; border-radius: 999px;
	font-size: 0.6875rem; font-weight: 800; line-height: 1.1rem; text-align: center;
	background: var(--wp--preset--color--highlight, #c9a84c); color: var(--wp--preset--color--inverse, #1a3d2b);
}
.pc-wishlist-link__count[hidden] { display: none; }

/* Product lists (wishlist page, recently viewed) */
.pc-mini-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--wp--preset--spacing--sm, 1rem); grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
.pc-mini-card { position: relative; display: flex; flex-direction: column; gap: 0.4rem; height: 100%;
	background: var(--wp--preset--color--surface, #fff); border: 1px solid var(--wp--preset--color--border, #ddd);
	border-radius: var(--wp--custom--radius--medium, 8px); padding: 0 0 0.75rem; overflow: hidden; }
.pc-mini-card img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; }
.pc-mini-card > *:not(img) { margin: 0 0.75rem; }
.pc-mini-card__name { font-weight: 600; color: var(--wp--preset--color--heading, inherit); text-decoration: none; line-height: 1.3; }
.pc-mini-card__price { font-weight: 800; color: var(--wp--preset--color--heading, inherit); }
.pc-mini-card__price del { font-weight: 400; color: var(--wp--preset--color--muted, #666); margin-right: 0.3rem; }
.pc-mini-card__price del[hidden], .pc-mini-card__oos[hidden] { display: none; }
.pc-mini-card__oos { font-size: 0.75rem; font-weight: 700; color: var(--wp--preset--color--muted, #666); text-transform: uppercase; letter-spacing: 0.08em; }
.pc-mini-card__remove { margin-top: auto !important; align-self: flex-start; border: 0; background: none; padding: 0; cursor: pointer; font-size: 0.8125rem; color: var(--wp--preset--color--muted, #666); text-decoration: underline; }
.pc-recently-viewed[hidden], .pc-wishlist__empty[hidden], .pc-wishlist__list[hidden] { display: none; }
.pc-recently-viewed__title { margin-bottom: var(--wp--preset--spacing--sm, 1rem); }

/* Quick view */
.pc-quick-view-btn {
	position: absolute; left: 50%; bottom: 0.75rem; transform: translateX(-50%); z-index: 3;
	border: 0; border-radius: var(--wp--custom--radius--pill, 999px); padding: 0.5rem 1rem; cursor: pointer;
	background: var(--wp--preset--color--surface, #fff); color: var(--wp--preset--color--heading, #222);
	font: inherit; font-size: 0.8125rem; font-weight: 700; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	opacity: 0; transition: opacity 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
	.pc-product-card:hover .pc-quick-view-btn, .pc-quick-view-btn:focus-visible { opacity: 1; }
}
@media not ((hover: hover) and (pointer: fine)) { .pc-quick-view-btn { display: none; } }
.pc-quick-view {
	width: min(880px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: 0; border: 0;
	border-radius: var(--wp--custom--radius--large, 12px); background: var(--wp--preset--color--surface, #fff);
	color: var(--wp--preset--color--ink, inherit);
	display: grid; grid-template-columns: 1fr 1fr; overflow: auto;
}
.pc-quick-view:not([open]) { display: none; }
.pc-quick-view::backdrop { background: rgba(10, 20, 15, 0.55); }
.pc-quick-view__close { position: absolute; top: 0.5rem; right: 0.75rem; border: 0; background: none; font-size: 1.75rem; line-height: 1; cursor: pointer; color: var(--wp--preset--color--heading, #222); z-index: 2; }
.pc-quick-view__media { background: #fff; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.pc-quick-view__media img { max-width: 100%; max-height: 60vh; object-fit: contain; }
.pc-quick-view__body { padding: 2rem 1.75rem; display: flex; flex-direction: column; gap: 0.75rem; }
.pc-quick-view__title { margin: 0; font-size: var(--wp--preset--font-size--xl, 1.5rem); }
.pc-quick-view__price { margin: 0; font-weight: 800; font-size: 1.25rem; color: var(--wp--preset--color--heading, inherit); }
.pc-quick-view__price del { font-weight: 400; color: var(--wp--preset--color--muted, #666); }
.pc-quick-view__summary { margin: 0; color: var(--wp--preset--color--text-secondary, inherit); }
.pc-quick-view__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 0.5rem; }
.pc-quick-view__add { min-height: 3rem; flex: 1 1 10rem; }
.pc-quick-view__more { font-weight: 700; color: var(--wp--preset--color--primary, inherit); }
.pc-quick-view__status { margin: 0; font-size: 0.875rem; }
@media (max-width: 640px) { .pc-quick-view { grid-template-columns: 1fr; } }

/* Notify me */
.pc-notify { border: 1px solid var(--wp--preset--color--border, #ddd); border-radius: var(--wp--custom--radius--medium, 8px); padding: var(--wp--preset--spacing--sm, 1rem); background: var(--wp--preset--color--surface, #fff); }
.pc-notify__title { margin: 0 0 0.25rem; font-weight: 700; color: var(--wp--preset--color--heading, inherit); }
.pc-notify__text { margin: 0 0 0.75rem; font-size: 0.875rem; color: var(--wp--preset--color--text-secondary, inherit); }
.pc-notify__row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pc-notify__row input[type="email"] { flex: 1 1 12rem; min-height: 3rem; }
.pc-notify__row button { min-height: 3rem; background: var(--wp--preset--color--secondary, #222); color: var(--wp--preset--color--on-inverse, #fff); }
.pc-notify__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pc-notify__fine { margin: 0.5rem 0 0; font-size: 0.75rem; color: var(--wp--preset--color--muted, #666); }
.pc-notify__msg { margin: 0.5rem 0 0; font-weight: 600; }
.pc-notify.is-done .pc-notify__form { display: none; }
.pc-notify__msg:empty { display: none; }

/* Free-delivery bar */
.pc-free-ship { padding: 0.75rem 1rem; border-radius: var(--wp--custom--radius--medium, 8px); background: var(--wp--preset--color--surface-alt, #f3f3f3); }
.pc-free-ship__msg { margin: 0 0 0.5rem; font-size: 0.875rem; font-weight: 600; color: var(--wp--preset--color--heading, inherit); }
.pc-free-ship__track { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--wp--preset--color--heading, #222) 12%, transparent); overflow: hidden; }
.pc-free-ship__fill { height: 100%; width: 0; border-radius: inherit; background: var(--wp--preset--color--primary, #1f7a55); transition: width 0.3s ease; }
.pc-free-ship.is-unlocked .pc-free-ship__fill { background: var(--wp--preset--color--highlight, #c9a84c); }
.wc-block-mini-cart__drawer .pc-free-ship { margin: 0 var(--wp--style--root--padding-left, 1rem) 0.75rem; }
@media (prefers-reduced-motion: reduce) { .pc-free-ship__fill, .pc-wish svg path, .pc-quick-view-btn { transition: none; } }

/* ---------- Cart drawer ---------- */
.pc-cart-drawer__button { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; padding: 0; border: 0; background: none; cursor: pointer; color: var(--wp--preset--color--heading, currentColor); border-radius: var(--wp--custom--radius--small, 4px); }
.pc-cart-drawer__button:hover { color: var(--wp--preset--color--primary, currentColor); }
.pc-cart-drawer__count { position: absolute; top: 2px; right: 0; min-width: 1.1rem; height: 1.1rem; padding: 0 0.25rem; border-radius: 999px; font-size: 0.6875rem; font-weight: 800; line-height: 1.1rem; text-align: center; background: var(--wp--preset--color--highlight, #c9a84c); color: var(--wp--preset--color--inverse, #1a3d2b); }
.pc-cart-drawer__count[hidden] { display: none; }
.pc-cart-drawer__panel {
	position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0; width: min(26rem, 100%); max-width: 100%; height: 100%; max-height: none; border: 0;
	background: var(--wp--preset--color--background, #fff); color: var(--wp--preset--color--ink, inherit);
	display: none; flex-direction: column; box-shadow: -12px 0 32px rgba(0, 0, 0, 0.18);
}
.pc-cart-drawer__panel[open] { display: flex; animation: pc-drawer-in 0.2s ease-out; }
.pc-cart-drawer__panel::backdrop { background: rgba(10, 20, 15, 0.5); }
@keyframes pc-drawer-in { from { transform: translateX(2rem); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pc-cart-drawer__panel[open] { animation: none; } }
.pc-cart-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--wp--preset--color--border, #ddd); }
.pc-cart-drawer__head h2 { margin: 0; font-size: 1.375rem; }
.pc-cart-drawer__close { border: 0; background: none; font-size: 1.75rem; line-height: 1; cursor: pointer; color: var(--wp--preset--color--heading, #222); }
.pc-cart-drawer__body { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; display: grid; gap: 1rem; align-content: start; }
.pc-cart-drawer__body .pc-free-ship { margin: 0; }
.pc-cart-drawer__empty { margin: 0; color: var(--wp--preset--color--text-secondary, inherit); }
.pc-cart-drawer__empty[hidden] { display: none; }
.pc-cart-drawer__note { margin: 0; color: var(--wp--preset--color--sale, #9c3d1f); font-weight: 600; font-size: 0.875rem; }
.pc-cart-drawer__note:empty { display: none; }
.pc-cart-drawer__items { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.pc-cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 0.75rem; align-items: start; padding-bottom: 1rem; border-bottom: 1px solid var(--wp--preset--color--border, #eee); }
.pc-cart-line__img img { width: 64px; height: 64px; object-fit: contain; background: #fff; border: 1px solid var(--wp--preset--color--border, #eee); border-radius: var(--wp--custom--radius--small, 4px); }
.pc-cart-line__main { display: grid; gap: 0.35rem; }
.pc-cart-line__name { font-weight: 700; color: var(--wp--preset--color--heading, inherit); text-decoration: none; line-height: 1.3; }
.pc-cart-line__variation { font-size: 0.8125rem; color: var(--wp--preset--color--muted, #666); }
.pc-cart-line__variation:empty { display: none; }
.pc-cart-line__qty { display: inline-flex; align-items: center; border: 1px solid var(--wp--preset--color--border, #ccc); border-radius: var(--wp--custom--radius--small, 4px); width: fit-content; }
.pc-cart-line__qty button { width: 2.25rem; height: 2.25rem; border: 0; background: none; font-size: 1.125rem; cursor: pointer; color: var(--wp--preset--color--heading, inherit); }
.pc-cart-line__qty button:disabled { opacity: 0.4; cursor: default; }
.pc-cart-line__qty span { min-width: 2rem; text-align: center; font-weight: 700; }
.pc-cart-line__side { display: grid; justify-items: end; gap: 0.5rem; }
.pc-cart-line__price { font-weight: 800; color: var(--wp--preset--color--heading, inherit); }
.pc-cart-line__remove { border: 0; background: none; padding: 0; cursor: pointer; font-size: 0.8125rem; color: var(--wp--preset--color--muted, #666); text-decoration: underline; }
.pc-cart-drawer__foot { padding: 1rem 1.25rem 1.25rem; border-top: 1px solid var(--wp--preset--color--border, #ddd); display: grid; gap: 0.5rem; background: var(--wp--preset--color--surface, #fff); }
.pc-cart-drawer__foot[hidden] { display: none; }
.pc-cart-drawer__subtotal { margin: 0; display: flex; justify-content: space-between; font-size: 1.0625rem; }
.pc-cart-drawer__fine { margin: 0; font-size: 0.8125rem; color: var(--wp--preset--color--muted, #666); }
.pc-cart-drawer__checkout { display: flex; justify-content: center; min-height: 3rem; align-items: center; text-decoration: none; }
.pc-cart-drawer__view { text-align: center; font-weight: 600; color: var(--wp--preset--color--primary, inherit); }
