/* ==========================================================================
   ERG Theme — WooCommerce Overrides
   Custom styles for WooCommerce blocks and pages
   ========================================================================== */

/* ---------- Filter Pills ---------- */
.erg-filter-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
}

.erg-pill {
	display: inline-flex;
	align-items: center;
	padding: 0.5rem 1.25rem;
	border-radius: var(--erg-radius-pill);
	border: 2px solid var(--wp--preset--color--border);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--text-secondary);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	font-size: 0.875rem;
	text-decoration: none;
	transition: var(--erg-transition);
	white-space: nowrap;
}

.erg-pill:hover {
	border-color: var(--wp--preset--color--terracotta);
	color: var(--wp--preset--color--terracotta);
}

.erg-pill--active,
.erg-pill--active:hover {
	background: var(--wp--preset--color--terracotta);
	border-color: var(--wp--preset--color--terracotta);
	color: var(--wp--preset--color--white);
}

/* ---------- Product Image Gallery ---------- */
.wc-block-product-image-gallery {	border-radius: var(--erg-radius-lg);	overflow: hidden;}.wc-block-product-image-gallery .wc-block-woocommerce-product-gallery-large-image + * {	margin-top: var(--wp--preset--spacing--30);}

.wc-block-product-image-gallery img {
	border-radius: var(--erg-radius-md);
}

/* ---------- Product Price ---------- */
.wc-block-components-product-price {
	font-family: var(--wp--preset--font-family--heading);
}

.wc-block-components-product-price del {
	color: var(--wp--preset--color--text-muted);
	font-weight: 400;
	font-size: 0.875em;
}

.wc-block-components-product-price ins {
	text-decoration: none;
	font-weight: 700;
}

/* ---------- Add to Cart Button ---------- */
.wc-block-components-product-add-to-cart .wp-element-button,
.single_add_to_cart_button,
.wc-block-add-to-cart-form .wp-element-button {
	background: var(--wp--preset--color--terracotta) !important;
	color: var(--wp--preset--color--white) !important;
	border-radius: var(--erg-radius-pill) !important;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	font-size: 1rem;
	padding: 0.875rem 2rem;
	border: none;
	transition: var(--erg-transition);
	width: 100%;
	text-align: center;
}

.wc-block-components-product-add-to-cart .wp-element-button:hover,
.single_add_to_cart_button:hover,
.wc-block-add-to-cart-form .wp-element-button:hover {
	background: var(--wp--preset--color--terracotta-dark) !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(200, 85, 61, 0.3);
}

/* ---------- Variation Selector ---------- */
.wc-block-add-to-cart-form .variations select,
.variations select {
	border: 2px solid var(--wp--preset--color--border);
	border-radius: var(--erg-radius-md);
	padding: 0.625rem 1rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.9375rem;
	color: var(--wp--preset--color--text-primary);
	background: var(--wp--preset--color--white);
	transition: var(--erg-transition);
}

.wc-block-add-to-cart-form .variations select:focus,
.variations select:focus {
	border-color: var(--wp--preset--color--sage);
	outline: none;
	box-shadow: 0 0 0 3px rgba(143, 174, 139, 0.2);
}

/* ---------- Product Rating Stars ---------- */
.wc-block-components-product-rating .wc-block-components-product-rating__stars {
	color: #F59E0B;
}

/* ---------- Cart Block ---------- */
.wc-block-cart {
	font-family: var(--wp--preset--font-family--body);
}

.wc-block-cart .wc-block-components-product-name {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	color: var(--wp--preset--color--plum);
	text-decoration: none;
}

.wc-block-cart .wc-block-components-product-name:hover {
	color: var(--wp--preset--color--terracotta);
}

.wc-block-cart .wc-block-cart__submit-button {
	background: var(--wp--preset--color--terracotta) !important;
	border-radius: var(--erg-radius-pill) !important;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
}

.wc-block-cart .wc-block-cart__submit-button:hover {
	background: var(--wp--preset--color--terracotta-dark) !important;
}

