/**
 * Annelien WooCommerce Brand
 * Reusable styling for native WooCommerce product and catalogue markup.
 */

:root {
	--apwc-ink: #302824;
	--apwc-muted: #7a746e;
	--apwc-soft-muted: #a49c94;
	--apwc-paper: #f9f7f2;
	--apwc-card: #ffffff;
	--apwc-sand: #efe3cf;
	--apwc-sand-deep: #dfcaa3;
	--apwc-line: #e5dbce;
	--apwc-accent: #ff6b1a;
	--apwc-accent-dark: #d94f07;
	--apwc-blue: #4b9ef8;
	--apwc-radius-sm: 12px;
	--apwc-radius: 22px;
	--apwc-shadow: 0 18px 50px rgba(48, 40, 36, 0.09);
	--apwc-shadow-hover: 0 22px 58px rgba(48, 40, 36, 0.14);
}

body.apwc-store #main-content {
	background: var(--apwc-paper);
	color: var(--apwc-muted);
}

body.apwc-store #main-content > .container {
	width: min(92%, 1240px);
	max-width: 1240px;
	padding-top: clamp(42px, 6vw, 76px);
}

body.apwc-store #left-area {
	width: 100%;
	padding-right: 0;
}

body.apwc-store #sidebar {
	display: none;
}

body.apwc-store #main-content .container::before {
	display: none;
}

/* Breadcrumbs */

body.apwc-store .woocommerce-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px;
	margin: 0 0 24px;
	color: var(--apwc-soft-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.035em;
	text-transform: uppercase;
}

body.apwc-store .woocommerce-breadcrumb a {
	color: var(--apwc-muted);
	transition: color 180ms ease;
}

body.apwc-store .woocommerce-breadcrumb a:hover {
	color: var(--apwc-accent);
}

/* Single-product structure */

body.single-product.apwc-store div.product.type-product {
	position: relative;
	display: block;
}

/*
 * Divi wraps the gallery and summary in a direct .clearfix container.
 * That wrapper—not the outer WooCommerce product—must own the two-column grid.
 */
body.single-product.apwc-store div.product.type-product > .clearfix {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(390px, 0.86fr);
	gap: clamp(32px, 5vw, 68px);
	align-items: start;
}

body.single-product.apwc-store div.product.type-product::before,
body.single-product.apwc-store div.product.type-product::after,
body.single-product.apwc-store div.product.type-product > .clearfix::before,
body.single-product.apwc-store div.product.type-product > .clearfix::after {
	display: none;
}

body.single-product.apwc-store div.product .woocommerce-product-gallery,
body.single-product.apwc-store div.product .summary {
	float: none !important;
	width: 100% !important;
	margin: 0 !important;
}

/* Product image */

body.single-product.apwc-store div.product .woocommerce-product-gallery {
	grid-column: 1;
	padding: 13px;
	border: 1px solid var(--apwc-line);
	border-radius: var(--apwc-radius);
	background: var(--apwc-card);
	box-shadow: var(--apwc-shadow);
}

body.single-product.apwc-store .woocommerce-product-gallery__wrapper,
body.single-product.apwc-store .woocommerce-product-gallery__image,
body.single-product.apwc-store .woocommerce-product-gallery__image a {
	overflow: hidden;
	border-radius: calc(var(--apwc-radius) - 7px);
}

body.single-product.apwc-store .woocommerce-product-gallery__image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: calc(var(--apwc-radius) - 7px);
}

body.single-product.apwc-membership-product .woocommerce-product-gallery__image a {
	display: block;
	aspect-ratio: 4 / 5;
	background: var(--apwc-sand);
}

body.single-product.apwc-membership-product .woocommerce-product-gallery__image img {
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	object-position: center 42%;
}

body.single-product.apwc-store .woocommerce-product-gallery__trigger {
	top: 28px !important;
	right: 28px !important;
	display: grid;
	width: 42px;
	height: 42px;
	border: 1px solid rgba(48, 40, 36, 0.08);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 7px 22px rgba(48, 40, 36, 0.12);
	place-items: center;
}

/* Dynamic sale badge */

