/* WOW CACAO Умови — HoReCa badge, conditions card, minimum order note. */

.wcac-badge {
	--wcac-gold: #c49846;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px 4px 6px;
	border: 1px solid var(--wcac-gold);
	border-radius: 999px;
	background: #fffaf0;
	color: #7a5a1e;
	font-family: 'Cera Pro', sans-serif;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: .02em;
	white-space: nowrap;
}
.wcac-badge__icon {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	padding: 2px;
	border-radius: 50%;
	background: var(--wcac-gold);
	color: #fff;
}

/* Header: small round badge on the account icon. */
.header-icon.account { position: relative; }
.wcac-badge--dot {
	position: absolute;
	top: -5px;
	right: -7px;
	z-index: 4;
	width: 16px;
	height: 16px;
	padding: 0;
	gap: 0;
	border: 1.5px solid #fff;
	background: var(--wcac-gold);
	pointer-events: none;
}
.wcac-badge--dot .wcac-badge__icon {
	flex-basis: 100%;
	width: 100%;
	height: 100%;
	padding: 1.5px;
	background: transparent;
}

/* Conditions card. */
.wcac-terms {
	margin: 0 0 16px;
	padding: 16px 18px;
	border-radius: var(--radius, 16px);
	background: #f4f2ee;
	color: #220e0f;
	font-family: 'Cera Pro', sans-serif;
}
.wcac-terms.is-horeca {
	background: linear-gradient(135deg, #f7efe0 0%, #f4f2ee 60%);
	box-shadow: inset 0 0 0 1px rgba(196, 152, 70, .35);
}
.wcac-terms__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}
.wcac-terms__title {
	margin: 0;
	white-space: nowrap;
	font-family: 'Cera Pro', sans-serif;
	font-size: 16px;
	font-weight: 500;
	letter-spacing: 0;
	color: #220e0f;
}
.wcac-terms__status {
	font-size: 13px;
	color: #6b6864;
}
.wcac-terms__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 8px;
	margin: 0;
}
.wcac-terms__row {
	padding: 10px 12px;
	border-radius: 10px;
	background: #fffefc;
}
.wcac-terms__row dt {
	margin: 0 0 4px;
	font-size: 12px;
	color: #6b6864;
}
.wcac-terms__row dd {
	margin: 0;
	font-size: 15px;
	font-weight: 500;
	color: #220e0f;
}
.wcac-terms__rules {
	margin-top: 12px;
	font-size: 14px;
}
.wcac-terms__rules-title {
	margin: 0 0 6px;
	font-weight: 500;
}
.wcac-terms__rules ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.wcac-terms__rules li {
	position: relative;
	margin: 0 0 4px;
	padding-left: 16px;
	color: #4b4b4b;
}
.wcac-terms__rules li::before {
	content: '';
	position: absolute;
	top: .5em;
	left: 2px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #c49846;
}

/* Cart / checkout: compact. */
.wcac-terms--cart,
.wcac-terms--checkout {
	padding: 14px;
}
.wcac-terms--cart .wcac-terms__list,
.wcac-terms--checkout .wcac-terms__list {
	grid-template-columns: 1fr;
	gap: 6px;
}
.wcac-terms--cart .wcac-terms__row,
.wcac-terms--checkout .wcac-terms__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 10px;
}
.wcac-terms--cart .wcac-terms__row dt,
.wcac-terms--checkout .wcac-terms__row dt {
	margin: 0;
	font-size: 13px;
}
.wcac-terms--cart .wcac-terms__row dd,
.wcac-terms--checkout .wcac-terms__row dd {
	font-size: 14px;
	text-align: right;
	white-space: nowrap;
}

/* Minimum order: the note sits in the theme's flex row with the buttons, so give it its own line above them. */
.wc-proceed-to-checkout {
	flex-wrap: wrap;
}
.wc-proceed-to-checkout .wcac-min-note {
	flex: 0 0 100%;
	max-width: 100%;
	order: -1;
	margin: 0 0 4px;
}
.wcac-checkout-disabled,
.wcac-checkout-disabled:hover {
	opacity: .45;
	cursor: not-allowed;
	pointer-events: none;
}
.wcac-min-note {
	margin: 10px 0 0;
	font-size: 14px;
	line-height: 1.35;
	color: #b94336;
}
.wcac-min-note--mini {
	margin: 0 0 12px;
}

@media (max-width: 575px) {
	.wcac-terms { padding: 14px 12px; }
	.wcac-terms__list { grid-template-columns: 1fr; }
	.wcac-badge { font-size: 12px; }
}

/* Wholesale price: the price, and under it the condition text, both left-aligned. */
.wcac-wholesale {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	margin-left: 12px;
	color: #9a958f;
	vertical-align: middle;
	text-align: left;
}
.wcac-wholesale__price,
.wcac-wholesale__price .amount,
.wcac-wholesale__price bdi {
	font-weight: 500;
	color: #9a958f;
	white-space: nowrap;
}
.wcac-wholesale__label {
	display: block;
	max-width: 170px;
	font-family: 'Cera Pro', sans-serif;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.2;
	text-align: left;
	white-space: normal;
}
/* Product page: the theme's price column is narrow, so the block goes on its own line under the main price. */
.singleProduct-summary .price .wcac-wholesale,
.singleProduct-main-mobile .price .wcac-wholesale {
	display: flex;
	margin: 8px 0 0;
	font-size: 20px;
}
.singleProduct-summary .price .wcac-wholesale__label,
.singleProduct-main-mobile .price .wcac-wholesale__label {
	max-width: none;
	font-size: 13px;
}
/* Catalog card: wholesale price under the main price, everything centered like the theme's price. */
.products-item__price .wcac-wholesale {
	display: flex;
	align-items: center;
	margin: 2px 0 0;
	font-size: .8em;
	text-align: center;
}
.products-item__price .wcac-wholesale__label {
	max-width: 200px;
	text-align: center;
}
.wcac-wholesale-progress .cart-freeDelivery-line span {
	background: #282015;
}

