/**
 * Open bar – complementos: dark cards, icon, price + Agregar/Agregado pill, variable radios.
 */

.gw-ob-cp {
	--ob-cp-gold: #c9a96e;
	--ob-cp-card-bg: #161616;
	--ob-cp-border: #332e29;
	--ob-cp-ink: #f8f4ee;
	--ob-cp-muted: #a69e94;
	--ob-cp-sans: var(--wp--preset--font-family--dm-sans, "DM Sans", sans-serif);
	--ob-cp-serif: var(--wp--preset--font-family--cormorant-garamond, "Cormorant Garamond", serif);
	box-sizing: border-box;
}

.gw-ob-cp *,
.gw-ob-cp *::before,
.gw-ob-cp *::after {
	box-sizing: border-box;
}

.gw-ob-cp--hidden,
.complement-variations.d-none {
	display: none !important;
}

.gw-ob-cp__empty {
	color: var(--ob-cp-ink);
	text-align: center;
}

.gw-ob-cp__head {
	text-align: center;
	margin-bottom: 30px;
}

.gw-ob-cp__title {
	font-family: var(--ob-cp-serif);
	font-size: 22px;
	font-style: italic;
	font-weight: 400;
	color: var(--ob-cp-ink);
	margin: 0 0 5px 0;
}

.gw-ob-cp__subtitle {
	font-family: var(--ob-cp-serif);
	font-size: 13px;
	font-style: italic;
	color: var(--ob-cp-muted);
	margin: 0;
}

/* ---------- Cards grid ---------- */

.gw-ob-cp__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 400px));
	justify-content: center;
	gap: 40px;
	width: 100%;
	margin: 0 auto;
}

@media (max-width: 900px) {
	.gw-ob-cp__grid {
		grid-template-columns: 1fr;
		max-width: 400px;
	}
}

.gw-ob-cp__card {
	background: var(--ob-cp-card-bg);
	border: 1px solid var(--ob-cp-border);
	border-radius: 10px;
	padding: 22px 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 15px;
	overflow: hidden;
}

/* Title + small gold underline */
.gw-ob-cp__card-title {
	font-family: var(--ob-cp-serif);
	font-size: 20px;
	font-weight: 600;
	color: var(--ob-cp-ink);
	text-align: center;
	margin: 0;
	line-height: 1.2;
}

.gw-ob-cp__line {
	width: 32px;
	height: 1px;
	background: var(--ob-cp-gold);
	margin: 0;
}

/* Icon */
.gw-ob-cp__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100px;
	height: 100px;
	padding: 10px;
	margin: 0;
}

.gw-ob-cp__icon-img {
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

/* Price + Agregar/Agregado row */
.gw-ob-cp__row.add_by_check_wrapper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	margin: 0;
}

.gw-ob-cp__row .product_item_price,
.gw-ob-cp__price {
	font-family: var(--ob-cp-serif);
	font-size: 20px;
	font-weight: 600;
	color: var(--ob-cp-gold);
	line-height: 1;
}

.gw-ob-cp__row .product_item_price .woocommerce-Price-amount,
.gw-ob-cp__row .product_item_price bdi {
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
}

.gw-ob-cp__row .pp,
.gw-ob-cp__price .pp {
	margin-left: 4px;
	font-size: 0.95em;
}

/* Toggle pill */
.gw-ob-cp__toggle {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	margin: 0;
	padding: 8px 20px;
	width: 115px;
	min-width: 115px;
	border-radius: 999px;
	border: 1px solid var(--ob-cp-gold);
	background: transparent;
	color: var(--ob-cp-gold);
	font-family: var(--ob-cp-sans);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.gw-ob-cp__toggle input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	appearance: none;
	border: 0;
}

.gw-ob-cp__t-add,
.gw-ob-cp__t-on {
	position: relative;
	z-index: 1;
	pointer-events: none;
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.gw-ob-cp__t-on {
	display: none;
}

.gw-ob-cp__toggle.is-complement-on .gw-ob-cp__t-add,
.gw-ob-cp__toggle:has(input:checked) .gw-ob-cp__t-add {
	display: none;
}

.gw-ob-cp__toggle.is-complement-on .gw-ob-cp__t-on,
.gw-ob-cp__toggle:has(input:checked) .gw-ob-cp__t-on {
	display: inline-flex;
}

.gw-ob-cp__toggle.is-complement-on,
.gw-ob-cp__toggle:has(input:checked) {
	background: var(--ob-cp-gold);
	border-color: var(--ob-cp-gold);
	color: #0d0d0d;
}

/* ---------- Variable options ---------- */

.gw-ob-cp__vars {
	width: 100%;
	border-top: 0.5px solid var(--ob-cp-border);
	padding-top: 15px;
	margin: 0;
}

.gw-ob-cp__var-list {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.gw-ob-cp__var-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.gw-ob-cp__var-lbl {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	margin: 0;
	min-width: 0;
}

.complement-variation-radio {
	appearance: none;
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin: 0;
	border: 1px solid var(--ob-cp-gold);
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	transition: background 0.15s ease;
	position: relative;
}

.complement-variation-radio::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--ob-cp-gold);
	transform: translate(-50%, -50%) scale(0);
	transition: transform 0.15s ease;
}

