/* TERSAFORM Diseño */
:root {
	--tfd-plum: #4A1F33;
	--tfd-cream: #F7EFEA;
	--tfd-nude: #E3C9B8;
	--tfd-rasp: #A83A5B;
	--tfd-sage: #3F7D5C;
	--tfd-ink: #2A2024;
	--tfd-malva: #A3808E;
	--tfd-sans: 'TFD Manrope', 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--tfd-serif: 'TFD Serif', 'DM Serif Display', Georgia, serif;
	--tfd-title-color: #2A2024;
	--tfd-title-weight: 400;
	--tfd-body-weight: 400;
	--tfd-quote-bg: #F5F5F5;
	--tfd-icon-bg: #F3E6DE;
	--tfd-bold: 800;
	--tfd-title-size: 38px;
	--tfd-title-size-m: 29px;
	--tfd-scale: 1;
}

/* ================= CABECERA ================= */
.tfd-head-wrap { font-family: var(--tfd-sans); color: var(--tfd-ink); position: relative; z-index: 9990; }
.tfd-head-wrap *, .tfd-head-wrap *::before, .tfd-head-wrap *::after { box-sizing: border-box; }

.tfd-bar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 18px; padding: 9px 16px; text-align: center; font-size: 13px; font-weight: var(--tfd-bold); letter-spacing: .08em; text-transform: uppercase; line-height: 1.3; }
.tfd-bar--1 { background: var(--tfd-plum); color: #fff; }
.tfd-bar--2 { background: var(--tfd-nude); color: var(--tfd-plum); font-size: 12.5px; padding: 8px 16px; }
.tfd-bar a, .tfd-bar a:hover, .tfd-bar a:focus { color: inherit; text-decoration: none; }

.tfd-cd { display: inline-flex; align-items: flex-start; gap: 4px; font-variant-numeric: tabular-nums; }
.tfd-cd i { font-style: normal; font-size: 17px; line-height: 1.1; }
.tfd-cd__u { display: inline-flex; flex-direction: column; align-items: center; min-width: 26px; }
.tfd-cd__u b { font-size: 17px; line-height: 1.1; }
.tfd-cd__u small { font-size: 9px; font-weight: 600; letter-spacing: .04em; text-transform: none; opacity: .85; }

.tfd-header { background: #fff; border-bottom: 1px solid #EFE4DD; position: relative; }
.tfd-header__in { max-width: 1240px; margin: 0 auto; padding: 0 24px; min-height: 78px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.tfd-header__left { display: flex; align-items: center; gap: 20px; min-width: 0; }
.tfd-header__right { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.tfd-header__logo { text-align: center; line-height: 0; }
.tfd-header__logo img, .tfd-drawer__logo img { max-height: 46px; width: auto; height: auto; }
.tfd-logo-text { font-family: var(--tfd-serif); font-weight: var(--tfd-title-weight); font-size: 36px; line-height: 1; color: var(--tfd-title-color) !important; text-decoration: none !important; letter-spacing: -.01em; }
.tfd-logo-text em { font-style: italic; color: var(--tfd-malva); }

.tfd-head-wrap .tfd-cta { display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; border-radius: 6px; background: var(--tfd-plum); color: #fff; font-size: 14px; font-weight: var(--tfd-bold); letter-spacing: .02em; text-decoration: none; white-space: nowrap; transition: opacity .15s; }
.tfd-head-wrap .tfd-cta:hover, .tfd-head-wrap .tfd-cta:focus { color: #fff; opacity: .9; }
.tfd-nav { display: flex; align-items: center; gap: 18px; }
.tfd-nav a { color: var(--tfd-ink); font-size: 15px; text-decoration: none; white-space: nowrap; }
.tfd-nav a:hover, .tfd-nav a:focus { color: var(--tfd-plum); text-decoration: underline; text-underline-offset: 4px; }

.tfd-head-wrap .tfd-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--tfd-ink); cursor: pointer; text-decoration: none; }
.tfd-head-wrap .tfd-icon:hover, .tfd-head-wrap .tfd-icon:focus { background: var(--tfd-cream); color: var(--tfd-plum); }
.tfd-cart-count { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--tfd-plum); color: #fff; font-size: 11px; font-weight: var(--tfd-bold); line-height: 18px; text-align: center; }
.tfd-cart-count[hidden] { display: none; }
.tfd-burger { display: none !important; }

.tfd-search { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid #EFE4DD; box-shadow: 0 12px 24px rgba(42, 32, 36, .08); }
.tfd-search[hidden] { display: none; }
.tfd-search__in { max-width: 720px; margin: 0 auto; padding: 16px 24px; display: flex; align-items: center; gap: 10px; }
.tfd-search form { flex: 1; display: flex; gap: 8px; margin: 0; }
.tfd-search input[type="search"] { flex: 1; height: 46px; padding: 0 14px; border: 1.5px solid var(--tfd-nude); border-radius: 8px; font: inherit; font-size: 16px; }
.tfd-search input[type="search"]:focus { border-color: var(--tfd-plum); outline: none; }
.tfd-search button[type="submit"], .tfd-search input[type="submit"] { height: 46px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--tfd-plum); color: #fff; font: inherit; font-weight: var(--tfd-bold); cursor: pointer; }

.tfd-drawer { position: fixed; inset: 0; z-index: 99998; background: rgba(42, 32, 36, .5); }
.tfd-drawer[hidden] { display: none; }
.tfd-drawer__box { position: absolute; top: 0; bottom: 0; left: 0; width: min(86vw, 340px); background: #fff; padding: 16px 20px 24px; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; }
.tfd-drawer__top { display: flex; align-items: center; justify-content: space-between; }
.tfd-drawer__logo .tfd-logo-text { font-size: 30px; }
.tfd-head-wrap .tfd-cta--block { display: flex; width: 100%; padding: 14px; font-size: 15px; }
.tfd-drawer__nav { display: flex; flex-direction: column; }
.tfd-drawer__nav a { padding: 14px 2px; border-bottom: 1px solid #F0E6E0; color: var(--tfd-ink); font-size: 16px; text-decoration: none; }
body.tfd-noscroll { overflow: hidden; }

@media (max-width: 921px) {
	.tfd-header__in { min-height: 64px; padding: 0 10px; grid-template-columns: 1fr auto 1fr; gap: 6px; }
	.tfd-header__left .tfd-cta, .tfd-nav, .tfd-hide-sm { display: none !important; }
	.tfd-burger { display: inline-flex !important; }
	.tfd-logo-text { font-size: 30px; }
	.tfd-header__logo img { max-height: 38px; }
	.tfd-bar { font-size: 11.5px; letter-spacing: .06em; padding: 8px 12px; }
	.tfd-bar--2 { font-size: 11px; }
	.tfd-cd__u b, .tfd-cd i { font-size: 15px; }
}

/* ================= FICHA DE PRODUCTO ================= */
.tfd-product .tfd-summary { font-family: var(--tfd-sans); color: var(--tfd-ink); }
.tfd-summary > * { margin-top: 0; }

.tfd-rating { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; color: var(--tfd-ink) !important; text-decoration: none !important; font-size: calc(15px * var(--tfd-scale)); line-height: 1; }
.tfd-rating__avg { font-size: calc(16px * var(--tfd-scale)); font-weight: var(--tfd-bold); }
.tfd-rating__txt { color: #6B5A61; }
.tfd-rating:hover .tfd-rating__txt { text-decoration: underline; text-underline-offset: 3px; }
.tfd-stars { position: relative; display: inline-block; line-height: 0; color: var(--tfd-plum); }
.tfd-stars__bg { display: inline-flex; gap: 2px; color: #E6D6CC; }
.tfd-stars__fg { position: absolute; inset: 0 auto 0 0; display: inline-flex; gap: 2px; overflow: hidden; white-space: nowrap; }
.tfd-stars svg { flex: 0 0 18px; }

.tfd-preview { margin: 0; padding: 0; border: 0; }
.tfd-preview .tfd-rating { cursor: default; }
.tfd-quote { margin: 0 0 20px; padding: 16px 18px; border: 0; border-left: 1.5px solid var(--tfd-nude); border-radius: 0 8px 8px 0; background: var(--tfd-quote-bg); font-style: normal; }
.tfd-quote p { margin: 0 0 6px; font-size: calc(15px * var(--tfd-scale)); line-height: 1.5; color: var(--tfd-ink); }
.tfd-quote cite { font-style: normal; font-size: calc(13px * var(--tfd-scale)); color: #7A6870; }

.tfd-eyebrow { margin: 0 0 10px; font-size: calc(12.5px * var(--tfd-scale)); font-weight: var(--tfd-bold); letter-spacing: .12em; text-transform: uppercase; color: var(--tfd-plum); }
.tfd-product .tfd-summary .tfd-title { margin: 0 0 14px; font-family: var(--tfd-serif); font-weight: var(--tfd-title-weight); font-size: var(--tfd-title-size); line-height: 1.1; letter-spacing: -.01em; color: var(--tfd-title-color); }

.tfd-pricebox { margin: 0 0 18px; }
.tfd-pricebox .tfp-price__now, .tfd-pricebox .price { font-family: var(--tfd-sans); font-size: calc(28px * var(--tfd-scale)); font-weight: var(--tfd-bold); color: var(--tfd-plum); }
.tfd-pricebox .price { margin: 0; }
.tfd-pricebox .tfp-price__save { font-size: calc(12.5px * var(--tfd-scale)); }

.tfd-sep { height: 0; margin: 0 0 18px; border: 0; border-top: 1px solid var(--tfd-nude); background: none; }

.tfd-lead { margin: 0 0 18px; font-size: calc(17px * var(--tfd-scale)); font-weight: var(--tfd-bold); line-height: 1.45; color: var(--tfd-ink); }

.tfd-ben { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; row-gap: 12px; }
.tfd-ben li { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 0; border: 0; font-size: calc(15px * var(--tfd-scale)); line-height: 1.5; }
.tfd-ben li:nth-child(odd):last-child { grid-column: 1 / -1; }
.tfd-ben__ico { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; background: var(--tfd-icon-bg); color: var(--tfd-plum); display: inline-flex; align-items: center; justify-content: center; }
.tfd-ben__ico svg { width: 15px; height: 15px; }
.tfd-ben__txt { padding-top: 4px; }
.tfd-ben__txt strong { font-weight: var(--tfd-bold); }
@media (max-width: 599px) {
	.tfd-ben { grid-template-columns: minmax(0, 1fr); row-gap: 10px; }
}

.tfd-buy { margin-top: 4px; }
.tfd-buy .tfp { font-family: var(--tfd-sans); }
.tfd-buy .tfp .tfp-btn { position: relative; overflow: hidden; padding: 19px 20px; font-size: calc(16px * var(--tfd-scale)); border-radius: 8px; box-shadow: 0 6px 16px -8px rgba(74, 31, 51, .55); transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease; }
.tfd-buy .tfp .tfp-btn::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .22), transparent); transform: skewX(-20deg); animation: tfd-shine 4.5s ease-in-out 1.5s infinite; pointer-events: none; }
.tfd-buy .tfp .tfp-btn:hover { opacity: 1; background: #5B2741; transform: translateY(-2px); box-shadow: 0 12px 22px -10px rgba(74, 31, 51, .6); }
.tfd-buy .tfp .tfp-btn:active { transform: translateY(0); box-shadow: 0 4px 10px -6px rgba(74, 31, 51, .6); }
.tfd-buy .tfp .tfp-btn:disabled { opacity: .85; transform: none; }
.tfd-buy .tfp .tfp-btn:disabled::after { animation: none; display: none; }
.tfd-buy .tfp .tfp-btn:disabled::before { content: ""; display: inline-block; width: 16px; height: 16px; margin: 0 10px -2px 0; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: tfd-spin .7s linear infinite; }
@keyframes tfd-shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }
@keyframes tfd-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
	.tfd-buy .tfp .tfp-btn, .tfd-buy .tfp .tfp-btn::after, .tfd-buy .tfp .tfp-btn::before { animation: none !important; transition: none !important; }
}
.tfd-admin-note { padding: 10px 12px; border: 1px dashed var(--tfd-rasp); border-radius: 6px; font-size: 13px; color: var(--tfd-rasp); }

/* Contenedor de la ficha: también cuando Astra usa la plantilla de ancho completo (productos editados con Elementor) */
.tfd-product div.product { max-width: 1240px; margin-left: auto; margin-right: auto; box-sizing: border-box; }
.tfd-product.ast-page-builder-template div.product { padding: 40px 24px 0; }
@media (max-width: 921px) { .tfd-product.ast-page-builder-template div.product { padding: 20px 16px 0; } }

/* Contenido de venta debajo de la ficha */
.tfd-product .tfd-content { clear: both; padding-top: 48px; }
.tfd-product .tfd-content--empty { padding-top: 0; }
@media (max-width: 921px) { .tfd-product .tfd-content { padding-top: 32px; } }

/* Columnas */
@media (min-width: 922px) {
	.tfd-product.woocommerce div.product div.images,
	.tfd-product .woocommerce div.product div.images { width: 54%; }
	.tfd-product.woocommerce div.product div.summary,
	.tfd-product .woocommerce div.product div.summary { width: 41%; }
}

/* Galería: miniaturas en columna a la izquierda */
.tfd-product div.product .woocommerce-product-gallery .flex-viewport,
.tfd-product div.product .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image img { border-radius: 14px; }
.tfd-product div.product .woocommerce-product-gallery .flex-viewport { background: var(--tfd-cream); }
.tfd-product div.product .woocommerce-product-gallery .flex-control-thumbs { margin: 0; padding: 0; list-style: none; }
.tfd-product div.product .woocommerce-product-gallery .flex-control-thumbs li { list-style: none; cursor: pointer; }
.tfd-product div.product .woocommerce-product-gallery .flex-control-thumbs img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; opacity: .55; border: 1px solid transparent; transition: opacity .15s, border-color .15s; }
.tfd-product div.product .woocommerce-product-gallery .flex-control-thumbs img:hover { opacity: .85; }
.tfd-product div.product .woocommerce-product-gallery .flex-control-thumbs img.flex-active { opacity: 1; border-color: var(--tfd-plum); }

.tfd-thumbs { position: relative; }
.tfd-thumbs__btn { display: none; }

@media (min-width: 922px) {
	.tfd-product div.product .woocommerce-product-gallery.tfd-vertical { display: grid !important; grid-template-columns: 92px minmax(0, 1fr); column-gap: 16px; align-items: start; }
	.tfd-product div.product .woocommerce-product-gallery.tfd-vertical > .flex-viewport,
	.tfd-product div.product .woocommerce-product-gallery.tfd-vertical > .woocommerce-product-gallery__wrapper { grid-column: 2; grid-row: 1; }
	.tfd-product div.product .woocommerce-product-gallery.tfd-vertical > .tfd-thumbs { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
	.tfd-product div.product .woocommerce-product-gallery.tfd-vertical .flex-control-thumbs { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; scrollbar-width: none; scroll-behavior: smooth; }
	.tfd-product div.product .woocommerce-product-gallery.tfd-vertical .flex-control-thumbs::-webkit-scrollbar { display: none; }
	.tfd-product div.product .woocommerce-product-gallery.tfd-vertical .flex-control-thumbs li { width: 100% !important; float: none !important; margin: 0 !important; flex: 0 0 auto; }
	.tfd-product div.product .woocommerce-product-gallery.tfd-vertical .woocommerce-product-gallery__trigger { right: 14px; top: 14px; }
	.tfd-thumbs__btn { display: flex; align-items: center; justify-content: center; height: 28px; width: 100%; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--tfd-ink); cursor: pointer; }
	.tfd-thumbs__btn:hover, .tfd-thumbs__btn:focus { background: var(--tfd-cream); color: var(--tfd-plum); }
	.tfd-thumbs__btn[disabled] { opacity: .25; cursor: default; background: transparent; }
}

@media (max-width: 921px) {
	.tfd-product div.product .woocommerce-product-gallery .flex-control-thumbs { display: flex !important; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
	.tfd-product div.product .woocommerce-product-gallery .flex-control-thumbs::-webkit-scrollbar { display: none; }
	.tfd-product div.product .woocommerce-product-gallery .flex-control-thumbs li { flex: 0 0 62px; width: 62px !important; float: none !important; margin: 0 !important; }
	.tfd-product .tfd-summary { padding-top: 20px; }
	.tfd-product .tfd-summary .tfd-title { font-size: var(--tfd-title-size-m); }
	.tfd-pricebox .tfp-price__now, .tfd-pricebox .price { font-size: calc(25px * var(--tfd-scale)); }
	.tfd-lead { font-size: calc(16px * var(--tfd-scale)); }
	.tfd-ben li { font-size: calc(14.5px * var(--tfd-scale)); gap: 12px; }
	.tfd-ben__ico { flex-basis: 28px; width: 28px; height: 28px; }
	.tfd-ben__txt { padding-top: 3px; }
	.tfd-quote { padding: 14px 15px; }
}
