/* =====================================================================
   Half Skull — shop archive, cart and checkout
   Same light system as the rest of the store: white surfaces, 1px
   borders, 10-16px radii, black primary action, red accent.
   ===================================================================== */

/* =====================================================================
   Shop / category archive
   ===================================================================== */

.woocommerce-products-header {
	margin: 0 0 18px;
	padding: 0;
}

.woocommerce-products-header__title,
.archive-shop .page-title {
	margin: 0 0 6px;
	font-size: 26px;
	font-weight: 600;
	color: var(--hs-ink);
	line-height: 1.25;
}

.woocommerce-products-header .term-description p {
	margin: 0;
	font-size: 14px;
	line-height: 1.7;
	color: var(--hs-muted);
	max-width: 720px;
}

/* ---------- toolbar: count on the left, sort on the right ---------- */
/* The theme's toolbar row is .main-filter; its children are sized to a
   third each, which stacked them once the row was made to wrap. */
.archive-shop .tbay-filter {
	margin: 0 0 22px;
	padding: 0;
	border: 0;
	background: none;
}

.archive-shop .tbay-filter .main-filter {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end !important;
	gap: 10px;
	margin: 0;
	padding: 10px 14px;
	border: 1px solid var(--hs-line);
	border-radius: var(--hs-r-md);
	background: var(--hs-surface-2);
}

.archive-shop .tbay-filter .main-filter > * {
	flex: 0 0 auto !important;
	width: auto !important;
	max-width: none !important;
	margin: 0;
}

.archive-shop .tbay-filter .main-filter > div:empty { display: none !important; }

/* the theme underlines each toolbar cell; the bar itself is the frame now */
.archive-shop .tbay-filter .main-filter > .filter-btn-wrapper,
.archive-shop .tbay-filter .main-filter > .display-mode-warpper,
.archive-shop .tbay-filter .main-filter > .woocommerce-result-count,
.archive-shop .tbay-filter .main-filter > .tbay-ordering { border: 0 !important; }

.archive-shop .display-mode-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--hs-line) !important;
	border-radius: 8px !important;
	background: var(--hs-surface);
	color: var(--hs-muted);
	transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.archive-shop .display-mode-btn.active {
	border-color: var(--hs-ink) !important;
	background: var(--hs-ink);
	color: #fff;
}

.archive-shop .button-filter-btn {
	width: 40px;
	height: 40px;
	border: 1px solid var(--hs-line) !important;
	border-radius: 8px !important;
	background: var(--hs-surface);
	color: var(--hs-ink);
}

.archive-shop .button-filter-btn:hover { border-color: var(--hs-ink) !important; }

.archive-shop .woocommerce-result-count {
	order: -1;
	margin: 0 auto 0 0 !important;
	font-size: 13px;
	color: var(--hs-muted);
	line-height: 1.4;
}

.archive-shop .filter-btn-wrapper { order: -2; }

.archive-shop .filter-btn-wrapper a,
.archive-shop .filter-btn-wrapper .btn-filter {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 40px;
	padding: 0 14px;
	border: 1px solid var(--hs-line);
	border-radius: 8px;
	background: var(--hs-surface);
	font-size: 13px;
	font-weight: 600;
	color: var(--hs-ink);
}

.archive-shop .filter-btn-wrapper a:hover { border-color: var(--hs-ink); }

.archive-shop .tbay-ordering,
.archive-shop .display-mode-warpper { display: flex; align-items: center; gap: 8px; }

.archive-shop .woocommerce-ordering { margin: 0; }

.archive-shop .woocommerce-ordering select,
.archive-shop .orderby,
.archive-shop select.orderby {
	height: 40px;
	min-width: 190px;
	padding: 0 34px 0 14px;
	border: 1px solid var(--hs-line);
	border-radius: 8px;
	background-color: var(--hs-surface);
	font-size: 13px;
	font-weight: 500;
	color: var(--hs-ink);
	cursor: pointer;
}

.archive-shop .woocommerce-ordering select:focus {
	border-color: var(--hs-ink);
	outline: none;
}

/* grid / list toggle */
.archive-shop .tbay-filter .change-view a,
.archive-shop .display-mode a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--hs-line);
	border-radius: 8px;
	background: var(--hs-surface);
	color: var(--hs-muted);
	transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.archive-shop .tbay-filter .change-view a.active,
.archive-shop .display-mode a.active {
	border-color: var(--hs-ink);
	background: var(--hs-ink);
	color: #fff;
}

