/* Shop pieces used on many pages: product cards and grids, prices, the product form (option
   dropdowns, quantity stepper), the "Added to your cart" panel, quick-add window, toast, pagination,
   breadcrumbs, star ratings and form fields. Values from the Arise theme CSS with Swanz's settings.
   Mobile = below 750px. */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
	word-wrap: normal !important;
}

ins { text-decoration: none; }

@keyframes swanz-fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes swanz-sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes swanz-spin { to { transform: rotate(360deg); } }

/* ---------- buttons: sizes and states ---------- */
.swanz-button { font-weight: 600; }
.swanz-button--lg { font-size: 17px; padding: 12px 21px; }
.swanz-button[disabled],
.swanz-button.is-disabled { opacity: 0.6; cursor: not-allowed; }
.swanz-button--dark { background: var(--wp--preset--color--scheme-3-text); border-color: var(--wp--preset--color--scheme-3-text); color: #fff; }
.swanz-button.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.swanz-button.is-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 18px;
	margin: -9px 0 0 -9px;
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-top-color: #fff;
	border-radius: 50%;
	animation: swanz-spin 0.8s linear infinite;
}
.swanz-button--secondary.is-loading::after { border-color: rgba(0, 0, 0, 0.2); border-top-color: #000; }
@media (min-width: 750px) {
	.swanz-button--lg { font-size: 19.125px; }
}

/* ---------- floating-label fields (contact form, reviews, coupon) ---------- */
.swanz-field { position: relative; margin: 0; }
.swanz-field input,
.swanz-field textarea { width: 100%; padding: 24px 6px 8px 16px; border: 1px solid rgba(0, 0, 0, 0.55); border-radius: 0; background: #fff; color: inherit; font: inherit; line-height: 1.15; }
.swanz-field textarea { min-height: 160px; padding-top: 28px; resize: vertical; }
.swanz-field input:hover,
.swanz-field input:focus,
.swanz-field textarea:hover,
.swanz-field textarea:focus { outline: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55); }
.swanz-field label { position: absolute; top: 50%; left: 17px; transform: translateY(-50%); transform-origin: left center; opacity: 0.6; pointer-events: none; transition: transform 0.3s ease; }
.swanz-field.is-textarea label { top: 23px; }
.swanz-field input:focus + label,
.swanz-field input:not(:placeholder-shown) + label { transform: translateY(-100%) scale(0.8); }
.swanz-field textarea:focus + label,
.swanz-field textarea:not(:placeholder-shown) + label { transform: translateY(-60%) scale(0.8); }

/* ---------- product card (Arise product-item) ---------- */
.swanz-card { display: flex; flex-direction: column; height: 100%; }
.swanz-card__media { position: relative; overflow: hidden; }
.swanz-card__image { position: relative; display: block; padding: var(--swanz-card-ratio, 100%) 0 0; background: var(--wp--preset--color--image-background); overflow: hidden; }
.swanz-card__image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: var(--swanz-card-fit, contain); transition: transform 0.5s ease, opacity 0.4s ease; }
.swanz-card__next { opacity: 0; }
.swanz-card__tag { position: absolute; top: 10px; left: 10px; z-index: 1; padding: 4px 12px; border-radius: 2px; background: #000; color: #fff; font-size: var(--swanz-body-4); line-height: 1.5; }
.swanz-card__actions { position: absolute; top: 50%; left: 0; right: 0; z-index: 2; padding: 0 20px; opacity: 0; transform: translateY(-50%); pointer-events: none; }
.swanz-card__add { display: block; width: 100%; margin-top: 10px; padding: 9px 0; font-size: 17px; text-align: center; }
.swanz-card__info { padding-top: 20px; }
.swanz-card__title { margin: 0; font-family: var(--wp--preset--font-family--body); font-weight: 500; font-size: var(--swanz-body-3); line-height: 1.6; word-break: break-word; }
.swanz-card__title a { color: var(--wp--preset--color--text); text-decoration: none; padding: 0; }
.swanz-card__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; margin-top: 6px; color: var(--wp--preset--color--price); }
.swanz-card__now { font-size: var(--swanz-body-3); font-weight: 600; }
.swanz-card__now.is-sale { color: var(--wp--preset--color--discount); }
.swanz-card__was { font-size: 13px; font-weight: 600; color: var(--wp--preset--color--text-light); }

