/* ==========================================================================
   CPS Single-Product · plantilla "Consumible" (simple o variable)
   Hereda la misma paleta/tokens que Máquina y Repuesto. Añade la MATRIZ de
   compatibilidad por formato (variable). Todo bajo .cps-tpl-consumable.
   ========================================================================== */

.cps-tpl-consumable {
	--green: #f4d300; --green-hover: #e3d44a; --green-deep: #c9ad00; --green-soft: #fdfce9; --green-light: #fbf49a;
	--blue-cyan: #8b5cf6;
	--black: #0d0c0a; --ink: #181715; --ink-2: #2e2c29; --ink-3: #4d4a46; --muted: #73706a; --muted-2: #a19e98;
	--line: #e8e6e1; --tint: #f7f6f2; --tint-2: #fcfcfa; --white: #fff;
	--white-82: rgba(255,255,255,.82); --white-72: rgba(255,255,255,.72); --white-22: rgba(255,255,255,.22);
	--white-12: rgba(255,255,255,.12); --white-08: rgba(255,255,255,.08); --white-06: rgba(255,255,255,.06);
	--green-25: rgba(244,211,0,.25); --green-18: rgba(244,211,0,.18); --green-10: rgba(244,211,0,.1); --green-06: rgba(244,211,0,.06);
	--blue-cyan-18: rgba(139,92,246,.18);
	--text-2xs: clamp(.625rem, .6rem + .15vw, .75rem); --text-xs: clamp(.75rem, .71rem + .18vw, .875rem);
	--text-sm: clamp(.875rem, .84rem + .18vw, 1rem); --text-base: clamp(1rem, .96rem + .18vw, 1.125rem);
	--text-md: clamp(1.125rem, 1.05rem + .36vw, 1.375rem); --text-xl: clamp(1.5rem, 1.29rem + 1.07vw, 2.25rem);
	--text-2xl: clamp(2rem, 1.2rem + 1.43vw, 3rem);
	--r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;
	--sh-1: 0 1px 2px rgba(24,23,21,.04); --sh-2: 0 4px 16px rgba(24,23,21,.06); --sh-3: 0 10px 30px rgba(24,23,21,.1);
	--ease: cubic-bezier(.22, 1, .36, 1); --max: 1280px; --pad-x: 32px;
	color: var(--ink); font-size: var(--text-base); line-height: 1.55;
}
@media (max-width: 768px) { .cps-tpl-consumable { --pad-x: 20px; } }

.cps-tpl-consumable *, .cps-tpl-consumable *::before, .cps-tpl-consumable *::after { box-sizing: border-box; }
.cps-tpl-consumable img, .cps-tpl-consumable svg { display: block; max-width: 100%; }
.cps-tpl-consumable a { color: inherit; text-decoration: none; }
.cps-tpl-consumable ul, .cps-tpl-consumable ol { margin: 0; padding: 0; list-style: none; }

.cps-tpl-consumable .cps-wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--pad-x); }
.cps-tpl-consumable .cps-sec { padding: 72px 0; position: relative; }
.cps-tpl-consumable .cps-sec--alt { background: var(--tint-2); }
@media (max-width: 768px) { .cps-tpl-consumable .cps-sec { padding: 52px 0; } }
.cps-tpl-consumable .cps-sec__head { margin-bottom: 36px; }
.cps-tpl-consumable .cps-sec__head--center { text-align: center; }
.cps-tpl-consumable .cps-h-section { font-size: var(--text-xl); font-weight: 800; line-height: 1.12; letter-spacing: -.03em; color: var(--ink); margin: 0 0 14px; max-width: 760px; }
.cps-tpl-consumable .cps-sec__head--center .cps-h-section { margin-inline: auto; }
.cps-tpl-consumable .cps-sec__sub { font-size: var(--text-base); color: var(--ink-3); margin: 0 auto; max-width: 640px; line-height: 1.6; }