/* ---------- sidebar filters ---------- */
.tbay-sidebar-shop .widget {
	margin: 0 0 18px;
	padding: 18px;
	border: 1px solid var(--hs-line);
	border-radius: var(--hs-r-md);
	background: var(--hs-surface);
}

.tbay-sidebar-shop .widget-title,
.tbay-sidebar-shop .widgettitle,
.tbay-sidebar-shop h2 {
	margin: 0 0 14px;
	padding: 0 0 12px;
	border-bottom: 1px solid var(--hs-line-soft);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--hs-ink);
}

.tbay-sidebar-shop ul { margin: 0; padding: 0; list-style: none; }

.tbay-sidebar-shop ul li {
	margin: 0;
	padding: 7px 0;
	font-size: 14px;
	line-height: 1.5;
}

.tbay-sidebar-shop ul li a { color: var(--hs-body); }
.tbay-sidebar-shop ul li a:hover { color: var(--hs-red); }

/* colour + size swatch filters */
.tbay-sidebar-shop .woof_list_swatches li,
.tbay-sidebar-shop .woof_swatches_container li { padding: 0; }

.tbay-sidebar-shop .woof_swatches_container .woof_swathes_term_size,
.tbay-sidebar-shop .woof_list_size li span {
	min-width: 42px;
	height: 38px;
	line-height: 36px;
	border: 1px solid var(--hs-line) !important;
	border-radius: 8px !important;
	background: var(--hs-surface);
	font-size: 13px;
	font-weight: 600;
	color: var(--hs-ink);
	text-align: center;
	transition: border-color .15s ease, background .15s ease;
}

.tbay-sidebar-shop .woof_swatches_container .woof_swathes_term_size:hover { border-color: var(--hs-ink) !important; }

.tbay-sidebar-shop .woof_swatches_container .woof_swathes_term_selected,
.tbay-sidebar-shop .woof_list_size li.chosen span {
	border-color: var(--hs-red) !important;
	background: var(--hs-red-tint);
	color: var(--hs-red-dark);
}

.tbay-sidebar-shop .woof_color_term,
.tbay-sidebar-shop .woof_swathes_term_color {
	width: 30px !important;
	height: 30px !important;
	border-radius: 50% !important;
	border: 1px solid var(--hs-line) !important;
	box-shadow: none !important;
}

/* price slider */
.tbay-sidebar-shop .irs-bar,
.tbay-sidebar-shop .ui-slider-range { background: var(--hs-red) !important; }

.tbay-sidebar-shop .irs-handle,
.tbay-sidebar-shop .ui-slider-handle {
	border: 2px solid var(--hs-red) !important;
	background: #fff !important;
	border-radius: 50% !important;
}

/* ---------- product grid rhythm ---------- */
.display-products.products-grid { margin-bottom: 8px; }

/* ---------- pagination ---------- */
.tbay-pagination,
.woocommerce-pagination {
	margin: 30px 0 0;
	padding-top: 24px;
	border-top: 1px solid var(--hs-line);
	text-align: center;
}

.tbay-pagination ul,
.woocommerce-pagination ul {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0 !important;
	list-style: none;
}

.tbay-pagination ul li,
.woocommerce-pagination ul li { border: 0 !important; margin: 0; }

.tbay-pagination ul li a,
.tbay-pagination ul li span,
.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--hs-line);
	border-radius: 8px;
	background: var(--hs-surface);
	font-size: 14px;
	font-weight: 600;
	color: var(--hs-body);
	transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.tbay-pagination ul li a:hover,
.woocommerce-pagination ul li a:hover {
	border-color: var(--hs-ink);
	color: var(--hs-ink);
}

.tbay-pagination ul li span.current,
.woocommerce-pagination ul li span.current {
	border-color: var(--hs-ink);
	background: var(--hs-ink);
	color: #fff;
}

/* =====================================================================
   Shared: notices
   ===================================================================== */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.wc-block-components-notice-banner {
	margin: 0 0 20px;
	padding: 14px 16px !important;
	border: 1px solid var(--hs-line) !important;
	border-radius: var(--hs-r-md) !important;
	background: var(--hs-surface-2) !important;
	font-size: 14px;
	color: var(--hs-body);
}