body.apwc-store span.onsale {
	top: 25px !important;
	left: 25px !important;
	z-index: 10;
	min-width: 0 !important;
	min-height: 0 !important;
	padding: 9px 12px !important;
	border-radius: 999px !important;
	background: var(--apwc-ink) !important;
	color: #fff !important;
	font-size: 10px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	box-shadow: none !important;
}

/* Product summary card */

body.single-product.apwc-store div.product .summary {
	grid-column: 2;
	padding: clamp(30px, 4vw, 48px);
	border: 1px solid var(--apwc-line);
	border-radius: var(--apwc-radius);
	background:
		radial-gradient(circle at 100% 0%, rgba(239, 227, 207, 0.7), transparent 32%),
		var(--apwc-card);
	box-shadow: var(--apwc-shadow);
}

@media (min-width: 981px) {
	body.single-product.apwc-store div.product .summary {
		position: sticky;
		top: 125px;
	}

	body.admin-bar.single-product.apwc-store div.product .summary {
		top: 157px;
	}
}

body.single-product.apwc-store .apwc-product-eyebrow {
	margin: 0 0 10px;
	color: var(--apwc-accent);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.17em;
	text-transform: uppercase;
}

body.single-product.apwc-store .product_title {
	margin: 0 0 20px;
	padding: 0;
	color: var(--apwc-ink);
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(36px, 4vw, 54px);
	font-weight: 600;
	line-height: 1.02;
}

body.single-product.apwc-store .summary .price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 11px;
	margin: 0 0 24px;
	color: var(--apwc-ink) !important;
	font-size: clamp(27px, 3vw, 36px) !important;
	font-weight: 700;
}

body.single-product.apwc-store .summary .price del {
	color: var(--apwc-soft-muted) !important;
	font-size: 0.58em;
	font-weight: 400;
	opacity: 0.8 !important;
}

body.single-product.apwc-store .summary .price ins {
	color: var(--apwc-accent) !important;
	font-weight: 700 !important;
	text-decoration: none;
}

body.single-product.apwc-store .woocommerce-product-details__short-description {
	margin-bottom: 24px;
	color: var(--apwc-muted);
	font-size: 16px;
	line-height: 1.72;
}

body.single-product.apwc-store .woocommerce-product-details__short-description p:last-child {
	margin-bottom: 0;
}

/* Membership benefits */

.apwc-membership-benefits {
	margin: 24px 0;
	padding: 21px;
	border: 1px solid var(--apwc-line);
	border-radius: var(--apwc-radius-sm);
	background: rgba(239, 227, 207, 0.42);
}

.apwc-membership-benefits__heading {
	margin: 0 0 13px !important;
	color: var(--apwc-ink);
	font-family: Georgia, "Times New Roman", serif;
	font-size: 19px;
	font-weight: 600;
}