.cps-tpl-consumable .cps-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: var(--text-xs); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--green-deep); padding: 6px 14px; border: 1px solid var(--green-25); border-radius: var(--r-pill); background: var(--green-06); margin-bottom: 14px; }
.cps-tpl-consumable .cps-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-18); }

.cps-tpl-consumable .cps-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: var(--text-sm); padding: 12px 22px; border-radius: var(--r-pill); cursor: pointer; transition: background .15s ease, transform .15s ease; border: 1px solid transparent; }
.cps-tpl-consumable .cps-btn--soft { background: var(--white); color: var(--ink); border: 1px solid var(--line); }
.cps-tpl-consumable .cps-btn--soft:hover { background: var(--tint); }

.cps-tpl-consumable .cps-fade { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.cps-tpl-consumable .cps-fade.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .cps-tpl-consumable .cps-fade { opacity: 1; transform: none; transition: none; } }

/* BREADCRUMB */
.cps-tpl-consumable .cps-crumb { background: var(--tint-2); border-bottom: 1px solid var(--line); padding: 14px 0; }
.cps-tpl-consumable .cps-crumb__inner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--text-xs); color: var(--muted); }
.cps-tpl-consumable .cps-crumb a, .cps-tpl-consumable .cps-crumb .woocommerce-breadcrumb a { color: var(--ink-3); font-weight: 500; }
.cps-tpl-consumable .cps-crumb a:hover { color: var(--green-deep); }
.cps-tpl-consumable .cps-crumb__sep { color: var(--muted-2); }

/* HERO */
.cps-tpl-consumable .cps-phero { padding: 48px 0 64px; background: linear-gradient(180deg, var(--tint-2) 0%, var(--white) 100%); position: relative; overflow: hidden; }
.cps-tpl-consumable .cps-phero::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 40% 40% at 90% 8%, var(--green-10) 0%, transparent 60%); }
.cps-tpl-consumable .cps-phero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: start; }
@media (max-width: 1024px) { .cps-tpl-consumable .cps-phero__grid { grid-template-columns: 1fr; gap: 36px; } }

