/**
 * Custom Woo — frontend styles.
 * Layout only: colours and typography come from Elementor controls.
 */

/* Editor placeholders --------------------------------------------------- */
.cwoo-notice {
	padding: 12px 16px;
	border: 1px dashed rgba(0, 0, 0, .25);
	border-radius: 4px;
	font-size: 13px;
	line-height: 1.5;
	opacity: .8;
}

.cwoo-placeholder {
	padding: 24px;
	border: 1px dashed rgba(0, 0, 0, .2);
	border-radius: 6px;
	text-align: center;
}

.cwoo-placeholder-title {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	font-size: 12px;
}

.cwoo-placeholder-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-top: 16px;
}

.cwoo-placeholder-field {
	height: 38px;
	border-radius: 4px;
	background: rgba(0, 0, 0, .06);
}

.cwoo-placeholder-field--wide,
.cwoo-placeholder-button {
	grid-column: 1 / -1;
}

.cwoo-placeholder-button {
	padding: 12px;
	border-radius: 4px;
	background: rgba(0, 0, 0, .12);
	font-weight: 600;
}

/* Checkout Form editor preview — self-contained baseline styling so the
   mocked field/payment/button markup doesn't rely on WooCommerce's or the
   theme's own CSS being present in the editor context. Scoped to
   .cwoo-checkout-preview only; the real frontend checkout is unaffected. */
.cwoo-checkout-preview {
	text-align: start;
}

.cwoo-checkout-preview .cwoo-placeholder-title {
	margin-bottom: 20px;
	text-align: center;
}

.cwoo-checkout-preview .form-row {
	margin: 0 0 14px;
}

.cwoo-checkout-preview label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
}

.cwoo-checkout-preview .required {
	color: #d63638;
	text-decoration: none;
}

.cwoo-checkout-preview .input-text,
.cwoo-checkout-preview select {
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: 360px;
	padding: 10px 12px;
	border: 1px solid rgba(0, 0, 0, .15);
	border-radius: 4px;
	background: #fff;
	font-size: 14px;
}

.cwoo-checkout-preview textarea.input-text {
	max-width: 100%;
	min-height: 80px;
	resize: vertical;
}

.cwoo-checkout-preview .payment_methods {
	margin: 20px 0 0;
	padding: 0;
	border: 1px solid rgba(0, 0, 0, .1);
	border-radius: 6px;
	list-style: none;
	overflow: hidden;
}

.cwoo-checkout-preview .payment_methods li {
	padding: 12px 14px;
}

.cwoo-checkout-preview .payment_methods li label {
	margin: 0;
	font-weight: 600;
}

.cwoo-checkout-preview .payment_box {
	margin-top: 10px;
	padding: 12px;
	border-radius: 4px;
	background: rgba(0, 0, 0, .04);
	font-size: 13px;
}

.cwoo-checkout-preview .payment_box p {
	margin: 0;
}

.cwoo-checkout-preview #place_order {
	display: block;
	width: 100%;
	margin-top: 20px;
	padding: 14px;
	border: 0;
	border-radius: 4px;
	background: rgba(0, 0, 0, .85);
	color: #fff;
	font-weight: 600;
	text-align: center;
	cursor: default;
}

/* Product ---------------------------------------------------------------- */
.cwoo-product-title,
.cwoo-product-price,
.cwoo-product-description {
	margin: 0 0 12px;
}

.cwoo-sale-badge {
	display: inline-block;
	margin-left: 8px;
	padding: 2px 8px;
	border-radius: 3px;
	background: #d63638;
	color: #fff;
	font-size: 12px;
	line-height: 1.6;
}

.cwoo-sale-flash {
	position: absolute;
	inset-block-start: 12px;
	inset-inline-start: 12px;
	margin: 0;
	z-index: 2;
}

