/* WC Elementor Builder – frontend */
.wceb-template { width: 100%; }

.wceb-editor-placeholder {
	padding: 12px 16px;
	border: 1px dashed #c3c4c7;
	background: #f6f7f7;
	color: #646970;
	font-size: 13px;
	text-align: center;
}

.wceb-product-title { margin: 0 0 0.5em; }
.wceb-product-price { margin: 0 0 1em; }
.wceb-product-images,
.wceb-product-add-to-cart,
.wceb-product-rating,
.wceb-product-stock,
.wceb-product-meta,
.wceb-product-short-description,
.wceb-product-tabs,
.wceb-related-products { margin-bottom: 1em; }

.wceb-products-loop ul.products {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	list-style: none;
	padding: 0;
	margin: 0 0 2rem;
}
.wceb-products-loop ul.products li.product {
	flex: 1 1 calc(25% - 1.5rem);
	min-width: 180px;
}

.wceb-shop-toolbar { margin-bottom: 1.25rem; }
.wceb-breadcrumbs { margin-bottom: 1rem; }
.wceb-category-grid ul.products { list-style: none; padding: 0; }

.wceb-cart,
.wceb-cart-totals,
.wceb-cart-coupon,
.wceb-checkout,
.wceb-thankyou,
.wceb-account,
.wceb-notices { width: 100%; margin-bottom: 1.5rem; }

.wceb-cart-coupon form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wceb-cart-coupon .form-row { margin: 0; }

@media (max-width: 768px) {
	.wceb-products-loop ul.products li.product {
		flex: 1 1 calc(50% - 1rem);
	}
}


/* Filters */
.wceb-filters form { display: flex; flex-direction: column; gap: 12px; }
.wceb-filter-row label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 13px; }
.wceb-filter-row input[type="search"],
.wceb-filter-row input[type="number"],
.wceb-filter-row select { width: 100%; max-width: 100%; }
.wceb-price-inputs { display: flex; gap: 8px; }
.wceb-price-inputs input { flex: 1; }

/* Sale flash */
.wceb-sale-flash {
	display: inline-block;
	padding: 4px 10px;
	background: #c5162e;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
}

/* Mini cart */
.wceb-mini-cart-link { text-decoration: none; font-weight: 600; }
.wceb-mini-cart-count { opacity: 0.8; }

/* AJAX button state */
.wceb-product-add-to-cart .single_add_to_cart_button.loading { opacity: 0.7; pointer-events: none; }
.wceb-ajax-notice { margin: 0 0 12px; padding: 10px 14px; }


/* Product gallery (Jet/Elementor-like) */
.wceb-product-images {
	position: relative;
	width: 100%;
}
.wceb-product-images .woocommerce-product-gallery {
	position: relative;
	opacity: 1 !important; /* WC sets opacity 0 until JS; force visible in editor */
	width: 100%;
}
.wceb-product-images .woocommerce-product-gallery__wrapper {
	margin: 0;
}
.wceb-product-images .woocommerce-product-gallery__image img,
.wceb-product-images img.wp-post-image {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
}
.wceb-product-images .flex-control-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}
.wceb-product-images .flex-control-thumbs li {
	flex: 0 0 calc(25% - 6px);
	max-width: calc(25% - 6px);
}
.wceb-product-images .flex-control-thumbs img {
	width: 100%;
	height: auto;
	cursor: pointer;
	opacity: 0.7;
}
.wceb-product-images .flex-control-thumbs img.flex-active,
.wceb-product-images .flex-control-thumbs img:hover {
	opacity: 1;
}
.wceb-product-images .onsale {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
}