.cps-tpl-consumable .cps-gallery { position: relative; }
.cps-tpl-consumable .cps-gallery .woocommerce-product-gallery { background: var(--white); border-radius: var(--r-xl); box-shadow: var(--sh-2); padding: 24px; border: 1px solid var(--line); position: relative; overflow: hidden; }
.cps-tpl-consumable .cps-gallery .woocommerce-product-gallery__image img { border-radius: var(--r-lg); }
.cps-tpl-consumable .cps-gallery .flex-control-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 14px; padding: 0; }
.cps-tpl-consumable .cps-gallery .flex-control-thumbs img { aspect-ratio: 1; object-fit: contain; padding: 6px; cursor: pointer; background: var(--white); border-radius: var(--r-md); border: 2px solid var(--line); opacity: 1; }
.cps-tpl-consumable .cps-gallery .flex-control-thumbs .flex-active { border-color: var(--ink); }
.cps-tpl-consumable .cps-gallery__badge { position: absolute; top: 18px; left: 18px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; background: var(--ink); color: var(--white); font-size: var(--text-2xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px; border-radius: var(--r-pill); }

.cps-tpl-consumable .cps-pinfo__brand { display: inline-flex; align-items: center; gap: 8px; font-size: var(--text-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.cps-tpl-consumable .cps-pinfo__brand-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.cps-tpl-consumable .cps-pinfo__title { font-size: var(--text-2xl); font-weight: 800; line-height: 1.08; letter-spacing: -.03em; margin: 0 0 14px; color: var(--ink); }
.cps-tpl-consumable .cps-pinfo__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.cps-tpl-consumable .cps-pinfo__chip { display: inline-flex; align-items: center; gap: 6px; background: var(--white); border: 1px solid var(--line); padding: 7px 13px; border-radius: var(--r-pill); font-size: var(--text-xs); font-weight: 600; color: var(--ink-2); }
.cps-tpl-consumable .cps-pinfo__chip svg { width: 14px; height: 14px; color: var(--green-deep); }

.cps-tpl-consumable .cps-pinfo__price { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--sh-1); margin-bottom: 20px; }
.cps-tpl-consumable .cps-pinfo__price-amount { font-size: var(--text-xl); font-weight: 800; color: var(--ink); letter-spacing: -.02em; line-height: 1; }
.cps-tpl-consumable .cps-pinfo__price-amount .amount, .cps-tpl-consumable .cps-pinfo__price-amount .price { font-size: inherit; font-weight: inherit; color: inherit; }
.cps-tpl-consumable .cps-pinfo__price-amount del { font-size: var(--text-md); color: var(--muted); font-weight: 600; margin-right: 8px; }
.cps-tpl-consumable .cps-pinfo__price-amount ins { text-decoration: none; }
.cps-tpl-consumable .cps-pinfo__price-amount .sequra-price { display: none; }
.cps-tpl-consumable .cps-pinfo__price-tax { font-size: var(--text-xs); color: var(--muted); margin: 6px 0 0; }
.cps-tpl-consumable .cps-pinfo__stock { display: inline-flex; align-items: center; gap: 7px; font-size: var(--text-xs); font-weight: 700; margin-top: 10px; }
.cps-tpl-consumable .cps-pinfo__stock::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.cps-tpl-consumable .cps-pinfo__stock--in { color: #1a8f3c; }
.cps-tpl-consumable .cps-pinfo__stock--back { color: #c98a00; }
.cps-tpl-consumable .cps-pinfo__stock--out { color: #c0392b; }

/* Compra + selector de variación (Woo). */
.cps-tpl-consumable .cps-pinfo__buy { margin-bottom: 20px; }
.cps-tpl-consumable .cps-pinfo__buy .variations { width: 100%; margin-bottom: 16px; border-collapse: collapse; }
.cps-tpl-consumable .cps-pinfo__buy .variations td, .cps-tpl-consumable .cps-pinfo__buy .variations th { padding: 8px 0; text-align: left; vertical-align: middle; }
.cps-tpl-consumable .cps-pinfo__buy .variations label { font-weight: 700; font-size: var(--text-sm); }
.cps-tpl-consumable .cps-pinfo__buy .variations select { width: 100%; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: var(--r-md); font-size: var(--text-sm); background: var(--white); }
.cps-tpl-consumable .cps-pinfo__buy .single_variation .price { font-size: var(--text-xl); font-weight: 800; color: var(--ink); margin-bottom: 12px; }
.cps-tpl-consumable .cps-pinfo__buy .reset_variations { font-size: var(--text-xs); color: var(--muted); margin-left: 8px; }
.cps-tpl-consumable .cps-pinfo__buy .quantity { margin-right: 10px; }
.cps-tpl-consumable .cps-pinfo__buy .cart { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.cps-tpl-consumable .cps-pinfo__buy .button,
.cps-tpl-consumable .cps-pinfo__buy .single_add_to_cart_button { flex: 1; min-width: 200px; min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--green); color: var(--ink); border: none; border-radius: var(--r-pill); font-weight: 800; font-size: var(--text-base); cursor: pointer; transition: background .15s ease, transform .15s ease; }
.cps-tpl-consumable .cps-pinfo__buy .single_add_to_cart_button:hover { background: var(--green-hover); transform: translateY(-1px); }

.cps-tpl-consumable .cps-pinfo__perks { display: flex; flex-direction: column; gap: 8px; }
.cps-tpl-consumable .cps-pinfo__perk { display: flex; gap: 10px; align-items: center; font-size: var(--text-sm); color: var(--ink-2); }
.cps-tpl-consumable .cps-pinfo__perk svg { width: 18px; height: 18px; color: var(--green-deep); flex-shrink: 0; }
.cps-tpl-consumable .cps-pinfo__perk strong { font-weight: 700; color: var(--ink); }
.cps-tpl-consumable .cps-pinfo__meta-list { margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); font-size: var(--text-xs); color: var(--muted); }
.cps-tpl-consumable .cps-pinfo__meta-list b { color: var(--ink); font-weight: 700; }

/* ============================ MATRIZ DE COMPATIBILIDAD POR FORMATO ============================ */
.cps-tpl-consumable .cps-compat-note { max-width: 760px; margin: 0 auto 28px; text-align: center; font-size: var(--text-sm); color: var(--ink-3); background: var(--green-soft); border: 1px solid var(--green-25); border-radius: var(--r-md); padding: 14px 20px; }
.cps-tpl-consumable .cps-compat-matrix { max-width: 920px; margin: 0 auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-1); }
.cps-tpl-consumable .cps-compat-row { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.cps-tpl-consumable .cps-compat-row:last-child { border-bottom: none; }
.cps-tpl-consumable .cps-compat-row:nth-child(odd) { background: var(--tint-2); }
.cps-tpl-consumable .cps-compat-row__fmt { font-size: var(--text-md); font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.cps-tpl-consumable .cps-compat-row__machines { display: flex; flex-wrap: wrap; gap: 8px; }
.cps-tpl-consumable .cps-compat-chip { display: inline-flex; align-items: center; background: var(--ink); color: var(--white); font-size: var(--text-xs); font-weight: 700; padding: 7px 14px; border-radius: var(--r-pill); transition: background .2s ease, transform .15s ease; }
.cps-tpl-consumable .cps-compat-chip:hover { background: var(--green); color: var(--ink); transform: translateY(-1px); }
@media (max-width: 600px) {
	.cps-tpl-consumable .cps-compat-row { grid-template-columns: 1fr; gap: 10px; }
	.cps-tpl-consumable .cps-compat-row__fmt { font-size: var(--text-base); }
}

/* Tarjetas de máquina (caso simple). */
.cps-tpl-consumable .cps-compat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1024px) { .cps-tpl-consumable .cps-compat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .cps-tpl-consumable .cps-compat-grid { grid-template-columns: 1fr; } }
.cps-tpl-consumable .cps-mcard { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease); }
.cps-tpl-consumable .cps-mcard:hover { transform: translateY(-3px); box-shadow: var(--sh-3); border-color: var(--green); }
.cps-tpl-consumable .cps-mcard__media { display: grid; place-items: center; height: 120px; margin-bottom: 14px; }
.cps-tpl-consumable .cps-mcard__media img { max-width: 100%; max-height: 120px; object-fit: contain; }
.cps-tpl-consumable .cps-mcard__media-ph { width: 100%; height: 100%; border-radius: var(--r-md); background: repeating-linear-gradient(135deg, var(--tint) 0 12px, var(--tint-2) 12px 24px); display: grid; place-items: center; color: var(--muted-2); font-size: var(--text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.cps-tpl-consumable .cps-mcard__name { font-size: var(--text-sm); font-weight: 800; color: var(--ink); line-height: 1.25; margin: 0 0 4px; }
.cps-tpl-consumable .cps-mcard__cta { margin-top: auto; padding-top: 12px; font-size: var(--text-xs); font-weight: 700; color: var(--green-deep); display: inline-flex; align-items: center; gap: 6px; }
.cps-tpl-consumable .cps-mcard__cta svg { width: 14px; height: 14px; }

/* FICHA TÉCNICA */
.cps-tpl-consumable .cps-spec-table { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-1); max-width: 860px; margin: 0 auto; }
.cps-tpl-consumable .cps-spec-row { display: grid; grid-template-columns: 240px 1fr; border-bottom: 1px solid var(--line); padding: 16px 24px; transition: background .2s ease; }
.cps-tpl-consumable .cps-spec-row:hover { background: var(--tint-2); }
.cps-tpl-consumable .cps-spec-row:last-child { border-bottom: none; }
.cps-tpl-consumable .cps-spec-row__label { font-size: var(--text-sm); font-weight: 700; color: var(--ink); }
.cps-tpl-consumable .cps-spec-row__value { font-size: var(--text-sm); color: var(--ink-2); line-height: 1.55; }
@media (max-width: 540px) {
	.cps-tpl-consumable .cps-spec-row { grid-template-columns: 1fr; gap: 4px; padding: 13px 18px; }
	.cps-tpl-consumable .cps-spec-row__label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
}

/* DESCRIPCIÓN */
.cps-tpl-consumable .cps-desc-body { max-width: 760px; margin: 0 auto; font-size: var(--text-base); line-height: 1.7; color: var(--ink-2); }
.cps-tpl-consumable .cps-desc-body p { margin: 0 0 16px; }

/* DOCUMENTACIÓN */
.cps-tpl-consumable .cps-docs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; max-width: 760px; margin: 0 auto; }
@media (max-width: 640px) { .cps-tpl-consumable .cps-docs { grid-template-columns: 1fr; } }
.cps-tpl-consumable .cps-docs a { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--line); padding: 14px 18px; border-radius: var(--r-md); font-size: var(--text-sm); font-weight: 600; color: var(--ink); transition: all .2s var(--ease); }
.cps-tpl-consumable .cps-docs a:hover { background: var(--ink); color: var(--white); border-color: var(--ink); transform: translateX(4px); }
.cps-tpl-consumable .cps-docs svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--green-deep); }
.cps-tpl-consumable .cps-docs a:hover svg { color: var(--green); }