.cwoo-product-meta {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.cwoo-product-meta--inline {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 16px;
}

.cwoo-meta-label {
	font-weight: 600;
}

.cwoo-product-rating {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

/* Gallery ---------------------------------------------------------------- */
.cwoo-gallery {
	--cwoo-gallery-gap: 12px;
	--cwoo-thumb-cols: 4;
	position: relative;
	display: grid;
	gap: var(--cwoo-gallery-gap);
}

.cwoo-gallery--left {
	grid-template-columns: 96px 1fr;
	grid-template-areas: "thumbs main";
}

.cwoo-gallery--left .cwoo-gallery-main {
	grid-area: main;
}

.cwoo-gallery--left .cwoo-gallery-thumbs {
	grid-area: thumbs;
	grid-template-columns: 1fr;
}

.cwoo-gallery-main img {
	display: block;
	width: 100%;
	height: auto;
}

.cwoo-gallery--lightbox .cwoo-gallery-main img {
	cursor: zoom-in;
}

.cwoo-gallery-main.cwoo-gallery-main--video-active img {
	display: none;
}

/* 16:9 embed box for the optional gallery video (YouTube or a self-hosted
   file). Hidden by default; JS reveals it and swaps the main image out when
   a video thumbnail is clicked. */
.cwoo-gallery-video {
	position: relative;
	display: none;
	width: 100%;
	padding-top: 56.25%;
	background: #000;
}

.cwoo-gallery-main--video-active .cwoo-gallery-video {
	display: block;
}

.cwoo-gallery-video iframe,
.cwoo-gallery-video video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.cwoo-gallery-thumbs {
	display: grid;
	grid-template-columns: repeat(var(--cwoo-thumb-cols), 1fr);
	gap: var(--cwoo-gallery-gap);
}

/* Doubled-up ".cwoo-gallery-thumbs .cwoo-gallery-thumb" (rather than the
   bare class) intentionally raises specificity above generic theme
   button/input resets — some themes apply a red border/outline to all
   <button> elements as a validation/focus style, which was bleeding into
   these thumbnails. Outline/box-shadow are !important since nothing here
   needs to set those; border is NOT !important so the Elementor "Hover"
   style controls below can still override it. */
.cwoo-gallery-thumbs .cwoo-gallery-thumb {
	position: relative;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 3px;
	background: none;
	cursor: pointer;
	line-height: 0;
	outline: none !important;
	box-shadow: none !important;
}

.cwoo-gallery-thumb img {
	width: 100%;
	height: auto;
}

.cwoo-gallery-thumbs .cwoo-gallery-thumb:hover,
.cwoo-gallery-thumbs .cwoo-gallery-thumb:focus {
	border-color: transparent;
}

.cwoo-gallery-thumb.is-active {
	border-color: currentColor;
}

.cwoo-gallery-thumb--video {
	aspect-ratio: 1 / 1;
	background: #000;
	overflow: hidden;
}

.cwoo-gallery-thumb--video img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: .85;
}

.cwoo-gallery-thumb--video::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	transform: translate(-50%, -50%);
	border-style: solid;
	border-width: 7px 0 7px 12px;
	border-color: transparent transparent transparent #fff;
	filter: drop-shadow(0 0 2px rgba(0, 0, 0, .6));
	pointer-events: none;
}

.cwoo-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px;
	background: rgba(0, 0, 0, .85);
}