/* ---------- Checkout Block ---------- */
.wc-block-checkout {
	font-family: var(--wp--preset--font-family--body);
}

.wc-block-checkout .wc-block-components-text-input input,
.wc-block-checkout .wc-block-components-text-input textarea {
	border: 2px solid var(--wp--preset--color--border);
	border-radius: var(--erg-radius-md);
	transition: var(--erg-transition);
}

.wc-block-checkout .wc-block-components-text-input input:focus,
.wc-block-checkout .wc-block-components-text-input textarea:focus {
	border-color: var(--wp--preset--color--sage);
	box-shadow: 0 0 0 3px rgba(143, 174, 139, 0.2);
}

.wc-block-checkout .wc-block-components-checkout-place-order-button {
	background: var(--wp--preset--color--terracotta) !important;
	border-radius: var(--erg-radius-pill) !important;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	font-size: 1.0625rem;
	padding: 1rem 2rem;
}

.wc-block-checkout .wc-block-components-checkout-place-order-button:hover {
	background: var(--wp--preset--color--terracotta-dark) !important;
}

/* ---------- Checkout ---------- */
.woocommerce-additional-fields {
	display: none !important;
}

/* ---------- My Account ---------- */
.woocommerce-MyAccount-navigation ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.woocommerce-MyAccount-navigation ul li a {
	display: block;
	padding: 0.75rem 1rem;
	color: var(--wp--preset--color--text-secondary);
	text-decoration: none;
	border-radius: var(--erg-radius-md);
	font-weight: 500;
	transition: var(--erg-transition);
}

.woocommerce-MyAccount-navigation ul li a:hover {
	background: var(--wp--preset--color--cream-dark);
	color: var(--wp--preset--color--plum);
}

.woocommerce-MyAccount-navigation ul li.is-active a {
	background: var(--wp--preset--color--plum);
	color: var(--wp--preset--color--white);
}

/* ---------- Mini Cart ---------- */
.wc-block-mini-cart__drawer {
	font-family: var(--wp--preset--font-family--body);
}

.wc-block-mini-cart__drawer .wc-block-mini-cart__footer-actions .wc-block-components-button {
	border-radius: var(--erg-radius-pill) !important;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
}

/* ---------- Breadcrumbs ---------- */
.wc-block-breadcrumbs {
	font-family: var(--wp--preset--font-family--body);
}

.wc-block-breadcrumbs a {
	color: var(--wp--preset--color--text-muted);
	text-decoration: none;
}

.wc-block-breadcrumbs a:hover {
	color: var(--wp--preset--color--terracotta);
}

/* ---------- Product Guarantees Box ---------- */
.erg-product-guarantees {
	background: var(--wp--preset--color--cream);
}

/* ---------- Sale Badge ---------- */
/* Position sale badge on top of product image */
ul.products li.product .woocommerce-loop-product__link,
.woocommerce ul.products li.product > a {
	position: relative !important;
	display: block;
}

ul.products li.product .onsale,
.woocommerce ul.products li.product .onsale,
.woocommerce span.onsale {
	position: absolute !important;
	top: 12px !important;
	left: 12px !important;
	right: auto !important;
	z-index: 10;
	margin: 0 !important;
	display: inline-block !important;
}

/* Remove the <br> tags WooCommerce adds around sale badge */
ul.products li.product a > br {
	display: none;
}