/* RELACIONADOS */
.cps-tpl-consumable .cps-rel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1024px) { .cps-tpl-consumable .cps-rel-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .cps-tpl-consumable .cps-rel-grid { grid-template-columns: 1fr; } }
.cps-tpl-consumable .cps-rcard { background: var(--white); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; border: 1px solid var(--line); transition: transform .3s var(--ease), box-shadow .3s var(--ease); min-height: 300px; }
.cps-tpl-consumable .cps-rcard:hover { transform: translateY(-3px); box-shadow: var(--sh-3); }
.cps-tpl-consumable .cps-rcard__tag { align-self: flex-start; background: var(--green); color: var(--ink); font-size: var(--text-2xs); font-weight: 800; padding: 4px 10px; border-radius: var(--r-pill); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; }
.cps-tpl-consumable .cps-rcard__media { flex: 1; display: grid; place-items: center; margin: 6px 0 16px; min-height: 130px; }
.cps-tpl-consumable .cps-rcard__media img { max-width: 80%; max-height: 150px; object-fit: contain; }
.cps-tpl-consumable .cps-rcard__title { font-size: var(--text-sm); font-weight: 800; margin: 0 0 8px; color: var(--ink); }
.cps-tpl-consumable .cps-rcard__price { font-size: var(--text-sm); color: var(--ink-3); margin-bottom: 14px; }
.cps-tpl-consumable .cps-rcard__price .amount { color: var(--ink); font-weight: 800; }
.cps-tpl-consumable .cps-rcard__cta { margin-top: auto; }