/* Desktop with a mouse: zoom, second image, and "Add to cart" over the image (Arise shows it without a transition). */
@media (min-width: 750px) and (hover: hover) {
	.swanz-card__media:hover .swanz-card__image img { transform: scale(1.06); }
	.swanz-card__media:hover .swanz-card__image img.swanz-card__next { opacity: 1; }
	.swanz-card__media:hover .swanz-card__image:has(.swanz-card__next) img:not(.swanz-card__next) { opacity: 0; }
	.swanz-card__media:hover .swanz-card__actions,
	.swanz-card__media:focus-within .swanz-card__actions { opacity: 1; pointer-events: auto; }
	.swanz-card__media:hover .swanz-card__add { animation: swanz-fade-in 0.5s ease; }
}

@media (max-width: 749.98px), (hover: none) {
	.swanz-card__actions { display: none; }
	.swanz-card__next { display: none; }
}

@media (max-width: 749.98px) {
	.swanz-card__info { padding: 10px 0 0 10px; }
	.swanz-card__tag { top: 6px; left: 6px; padding: 3px 8px; }
}

/* ---------- product grids (category, search, recently viewed) ---------- */
.swanz-grid { display: grid; grid-template-columns: repeat(var(--swanz-cols-m, 2), minmax(0, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.swanz-grid__item { min-width: 0; }
@media (min-width: 750px) {
	.swanz-grid { gap: 20px; }
	.swanz-grid.is-from-md { grid-template-columns: repeat(var(--swanz-cols, 4), minmax(0, 1fr)); }
}
@media (min-width: 960px) {
	.swanz-grid { grid-template-columns: repeat(var(--swanz-cols, 4), minmax(0, 1fr)); }
}

/* ---------- pagination: [‹] 2/5 [›] ---------- */
.swanz-pagination { margin-top: 20px; text-align: center; }
.swanz-pagination__box { display: inline-flex; align-items: center; padding: 8px 10px; border: 1px solid #000; border-radius: 4px; font-size: var(--swanz-body-3); line-height: 1.5; }
.swanz-pagination__count { padding: 0 13px; }
.swanz-pagination__arrow { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; color: #000; }
.swanz-pagination__arrow.is-prev { margin-right: 5px; }
.swanz-pagination__arrow.is-next { margin-left: 5px; }
.swanz-pagination__arrow.is-next svg { transform: rotate(180deg); }
.swanz-pagination__arrow.is-disabled { opacity: 0.5; }
.swanz-pagination__info { margin: 12px 0 0; font-size: var(--swanz-body-4); }

/* ---------- prices ---------- */
.swanz-price { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; color: var(--wp--preset--color--price); }
.swanz-price__now { font-size: var(--swanz-body-1); font-weight: 700; line-height: 1.5; }
.swanz-price__now.is-sale { color: var(--wp--preset--color--discount); }
.swanz-price__was { font-size: var(--swanz-body-2); font-weight: 500; line-height: 1.5; color: var(--wp--preset--color--text-light); }

/* ---------- breadcrumbs (WooCommerce's, with Arise's " / ") ---------- */
.swanz-crumbs { font-size: var(--swanz-body-4); line-height: 1.5; }
.swanz-crumbs a { color: inherit; text-decoration: none; }
.swanz-crumbs__item:last-child { opacity: 0.6; }

/* ---------- "Key: value" option lists (cart, added panel) ---------- */
.swanz-options { margin: 10px 0 0; }
.swanz-options div { display: flex; flex-wrap: wrap; column-gap: 7px; }
.swanz-options dt { font-weight: 700; }
.swanz-options dd { margin: 0; font-weight: 400; }

/* ---------- product form ---------- */
.swanz-form { position: relative; }
.swanz-form > * + * { margin-top: 26px; }
.swanz-form > [type="hidden"],
.swanz-form > script { display: none; }
.swanz-form__label { display: block; margin-bottom: 10px; font-size: var(--swanz-body-3); font-weight: 600; line-height: 1.5; }
.swanz-form__stock { margin: 10px 0 0; font-size: var(--swanz-body-4); }
.swanz-form__submit { position: relative; width: 100%; min-height: 44px; }
.swanz-form__price .swanz-price__now { font-size: var(--swanz-body-3); }
.swanz-form__price .swanz-price__was { font-size: var(--swanz-body-3); font-weight: 700; }
.swanz-form__price { column-gap: 15px; }
@media (max-width: 749.98px) {
	.swanz-form > * + * { margin-top: 20px; }
}

/* Option dropdown ("pill"): native select without JavaScript, the enhanced one with it. */
.swanz-select { position: relative; }
.swanz-js .swanz-select__native,
html:not(.swanz-js) .swanz-select { display: none; }
.swanz-select__native { width: 100%; padding: 9px 11px; border: 1px solid rgba(0, 0, 0, 0.55); border-radius: 40px; background: #fff; font: inherit; font-size: var(--swanz-body-3); }
.swanz-select__trigger {
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 43.5px;
	padding: 8px 11px;
	border: 1px solid rgba(0, 0, 0, 0.55);
	border-radius: 40px;
	background: #fff;
	color: #000;
	font: inherit;
	font-size: var(--swanz-body-3);
	line-height: 1.5;
	text-align: left;
	cursor: pointer;
	transition: box-shadow 0.1s;
}
.swanz-select__trigger:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
.swanz-select__thumb { flex: none; width: 30px; height: 30px; margin-right: 8px; object-fit: contain; }
.swanz-select__value { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swanz-select__chevron { position: relative; flex: none; width: 10px; height: 10px; margin-left: 8px; transition: transform 0.2s; }
.swanz-select__chevron::before { content: ""; position: absolute; top: 0; left: 1.5px; width: 7px; height: 7px; border-left: 1px solid #000; border-bottom: 1px solid #000; transform: rotate(-45deg); }
.swanz-select.is-open .swanz-select__chevron { transform: rotate(180deg) translateY(-3px); }
.swanz-select__list {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 110;
	max-height: 480px;
	margin: 0;
	padding: 0;
	overflow: auto;
	list-style: none;
	background: #fff;
	border-radius: 4px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	animation: swanz-fade-in 0.2s ease;
}
.swanz-select__option { display: flex; align-items: center; gap: 8px; padding: 8px 12px; color: #000; font-size: 14px; line-height: 1.5; cursor: pointer; }
.swanz-select__option:hover,
.swanz-select__option:focus { background: rgba(0, 0, 0, 0.05); outline: none; }
.swanz-select__option:focus-visible { box-shadow: inset 0 0 0 2px #000; }
.swanz-select__image { flex: none; width: 30px; height: 30px; object-fit: contain; }
.swanz-select__name { flex: 1 1 auto; overflow-wrap: anywhere; }
.swanz-select__check { flex: none; visibility: hidden; }
.swanz-select__option[aria-selected="true"] .swanz-select__check { visibility: visible; }
.swanz-select__option.is-unavailable .swanz-select__name,
.swanz-select__option.is-unavailable .swanz-select__image { opacity: 0.3; }
.swanz-select__overlay { position: fixed; inset: 0; z-index: 999; background: rgba(23, 23, 23, 0.6); }
.swanz-select__overlay[hidden] { display: none; }
@media (min-width: 750px) and (hover: hover) {
	.swanz-select__trigger:hover { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55); }
}
@media (max-width: 749.98px) {
	.swanz-select__trigger { min-height: 40px; }
	/* Bottom sheet */
	.swanz-select__list { position: fixed; top: auto; bottom: 0; z-index: 1000; max-height: 80%; min-height: 30vh; padding-top: 8px; border-radius: 0; box-shadow: none; animation: swanz-sheet-in 0.2s ease; }
	.swanz-select__option { padding: 8px 20px; }
}

/* Quantity stepper: − [n] + in a square outline. */
.swanz-stepper { display: inline-flex; align-items: stretch; width: 108px; padding: 1px; border: 1px solid rgba(0, 0, 0, 0.55); background: #fff; }
.swanz-stepper__button { display: grid; flex: none; place-items: center; width: 28px; padding: 4px 0; border: 0; background: none; color: #000; cursor: pointer; }
.swanz-stepper__button:disabled { opacity: 0.4; cursor: not-allowed; }
.swanz-stepper__button:focus-visible,
.swanz-stepper__input:focus-visible { outline: 2px solid #000; outline-offset: -2px; }
.swanz-stepper__input { flex: 1 1 auto; width: 100%; min-width: 0; padding: 6px 0; border: 0; background: transparent; color: #000; font: inherit; font-size: var(--swanz-body-3); text-align: center; -moz-appearance: textfield; appearance: textfield; }
.swanz-stepper__input::-webkit-outer-spin-button,
.swanz-stepper__input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
@media (min-width: 750px) and (hover: hover) {
	.swanz-stepper:hover { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55); }
}
@media (max-width: 749.98px) {
	.swanz-stepper { width: 100px; }
}

/* ---------- star ratings ---------- */
.swanz-stars {
	--swanz-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.2 6.8.8-5 4.7 1.3 6.8L12 17.6 6 21l1.3-6.8-5-4.7 6.8-.8z'/%3E%3C/svg%3E");
	display: inline-block;
	width: 90px;
	height: 18px;
	background: linear-gradient(90deg, #000 var(--swanz-rating, 0%), rgba(0, 0, 0, 0.15) var(--swanz-rating, 0%));
	-webkit-mask: var(--swanz-star) repeat-x 0 0 / 18px 18px;
	mask: var(--swanz-star) repeat-x 0 0 / 18px 18px;
	vertical-align: middle;
}

/* ---------- "Added to your cart" panel (hangs from the bottom of the header) ---------- */
.swanz-added { position: relative; z-index: 3; height: 0; }
.swanz-added[hidden] { display: none; }
.swanz-added__clip { position: absolute; top: 0; right: var(--swanz-gutter); width: 480px; max-width: calc(100% - 2 * var(--swanz-gutter)); clip-path: inset(0 -40px -40px -40px); pointer-events: none; }
.swanz-added.is-pinned .swanz-added__clip { position: fixed; right: max(var(--swanz-gutter), calc((100vw - var(--swanz-page-width)) / 2)); }
.swanz-added__panel {
	position: relative;
	max-height: calc(100vh - 20px);
	padding: 40px;
	overflow-y: auto;
	background: #fff;
	color: #000;
	pointer-events: auto;
	transform: translateY(-100%);
	transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s ease 0.15s;
}
.swanz-added.is-open .swanz-added__panel { transform: none; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); }
.swanz-added__panel:focus { outline: none; }
.swanz-added__close { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; background: none; color: #000; cursor: pointer; }
.swanz-added__title { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--wp--preset--font-family--title); font-size: 20px; font-weight: 600; line-height: 1.2; }
.swanz-added__item { display: flex; gap: 30px; margin: 35px 0 40px; }
.swanz-added__image { flex: none; width: 100px; }
.swanz-added__image img { display: block; width: 100%; height: auto; }
.swanz-added__info { min-width: 0; }
.swanz-added__name { display: -webkit-box; margin: 0; overflow: hidden; font-size: var(--swanz-body-2); line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.swanz-added__options { font-size: var(--swanz-body-4); }
.swanz-added__price { margin: 6px 0 0; color: var(--wp--preset--color--price); font-size: var(--swanz-body-2); font-weight: 600; }
.swanz-added__subtotal { display: flex; align-items: baseline; gap: 12px; margin: 0 0 20px; }
.swanz-added__subtotal span { color: var(--wp--preset--color--text-light); font-size: var(--swanz-body-2); }
.swanz-added__subtotal strong { font-size: var(--swanz-body-1); font-weight: 600; }
.swanz-added__button { display: flex; width: 100%; }
.swanz-added__button + .swanz-added__button { margin-top: 10px; }
@media (max-width: 749.98px) {
	.swanz-added__clip { left: 0; right: 0; width: auto; max-width: none; }
	.swanz-added.is-pinned .swanz-added__clip { left: 0; right: 0; }
	.swanz-added__panel { padding: 40px 20px; }
	.swanz-added__title { font-size: 18px; }
}

/* ---------- quick-add window (products with options, from a card) ---------- */
.swanz-quick-add { width: 600px; max-width: calc(100% - 40px); max-height: calc(100vh - 120px); padding: 0; overflow: visible; border: 1px solid rgba(0, 0, 0, 0.1); background: #fff; color: #000; }
.swanz-quick-add::backdrop { background: rgba(23, 23, 23, 0.6); }
.swanz-quick-add__body { min-height: 200px; max-height: calc(100vh - 120px); padding: 48px; overflow-y: auto; }
.swanz-quick-add__close { position: absolute; top: 0; right: 0; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--wp--preset--color--button); color: #fff; cursor: pointer; transform: translate(40%, -40%); transition: transform 0.2s ease; }
.swanz-quick-add__close:hover { transform: translate(40%, -40%) scale(1.08); }
.swanz-quick__title { margin: 0 0 26px; font-family: var(--wp--preset--font-family--title); font-size: var(--swanz-title-6); font-weight: 600; line-height: 1.2; }
.swanz-quick__title a { color: inherit; text-decoration: none; }
@media (max-width: 749.98px) {
	.swanz-quick-add { width: 100%; max-width: 100%; max-height: 90vh; margin: auto 0 0; border: 0; }
	.swanz-quick-add[open] { animation: swanz-sheet-in 0.25s ease; }
	.swanz-quick-add__body { max-height: 90vh; padding: 20px; }
	.swanz-quick-add__close { transform: translate(-11px, -50%); }
	.swanz-quick-add__close:hover { transform: translate(-11px, -50%); }
}

/* ---------- toast ---------- */
.swanz-toast {
	position: fixed;
	top: 50%;
	left: 50%;
	z-index: 2000;
	max-width: calc(100% - 40px);
	padding: 16px 32px;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.85);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	color: #fff;
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, -50%);
	transition: opacity 0.2s ease;
}
.swanz-toast.is-visible { opacity: 1; }

/* ---------- WooCommerce notices (only printed where a page can't handle a message itself) ---------- */
.swanz-notices { margin-bottom: 20px; }
.swanz-notices ul,
.swanz-notices .woocommerce-message,
.swanz-notices .woocommerce-info,
.swanz-notices .woocommerce-error { margin: 0 0 10px; padding: 12px 16px; list-style: none; border: 1px solid currentColor; font-size: var(--swanz-body-4); }
.swanz-notices .woocommerce-error { color: #f04949; }
.swanz-notices .button { margin-left: 10px; color: inherit; }

/* ---------- recently viewed ---------- */
.swanz-recent[hidden] { display: none; }
.swanz-recent__title { margin: 0 0 30px; font-family: var(--wp--preset--font-family--title); font-size: var(--swanz-title-4); font-weight: 600; line-height: 1; text-align: center; }

@media (prefers-reduced-motion: reduce) {
	.swanz-added__panel,
	.swanz-card__image img,
	.swanz-toast { transition: none; }
	.swanz-select__list,
	.swanz-quick-add[open],
	.swanz-card__media:hover .swanz-card__add { animation: none; }
}