.cwoo-lightbox-image {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.cwoo-lightbox-close {
	position: absolute;
	inset-block-start: 16px;
	inset-inline-end: 16px;
	width: 40px;
	height: 40px;
	border: 0;
	background: none;
	color: #fff;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
}

.cwoo-no-scroll {
	overflow: hidden;
}

/* Tabs ------------------------------------------------------------------- */
.cwoo-tabs-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.cwoo-tab-title {
	padding: 10px 18px;
	border: 0;
	border-bottom: 2px solid transparent;
	background: none;
	cursor: pointer;
	font: inherit;
}

.cwoo-tab-panel {
	display: none;
	padding: 20px 0;
}

.cwoo-tab-panel.is-active {
	display: block;
}

.cwoo-tabs--vertical {
	display: grid;
	grid-template-columns: minmax(140px, 220px) 1fr;
	gap: 24px;
}

.cwoo-tabs--vertical .cwoo-tabs-nav {
	flex-direction: column;
}

.cwoo-tabs--accordion .cwoo-tab-title {
	display: block;
	width: 100%;
	text-align: start;
	border-bottom: 1px solid rgba(0, 0, 0, .12);
}

/* Archive ---------------------------------------------------------------- */
.cwoo-products ul.products {
	--cwoo-columns: 4;
	display: grid;
	grid-template-columns: repeat(var(--cwoo-columns), minmax(0, 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
}

.cwoo-products ul.products::before,
.cwoo-products ul.products::after {
	content: none;
}

.cwoo-products ul.products li.product {
	width: auto !important;
	margin: 0 !important;
	float: none !important;
	clear: none !important;
	box-sizing: border-box;
}

.cwoo-products ul.products li.product img {
	display: block;
	width: 100%;
	height: auto;
}

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

.cwoo-result-count {
	margin: 0;
}

/* outline/box-shadow reset for the same reason as the gallery thumbnails
   and cart-table buttons above — border is left free for the Elementor
   "Toolbar" style controls to set. */
.cwoo-archive-toolbar select {
	outline: none !important;
	box-shadow: none !important;
}

/* Product Categories grid ------------------------------------------------- */
.cwoo-categories {
	--cwoo-cat-columns: 4;
	display: grid;
	grid-template-columns: repeat(var(--cwoo-cat-columns), minmax(0, 1fr));
	gap: 24px;
}

.cwoo-category-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 16px;
	border: 1px solid transparent;
	text-align: center;
	text-decoration: none;
	color: inherit;
}

.cwoo-category-image {
	display: block;
	width: 100%;
	margin-bottom: 12px;
}

.cwoo-category-image img {
	display: block;
	width: 100%;
	height: auto;
}

.cwoo-category-name {
	font-weight: 600;
}

.cwoo-category-count {
	margin-top: 4px;
	font-size: .85em;
	opacity: .75;
}

.cwoo-archive-title {
	margin: 0;
}

/* Breadcrumb --------------------------------------------------------------- */
.cwoo-breadcrumb-trail {
	margin: 0;
}

.cwoo-breadcrumb-delimiter {
	margin: 0 6px;
}

.cwoo-filters-list {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cwoo-filters--inline .cwoo-filters-list {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 8px;
}

.cwoo-filter-link {
	display: inline-block;
	padding: 6px 12px;
	text-decoration: none;
}

.cwoo-filters-title {
	margin-bottom: 10px;
	font-weight: 600;
}

.cwoo-filter-count {
	opacity: .6;
	font-size: .85em;
}

.cwoo-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 40px;
	padding: 0 10px;
	text-decoration: none;
}

.cwoo-pagination ul.page-numbers {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
}

.cwoo-pagination ul.page-numbers li {
	border: 0;
	margin: 0;
}

/* Cart ------------------------------------------------------------------- */
.cwoo-cart.is-busy,
.cwoo-cart-totals.is-busy {
	opacity: .6;
	pointer-events: none;
}

.cwoo-cart-table {
	width: 100%;
	border-collapse: collapse;
}

.cwoo-cart-table th,
.cwoo-cart-table td {
	padding: 14px 10px;
	border-bottom: 1px solid rgba(0, 0, 0, .1);
	text-align: start;
	vertical-align: middle;
}

.cwoo-cart-thumb img {
	width: 72px;
	height: auto;
}

.cwoo-col-remove {
	width: 40px;
	text-align: center;
}

/* Doubled-up ".cwoo-cart-table .cwoo-cart-remove" (rather than the bare
   class) intentionally raises specificity above generic theme button/input
   resets — some themes apply a red border/outline to all <button>/<input>
   elements as a validation style, which was bleeding into these controls.
   Outline/box-shadow are !important since nothing here needs to set those;
   border is NOT !important so the Elementor "Remove Button" / "Quantity
   Buttons" style controls below can still override it. */
.cwoo-cart-table .cwoo-cart-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 50%;
	background: rgba(0, 0, 0, .07);
	color: inherit;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	outline: none !important;
	box-shadow: none !important;
}

.cwoo-cart-table .cwoo-cart-remove:hover,
.cwoo-cart-table .cwoo-cart-remove:focus,
.cwoo-cart-table .cwoo-cart-remove:active {
	background: rgba(0, 0, 0, .12);
	color: inherit;
}

.cwoo-cart-table .cwoo-qty {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid rgba(0, 0, 0, .15);
	border-radius: 4px;
	overflow: hidden;
	line-height: 1;
	vertical-align: middle;
}

.cwoo-cart-table .cwoo-qty-btn {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 34px;
	padding: 0;
	border: 1px solid transparent;
	background: rgba(0, 0, 0, .04);
	color: inherit;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	outline: none !important;
	box-shadow: none !important;
}

.cwoo-cart-table .cwoo-qty-btn:hover,
.cwoo-cart-table .cwoo-qty-btn:focus,
.cwoo-cart-table .cwoo-qty-btn:active {
	background: rgba(0, 0, 0, .08);
	color: inherit;
}

.cwoo-cart-table .cwoo-qty-input {
	width: 52px;
	height: 34px;
	padding: 0;
	border: 0;
	outline: none !important;
	box-shadow: none !important;
	text-align: center;
	-moz-appearance: textfield;
}

.cwoo-qty-input::-webkit-outer-spin-button,
.cwoo-qty-input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.cwoo-cart-totals {
	padding: 20px;
}

.cwoo-cart-totals table {
	width: 100%;
	border-collapse: collapse;
}

.cwoo-cart-totals table th,
.cwoo-cart-totals table td {
	padding: 14px 10px;
	vertical-align: middle;
}

.cwoo-cart-totals .order-total th,
.cwoo-cart-totals .order-total td {
	border-top: 2px solid rgba(0, 0, 0, .15);
	font-size: 1.15em;
	font-weight: 700;
}

.cwoo-cart-totals-heading {
	margin: 0 0 12px;
}

/* Coupon (inside Cart Totals) -------------------------------------------- */
.cwoo-coupon {
	margin: 0 0 16px;
	padding: 16px;
	border: 1px solid rgba(0, 0, 0, .15);
	border-radius: 6px;
	background: rgba(0, 0, 0, .03);
}

.cwoo-coupon-label {
	display: block;
	margin: 0 0 8px;
	font-weight: 600;
}

.cwoo-coupon-row {
	display: flex;
	flex-wrap: nowrap;
	gap: 10px;
}

.cwoo-coupon-input {
	box-sizing: border-box;
	flex: 1 1 auto;
	min-width: 0;
	height: 40px;
	padding: 0 12px;
	border: 1px solid rgba(0, 0, 0, .15);
	border-radius: 4px;
}

.cwoo-coupon-apply {
	box-sizing: border-box;
	flex: 0 0 auto;
	height: 40px;
	padding: 0 18px;
	border: 0;
	border-radius: 4px;
	background: #000;
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

.cwoo-coupon-notices:empty {
	display: none;
}

/* Mini cart -------------------------------------------------------------- */
.cwoo-mini-cart {
	position: relative;
	display: inline-block;
}

.cwoo-mini-cart-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border: 0;
	background: none;
	cursor: pointer;
	font: inherit;
	text-decoration: none;
}

.cwoo-mini-cart-icon {
	width: 22px;
	height: 22px;
}

.cwoo-mini-cart-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 10px;
	background: rgba(0, 0, 0, .1);
	font-size: 12px;
}