/* SOPORTE */
.cps-tpl-consumable .cps-support { background: var(--ink); color: var(--white); border-radius: var(--r-xl); padding: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; position: relative; overflow: hidden; }
@media (max-width: 900px) { .cps-tpl-consumable .cps-support { grid-template-columns: 1fr; padding: 32px 24px; } }
.cps-tpl-consumable .cps-support::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 40% 50% at 90% 20%, var(--green-25) 0%, transparent 60%), radial-gradient(ellipse 30% 50% at 5% 90%, var(--blue-cyan-18) 0%, transparent 60%); }
.cps-tpl-consumable .cps-support__content { position: relative; z-index: 1; }
.cps-tpl-consumable .cps-support__title { font-size: var(--text-xl); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; margin: 0 0 14px; }
.cps-tpl-consumable .cps-support__title em { font-style: normal; background: linear-gradient(120deg, var(--green) 0%, var(--green-light) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cps-tpl-consumable .cps-support__desc { font-size: var(--text-base); color: var(--white-82); line-height: 1.6; margin: 0; max-width: 420px; }
.cps-tpl-consumable .cps-support__channels { display: flex; flex-direction: column; gap: 12px; position: relative; z-index: 1; }
.cps-tpl-consumable .cps-support__channel { display: flex; align-items: center; gap: 14px; background: var(--white-06); border: 1px solid var(--white-12); padding: 14px 18px; border-radius: var(--r-md); transition: all .2s var(--ease); }
.cps-tpl-consumable .cps-support__channel:hover { background: var(--white-12); transform: translateX(4px); }
.cps-tpl-consumable .cps-support__channel-icon { width: 38px; height: 38px; border-radius: var(--r-sm); background: var(--green); color: var(--ink); display: grid; place-items: center; flex-shrink: 0; }
.cps-tpl-consumable .cps-support__channel-icon svg { width: 19px; height: 19px; }
.cps-tpl-consumable .cps-support__channel-text strong { display: block; font-size: var(--text-sm); font-weight: 800; color: var(--white); margin-bottom: 2px; }
.cps-tpl-consumable .cps-support__channel-text span { font-size: var(--text-xs); color: var(--white-72); }

@keyframes cpsConsPulse { 0%, 100% { box-shadow: 0 0 0 4px var(--green-18); } 50% { box-shadow: 0 0 0 8px var(--green-10); } }
.cps-tpl-consumable .cps-eyebrow .dot { animation: cpsConsPulse 2s var(--ease) infinite; }
@media (prefers-reduced-motion: reduce) { .cps-tpl-consumable .cps-eyebrow .dot { animation: none; } }







/* ==========================================================================
   CPS — Adaptación visual de la galería del plugin (WPRY Commerce Kit)
   --------------------------------------------------------------------------
   El módulo "Galería de producto" del plugin genera este markup:
     .wck-gallery[data-zoom]
       .wck-gallery-main > img.wck-gallery-main-img[data-full]
       ul.wck-gallery-thumbs > li.wck-gallery-thumb(.is-active) > img[data-large][data-full]

   Aquí SOLO cambiamos su aspecto para que encaje con el diseño CPS (bordes,
   sombras, miniaturas, paleta). NO tocamos clases ni data-*, así que el JS del
   plugin (cambio de miniatura + zoom) sigue funcionando intacto.

   Cómo cargarlo: añade este archivo como su propia hoja, o pégalo al final de
   single-product-gallery.css (si conservas ese nombre) y encólalo en is_product().
   Las reglas van scopeadas a las tres plantillas para no afectar otras vistas.
   ========================================================================== */

.cps-tpl-machine .wck-gallery,
.cps-tpl-spare .wck-gallery,
.cps-tpl-consumable .wck-gallery {
	--gal-line: var(--line, #e8e6e1);
	--gal-bg: var(--white, #fff);
	--gal-tint: var(--tint, #f7f6f2);
	--gal-ink: var(--ink, #181715);
	--gal-accent: var(--green, #f4d300);
	--gal-radius: var(--r-xl, 24px);
	--gal-radius-sm: var(--r-md, 12px);
	--gal-shadow: var(--sh-2, 0 4px 16px rgba(24,23,21,.06));
	--gal-ease: var(--ease, cubic-bezier(.22, 1, .36, 1));
	position: relative;
}

/* --- Imagen principal --- */
.cps-tpl-machine .wck-gallery-main,
.cps-tpl-spare .wck-gallery-main,
.cps-tpl-consumable .wck-gallery-main {
	position: relative;
	background: var(--gal-bg);
	border: 1px solid var(--gal-line);
	border-radius: var(--gal-radius);
	box-shadow: var(--gal-shadow);
	overflow: hidden;
	aspect-ratio: 1 / 1;
	display: grid;
	place-items: center;
	height: auto;
	width: 100%;
}
.cps-tpl-machine .wck-gallery-main-img,
.cps-tpl-spare .wck-gallery-main-img,
.cps-tpl-consumable .wck-gallery-main-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	cursor: zoom-in;
	transition: opacity .25s var(--gal-ease);
}

/* Indicador de zoom (esquina) cuando data-zoom="1". Decorativo, sobre la imagen. */
.cps-tpl-machine .wck-gallery[data-zoom="1"] .wck-gallery-main::after,
.cps-tpl-spare .wck-gallery[data-zoom="1"] .wck-gallery-main::after,
.cps-tpl-consumable .wck-gallery[data-zoom="1"] .wck-gallery-main::after {
	content: "";
	position: absolute;
	top: 14px;
	right: 14px;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 1px solid var(--gal-line);
	background: rgba(255, 255, 255, .9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23181715' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3M11 8v6M8 11h6'/%3E%3C/svg%3E") center / 20px no-repeat;
	pointer-events: none;
	transition: background-color .2s ease;
}

/* --- Miniaturas --- */
.cps-tpl-machine .wck-gallery-thumbs,
.cps-tpl-spare .wck-gallery-thumbs,
.cps-tpl-consumable .wck-gallery-thumbs {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 12px;
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
}
@media (max-width: 540px) {
	.cps-tpl-machine .wck-gallery-thumbs,
	.cps-tpl-spare .wck-gallery-thumbs,
	.cps-tpl-consumable .wck-gallery-thumbs { grid-template-columns: repeat(4, 1fr); }
}

.cps-tpl-machine .wck-gallery-thumb,
.cps-tpl-spare .wck-gallery-thumb,
.cps-tpl-consumable .wck-gallery-thumb {
	margin: 0;
	list-style: none;
	aspect-ratio: 1 / 1;
	padding: 6px;
	background: var(--gal-bg);
	border: 2px solid var(--gal-line);
	border-radius: var(--gal-radius-sm);
	cursor: pointer;
	overflow: hidden;
	transition: border-color .2s ease, transform .15s ease;
}
.cps-tpl-machine .wck-gallery-thumb img,
.cps-tpl-spare .wck-gallery-thumb img,
.cps-tpl-consumable .wck-gallery-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}
.cps-tpl-machine .wck-gallery-thumb:hover,
.cps-tpl-spare .wck-gallery-thumb:hover,
.cps-tpl-consumable .wck-gallery-thumb:hover {
	border-color: var(--muted-2, #a19e98);
	transform: translateY(-2px);
}
.cps-tpl-machine .wck-gallery-thumb.is-active,
.cps-tpl-spare .wck-gallery-thumb.is-active,
.cps-tpl-consumable .wck-gallery-thumb.is-active {
	border-color: var(--gal-ink);
}

/* --- Galería vacía (placeholder de Woo) --- */
.cps-tpl-machine .wck-gallery--empty,
.cps-tpl-spare .wck-gallery--empty,
.cps-tpl-consumable .wck-gallery--empty {
	background: var(--gal-bg);
	border: 1px solid var(--gal-line);
	border-radius: var(--gal-radius);
	box-shadow: var(--gal-shadow);
	overflow: hidden;
	aspect-ratio: 1 / 1;
	display: grid;
	place-items: center;
	padding: 24px;
}
.cps-tpl-machine .wck-gallery--empty img,
.cps-tpl-spare .wck-gallery--empty img,
.cps-tpl-consumable .wck-gallery--empty img {
	max-width: 70%;
	height: auto;
	opacity: .5;
}

/* --- Capa de zoom del plugin (overlay a pantalla completa) ---
   El plugin crea su propia capa al hacer clic. No conocemos su clase exacta,
   así que cubrimos los nombres más probables. Si el zoom del plugin usa otra
   clase, dímelo y la ajusto; esto solo afina el fondo y el cursor. */
.wck-gallery-zoom,
.wck-gallery-overlay,
.wck-gallery-lightbox {
	background: rgba(8, 8, 8, .92) !important;
}

@media (prefers-reduced-motion: reduce) {
	.cps-tpl-machine .wck-gallery-main-img,
	.cps-tpl-spare .wck-gallery-main-img,
	.cps-tpl-consumable .wck-gallery-main-img,
	.cps-tpl-machine .wck-gallery-thumb,
	.cps-tpl-spare .wck-gallery-thumb,
	.cps-tpl-consumable .wck-gallery-thumb { transition: none; }
}






/* ==========================================================================
   CPS — Columna sticky en secciones de dos columnas (las 3 plantillas)
   --------------------------------------------------------------------------
   En las secciones a dos columnas, la columna naturalmente MÁS CORTA queda
   fija (sticky) mientras la larga sigue desplazándose, hasta el final de la
   sección. Elegida por sección (CSS puro, sin JS):
     · Hero        → la galería (.cps-gallery) — la info de compra es más alta.
     · Descripción → el visual (.cps-desc__visual) — el texto suele ser largo.
 
   Requisitos de position:sticky que ya cumplimos:
     · El padre (grid) NO tiene overflow:hidden.
     · El sticky se mide respecto al viewport; usamos un offset bajo el header fijo.
 
   AÑADIR al final de cada CSS de plantilla, o cargar como hoja aparte en is_product().
   ========================================================================== */
 
/* Offset superior: deja hueco bajo el header fijo del sitio (cps-has-fixed-header).
   Ajusta --cps-sticky-top si tu header mide distinto. */
.cps-tpl-machine,
.cps-tpl-spare,
.cps-tpl-consumable {
	--cps-sticky-top: 110px;   /* alto aprox. del header fijo + ~16px de aire */
}
 
/* --------------------------------------------------------------------------
   1) HERO — la GALERÍA (columna más corta) acompaña al scroll mientras la
   info de compra, más alta (precio, stock, variaciones, perks, meta), se
   desplaza. El grid .cps-phero__grid alinea sus hijos arriba (align-items:start
   ya está en cada plantilla), condición necesaria para que el sticky funcione.
   -------------------------------------------------------------------------- */
.cps-tpl-machine .cps-phero__grid .cps-gallery,
.cps-tpl-spare .cps-phero__grid .cps-gallery,
.cps-tpl-consumable .cps-phero__grid .cps-gallery {
	position: sticky;
	top: var(--cps-sticky-top);
	align-self: start;   /* refuerza: el item no se estira a la altura de la fila */
}
 
/* --------------------------------------------------------------------------
   2) DESCRIPCIÓN (solo máquina) — el visual acompaña al scroll del texto.
   -------------------------------------------------------------------------- */
.cps-tpl-machine .cps-desc {
	align-items: start;   /* asegura recorrido para el sticky */
}
.cps-tpl-machine .cps-desc .cps-desc__visual {
	position: sticky;
	top: var(--cps-sticky-top);
	align-self: start;
}
 
/* --------------------------------------------------------------------------
   DESACTIVAR el sticky cuando las columnas se apilan (1 sola columna).
   En móvil/tablet el grid pasa a 1 columna; sticky ahí no tiene sentido y
   podría dejar la info "flotando". Lo anulamos en los mismos breakpoints que
   cada plantilla usa para colapsar el grid.
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.cps-tpl-machine .cps-phero__grid .cps-gallery,
	.cps-tpl-spare .cps-phero__grid .cps-gallery,
	.cps-tpl-consumable .cps-phero__grid .cps-gallery {
		position: static;
		top: auto;
	}
}
@media (max-width: 900px) {
	.cps-tpl-machine .cps-desc .cps-desc__visual {
		position: static;
		top: auto;
	}
}