/*
 * Vortex Store — WooCommerce.
 */

/* ------------------------------------------------------------------ */
/* Archive shell                                                       */
/* ------------------------------------------------------------------ */

.vs-archive__header { padding-block: 24px 8px; text-align: center; }
.vs-archive__title { margin: 0; }
.vs-archive__description { max-width: 70ch; margin: 12px auto 0; color: var(--vs-subtext); }
.vs-archive__count { margin: 8px 0 0; color: var(--vs-subtext); font-size: .9375rem; }

.vs-page-head--product .vs-breadcrumbs ol { justify-content: flex-start; }

.vs-shop { display: block; padding-bottom: 24px; }
.vs-shop__content { min-width: 0; }

@media (min-width: 1280px) {
	.vs-shop--sidebar { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: start; }
	.vs-shop--sidebar .vs-shop__sidebar { order: -1; position: sticky; top: 120px; }
}

.vs-shop__sidebar { display: none; }

@media (min-width: 1280px) { .vs-shop--sidebar .vs-shop__sidebar { display: block; } }

.vs-shop__sidebar .widget { margin-bottom: 28px; }
.vs-shop__sidebar .widget-title { margin-bottom: 12px; }
.vs-shop__sidebar ul li { margin-bottom: 8px; font-size: .9375rem; }
.vs-shop__sidebar ul li a { text-decoration: none; }
.vs-shop__sidebar ul li a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ */
/* Toolbar                                                             */
/* ------------------------------------------------------------------ */

.vs-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 24px;
}

.vs-toolbar__right {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 20px;
	margin-left: auto;
}

.vs-toolbar__filter { min-height: 44px; padding: 0 20px; }
.vs-toolbar__spacer { flex: 0 0 auto; }

.woocommerce-result-count { margin: 0; font-size: .9375rem; color: var(--vs-subtext); }

.woocommerce-ordering { margin: 0; display: flex; align-items: center; gap: 8px; }
.woocommerce-ordering select {
	min-height: 40px;
	width: auto;
	padding: 6px 40px 6px 12px;
	border: 0;
	background-color: transparent;
	font-size: .9375rem;
}

.vs-filters { padding: 20px; }
.vs-filters .widget { margin-bottom: 24px; }

/* ------------------------------------------------------------------ */
/* Product card                                                        */
/* ------------------------------------------------------------------ */

.vs-card {
	position: relative;
	display: flex;
	flex-direction: column;
	border-radius: var(--vs-radius-block);
	background: var(--vs-surface);
	overflow: hidden;
	transition: box-shadow .25s ease;
}

.vs-card:hover { box-shadow: 0 8px 28px rgba(var(--vs-fg-rgb), .07); }

.vs-card__media {
	position: relative;
	background: #fff;
	border-radius: var(--vs-radius-block) var(--vs-radius-block) 0 0;
	overflow: hidden;
}

.vs-card__imglink { display: block; position: relative; }

.vs-card__img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background: #fff;
	transition: transform .5s cubic-bezier(.3, 1, .3, 1), opacity .3s ease;
}

.vs-card__img--placeholder { display: block; background: var(--vs-surface); }

.vs-card__img--hover {
	position: absolute;
	inset: 0;
	height: 100%;
	opacity: 0;
}

@media (hover: hover) {
	.vs-card:hover .vs-card__img--main { transform: scale(1.04); }
	.vs-card:hover .vs-card__img--hover { opacity: 1; }
}

.vs-card__badges {
	position: absolute;
	top: 12px;
	left: 12px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	z-index: 2;
}

.vs-card__quickview {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
	cursor: pointer;
	opacity: 0;
	transform: translateY(-4px);
	transition: opacity .2s ease, transform .2s ease;
}

.vs-card:hover .vs-card__quickview,
.vs-card__quickview:focus-visible { opacity: 1; transform: translateY(0); }

@media (hover: none) { .vs-card__quickview { display: none; } }

.vs-card__info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1 1 auto;
	padding: 16px;
}

@media (min-width: 768px) { .vs-card__info { padding: 24px; } }

.vs-card__title {
	margin: 0;
	font-size: 1.12rem;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: var(--vs-heading-tracking);
}

.vs-card__title a { text-decoration: none; }
.vs-card__title a:hover { text-decoration: underline; }

.vs-card__price { margin-top: auto; padding-top: 8px; font-size: 1rem; font-weight: 700; }
.vs-card__price .amount { font-weight: 700; }
.vs-card__price del { font-weight: 400; opacity: .5; margin-right: 6px; }
.vs-card__price ins { text-decoration: none; color: var(--vs-primary); }

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

.vs-product { padding-block: 16px 0; }

.vs-product__layout {
	display: grid;
	gap: 32px;
	align-items: start;
}

