/* Alipharma Custom Bundles — customer-facing promo helper cards.
 * Scoped under .alp-bundles. Typography is inherited from the theme so the
 * cards feel native; only colors, spacing and shapes are set here.
 * -------------------------------------------------------------------------- */

.alp-bundles {
	--alp-navy: #0e1b54;
	--alp-ink: #16205a;
	--alp-blue: #1f2ad6;
	--alp-blue-600: #1a23bd;
	--alp-lavender: #b388dd;
	--alp-lavender-soft: #f3ecfb;
	--alp-blue-soft: #eef0fc;
	--alp-muted: #6b7280;
	--alp-line: #e9eaf2;
	--alp-track: #eceef6;

	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 22px 0;
}

.alp-bundle-card {
	position: relative;
	background: #fff;
	border: 1px solid var(--alp-line);
	border-radius: 16px;
	padding: 16px 18px 18px;
	box-shadow: 0 1px 2px rgba(14, 27, 84, .04), 0 10px 26px rgba(14, 27, 84, .07);
	overflow: hidden;
}

/* Accent ribbon down the left edge. */
.alp-bundle-card::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 4px;
	background: linear-gradient(180deg, var(--alp-blue), #5b6cf0);
}

.alp-bundle-card--gift::before {
	background: linear-gradient(180deg, var(--alp-lavender), #d9a7ef);
}

/* ------------------------------------------------------------------ Head -- */

.alp-bundle-card__head {
	display: flex;
	align-items: center;
	gap: 13px;
}

.alp-bundle-card__icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 13px;
	color: #fff;
	background: linear-gradient(135deg, var(--alp-navy), var(--alp-blue));
	box-shadow: 0 6px 14px rgba(31, 42, 214, .28);
}

.alp-bundle-card__icon--gift {
	background: linear-gradient(135deg, #8b5cf6, var(--alp-lavender));
	box-shadow: 0 6px 14px rgba(179, 136, 221, .35);
}

.alp-bundle-card__text {
	min-width: 0;
	flex: 1;
}

.alp-bundle-card__eyebrow {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--alp-blue-600);
	margin-bottom: 3px;
}

.alp-bundle-card--gift .alp-bundle-card__eyebrow {
	color: #9b59d6;
}

.alp-bundle-card__title {
	display: block;
	font-size: 15.5px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--alp-ink);
}

.alp-bundle-card__title em {
	font-style: normal;
	color: var(--alp-blue-600);
}

.alp-bundle-card--gift .alp-bundle-card__title em {
	color: #9b59d6;
}

.alp-bundle-card__thumb {
	flex: none;
	width: 46px;
	height: 46px;
	border-radius: 11px;
	overflow: hidden;
	border: 1px solid var(--alp-line);
	background: #fff;
}

.alp-bundle-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	margin: 0;
}

/* -------------------------------------------------------------- Progress -- */

.alp-progress {
	padding-top: 26px; /* room for milestone labels above the track */
	margin: 6px 0 12px;
}

.alp-progress__track {
	position: relative;
	height: 8px;
	border-radius: 999px;
	background: var(--alp-track);
}

.alp-progress__fill,
.alp-progress__projected {
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	border-radius: 999px;
	transition: width .45s cubic-bezier(.4, 0, .2, 1);
}