.cwoo-mini-cart-panel {
	position: absolute;
	inset-block-start: calc(100% + 8px);
	inset-inline-end: 0;
	z-index: 999;
	width: 340px;
	max-width: 90vw;
	padding: 16px;
	border: 1px solid rgba(0, 0, 0, .1);
	background: #fff;
	box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
}

.cwoo-mini-cart--sidebar .cwoo-mini-cart-panel {
	position: fixed;
	inset-block: 0;
	inset-inline-end: 0;
	inset-block-start: 0;
	height: 100vh;
	overflow-y: auto;
}

.cwoo-mini-cart-panel[hidden] {
	display: none;
}

/* Checkout / account ----------------------------------------------------- */
.cwoo-checkout .col2-set #order_review_heading {
	margin-top: 24px;
}

.cwoo-checkout-additional-fields {
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid rgba(0, 0, 0, .1);
}

.cwoo-order-review,
.cwoo-order-summary {
	width: 100%;
	border-collapse: collapse;
}

.cwoo-account-nav ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.cwoo-account-nav a {
	display: block;
	padding: 10px 14px;
	text-decoration: none;
}

.cwoo-account-nav--horizontal ul {
	display: flex;
	flex-wrap: wrap;
}

.cwoo-account-addresses .woocommerce-Addresses {
	--cwoo-address-cols: 2;
	display: grid;
	grid-template-columns: repeat(var(--cwoo-address-cols), minmax(0, 1fr));
	gap: 24px;
}