.complement-variation-radio:checked::after {
	transform: translate(-50%, -50%) scale(1);
}

.complement-variation-radio:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.complement-variation-radio:disabled + .gw-ob-cp__var-txt {
	opacity: 0.5;
}

.complement-variation-radio:focus-visible {
	box-shadow: 0 0 0 2px rgba(201, 169, 110, 0.4);
}

.gw-ob-cp__var-txt {
	font-family: var(--ob-cp-sans);
	font-size: 13px;
	font-weight: 400;
	color: var(--ob-cp-ink);
	line-height: 1.2;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.gw-ob-cp__info {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	padding: 0;
	border: 0;
	background-color: transparent;
	background-image: url(../../images/info_icon.svg);
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	color: transparent;
	font-size: 0;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.gw-ob-cp__info:hover,
.gw-ob-cp__info:focus-visible {
	opacity: 0.7;
	outline: none;
}

.gw-ob-cp__var-delta {
	flex: 0 0 auto;
	font-family: var(--ob-cp-serif);
	font-size: 18px;
	font-weight: 600;
	color: var(--ob-cp-gold);
	white-space: nowrap;
	line-height: 1;
}

.gw-ob-cp__var-delta:empty {
	display: none;
}

.gw-ob-cp__var-delta .woocommerce-Price-amount,
.gw-ob-cp__var-delta bdi {
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
}

/* ---------- Simple short description footer ---------- */

.gw-ob-cp__footer {
	width: 100%;
	border-top: 0.5px solid var(--ob-cp-border);
	padding-top: 15px;
	margin: 0;
}

.gw-ob-cp__footer p {
	font-family: var(--ob-cp-serif);
	font-size: 12px;
	font-style: italic;
	font-weight: 400;
	color: var(--ob-cp-muted);
	line-height: 1.6;
	margin: 0 0 0.5em;
	text-align: left;
}

.gw-ob-cp__footer p:last-child {
	margin-bottom: 0;
}

/* ---------- Hidden description (source for modal) ---------- */

.gw-ob-cp__modal-content[hidden] {
	display: none !important;
}

/* ---------- Product info modal ---------- */

.gw-ob-cp-modal-open {
	overflow: hidden;
}

.gw-ob-cp__modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.gw-ob-cp__modal[hidden] {
	display: none !important;
}

.gw-ob-cp__modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.7);
	cursor: pointer;
}

.gw-ob-cp__modal-dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 15px;
	width: min(516px, 100%);
	max-height: calc(100vh - 48px);
	padding: 40px;
	background: #1c1b19;
	border: 1px solid #332e29;
	border-radius: 10px;
	overflow-y: auto;
	box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
	outline: none;
}

.gw-ob-cp__modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 25px;
	height: 25px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid #c9a96e;
	border-radius: 50%;
	color: #c9a96e;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.gw-ob-cp__modal-close:hover,
.gw-ob-cp__modal-close:focus-visible {
	background: #c9a96e;
	color: #0d0d0d;
	outline: none;
}

/* Body — inherits typography from product description (h1, h2, p) */

.gw-ob-cp__modal-body {
	display: block;
	color: #f8f4ee;
}

.gw-ob-cp__modal-body :first-child {
	margin-top: 0;
}

.gw-ob-cp__modal-body h1 {
	font-family: var(--ob-cp-serif);
	font-size: 20px;
	font-weight: 600;
	font-style: normal;
	color: #f8f4ee;
	margin: 0 0 15px 0;
	padding: 0 0 12px 0;
	position: relative;
	line-height: 1.2;
}

.gw-ob-cp__modal-body h1::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 32px;
	height: 0.8px;
	background: #c9a96e;
}

.gw-ob-cp__modal-body h2 {
	font-family: var(--ob-cp-serif);
	font-size: 18px;
	font-weight: 600;
	font-style: normal;
	color: #c9a96e;
	margin: 15px 0 3px 0;
	padding: 15px 0 0 0;
	border-top: 0.5px solid #332e29;
	line-height: 1.2;
}

.gw-ob-cp__modal-body h2:first-of-type {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.gw-ob-cp__modal-body p {
	font-family: var(--ob-cp-serif);
	font-size: 12px;
	font-style: italic;
	font-weight: 400;
	color: #a69e94;
	line-height: 1.6;
	margin: 0;
}

.gw-ob-cp__modal-body p + p {
	margin-top: 0;
}

@media (max-width: 600px) {
	.gw-ob-cp__modal {
		padding: 12px;
	}

	.gw-ob-cp__modal-dialog {
		padding: 28px 20px;
	}
}