/* ===== Custom gallery layout ===== */
.wceb-gallery { position: relative; width: 100%; }
.wceb-gallery-inner { display: flex; flex-direction: column; gap: 12px; }
.wceb-gallery.wceb-thumbs--left .wceb-gallery-inner,
.wceb-gallery.wceb-thumbs--right .wceb-gallery-inner {
	flex-direction: row;
	align-items: flex-start;
}
.wceb-gallery.wceb-thumbs--right .wceb-gallery-inner { flex-direction: row-reverse; }
.wceb-gallery.wceb-thumbs--left .wceb-thumbs,
.wceb-gallery.wceb-thumbs--right .wceb-thumbs {
	flex-direction: column;
	width: 72px;
	flex-shrink: 0;
}
.wceb-main-image { position: relative; flex: 1; min-width: 0; }
.wceb-main-image img { display: block; width: 100%; height: auto; }
.wceb-thumbs {
	display: grid;
	grid-template-columns: repeat(var(--wceb-thumb-cols, 4), 1fr);
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.wceb-gallery.wceb-thumbs--left .wceb-thumbs,
.wceb-gallery.wceb-thumbs--right .wceb-thumbs {
	grid-template-columns: 1fr;
}
.wceb-thumbs li { margin: 0; }
.wceb-thumbs img {
	display: block;
	width: 100%;
	height: auto;
	cursor: pointer;
	opacity: 0.65;
	transition: opacity 0.15s ease;
	border: 2px solid transparent;
}
.wceb-thumbs img.is-active,
.wceb-thumbs img:hover { opacity: 1; border-color: rgba(0,0,0,0.15); }

/* Sale badge positions */
.wceb-sale-badge {
	position: absolute;
	z-index: 3;
	display: inline-block;
	padding: 6px 12px;
	background: #6b7c0f;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	border-radius: 999px;
}
.wceb-badge--top-left { top: 12px; left: 12px; }
.wceb-badge--top-right { top: 12px; right: 12px; left: auto; }
.wceb-badge--bottom-left { bottom: 12px; left: 12px; top: auto; }
.wceb-badge--bottom-right { bottom: 12px; right: 12px; top: auto; left: auto; }

/* Quantity boxed ± */
.wceb-product-add-to-cart form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}
.wceb-product-add-to-cart.wceb-layout-stacked form.cart {
	flex-direction: column;
	align-items: stretch;
}
.wceb-product-add-to-cart.wceb-qty-boxed .quantity {
	display: inline-flex;
	margin: 0;
}
.wceb-qty-box {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}
.wceb-qty-box input.qty {
	width: 56px;
	border: 0 !important;
	border-radius: 0 !important;
	text-align: center;
	box-shadow: none !important;
	margin: 0 !important;
	-moz-appearance: textfield;
}
.wceb-qty-box input.qty::-webkit-outer-spin-button,
.wceb-qty-box input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.wceb-qty-btn {
	width: 40px;
	border: 0;
	background: transparent;
	cursor: pointer;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	color: #1d2327;
	padding: 0;
}
.wceb-qty-btn:hover { opacity: 0.85; }
.wceb-product-add-to-cart .single_add_to_cart_button {
	border-radius: 8px;
	padding: 12px 22px;
}

/* Main image relative for badge */
.wceb-main-image { position: relative; }

/* Custom ATC layout: row1 qty+atc, row2 buy now */
.wceb-product-add-to-cart.wceb-custom-atc {
	display: flex;
	flex-direction: column;
	width: 100%;
}
.wceb-product-add-to-cart .wceb-atc-form {
	display: flex;
	flex-direction: column;
	width: 100%;
	gap: 10px;
}
.wceb-atc-row {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	gap: 10px;
	width: 100%;
}
.wceb-atc-row .wceb-btn-add-to-cart,
.wceb-atc-row .single_add_to_cart_button {
	flex: 1 1 auto;
	margin: 0 !important;
}
.wceb-btn-buy-now {
	display: block;
	width: 100%;
	margin: 0 !important;
	text-align: center;
	padding: 12px 20px;
	border: none;
	cursor: pointer;
	font-weight: 600;
	border-radius: 6px;
	background: #1d2327;
	color: #fff;
}
.wceb-btn-buy-now:hover { filter: brightness(1.08); }