.apwc-membership-benefits ul {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.apwc-membership-benefits li {
	display: grid;
	grid-template-columns: 24px minmax(0, 1fr);
	gap: 10px;
	align-items: start;
	padding: 10px 0;
	color: var(--apwc-muted);
	font-size: 14px;
	line-height: 1.5;
}

.apwc-membership-benefits li + li {
	border-top: 1px solid rgba(48, 40, 36, 0.08);
}

.apwc-membership-benefits li strong {
	display: block;
	color: var(--apwc-ink);
	font-weight: 700;
}

.apwc-membership-benefits__icon {
	display: grid;
	width: 22px;
	height: 22px;
	margin-top: 1px;
	border-radius: 50%;
	background: var(--apwc-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	place-items: center;
}

/* Purchasing controls */

body.single-product.apwc-store form.cart {
	display: flex;
	gap: 10px;
	margin: 0 !important;
	padding: 0 !important;
}

body.single-product.apwc-store form.cart .quantity .qty {
	min-height: 54px;
	border: 1px solid var(--apwc-line) !important;
	border-radius: 10px;
	background: #fff !important;
	color: var(--apwc-ink) !important;
}

body.single-product.apwc-store .single_add_to_cart_button {
	min-height: 54px;
	padding: 14px 24px !important;
	border: 1px solid var(--apwc-ink) !important;
	border-radius: 10px !important;
	background: var(--apwc-ink) !important;
	color: #fff !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	transition:
		background-color 180ms ease,
		border-color 180ms ease,
		transform 180ms ease;
}

body.single-product.apwc-store .single_add_to_cart_button::after {
	display: none !important;
}

body.single-product.apwc-store .single_add_to_cart_button:hover,
body.single-product.apwc-store .single_add_to_cart_button:focus-visible {
	border-color: var(--apwc-accent) !important;
	background: var(--apwc-accent) !important;
	transform: translateY(-1px);
}

body.single-product.apwc-membership-product .single_add_to_cart_button {
	flex: 1;
	width: 100%;
}

.apwc-purchase-note {
	margin: 12px 0 0 !important;
	color: var(--apwc-soft-muted);
	font-size: 12px;
	line-height: 1.45;
	text-align: center;
}

body.single-product.apwc-store .product_meta {
	margin-top: 24px;
	padding-top: 18px;
	border-top: 1px solid var(--apwc-line);
	color: var(--apwc-soft-muted);
	font-size: 11px;
	line-height: 1.65;
}

body.single-product.apwc-store .product_meta a {
	color: var(--apwc-muted);
}

body.single-product.apwc-membership-product .product_meta {
	display: none;
}

/* Product tabs */

body.single-product.apwc-store .woocommerce-tabs {
	grid-column: 1 / -1;
	width: 100%;
	margin-top: clamp(34px, 6vw, 72px);
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

body.single-product.apwc-store .woocommerce-tabs ul.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin: 0 0 16px !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	overflow: visible;
}

body.single-product.apwc-store .woocommerce-tabs ul.tabs::before,
body.single-product.apwc-store .woocommerce-tabs ul.tabs li::before,
body.single-product.apwc-store .woocommerce-tabs ul.tabs li::after {
	display: none !important;
}

body.single-product.apwc-store .woocommerce-tabs ul.tabs li {
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid var(--apwc-line) !important;
	border-radius: 999px !important;
	background: transparent !important;
}

body.single-product.apwc-store .woocommerce-tabs ul.tabs li a {
	padding: 10px 18px !important;
	color: var(--apwc-muted) !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

body.single-product.apwc-store .woocommerce-tabs ul.tabs li.active {
	border-color: var(--apwc-ink) !important;
	background: var(--apwc-ink) !important;
}

body.single-product.apwc-store .woocommerce-tabs ul.tabs li.active a {
	color: #fff !important;
}

body.single-product.apwc-store .woocommerce-Tabs-panel {
	margin: 0 !important;
	padding: clamp(28px, 4vw, 48px) !important;
	border: 1px solid var(--apwc-line);
	border-radius: var(--apwc-radius);
	background: var(--apwc-card);
	box-shadow: var(--apwc-shadow);
	color: var(--apwc-muted);
	font-size: 16px;
	line-height: 1.75;
}

body.single-product.apwc-store .woocommerce-Tabs-panel h2,
body.single-product.apwc-store .woocommerce-Tabs-panel h3,
body.single-product.apwc-store .woocommerce-Tabs-panel h4 {
	color: var(--apwc-ink);
	font-family: Georgia, "Times New Roman", serif;
	font-weight: 600;
}

body.single-product.apwc-store .woocommerce-Tabs-panel h2 {
	margin-bottom: 22px;
	font-size: clamp(28px, 3vw, 40px);
}

body.single-product.apwc-store .woocommerce-Tabs-panel h3 {
	margin-top: 32px;
	font-size: clamp(22px, 2.3vw, 30px);
}

/* Related products and shop cards */

body.apwc-store .related.products,
body.apwc-store .upsells.products {
	grid-column: 1 / -1;
	width: 100%;
	margin-top: clamp(40px, 6vw, 72px);
}

body.apwc-store .related.products > h2,
body.apwc-store .upsells.products > h2,
body.apwc-store .woocommerce-products-header__title {
	margin-bottom: 26px;
	color: var(--apwc-ink);
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(30px, 4vw, 46px);
	font-weight: 600;
}

body.apwc-store ul.products {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 22px;
}

body.apwc-store ul.products::before,
body.apwc-store ul.products::after {
	display: none;
}

body.apwc-store ul.products li.product {
	float: none !important;
	display: flex;
	flex-direction: column;
	width: 100% !important;
	height: 100%;
	margin: 0 !important;
	padding: 12px 12px 18px;
	overflow: hidden;
	border: 1px solid var(--apwc-line);
	border-radius: 17px;
	background: var(--apwc-card);
	box-shadow: 0 10px 30px rgba(48, 40, 36, 0.07);
	transition:
		border-color 180ms ease,
		box-shadow 180ms ease,
		transform 180ms ease;
}

body.apwc-store ul.products li.product:hover {
	border-color: var(--apwc-sand-deep);
	box-shadow: var(--apwc-shadow-hover);
	transform: translateY(-3px);
}

body.apwc-store ul.products li.product .woocommerce-loop-product__link {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
}

body.apwc-store ul.products li.product img {
	width: 100%;
	aspect-ratio: 1 / 1;
	margin-bottom: 17px !important;
	border-radius: 12px;
	object-fit: cover;
}

body.apwc-store ul.products li.product .woocommerce-loop-product__title {
	padding: 0 4px !important;
	color: var(--apwc-ink);
	font-family: Georgia, "Times New Roman", serif;
	font-size: 20px !important;
	font-weight: 600;
	line-height: 1.25;
}

body.apwc-store ul.products li.product .price {
	margin-top: auto;
	padding: 0 4px;
	color: var(--apwc-accent) !important;
	font-size: 16px !important;
	font-weight: 700;
}

body.apwc-store ul.products li.product .button {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: calc(100% - 8px);
	min-height: 42px;
	margin: 13px 4px 0 !important;
	padding: 10px 14px !important;
	border: 1px solid var(--apwc-ink) !important;
	border-radius: 8px !important;
	background: var(--apwc-ink) !important;
	color: #fff !important;
	font-size: 10px !important;
	font-weight: 700 !important;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

body.apwc-store ul.products li.product .button:hover,
body.apwc-store ul.products li.product .button:focus-visible {
	border-color: var(--apwc-accent) !important;
	background: var(--apwc-accent) !important;
	color: #fff !important;
}

body.apwc-store ul.products li.product .button::after {
	display: none !important;
}

/* Tablet and mobile */

@media (max-width: 1100px) {
	body.apwc-store ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 900px) {
	body.single-product.apwc-store div.product.type-product > .clearfix {
		grid-template-columns: minmax(0, 1fr);
		gap: 25px;
	}

	body.single-product.apwc-store div.product .woocommerce-product-gallery,
	body.single-product.apwc-store div.product .summary,
	body.single-product.apwc-store .woocommerce-tabs,
	body.apwc-store .related.products,
	body.apwc-store .upsells.products {
		grid-column: 1;
	}

	body.single-product.apwc-store div.product .summary {
		padding: clamp(27px, 6vw, 40px);
	}

	body.apwc-store ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	body.apwc-store #main-content > .container {
		width: min(91%, 1240px);
		padding-top: 33px;
	}

	body.single-product.apwc-store .product_title {
		font-size: 37px;
	}

	body.single-product.apwc-store .summary .price {
		font-size: 29px !important;
	}

	body.single-product.apwc-store form.cart {
		flex-direction: column;
	}

	body.single-product.apwc-store form.cart .quantity,
	body.single-product.apwc-store form.cart .quantity .qty,
	body.single-product.apwc-store .single_add_to_cart_button {
		width: 100%;
	}

	body.single-product.apwc-store .woocommerce-tabs ul.tabs {
		gap: 7px;
	}

	body.single-product.apwc-store .woocommerce-tabs ul.tabs li {
		flex: 1 1 auto;
		text-align: center;
	}

	body.single-product.apwc-store .woocommerce-tabs ul.tabs li a {
		display: block;
		padding: 9px 12px !important;
	}

	body.single-product.apwc-store .woocommerce-Tabs-panel {
		padding: 25px 21px !important;
	}

	body.apwc-store ul.products {
		gap: 14px;
	}

	body.apwc-store ul.products li.product {
		padding: 9px 9px 15px;
	}

	body.apwc-store ul.products li.product .woocommerce-loop-product__title {
		font-size: 17px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.apwc-store *,
	body.apwc-store *::before,
	body.apwc-store *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