.alp-progress__fill {
	background: linear-gradient(90deg, var(--alp-blue), #5b6cf0);
	z-index: 2;
}

.alp-progress__projected {
	background: rgba(31, 42, 214, .22);
	z-index: 1;
}

.alp-bundle-card--gift .alp-progress__fill {
	background: linear-gradient(90deg, var(--alp-lavender), #d9a7ef);
}

.alp-bundle-card--gift .alp-progress__projected {
	background: rgba(179, 136, 221, .25);
}

/* Milestones */
.alp-progress__milestone {
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 3;
	text-align: center;
}

.alp-progress__milestone i {
	display: block;
	width: 13px;
	height: 13px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid #cdd2e4;
	margin: 0 auto;
	transition: border-color .25s ease, background .25s ease, transform .25s ease;
}

.alp-progress__milestone b {
	position: absolute;
	bottom: calc(100% + 6px);
	left: 50%;
	transform: translateX(-50%);
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
	color: var(--alp-muted);
	transition: color .25s ease;
}

.alp-progress__milestone.is-reached i {
	background: var(--alp-blue);
	border-color: var(--alp-blue);
}

.alp-progress__milestone.is-reached b {
	color: var(--alp-ink);
}

/* Projected (this-quantity preview) state */
.alp-progress__milestone.is-projected i {
	border-color: var(--alp-lavender);
	background: var(--alp-lavender-soft);
	transform: scale(1.12);
}

/* ----------------------------------------------------------------- Hint --- */

.alp-bundle-card__hint {
	margin: 0;
	font-size: 12.5px;
	color: var(--alp-muted);
	line-height: 1.5;
}

@media (max-width: 480px) {
	.alp-bundle-card__title { font-size: 14.5px; }
	.alp-progress__milestone b { font-size: 10px; }
}

/* ----------------------------------------------------- Cart context ------- */

/* Summary card sits in the totals column — tighten the spacing there. */
.alp-bundles--cart {
	margin: 0 0 18px;
}

/* In-scope line-item note (rendered inside the cart table, outside .alp-bundles,
   so it can't rely on the scoped CSS variables). */
.alp-line-note {
	display: block;
	margin-top: 5px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	color: #1a23bd;
}
.alp-line-note::before {
	content: "🏷 ";
}

/* "Ya tienes N de este producto…" — soft info chip below the quantity selector. */
.alp-incart {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	flex-basis: 100%;
	width: 100%;
	box-sizing: border-box;
	margin: 14px 0 0;
	padding: 9px 9px 9px 14px;
	border-radius: 12px;
	background: #f5f6fd;
	border: 1px solid #e7e9f7;
}
@keyframes alp-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, .55); }
	70%  { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
	100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.alp-incart::before {
	content: "";
	flex: none;
	align-self: flex-start;
	margin-top: 4px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #10b981;
	animation: alp-pulse 1.8s ease-out infinite;
}
@media (prefers-reduced-motion: reduce) {
	.alp-incart::before { animation: none; }
}
.alp-incart__text {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.alp-incart__main {
	font-size: 12.5px;
	line-height: 1.4;
	color: #535a72;
}
.alp-incart__main strong {
	color: #16205a;
	font-weight: 800;
}
.alp-incart__sub {
	font-size: 11px;
	line-height: 1.4;
	color: #9aa0b5;
}
.alp-incart__link {
	flex: none;
	padding: 5px 13px;
	border-radius: 999px;
	background: #1a23bd;
	color: #fff !important;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background .15s ease;
}
.alp-incart__link:hover {
	background: #11198f;
}

/* Discount tiers table (above the add-to-cart). */
.alp-tiers {
	margin: 0 0 18px;
}
.alp-tiers-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
	margin: 0;
}
.alp-tiers-table th {
	text-align: left;
	padding: 8px 10px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: #6b7280;
	border-bottom: 1px solid #e6e8ef;
}
.alp-tiers-table td {
	padding: 11px 10px;
	border-bottom: 1px solid #f0f1f6;
	color: #16205a;
}
.alp-tiers-table tr:last-child td {
	border-bottom: 0;
}
.alp-tiers-table th:last-child,
.alp-tiers-table td:last-child {
	text-align: right;
}
.alp-tiers-price {
	font-weight: 700;
	color: #1a23bd;
}
.alp-tiers-disc {
	color: #6b7280;
	font-weight: 600;
}
/* Active tier (matches the customer's projected quantity). */
.alp-tiers-table tr.is-active td {
	background: #eef0fc;
}
.alp-tiers-table tr.is-active td:first-child {
	font-weight: 800;
	color: #16205a;
	box-shadow: inset 3px 0 0 #1a23bd;
}
.alp-tiers-table tr.is-active .alp-tiers-disc {
	color: #16205a;
	font-weight: 700;
}

/* Space between the add-to-cart actions (qty + button) and the PayPal button. */
.single-product div.product form.cart,
.qodef-woo-single-inner form.cart {
	margin-bottom: 24px;
}
.single-product .paypal-buttons,
.single-product [class*="paypal-button"],
.single-product [id*="paypal-button"] {
	margin-top: 6px;
}

/* Quantity selectors — widen so 2–3 digit counts fit.
   Classic theme input (product page): */
.quantity input.qty,
.woocommerce .quantity input.qty {
	min-width: 3.4em;
	text-align: center;
}

/* Teenglow / qode product-page stepper input (fixed 30px by the theme). */
.qodef-quantity-buttons .qodef-quantity-input {
	width: 50px !important;
	min-width: 50px !important;
}

/* WooCommerce Cart/Checkout block: the container is a fixed 107px flex box, so
   widening it gives the flex input room. Specificity ties the core rule and load
   order isn't guaranteed, hence !important. */
.wc-block-components-quantity-selector {
	width: 120px !important;
	max-width: none !important;
}
.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input {
	min-width: 46px !important;
}

/* ------------------------------------------- Product meta: badge pool ----- */

/* One inline pool holding ONLY the category + brand badges. The meta also
   contains a Tags block and (sometimes) SKU — hide those and all labels so we
   don't drag a long list of bare tag links into the pool. */
.product_meta {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 22px;
}
.product_meta .tagged_as,
.product_meta .sku_wrapper,
.product_meta .qodef-woo-meta-label {
	display: none !important; /* tags, SKU, and the "Categoría:"/"Marca:" labels */
}
.product_meta .posted_in {
	display: inline-flex !important;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 !important;
}
.product_meta .posted_in .qodef-woo-meta-value {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Uniform soft badge for both the category links and the brand. */
.product_meta .posted_in .qodef-woo-meta-value a,
.product_meta .alp-brands .alp-brand-badge {
	display: inline-block;
	margin: 0 !important;
	padding: 3px 11px !important;
	border-radius: 7px !important;
	background: #eef0fc !important;
	color: #1a23bd !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	letter-spacing: .04em !important;
	line-height: 1.6 !important;
	text-transform: uppercase !important;
	text-decoration: none !important;
}
.product_meta .posted_in .qodef-woo-meta-value a:hover,
.product_meta .alp-brands .alp-brand-badge:hover {
	background: #1a23bd !important;
	color: #fff !important;
}

/* --------------------------------------- Header mini-cart (dropdown) ------ */

/* Widen the dropdown a touch (theme default is 420px). */
header .widget_shopping_cart .qodef-widget-dropdown-cart-content,
header .widget_teenglow_core_woo_dropdown_cart .qodef-widget-dropdown-cart-content {
	width: 480px !important;
}

.qodef-widget-dropdown-cart-content .qodef-woo-mini-cart {
	margin: 0;
	padding: 0;
	list-style: none;
}
.qodef-widget-dropdown-cart-content .qodef-woo-mini-cart-item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 14px 26px 14px 0;
	border-bottom: 1px solid #ececf3;
}
.qodef-widget-dropdown-cart-content .qodef-woo-mini-cart-item:last-child {
	border-bottom: 0;
}
.qodef-widget-dropdown-cart-content .qodef-woo-mini-cart-item .qodef-e-image {
	flex: 0 0 54px;
	width: 54px;
	margin: 0;
}
.qodef-widget-dropdown-cart-content .qodef-woo-mini-cart-item .qodef-e-image img {
	width: 54px;
	height: 54px;
	object-fit: cover;
	border-radius: 10px;
	border: 1px solid #ececf3;
	margin: 0;
}
.qodef-widget-dropdown-cart-content .qodef-woo-mini-cart-item .qodef-e-content {
	flex: 1;
	min-width: 0;
	margin: 0;
}
.qodef-widget-dropdown-cart-content .qodef-woo-mini-cart-item .qodef-e-title {
	margin: 0 0 3px;
	font-size: 13.5px;
	line-height: 1.3;
	font-weight: 600;
}
.qodef-widget-dropdown-cart-content .qodef-woo-mini-cart-item .qodef-e-price {
	margin: 0;
	font-size: 13px;
	color: #6b7280;
}
.qodef-widget-dropdown-cart-content .qodef-woo-mini-cart-item .qodef-e-price .quantity {
	font-weight: 600;
	color: #16205a;
}
.qodef-widget-dropdown-cart-content .qodef-woo-mini-cart-item .qodef-e-remove {
	position: absolute;
	top: 50%;
	right: 0;
	transform: translateY(-50%);
	margin: 0;
}
/* Declutter the mini-cart: hide the in-scope line note + star rating there. */
.qodef-widget-dropdown-cart-content .alp-line-note,
.qodef-widget-dropdown-cart-content .qodef-woo-product-rating,
.qodef-widget-dropdown-cart-content .star-rating,
.qodef-widget-dropdown-cart-content .woocommerce-product-rating {
	display: none !important;
}
/* Gift badge sized down for the cramped mini-cart. */
.qodef-widget-dropdown-cart-content .alp-gift-badge {
	margin-left: 4px;
	padding: 1px 7px;
	font-size: 10px;
}