/* Mini cart: HoReCa amount crossed out, wholesale amount next to it. */
.wcac-mini-price del,
.wcac-mini-total del {
	margin-right: 6px;
	font-weight: 400;
	color: #9A9A9A;
	font-size: 0.8em;
}
.wcac-mini-price del *,
.wcac-mini-total del * {
	font-weight: 400;
	color: #9A9A9A;
}
.wcac-mini-price ins {
	text-decoration: none;
}
.wcac-mini-total {
	white-space: nowrap;
}

/* Cart page / checkout: HoReCa price small and crossed out above the wholesale price. */
.wcac-cart-price {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	line-height: 1.15;
}
.wcac-cart-price del,
.wcac-cart-price del * {
	font-size: 0.75em;
	font-weight: 400;
	color: #9A9A9A;
}
.wcac-cart-price del .amount,
.wcac-cart-price del bdi {
	font-size: 1em;
}
.wcac-cart-price ins {
	text-decoration: none;
}

/* Product badges: "Акція" / "New" / "Немає в наявності" in the top-left corner of the image.
   (Own class names — .wcac-badge is the HoReCa status badge.) */
.products-item__image,
.singleProduct-images {
	position: relative;
}
.wcac-pbadges {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 5;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	pointer-events: none;
}
.wcac-pbadge {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #fff;
	white-space: nowrap;
}
.wcac-pbadge--sale {
	background: #C49846;
}
.wcac-pbadge--new {
	background: #211A16;
}
.wcac-pbadge--out {
	background: #8A8580;
}
/* Out-of-stock card: slightly faded image. */
.products-item.outofstock .products-item__image img {
	opacity: 0.55;
}
.wcac-pbadges--single {
	top: 16px;
	left: 16px;
}
.wcac-pbadges--single .wcac-pbadge {
	font-size: 14px;
	padding: 6px 14px;
}
@media (max-width: 767px) {
	.wcac-pbadges {
		top: 8px;
		left: 8px;
		gap: 4px;
	}
	.wcac-pbadge {
		font-size: 11px;
		padding: 4px 9px;
	}
}

/* Account → orders: discount and delivery rows above "Разом". */
.wca-order-products-subtotal {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 16px;
	border-top: 1px solid #ebe9e6;
	font-size: 16px;
	color: #2d2925;
}
.wca-order-products-subtotal strong {
	font-weight: 600;
	white-space: nowrap;
}

/* Out-of-stock card: price kept, button disabled. */
.wcac-out-of-stock__button,
.wcac-out-of-stock__button:hover,
.wcac-out-of-stock__button:disabled {
	background: #E4E1DD !important;
	border-color: #E4E1DD !important;
	color: #6F6A64 !important;
	cursor: not-allowed;
	opacity: 1;
}

/* ------------------------------------------------------------------
 * Layout fixes (audit 27.10 / 02.11)
 * ------------------------------------------------------------------ */

/* Contacts on phones: same two columns, but in the first row the phone column is narrower
   and the e-mail column wider, so the e-mail fits on one line at full size. If it still
   doesn't fit (very narrow screens), assets/wcac-fit.js makes it only as small as needed. */
@media (max-width: 480px) {
	.contacts-wrap {
		column-gap: 20px;
	}
	.contacts-wrap > .contacts-block:nth-child(1) {
		flex: 0 0 calc(40% - 10px);
		max-width: calc(40% - 10px);
	}
	.contacts-wrap > .contacts-block:nth-child(2) {
		flex: 0 0 calc(60% - 10px);
		max-width: calc(60% - 10px);
	}
	.contacts-wrap > .contacts-block:nth-child(n+3) {
		flex: 0 0 calc(50% - 10px);
		max-width: calc(50% - 10px);
	}
}
.contacts-block a[href^="mailto:"] {
	white-space: nowrap;
	transition-property: color; /* No animated font-size while it is being fitted. */
}

/* Account modals (company details etc.) on narrow phones: the title sits below the close
   button and fits the width. */
@media (max-width: 480px) {
	body.wca-account-page .wca-modal > h2 {
		margin: 24px 0 16px;
		font-size: min(21px, 5.8vw);
		overflow-wrap: anywhere;
	}
	body.wca-account-page .wca-modal__close {
		top: 8px;
		right: 8px;
	}
	body.wca-account-page .wca-modal-backdrop {
		padding: 10px;
	}
	body.wca-account-page .wca-modal {
		padding-left: 12px;
		padding-right: 12px;
	}
}

/* Account → orders: header of an order on tablets — the buttons get their own row
   instead of squeezing the TTN into one word per line. */
@media (max-width: 1180px) {
	body.wca-account-page .wca-order-card > header.wca-order-expanded-head {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, auto));
		justify-content: start;
		column-gap: 32px;
		row-gap: 18px;
	}
	body.wca-account-page .wca-order-head-cell--ttn strong {
		white-space: nowrap;
	}
	body.wca-account-page .wca-order-head-actions {
		grid-column: 1 / -1;
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-start;
		gap: 10px;
	}
}
@media (max-width: 760px) {
	body.wca-account-page .wca-order-card > header.wca-order-expanded-head {
		grid-template-columns: minmax(0, 1fr);
	}
	body.wca-account-page .wca-order-head-actions {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
	}
	body.wca-account-page .wca-order-outline-button,
	body.wca-account-page .wca-order-primary-button {
		width: 100%;
		white-space: normal;
		text-align: center;
	}
}