.cwoo-account-addresses .woocommerce-Address {
	width: auto !important;
	float: none !important;
}

/* Thank you -------------------------------------------------------------- */
.cwoo-order-details-table,
.cwoo-order-summary {
	width: 100%;
	border-collapse: collapse;
}

.cwoo-order-details-table th,
.cwoo-order-details-table td,
.cwoo-order-summary th,
.cwoo-order-summary td {
	padding: 12px 10px;
	text-align: start;
}

.cwoo-table--bordered,
.cwoo-table--bordered th,
.cwoo-table--bordered td {
	border: 1px solid rgba(0, 0, 0, .12);
}

.cwoo-table--minimal th,
.cwoo-table--minimal td {
	border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.cwoo-order-summary th {
	width: 45%;
	font-weight: 600;
}

.cwoo-order-summary td {
	text-align: end;
}

.cwoo-summary-total th,
.cwoo-summary-total td {
	border-top: 2px solid rgba(0, 0, 0, .15);
	font-size: 1.1em;
	font-weight: 700;
}

.cwoo-redirect-notice {
	margin-top: 16px;
	font-size: .95em;
}

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1024px) {
	.cwoo-products ul.products {
		grid-template-columns: repeat(var(--cwoo-columns-tablet, var(--cwoo-columns)), minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.cwoo-tabs--vertical,
	.cwoo-gallery--left {
		grid-template-columns: 1fr;
	}

	.cwoo-gallery--left {
		grid-template-areas: "main" "thumbs";
	}

	.cwoo-account-addresses .woocommerce-Addresses {
		grid-template-columns: 1fr;
	}

	.cwoo-cart-table thead {
		display: none;
	}

	.cwoo-cart-table,
	.cwoo-cart-table tbody,
	.cwoo-cart-table tr,
	.cwoo-cart-table td {
		display: block;
		width: 100%;
	}

	.cwoo-cart-table tr {
		position: relative;
		padding: 12px 0;
		border-bottom: 1px solid rgba(0, 0, 0, .1);
	}

	.cwoo-cart-table td {
		border: 0;
		padding: 6px 0;
	}

	.cwoo-cart-table td[data-title]::before {
		content: attr(data-title) ": ";
		font-weight: 600;
	}

	.cwoo-cart-table .cwoo-col-remove {
		position: absolute;
		inset-block-start: 12px;
		inset-inline-end: 0;
		width: auto;
	}
}