@media (min-width: 1024px) {
	.vs-product__layout { grid-template-columns: minmax(0, 1fr) minmax(0, 42%); gap: 60px; }
	.vs-product__summary { position: sticky; top: 140px; }
}

.vs-product__gallery { position: relative; min-width: 0; }

.vs-product__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.woocommerce div.product .product_title { margin-bottom: .3em; }

.woocommerce div.product p.price,
.woocommerce div.product span.price {
	margin: 0 0 8px;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--vs-fg);
}

.woocommerce div.product p.price del { font-weight: 400; opacity: .5; }
.woocommerce div.product p.price ins { text-decoration: none; color: var(--vs-primary); }

.vs-product__taxnote { margin-bottom: 12px; font-size: .875rem; color: var(--vs-subtext); }
.vs-product__taxnote a { color: inherit; }

.vs-product__stock {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 16px;
	font-size: .9375rem;
}

.vs-product__stock-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--vs-badge-soldout);
}

.vs-product__stock--in  .vs-product__stock-dot { background: #559b60; }
.vs-product__stock--low .vs-product__stock-dot { background: #ffc107; }
.vs-product__stock--out .vs-product__stock-dot { background: var(--vs-badge-soldout); }

.woocommerce div.product form.cart { margin-block: 20px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.woocommerce div.product form.cart .variations { width: 100%; margin: 0 0 16px; }
.woocommerce div.product form.cart .button { flex: 1 1 200px; }

/* Variation selector as pill buttons, matching the source "Stav" picker. */
.woocommerce div.product form.cart .variations table,
.woocommerce div.product form.cart .variations tbody,
.woocommerce div.product form.cart .variations tr,
.woocommerce div.product form.cart .variations td { display: block; width: 100%; padding: 0; border: 0; }

.woocommerce div.product form.cart .variations label { font-weight: 700; margin-bottom: 8px; }
.woocommerce div.product form.cart .variations td.value { margin-bottom: 16px; }
.woocommerce div.product form.cart .reset_variations { display: inline-block; margin-top: 8px; font-size: .8125rem; }

.woocommerce div.product .woocommerce-variation-price { margin-bottom: 12px; }

.vs-qty {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding: 4px;
	border: 1px solid var(--vs-border);
	border-radius: var(--vs-radius-button);
	background: var(--vs-bg);
}

.vs-qty__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 38px;
	border: 0;
	border-radius: 50%;
	background: none;
	cursor: pointer;
}

.vs-qty__btn:hover:not(:disabled) { background: var(--vs-surface); }
.vs-qty__btn:disabled { opacity: .35; cursor: not-allowed; }

.vs-qty__input {
	width: 44px;
	min-height: 38px;
	padding: 0;
	border: 0;
	background: none;
	text-align: center;
	font-weight: 500;
	-moz-appearance: textfield;
}

.vs-qty__input::-webkit-outer-spin-button,
.vs-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.vs-product__description { margin-top: 24px; }
.vs-product__accordions { margin-top: 32px; }

/* Gallery */
.woocommerce div.product div.images { margin-bottom: 0; }
.woocommerce div.product div.images img { border-radius: var(--vs-radius-block); background: #fff; }
.woocommerce div.product div.images .flex-control-thumbs { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 10px; }
.woocommerce div.product div.images .flex-control-thumbs li { width: calc(20% - 8px); float: none; margin: 0; }
.woocommerce div.product div.images .flex-control-thumbs img { border-radius: 10px; border: 1px solid var(--vs-border); }
.woocommerce div.product div.images .woocommerce-product-gallery__trigger { top: 16px; right: 16px; }

/* Related products */
.related.products, .up-sells.products {
	padding-block: 60px;
}

.related.products > h2, .up-sells.products > h2,
.cross-sells > h2 {
	text-align: center;
	margin-bottom: 1em;
}

.related.products ul.products,
.up-sells.products ul.products,
.cross-sells ul.products {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 15px;
	margin: 0;
}

@media (min-width: 768px) {
	.related.products ul.products,
	.up-sells.products ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
}

/* ------------------------------------------------------------------ */
/* Quick view                                                          */
/* ------------------------------------------------------------------ */

.vs-quickview { padding: 20px; }
.vs-quickview__media { border-radius: var(--vs-radius-block); overflow: hidden; background: #fff; }
.vs-quickview__img { width: 100%; object-fit: contain; }
.vs-quickview__info { padding-top: 20px; }
.vs-quickview__title a { text-decoration: none; }
.vs-quickview__price { font-size: 1.125rem; font-weight: 700; margin-bottom: 16px; }
.vs-quickview__excerpt { font-size: .9375rem; color: var(--vs-subtext); }
.vs-quickview__actions { margin-top: 20px; display: grid; gap: 12px; }
.vs-quickview__actions .cart { display: flex; gap: 12px; align-items: center; }
.vs-quickview__actions .cart .vs-btn { flex: 1; }
.vs-quickview__full { font-size: .875rem; text-align: center; }

/* ------------------------------------------------------------------ */
/* Cart                                                                */
/* ------------------------------------------------------------------ */

.woocommerce-cart .vs-main,
.woocommerce-checkout .vs-main,
.woocommerce-account .vs-main { padding-bottom: 40px; }

.woocommerce table.shop_table {
	width: 100%;
	border: 0;
	border-radius: var(--vs-radius-block);
	background: var(--vs-surface);
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	padding: 16px;
	border: 0;
	border-bottom: 1px solid var(--vs-border);
	vertical-align: middle;
}

.woocommerce table.shop_table thead th { font-weight: 500; text-align: left; }
.woocommerce table.shop_table tr:last-child td { border-bottom: 0; }
.woocommerce table.cart img { width: 64px; border-radius: 10px; background: #fff; }
.woocommerce a.remove { color: var(--vs-fg) !important; font-weight: 400; }
.woocommerce a.remove:hover { background: var(--vs-primary); color: #fff !important; }

.woocommerce .cart-collaterals { margin-top: 32px; }
.woocommerce .cart_totals { padding: 24px; border-radius: var(--vs-radius-block); background: var(--vs-surface); }
.woocommerce .cart_totals h2 { margin-top: 0; }
.woocommerce .cart_totals table.shop_table { background: transparent; }
.woocommerce .wc-proceed-to-checkout { padding-top: 16px; }
.woocommerce .wc-proceed-to-checkout .button { width: 100%; }

@media (min-width: 1024px) {
	.woocommerce .cart-collaterals { display: flex; justify-content: flex-end; }
	.woocommerce .cart_totals { width: min(460px, 100%); }
}

.woocommerce .quantity .qty { width: 70px; text-align: center; }

/* Mini-cart */
.vs-minicart { padding: 20px; }
.vs-minicart .woocommerce-mini-cart { display: grid; gap: 16px; margin-bottom: 20px; }

.vs-minicart .woocommerce-mini-cart-item {
	display: grid;
	grid-template-columns: 64px 1fr auto;
	gap: 12px;
	align-items: start;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--vs-border);
}

.vs-minicart .woocommerce-mini-cart-item img { width: 64px; height: 64px; object-fit: contain; border-radius: 10px; background: #fff; grid-row: span 2; }
.vs-minicart .woocommerce-mini-cart-item a { text-decoration: none; font-size: .9375rem; font-weight: 500; }
.vs-minicart .woocommerce-mini-cart-item .quantity { font-size: .875rem; color: var(--vs-subtext); }
.vs-minicart .woocommerce-mini-cart-item a.remove { grid-column: 3; grid-row: 1; }

.vs-minicart .woocommerce-mini-cart__total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 0;
	border-top: 1px solid var(--vs-border);
	font-size: 1.0625rem;
	font-weight: 500;
}

.vs-minicart .woocommerce-mini-cart__buttons { display: grid; gap: 10px; }
.vs-minicart .woocommerce-mini-cart__buttons .button { width: 100%; }
.vs-minicart .woocommerce-mini-cart__buttons .checkout { background: var(--vs-btn-bg); color: var(--vs-btn-fg); }
.vs-minicart .woocommerce-mini-cart__empty-message { padding: 48px 0; text-align: center; color: var(--vs-subtext); }

/* ------------------------------------------------------------------ */
/* Checkout & account                                                  */
/* ------------------------------------------------------------------ */

.woocommerce-checkout .col2-set { display: grid; gap: 32px; }

@media (min-width: 1024px) {
	.woocommerce-checkout #customer_details.col2-set { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.woocommerce-checkout #customer_details .col-1,
	.woocommerce-checkout #customer_details .col-2 { width: 100%; float: none; }
}

.woocommerce form .form-row { margin: 0 0 16px; padding: 0; display: block; }
.woocommerce form .form-row label { display: block; }
.woocommerce form .form-row-first,
.woocommerce form .form-row-last { width: 100%; float: none; }

@media (min-width: 640px) {
	.woocommerce form .form-row-first,
	.woocommerce form .form-row-last { width: calc(50% - 8px); display: inline-block; vertical-align: top; }
	.woocommerce form .form-row-first { margin-right: 12px; }
}

.woocommerce #order_review,
.woocommerce-checkout #order_review_heading { margin-top: 32px; }

.woocommerce #payment {
	border-radius: var(--vs-radius-block);
	background: var(--vs-surface);
	padding: 20px;
}

.woocommerce #payment ul.payment_methods { border: 0; padding: 0; }
.woocommerce #payment div.form-row { padding: 16px 0 0; }
.woocommerce #payment #place_order { width: 100%; }

.woocommerce-account .woocommerce { display: grid; gap: 32px; }

@media (min-width: 1024px) {
	.woocommerce-account .woocommerce { grid-template-columns: 260px minmax(0, 1fr); }
}

.woocommerce-account .woocommerce-MyAccount-navigation { width: 100%; float: none; }
.woocommerce-account .woocommerce-MyAccount-navigation ul { display: grid; gap: 4px; }

.woocommerce-account .woocommerce-MyAccount-navigation li a {
	display: block;
	padding: 12px 16px;
	border-radius: var(--vs-radius-button);
	text-decoration: none;
	font-weight: 500;
}

.woocommerce-account .woocommerce-MyAccount-navigation li a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a { background: var(--vs-surface); }
.woocommerce-account .woocommerce-MyAccount-content { width: 100%; float: none; }

.woocommerce-form-login,
.woocommerce-form-register,
.woocommerce-ResetPassword {
	max-width: 520px;
	padding: 24px;
	border: 1px solid var(--vs-border);
	border-radius: var(--vs-radius-block);
}

/* ------------------------------------------------------------------ */
/* Notices                                                             */
/* ------------------------------------------------------------------ */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-noreviews {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin: 0 0 24px;
	padding: 16px 20px;
	border: 1px solid var(--vs-border);
	border-top: 3px solid var(--vs-fg);
	border-radius: 12px;
	background: var(--vs-surface);
	list-style: none;
}

.woocommerce-error { border-top-color: var(--vs-primary); }
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before { display: none; }
.woocommerce-message .button,
.woocommerce-info .button { margin-left: auto; min-height: 40px; padding: 0 24px; }

.woocommerce .woocommerce-breadcrumb { display: none; }

/* ------------------------------------------------------------------ */
/* WooCommerce Cart & Checkout blocks                                  */
/*                                                                     */
/* WooCommerce 8+ ships block-based cart and checkout. Rather than      */
/* downgrading them to the classic shortcodes, the block components are */
/* re-pointed at the theme's own design tokens.                         */
/* ------------------------------------------------------------------ */

.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout {
	width: 100%;
	max-width: calc(var(--vs-page-width) + 100px);
	margin-inline: auto;
	padding-inline: 15px;
	padding-block: 24px 40px;
}

@media (min-width: 768px)  { .wp-block-woocommerce-cart, .wp-block-woocommerce-checkout { padding-inline: 30px; } }
@media (min-width: 1280px) { .wp-block-woocommerce-cart, .wp-block-woocommerce-checkout { padding-inline: 50px; } }

.wc-block-components-button:not(.is-link) {
	min-height: 48px;
	padding: 0 40px;
	border-radius: var(--vs-radius-button);
	background-color: var(--vs-btn-bg);
	color: var(--vs-btn-fg);
	font-family: var(--vs-font-body);
	font-size: .875rem;
	font-weight: 500;
}

.wc-block-components-button:not(.is-link):hover { background-color: #333; color: var(--vs-btn-fg); }

.wc-block-components-button.is-link { color: var(--vs-fg); }

.wc-block-components-text-input input[type="text"],
.wc-block-components-text-input input[type="email"],
.wc-block-components-text-input input[type="tel"],
.wc-block-components-text-input input[type="number"],
.wc-block-components-textarea,
.wc-blocks-components-select__select {
	border: 1px solid var(--vs-border);
	border-radius: var(--vs-radius-button);
	background: var(--vs-field);
	font-family: var(--vs-font-body);
}

.wc-block-components-text-input.is-active input,
.wc-block-components-text-input input:focus { border-color: var(--vs-fg); }

.wc-block-components-sidebar-layout .wc-block-components-sidebar,
.wp-block-woocommerce-cart-order-summary-block,
.wp-block-woocommerce-checkout-order-summary-block {
	border-radius: var(--vs-radius-block);
	background: var(--vs-surface);
}

.wc-block-components-sidebar .wc-block-components-panel,
.wc-block-components-sidebar .wc-block-components-totals-item { padding-inline: 20px; }

.wc-block-cart-items__row td,
.wc-block-components-order-summary-item { border-color: var(--vs-border); }

.wc-block-cart-item__image img,
.wc-block-components-order-summary-item__image img {
	border-radius: 10px;
	background: #fff;
	object-fit: contain;
}

.wc-block-components-product-name { text-decoration: none; font-weight: 500; }
.wc-block-components-product-name:hover { text-decoration: underline; }

.wc-block-components-radio-control__option { border-radius: 12px; }

.wc-block-components-notice-banner {
	border-radius: 12px;
	font-family: var(--vs-font-body);
}

.wc-block-components-title,
.wp-block-woocommerce-cart h1,
.wp-block-woocommerce-checkout h1 {
	font-family: var(--vs-font-heading);
	font-weight: var(--vs-heading-weight);
	letter-spacing: var(--vs-heading-tracking);
}
