/* ═══════════════════════════════════════════════
   BARRA BASE
═══════════════════════════════════════════════ */
.gg-sticky-atc {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 99999;
	background: #ffb503;
	border-top: 2.5px solid black;
	box-shadow: 0 -6px 18px rgba(0,0,0,.15);
}

.gg-sa-inner {
	max-width: 680px;
	margin: 0 auto;
	padding: 8px 14px;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

/* ── Nombre ── */
.gg-sa-row-name { display: block; }

.gg-sa-name {
	display: block;
	font-size: 13px;
	font-weight: 800;
	color: #111;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ════════════════════════════════════════════════
   FILA PRINCIPAL base (mobile)
   Grid: [precio-block] [selector] / [botón full]
════════════════════════════════════════════════ */
.gg-sa-row-main {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-rows: auto auto;
	align-items: center;
	gap: 6px 10px;
}

.gg-sa-price-block {
	grid-column: 1;
	grid-row: 1;
	display: flex;
	flex-direction: row;
	align-items: baseline;
	gap: 5px;
	min-width: 0;
	flex-wrap: nowrap;
}

.gg-sa-selector-col {
	grid-column: 2;
	grid-row: 1;
	align-self: center;
	position: relative;
}

.gg-sa-actions {
	grid-column: 1 / -1;
	grid-row: 2;
}

/* ── Precios WooCommerce ─────────────────────── */

.gg-sa-price,
.gg-sa-price .price {
	display: inline-flex !important;
	flex-direction: row !important;
	align-items: baseline !important;
	gap: 4px !important;
	line-height: 1 !important;
	flex-wrap: nowrap !important;
}

.gg-sa-price br                    { display: none !important; }
.gg-sa-price .screen-reader-text   { display: none !important; }

.gg-sa-price del {
	display: inline-flex !important;
	align-items: baseline !important;
	opacity: 0.6;
}
.gg-sa-price del .woocommerce-Price-amount,
.gg-sa-price del bdi,
.gg-sa-price del .woocommerce-Price-currencySymbol {
	font-size: 11px !important;
	font-weight: 600 !important;
	color: #111 !important;
	text-decoration: line-through !important;
}

.gg-sa-price ins {
	display: inline-flex !important;
	align-items: baseline !important;
	text-decoration: none !important;
}
.gg-sa-price ins .woocommerce-Price-amount,
.gg-sa-price ins bdi,
.gg-sa-price ins .woocommerce-Price-currencySymbol {
	font-size: 14px !important;
	font-weight: 800 !important;
	color: #111 !important;
	text-decoration: none !important;
}

.gg-sa-price > .woocommerce-Price-amount,
.gg-sa-price .price > .woocommerce-Price-amount {
	display: inline-flex !important;
	align-items: baseline !important;
}
.gg-sa-price > .woocommerce-Price-amount bdi,
.gg-sa-price > .woocommerce-Price-amount .woocommerce-Price-currencySymbol,
.gg-sa-price .price > .woocommerce-Price-amount bdi,
.gg-sa-price .price > .woocommerce-Price-amount .woocommerce-Price-currencySymbol {
	font-size: 14px !important;
	font-weight: 800 !important;
	color: #111 !important;
}

/* Badge "Desde X€/gr" del plugin PPG */
.gg-sa-price .gg-ppg-badge {
	display: inline-block !important;
	font-size: 13px !important;
	font-weight: 800 !important;
	color: #111 !important;
	background: none !important;
	border: none !important;
	padding: 0 !important;
	margin: 0 !important;
	line-height: 1 !important;
	opacity: 1 !important;
	visibility: visible !important;
}

/* €/gr */
.gg-sa-price-ppg {
	font-size: 9px;
	font-weight: 600;
	color: #555;
	line-height: 1;
	white-space: nowrap;
	flex-shrink: 0;
	align-self: baseline;
}

/* Ocultar €/gr duplicado cuando ya lo muestra el badge */
.gg-sa-price:has(.gg-ppg-badge) ~ .gg-sa-price-ppg {
	display: none !important;
}

/* ── Selector trigger (multi-variable) ── */
.gg-sa-selector-trigger {
	display: flex;
	align-items: center;
	gap: 5px;
	height: 34px;
	padding: 0 10px;
	border: 2px solid black;
	border-radius: 9px;
	background: #8A4C9F;
	cursor: pointer;
	white-space: nowrap;
}

.gg-sa-selector-label {
	font-size: 12px;
	font-weight: 800;
	color: #fff;
	max-width: 120px;
	overflow: hidden;
	text-overflow: ellipsis;
}

.gg-sa-selector-arrow { font-size: 12px; color: #fff; flex-shrink: 0; }

/* ── Inline single selector ── */
.gg-sa-inline-single-wrap { position: relative; }

.gg-sa-inline-single-button {
	display: flex;
	align-items: center;
	gap: 5px;
	height: 34px;
	padding: 0 10px;
	border: 2px solid black;
	border-radius: 9px;
	background: #fff;
	cursor: pointer;
	white-space: nowrap;
}

.gg-sa-inline-single-text {
	font-size: 18px;
	font-weight: 800;
	color: #111;
	max-width: 120px;
	overflow: hidden;
	font-family: 'HWTN';
	text-overflow: ellipsis;
}

.gg-sa-inline-single-arrow { font-size: 12px; color: #111; flex-shrink: 0; }

.gg-sa-inline-single-menu {
	position: absolute;
	right: 0;
	bottom: calc(100% + 6px);
	min-width: 160px;
	background: #fff;
	border: 2px solid black;
	border-radius: 12px;
	box-shadow: 0 -8px 20px rgba(0,0,0,.18);
	padding: 6px;
	z-index: 100001;
	max-height: 240px;
	overflow: auto;
}

.gg-sa-inline-single-option {
	width: 100%;
	display: block;
	border: 0;
	background: #fff;
	color: #111;
	text-align: left;
	padding: 9px 10px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}
.gg-sa-inline-single-option:hover,
.gg-sa-inline-single-option.is-active { background: #f3e9f7; }

/* ── Botón ATC ── */
.gg-sa-atc-btn,
.gg-sa-modal-atc-btn {
	display: block;
	width: 100%;
	min-height: 44px;
	background-color: #038d2b !important;
	border: 2.5px solid black !important;
	border-radius: 12px !important;
	color: #fff !important;
	font-family: 'HWTN', sans-serif;
	font-size: 17px;
	font-weight: 800;
	line-height: 1;
	padding: 10px 18px;
	cursor: pointer;
	box-shadow: none !important;
	white-space: nowrap;
	text-align: center;
}

.gg-sa-atc-btn.is-disabled,
.gg-sa-modal-atc-btn.is-disabled,
.gg-sa-atc-btn:disabled,
.gg-sa-modal-atc-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Ocultar selector en simple */
.gg-mode-simple .gg-sa-selector-col { display: none !important; }

/* ═══════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════ */
.gg-sa-modal { display: none; position: fixed; inset: 0; z-index: 100000; }
.gg-sa-modal.is-open { display: block; }
.gg-sa-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }

.gg-sa-modal-panel {
	position: absolute;
	left: 50%; transform: translateX(-50%);
	bottom: 0;
	width: min(720px, calc(100vw - 24px));
	max-height: 85vh;
	background: #ffb503;
	border-radius: 18px 18px 0 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: 0 -16px 35px rgba(0,0,0,.22);
}

.gg-sa-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px;
	border-bottom: 1px solid rgba(0,0,0,.12);
}

.gg-sa-modal-price { font-size: 15px; font-weight: 700; color: #111; }

.gg-sa-modal-close {
	width: 40px; height: 40px;
	display: inline-flex; align-items: center; justify-content: center;
	background: #fff; border: 1.5px solid #ddd; border-radius: 10px;
	font-size: 28px; line-height: 1; cursor: pointer; color: #111; flex-shrink: 0;
}

.gg-sa-modal-body { padding: 14px; overflow: auto; }
.gg-sa-field { margin-bottom: 12px; }
.gg-sa-field-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 800; color: #111; }

.gg-sa-select {
	width: 100%; min-height: 46px; padding: 10px 12px;
	border: 2px solid black; border-radius: 12px;
	background: #fff; font-size: 14px; color: #111;
}
.gg-sa-select.gg-sa-missing { border-color: #d62828; box-shadow: 0 0 0 2px rgba(214,40,40,.10); }

.gg-sa-qty-wrap { margin-top: 10px; }
.gg-sa-qty-box { display: inline-flex; align-items: center; gap: 8px; }

.gg-sa-qty-btn {
	width: 40px; height: 40px;
	display: inline-flex; align-items: center; justify-content: center;
	border: 2px solid black !important; border-radius: 999px;
	font-size: 24px; font-weight: 700; cursor: pointer; padding: 0;
}
#gg-sa-qty-plus  { background-color: rgb(3,147,215) !important; color: #fff !important; font-family: HWTArtzW00-Regular !important; }
#gg-sa-qty-minus { background: #f23300 !important;              color: #fff !important; font-family: HWTArtzW00-Regular !important; }

.gg-sa-qty-input {
	width: 56px; height: 40px; border: 0 !important; outline: none;
	box-shadow: none !important; text-align: center; font-size: 14px;
	font-weight: 800; color: #111; background: transparent;
	appearance: textfield; -moz-appearance: textfield;
}
.gg-sa-qty-input::-webkit-outer-spin-button,
.gg-sa-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.gg-sa-modal-foot { padding: 14px; border-top: 1px solid rgba(0,0,0,.12); background: #ffb503; }
body.gg-sa-no-scroll { overflow: hidden; }


/* ═══════════════════════════════════════════════
   MOBILE ≤ 767px — siempre visible
═══════════════════════════════════════════════ */
@media (max-width: 767px) {

	body.single-product { padding-bottom: 115px; }

	.gg-sticky-atc {
		transform: none !important;
		transition: none !important;
	}

	/* Multi-variable: solo botón */
	.gg-mode-multi .gg-sa-row-name,
	.gg-mode-multi .gg-sa-price-block,
	.gg-mode-multi .gg-sa-selector-col { display: none !important; }

	.gg-mode-multi .gg-sa-row-main { display: block; }

	/* Modal mobile */
	.gg-sa-modal-panel { left: 0; right: 0; transform: none; width: auto; }
	.gg-sa-modal-close { width: 38px; height: 38px; font-size: 26px; }
	.gg-sa-qty-box { justify-content: center; }
	.gg-sa-qty-input { width: 48px; font-size: 13px; }
	.gg-sa-qty-btn { width: 38px; height: 38px; font-size: 22px; }
	.gg-sa-inline-single-menu { max-height: 200px; }
}


/* ═══════════════════════════════════════════════
   DESKTOP ≥ 768px
═══════════════════════════════════════════════ */
@media (min-width: 768px) {

	body.single-product { padding-bottom: 0; }

	.gg-sticky-atc {
		border-top: none;
		border-radius: 8px 8px 0 0;
		box-shadow: 0 0 0 2.5px black, 0 -6px 18px rgba(0,0,0,.15);
		transform: translateY(110%);
		transition: transform 0.3s cubic-bezier(.4,0,.2,1);
	}

	.gg-sticky-atc.gg-sa-visible {
		transform: translateY(0);
		width: 40%;
		margin-left: auto;
		margin-right: auto;
	}

	.gg-sa-inner { padding: 6px 20px; gap: 3px; }

	/* Fila principal: flex row precio | selector | botón */
	.gg-sa-row-main {
		display: flex !important;
		flex-direction: row !important;
		align-items: center !important;
		gap: 10px !important;
		grid-template-columns: unset !important;
		grid-template-rows: unset !important;
	}

	.gg-sa-price-block {
		flex: 1 1 auto;
		grid-column: unset !important;
		grid-row: unset !important;
	}

	.gg-sa-selector-col {
		flex: 0 0 auto;
		grid-column: unset !important;
		grid-row: unset !important;
	}

	.gg-sa-actions {
		flex: 0 0 auto;
		grid-column: unset !important;
		grid-row: unset !important;
	}

	.gg-sa-atc-btn {
		width: auto !important;
		min-height: 36px !important;
		font-size: 15px !important;
		padding: 7px 18px !important;
	}

	/* Precios desktop */
	.gg-sa-price ins .woocommerce-Price-amount,
	.gg-sa-price ins bdi,
	.gg-sa-price ins .woocommerce-Price-currencySymbol,
	.gg-sa-price > .woocommerce-Price-amount bdi,
	.gg-sa-price > .woocommerce-Price-amount .woocommerce-Price-currencySymbol,
	.gg-sa-price .price > .woocommerce-Price-amount bdi,
	.gg-sa-price .price > .woocommerce-Price-amount .woocommerce-Price-currencySymbol {
		font-size: 15px !important;
	}

	.gg-sa-price del .woocommerce-Price-amount,
	.gg-sa-price del bdi,
	.gg-sa-price del .woocommerce-Price-currencySymbol { font-size: 12px !important; }

	.gg-sa-price-ppg { font-size: 10px; }

	/* Multi-variable desktop: mostrar todo, ocultar selector */
	.gg-mode-multi .gg-sa-price-block  { display: flex !important; }
	.gg-mode-multi .gg-sa-row-name     { display: block !important; }
	.gg-mode-multi .gg-sa-selector-col { display: none !important; }
}