.woocommerce-message { border-color: #cdeddd !important; background: var(--hs-green-tint) !important; }
.woocommerce-error  { border-color: var(--hs-red-line) !important; background: var(--hs-red-tint) !important; }

/* =====================================================================
   Cart and checkout (WooCommerce blocks)
   ===================================================================== */

.woocommerce-cart .entry-title,
.woocommerce-checkout .entry-title,
.woocommerce-cart .page-title,
.woocommerce-checkout .page-title {
	margin: 0 0 24px;
	font-size: 26px;
	font-weight: 600;
	color: var(--hs-ink);
}

/* the marquee is a distraction once someone is paying */
.woocommerce-checkout .hs-marquee { display: none; }

/* No gap here: Woo sizes main + sidebar to exactly fill the row, so any
   gap overflows and drops the summary below the form. */

/* ---------- panels ---------- */
.wc-block-cart-items,
.wc-block-components-order-summary,
.wc-block-components-totals-wrapper,
.wc-block-cart__totals-title { font-family: inherit; }

.wc-block-cart .wc-block-cart__sidebar .wc-block-components-sidebar,
.wc-block-checkout__sidebar {
	padding: 22px;
	border: 1px solid var(--hs-line);
	border-radius: var(--hs-r-lg);
	background: var(--hs-surface-2);
}

@media (min-width: 992px) {
	.wc-block-checkout__sidebar,
	.wc-block-cart__sidebar { position: sticky; top: 92px; }
}

/* ---------- cart line items ---------- */
.wc-block-cart-items__row {
	padding: 18px 0;
	border-bottom: 1px solid var(--hs-line-soft);
}

.wc-block-cart-item__image img {
	border: 1px solid var(--hs-line);
	border-radius: 10px;
}

.wc-block-components-product-name {
	font-size: 15px;
	font-weight: 600;
	color: var(--hs-ink);
	text-decoration: none;
}

.wc-block-components-product-name:hover { color: var(--hs-red); }

.wc-block-components-product-metadata,
.wc-block-components-product-details {
	font-size: 13px;
	color: var(--hs-muted);
}

.wc-block-components-product-price__value,
.wc-block-components-formatted-money-amount {
	font-weight: 600;
	color: var(--hs-ink);
}

.wc-block-components-product-price del,
.wc-block-components-sale-badge + del,
.wc-block-components-product-price__regular {
	color: var(--hs-faint);
	font-weight: 500;
}

.wc-block-components-sale-badge {
	border-radius: 6px;
	background: var(--hs-red-tint);
	color: var(--hs-red-dark);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .03em;
	padding: 4px 8px;
}

/* quantity stepper */
.wc-block-components-quantity-selector {
	border: 1px solid var(--hs-line) !important;
	border-radius: 8px !important;
	background: var(--hs-surface);
	overflow: hidden;
}

.wc-block-components-quantity-selector::after { display: none !important; }

.wc-block-components-quantity-selector__input {
	font-size: 14px;
	font-weight: 600;
	color: var(--hs-ink);
}

.wc-block-components-quantity-selector__button {
	color: var(--hs-body);
	font-size: 16px;
	transition: color .15s ease;
}

.wc-block-components-quantity-selector__button:hover { color: var(--hs-red); }

/* ---------- totals ---------- */
.wc-block-components-totals-item {
	padding: 10px 0;
	font-size: 14px;
	color: var(--hs-body);
}

.wc-block-components-totals-item__label { color: var(--hs-muted); }
.wc-block-components-totals-item__value { color: var(--hs-ink); font-weight: 600; }

.wc-block-components-totals-footer-item {
	margin-top: 6px;
	padding-top: 16px;
	border-top: 1px solid var(--hs-line);
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-size: 18px;
	font-weight: 700;
	color: var(--hs-ink);
}

.wc-block-components-totals-coupon__form { gap: 8px; }

/* ---------- buttons ---------- */
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button,
.wc-block-components-button.contained {
	width: 100%;
	min-height: 54px;
	padding: 15px 22px;
	border: 0;
	border-radius: 10px;
	background: var(--hs-ink);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	line-height: 1.2;
	transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover,
.wc-block-components-button.contained:hover {
	background: var(--hs-red);
	box-shadow: 0 8px 20px rgba(255, 2, 37, .24);
	transform: translateY(-1px);
}

/* the coupon apply button stays secondary */
.wc-block-components-totals-coupon__button,
.wc-block-components-button.outlined {
	min-height: 44px;
	border: 1px solid var(--hs-ink) !important;
	border-radius: 8px !important;
	background: transparent !important;
	color: var(--hs-ink) !important;
	font-size: 13px;
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none !important;
	transform: none !important;
}

.wc-block-components-totals-coupon__button:hover {
	background: var(--hs-ink) !important;
	color: #fff !important;
}

/* ---------- form fields ---------- */
.wc-block-components-text-input input,
.wc-block-components-select select,
.wc-block-components-textarea,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row select,
.woocommerce form .form-row textarea {
	min-height: 52px;
	padding: 14px;
	border: 1px solid var(--hs-line) !important;
	border-radius: 10px !important;
	background: var(--hs-surface);
	font-size: 15px;
	color: var(--hs-ink);
	box-shadow: none !important;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.wc-block-components-text-input input:focus,
.wc-block-components-select select:focus,
.woocommerce form .form-row input.input-text:focus {
	border-color: var(--hs-ink) !important;
	box-shadow: 0 0 0 3px rgba(19, 19, 22, .07) !important;
	outline: none;
}

.wc-block-components-text-input.is-active label,
.wc-block-components-text-input label {
	color: var(--hs-muted);
	font-size: 14px;
}

.wc-block-components-checkout-step__heading,
.wc-block-components-title {
	margin: 0 0 14px;
	font-size: 17px;
	font-weight: 600;
	color: var(--hs-ink);
}

.wc-block-components-checkout-step__description {
	font-size: 13px;
	color: var(--hs-muted);
}

.wc-block-components-checkout-step {
	padding-bottom: 26px;
	margin-bottom: 26px;
	border-bottom: 1px solid var(--hs-line-soft);
}

.wc-block-components-checkout-step:last-child { border-bottom: 0; }

/* payment methods */
.wc-block-components-radio-control__option,
.wc-block-components-radio-control-accordion-option {
	border: 1px solid var(--hs-line);
	border-radius: 10px;
	margin-bottom: 10px;
	padding: 14px 16px;
	background: var(--hs-surface);
}

.wc-block-components-radio-control__option--checked-option-highlighted,
.wc-block-components-radio-control-accordion-option:has(input:checked) {
	border-color: var(--hs-ink);
	box-shadow: 0 0 0 1px var(--hs-ink);
}

/* ---------- reassurance under the pay button ---------- */
.hs-checkout-trust {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 16px 0 0;
}

.hs-checkout-trust span {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 10px;
	border: 1px solid var(--hs-line);
	border-radius: 999px;
	background: var(--hs-surface);
	font-size: 12px;
	color: var(--hs-body);
}

/* =====================================================================
   Mobile
   ===================================================================== */

@media (max-width: 991px) {
	.archive-shop .tbay-filter { margin: 0 0 16px; }

	.archive-shop .tbay-filter .main-filter {
		position: sticky;
		top: 0;
		z-index: 30;
		gap: 8px;
		padding: 9px 12px;
		border-radius: 0;
		border-left: 0;
		border-right: 0;
		background: rgba(255, 255, 255, .96);
		backdrop-filter: blur(6px);
	}

	.archive-shop .woocommerce-result-count { font-size: 12px; }

	/* one row on phones: filter + count left, sort right.
	   The list view toggle is desktop-only. */
	.archive-shop .tbay-filter .main-filter { flex-wrap: nowrap; }
	.archive-shop .display-mode-warpper { display: none !important; }
	.archive-shop .tbay-ordering { min-width: 0; }

	.archive-shop .woocommerce-ordering select,
	.archive-shop .orderby {
		height: 38px;
		min-width: 0;
		max-width: 168px;
		font-size: 12px;
	}

	.woocommerce-products-header__title,
	.archive-shop .page-title { font-size: 21px; }

	.wc-block-cart .wc-block-cart__sidebar .wc-block-components-sidebar,
	.wc-block-checkout__sidebar { padding: 16px; border-radius: var(--hs-r-md); }

	.wc-block-components-text-input input,
	.wc-block-components-select select {
		min-height: 50px;
		font-size: 16px; /* stops iOS zooming on focus */
	}

	.wc-block-components-checkout-step { padding-bottom: 20px; margin-bottom: 20px; }

	.tbay-pagination,
	.woocommerce-pagination { margin-top: 22px; padding-top: 18px; }

	.tbay-pagination ul li a,
	.tbay-pagination ul li span { min-width: 38px; height: 38px; font-size: 13px; }
}

@media (max-width: 767px) {
	.archive-shop .tbay-filter { gap: 8px; }
	.tbay-sidebar-shop .widget { padding: 14px; }
	.wc-block-cart-items__row { padding: 14px 0; }
	.wc-block-components-product-name { font-size: 14px; }
}