.wceb-qty-box {
	display: inline-flex;
	align-items: stretch;
	flex-shrink: 0;
	border: 1px solid transparent;
	border-radius: 0;
	overflow: hidden;
	background: transparent;
}
.wceb-qty-box input.qty {
	width: 52px;
	border: 0 !important;
	border-left: 1px solid #e5e7eb !important;
	border-right: 1px solid #e5e7eb !important;
	border-radius: 0 !important;
	text-align: center;
	box-shadow: none !important;
	margin: 0 !important;
	padding: 0 4px !important;
	-moz-appearance: textfield;
	appearance: textfield;
	background: transparent;
}
.wceb-qty-box input.qty::-webkit-outer-spin-button,
.wceb-qty-box input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.wceb-qty-btn {
	width: 40px;
	min-width: 40px;
	border: 0;
	background: transparent;
	cursor: pointer;
	font-size: 18px;
	font-weight: 600;
	line-height: 1;
	color: inherit;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Buy Now full width (theme-proof) */
.wceb-buy-now-wrap {
	display: flex;
	width: 100% !important;
	margin: 0 !important;
}
.elementor-widget-wceb_product_add_to_cart.wceb-buy-width-full .wceb-btn-buy-now,
.wceb-product-add-to-cart .wceb-buy-now-wrap .wceb-btn-buy-now {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
	margin: 0 !important;
	text-align: center !important;
}
.elementor-widget-wceb_product_add_to_cart.wceb-buy-width-auto .wceb-btn-buy-now {
	width: auto !important;
	display: inline-block !important;
}
.wceb-product-add-to-cart.wceb-custom-atc .wceb-atc-form {
	width: 100% !important;
}
.wceb-atc-row {
	width: 100% !important;
}
.wceb-atc-row .wceb-btn-add-to-cart {
	flex: 1 1 auto !important;
	width: auto !important;
}

/* Product tabs */
.wceb-product-tabs { width: 100%; }
.wceb-tab-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	border-bottom: 2px solid #e5e7eb;
	margin-bottom: 16px;
}
.wceb-tab-btn {
	appearance: none;
	background: none;
	border: 0;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	padding: 10px 16px;
	cursor: pointer;
	font-weight: 600;
	color: #6b7280;
}
.wceb-tab-btn.is-active {
	color: #111;
	border-bottom-color: #111;
}
.wceb-tab-panel { display: none; }
.wceb-tab-panel.is-active { display: block; }
.wceb-acc-item { border-bottom: 1px solid #e5e7eb; }
.wceb-acc-head {
	width: 100%;
	text-align: left;
	padding: 12px 0;
	background: none;
	border: 0;
	font-weight: 600;
	cursor: pointer;
}
.wceb-acc-item .wceb-acc-body { display: none; padding: 0 0 14px; }
.wceb-acc-item.is-open .wceb-acc-body { display: block; }
.wceb-product-meta.wceb-meta-block .wceb-meta-item {
	display: block;
	margin: 0 0 6px;
}
.wceb-product-meta.wceb-meta-inline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}
.wceb-meta-sep { margin: 0 8px; opacity: 0.5; }
.wceb-meta-label { font-weight: 600; margin-right: 4px; }

/* Equal height qty + buttons */
.wceb-atc-row {
	align-items: stretch !important;
}
.wceb-atc-row .wceb-qty-box,
.wceb-atc-row .wceb-btn-add-to-cart,
.wceb-atc-row .single_add_to_cart_button {
	box-sizing: border-box !important;
}
.wceb-atc-row .wceb-btn-add-to-cart,
.wceb-atc-row .single_add_to_cart_button {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
}
.wceb-btn-buy-now {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-sizing: border-box !important;
}
.wceb-qty-btn {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}


/* Main image fixed aspect / size helpers */
.wceb-main-image.wceb-has-size {
	width: 100%;
}
.wceb-main-image.wceb-has-size .wceb-main-link {
	display: block;
	width: 100%;
	height: 100%;
}
.wceb-main-image.wceb-has-size img {
	width: 100%;
	height: 100%;
	object-fit: var(--wceb-object-fit, cover);
	display: block;
}

/* Mobile friendly gallery */
@media (max-width: 767px) {
	.wceb-gallery.wceb-thumbs--left .wceb-gallery-inner,
	.wceb-gallery.wceb-thumbs--right .wceb-gallery-inner {
		flex-direction: column !important;
	}
	.wceb-gallery.wceb-thumbs--left .wceb-thumbs,
	.wceb-gallery.wceb-thumbs--right .wceb-thumbs {
		width: 100% !important;
		flex-direction: row;
		grid-template-columns: repeat(var(--wceb-thumb-cols, 4), 1fr) !important;
	}
	.wceb-atc-row {
		flex-wrap: nowrap;
	}
	.wceb-atc-row .wceb-btn-add-to-cart {
		min-width: 0;
		flex: 1 1 auto;
	}
	.wceb-tab-nav {
		overflow-x: auto;
		flex-wrap: nowrap;
		-webkit-overflow-scrolling: touch;
	}
	.wceb-tab-btn {
		white-space: nowrap;
		flex-shrink: 0;
	}
	.wceb-product-meta.wceb-meta-inline {
		flex-direction: column;
		align-items: flex-start;
	}
	.wceb-product-meta.wceb-meta-inline .wceb-meta-sep {
		display: none;
	}
}