.wc-block-components-product-sale-badge,
.onsale {
	background: var(--wp--preset--color--terracotta) !important;
	color: var(--wp--preset--color--white) !important;
	border-radius: var(--erg-radius-pill) !important;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	font-size: 0.75rem;
	padding: 0.25rem 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

/* ---------- Product Content Styling ---------- */
.erg-product-content {
	color: var(--wp--preset--color--text-primary);
	line-height: 1.75;
}

.erg-product-content h2,
.erg-product-content h3 {
	font-family: var(--wp--preset--font-family--heading);
	color: var(--wp--preset--color--plum);
	margin-top: 2.5rem;
	margin-bottom: 1rem;
}

.erg-product-content h2 {
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 700;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid var(--wp--preset--color--border);
}

.erg-product-content h3 {
	font-size: 1.125rem;
	font-weight: 700;
}

.erg-product-content h4 {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1rem;
	font-weight: 700;
	color: var(--wp--preset--color--plum);
	margin-top: 1.5rem;
	margin-bottom: 0.5rem;
}

.erg-product-content p {
	margin-bottom: 1rem;
	color: var(--wp--preset--color--text-secondary);
}

.erg-product-content b,
.erg-product-content strong {
	color: var(--wp--preset--color--plum);
	font-weight: 700;
}

.erg-product-content img {
	border-radius: var(--erg-radius-md);
	margin: 1.5rem auto;
	display: block;
	max-width: 100%;
	height: auto;
}

.erg-product-content figure {
	margin: 1.5rem 0;
	text-align: center;
}

.erg-product-content figure img {
	margin: 0 auto;
}

.erg-product-content a {
	color: var(--wp--preset--color--terracotta);
	text-decoration: none;
	font-weight: 500;
}

.erg-product-content a:hover {
	color: var(--wp--preset--color--terracotta-dark);
	text-decoration: underline;
}

.erg-product-content ul,
.erg-product-content ol {
	padding-left: 1.5rem;
	margin: 1rem 0 1.5rem;
	color: var(--wp--preset--color--text-secondary);
}

.erg-product-content li {
	margin-bottom: 0.75rem;
	line-height: 1.6;
}

.erg-product-content li::marker {
	color: var(--wp--preset--color--terracotta);
}

/* Bundle upsell cards at top of product pages */
.erg-product-content > a > img,
.erg-product-content > a:first-child img {
	border-radius: var(--erg-radius-lg);
	box-shadow: var(--erg-shadow-card);
	transition: var(--erg-transition);
	max-width: 280px;
}

.erg-product-content > a:hover img {
	box-shadow: var(--erg-shadow-card-hover);
	transform: translateY(-2px);
}

/* Guarantee icons row */
.erg-product-content figure + h3 {
	text-align: center;
	margin-top: 0.5rem;
}

.erg-product-content figure img[width="225"],
.erg-product-content figure img[width="201"],
.erg-product-content figure img[width="149"] {
	width: 64px !important;
	height: 64px !important;
	margin: 0 auto;
}

/* FAQ accordions */
.erg-product-content details {
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding: 1rem 0;
}

.erg-product-content details summary {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	font-size: 1rem;
	color: var(--wp--preset--color--plum);
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	transition: var(--erg-transition);
}

.erg-product-content details summary::-webkit-details-marker {
	display: none;
}

.erg-product-content details summary::after {
	content: "+";
	font-size: 1.5rem;
	font-weight: 400;
	color: var(--wp--preset--color--terracotta);
	transition: transform 0.3s ease;
	flex-shrink: 0;
	margin-left: 1rem;
}

.erg-product-content details[open] summary::after {
	transform: rotate(45deg);
}

.erg-product-content details summary:hover {
	color: var(--wp--preset--color--terracotta);
}

/* Reviews section within product */
.erg-product-content [data-show-more] {
	display: none;
}

/* App download badges */
.erg-product-content a > img[width="200"] {
	display: inline-block;
	border-radius: var(--erg-radius-sm);
	margin: 0.5rem 0.5rem 0.5rem 0;
	max-width: 160px;
}

/* ---------- Product Pills (dc-product-pills shortcode) ---------- */
.dc-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: var(--wp--preset--spacing--20) 0;
}

.dc-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.375rem 0.75rem;
	border-radius: var(--erg-radius-pill);
	background: var(--wp--preset--color--cream-dark);
	color: var(--wp--preset--color--plum);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.75rem;
	font-weight: 600;
}

.dc-pill svg,
.dc-pill img {
	width: 14px;
	height: 14px;
}
