/* ==========================================================================
   Tienda (templates/shop.php, Tokka_Shop). Se carga después de home.css y
   de los estilos de WooCommerce: paleta, tipografía y botones del inicio
   sobre la tienda, el producto, el carrito y el checkout.
   ========================================================================== */

.tsh-body { --tsh-radius: 4px; }
.tsh-main { padding-top: 96px; min-height: 70vh; }
.tsh-body .th-top { color: var(--ink); }

/* Tipografía y colores base dentro del contenido de WooCommerce. */
.tsh-body :is(.tsh-wc, .tsh-page) { font-family: var(--font); color: var(--ink); }
.tsh-body :is(.tsh-wc, .tsh-page) :is(input, select, textarea, button) { font-family: var(--font); }
.tsh-body :is(.tsh-wc, .tsh-page) a { color: inherit; }

/* ---------- Tienda ---------- */
.tsh-hero { padding: 64px var(--gutter) 8px; display: flex; flex-direction: column; gap: 18px; }
.tsh-title { font-size: clamp(46px, 7.4vw, 124px); font-weight: 500; line-height: 0.92; letter-spacing: -0.055em; }
.tsh-lead { font-size: clamp(17px, 1.4vw, 21px); color: var(--ink-60); max-width: 32em; }
.tsh-grid-wrap { padding-top: 48px; }
.tsh-body .th-product-media > img { height: 100%; } /* WooCommerce pone img { height: auto } */
.tsh-card-title { font-size: 24px; font-weight: 500; letter-spacing: -0.035em; line-height: 1.1; margin: 0; }
.tsh-card-title a { text-decoration: none; }
.tsh-notices { padding: 0 var(--gutter); }

.tsh-biz {
    margin: 0 var(--gutter) 120px; padding: 28px clamp(24px, 3vw, 40px); border-radius: var(--tsh-radius);
    display: flex; align-items: center; justify-content: space-between; gap: 18px 32px; flex-wrap: wrap;
    background: var(--brand); color: var(--paper-text); font-size: 19px;
}
.tsh-biz strong { font-weight: 600; }

/* ---------- Avisos (añadido al carrito, errores) ---------- */
.tsh-body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner) {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between;
    margin: 0 0 20px; padding: 14px 18px; border: 0; border-radius: var(--tsh-radius);
    background: var(--mint); color: var(--ink); font-size: 15px; text-align: left; list-style: none;
}
.tsh-body .woocommerce-error, .tsh-body .wc-block-components-notice-banner.is-error { background: #fbe4e1; }
.tsh-body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error)::before { display: none; }
/* wc-blocks.css se imprime al final: selector más fuerte para ganarle. */
body.tsh-body :is(.woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner > .wc-block-components-notice-banner__content) :is(.button, .wc-forward) {
    float: none !important; margin: 0 !important; text-decoration: none !important;
    order: 2; min-height: 38px !important; padding: 0 16px !important; border-radius: 999px !important;
    background: var(--ink) !important; color: var(--paper-text) !important; opacity: 1 !important; font-size: 14px !important; text-decoration: none !important;
}
.tsh-body .wc-block-components-notice-banner > svg { background: var(--teal); fill: #fff; border-radius: 50%; }

/* ---------- Botones de WooCommerce = .th-btn ---------- */
.tsh-body :is(.tsh-wc, .tsh-page, .tsh-notices) :is(.button, button.button, a.button, input.button, .single_add_to_cart_button, .checkout-button, .wc-block-components-button:not(.is-link), .wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button) {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 48px; padding: 0 24px; border: 0; border-radius: 999px;
    background: var(--ink); color: var(--paper-text) !important;
    font-family: var(--font); font-size: 15px; font-weight: 500; letter-spacing: -0.01em; text-decoration: none;
    box-shadow: none; cursor: pointer; transition: transform 0.2s var(--ease), opacity 0.2s ease;
}
.tsh-body :is(.tsh-wc, .tsh-page, .tsh-notices) :is(.button, .single_add_to_cart_button, .wc-block-components-button:not(.is-link)):hover { transform: translateY(-1px); background: var(--ink); }
.tsh-body :is(.tsh-wc, .tsh-page) :is(.button, .single_add_to_cart_button):is(.disabled, :disabled) { opacity: 0.35; cursor: not-allowed; transform: none; }
.tsh-body .wc-block-components-button:not(.is-link) .wc-block-components-button__text { color: var(--paper-text); }

/* ---------- Campos ---------- */
.tsh-body :is(.tsh-wc, .tsh-page) :is(input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], select, textarea),
.tsh-body .wc-block-components-text-input input,
.tsh-body .wc-blocks-components-select__select,
.tsh-body .wc-block-components-combobox .wc-block-components-combobox-control input {
    border: 1px solid var(--ink-15) !important; border-radius: var(--tsh-radius) !important;
    background: var(--white) !important; color: var(--ink); font-size: 16px; box-shadow: none !important;
}
.tsh-body :is(.tsh-wc, .tsh-page) :is(input, select, textarea):focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent !important; }
.tsh-body .wc-block-components-text-input label,
.tsh-body .wc-blocks-components-select__label { color: var(--ink-60); }

/* ---------- Producto ---------- */
.tsh-wc--product { padding: 40px var(--gutter) 120px; }
.tsh-wc .woocommerce-breadcrumb { font-size: 13px; color: var(--ink-60); margin: 0 0 24px; }
.tsh-wc .woocommerce-breadcrumb a { text-decoration: none; }
.tsh-wc--product div.product {
    display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px 64px; align-items: start;
}
.tsh-wc--product div.product > .onsale { display: none; }
.tsh-wc--product .woocommerce-product-gallery { position: relative !important; top: 0; width: 100% !important; float: none !important; margin: 0; opacity: 1 !important; }
.tsh-wc--product .woocommerce-product-gallery img { width: 100%; height: auto; border-radius: var(--tsh-radius); background: var(--ink-06); }
.tsh-wc--product .woocommerce-product-gallery__trigger { display: none; }
.tsh-wc--product .flex-control-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 8px; }

.tsh-wc--product .summary { width: 100% !important; float: none !important; margin: 0; display: flex; flex-direction: column; gap: 20px; }
.tsh-wc--product .product_title { font-size: clamp(38px, 4.6vw, 72px); font-weight: 500; line-height: 0.95; letter-spacing: -0.05em; margin: 0; }
.tsh-wc--product .summary .price { font-size: 24px; font-weight: 500; color: var(--ink) !important; margin: 0; }
.tsh-wc--product .summary .price del { opacity: 0.5; }
.tsh-wc--product .summary .price ins { text-decoration: none; }
.tsh-wc--product .woocommerce-product-details__short-description { color: var(--ink-60); font-size: 17px; }

.tsh-wc--product form.cart { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 4px 0 0; padding-top: 20px; border-top: 1px solid var(--ink-15); }
.tsh-wc--product form.variations_form { flex-direction: column; align-items: stretch; }
.tsh-wc--product .woocommerce-variation-add-to-cart { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tsh-wc--product .quantity .qty { width: 72px; min-height: 48px; text-align: center; }
.tsh-wc--product .single_add_to_cart_button { flex: 1; min-width: 200px; }
.tsh-wc--product table.variations { border: 0; margin: 0; width: 100%; }
.tsh-wc--product table.variations :is(th, td) { display: block; padding: 0; border: 0; text-align: left; background: none; }
.tsh-wc--product table.variations th.label { font-size: 13px; font-weight: 500; margin-bottom: 10px; }
.tsh-wc--product table.variations th.label label { font-weight: 500; }
.tsh-wc--product .reset_variations { font-size: 13px; color: var(--ink-60); margin-top: 8px; display: inline-block; }
/* Swatches (Woo Variation Swatches): pastillas del estilo del sitio. */
.tsh-body .variable-items-wrapper { gap: 8px; margin: 0 !important; }
.tsh-body .variable-items-wrapper .variable-item:not(.radio-variable-item) {
    box-shadow: inset 0 0 0 1px var(--ink-15) !important; border-radius: 999px !important; background: var(--white) !important;
    min-height: 40px; padding: 0 6px !important; margin: 0 !important;
}
.tsh-body .variable-items-wrapper .variable-item.selected:not(.radio-variable-item),
.tsh-body .variable-items-wrapper .variable-item:not(.radio-variable-item):hover { box-shadow: inset 0 0 0 2px var(--ink) !important; }
.tsh-body .variable-items-wrapper .variable-item .variable-item-span { font-size: 14px; color: var(--ink); padding: 0 8px; }
.tsh-wc--product .product_meta { font-size: 13px; color: var(--ink-60); }
.tsh-wc--product .product_meta .posted_in { display: none; }

/* Pestañas → secciones con línea arriba, en todo el ancho. */
.tsh-wc--product .woocommerce-tabs { grid-column: 1 / -1; margin-top: 40px; }
.tsh-wc--product .woocommerce-tabs ul.tabs { display: flex; gap: 8px; margin: 0 0 28px !important; padding: 0 !important; border: 0 !important; overflow-x: auto; }
.tsh-wc--product .woocommerce-tabs ul.tabs::before, .tsh-wc--product .woocommerce-tabs ul.tabs li::before, .tsh-wc--product .woocommerce-tabs ul.tabs li::after { display: none !important; }
.tsh-wc--product .woocommerce-tabs ul.tabs li { margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; border-radius: 0 !important; }
.tsh-wc--product .woocommerce-tabs ul.tabs li a {
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px !important; border-radius: 999px;
    box-shadow: inset 0 0 0 1px var(--ink-15); text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink) !important; white-space: nowrap;
}
.tsh-wc--product .woocommerce-tabs ul.tabs li { display: flex !important; }
.tsh-wc--product .woocommerce-tabs ul.tabs li a { display: inline-flex !important; align-items: center !important; height: 40px; min-height: 0 !important; padding: 0 18px !important; line-height: 1 !important; }
body.tsh-body .tsh-wc--product .woocommerce-tabs ul.tabs li.active a { background: var(--ink) !important; color: var(--paper-text) !important; box-shadow: none !important; }
.tsh-wc--product .woocommerce-Tabs-panel { max-width: 780px; font-size: 17px; line-height: 1.55; color: var(--ink); }
.tsh-wc--product .woocommerce-Tabs-panel > h2:first-child { display: none; }
.tsh-wc--product .woocommerce-Tabs-panel :is(h2, h3) { font-size: 24px; font-weight: 500; letter-spacing: -0.03em; margin: 32px 0 10px; }
.tsh-wc--product .woocommerce-Tabs-panel p { margin: 0 0 14px; color: var(--ink-60); }
.tsh-wc--product .woocommerce-Tabs-panel p strong { color: var(--ink); }
.tsh-wc--product .woocommerce-Tabs-panel ul { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.tsh-wc--product .woocommerce-Tabs-panel ul li { position: relative; padding-left: 26px; color: var(--ink-60); }
.tsh-wc--product .woocommerce-Tabs-panel ul li::before { content: "→"; position: absolute; left: 0; color: var(--brand); }
.tsh-wc--product .woocommerce-Tabs-panel ol { list-style: decimal; padding-left: 22px; margin: 0 0 14px; display: grid; gap: 8px; color: var(--ink-60); }
.tsh-wc--product .woocommerce-Tabs-panel ol li::marker { color: var(--brand); font-weight: 600; }
.tsh-wc--product .woocommerce-Tabs-panel table.shop_attributes { border: 0; width: 100%; }
.tsh-wc--product .woocommerce-Tabs-panel table.shop_attributes :is(th, td) { border: 0; border-top: 1px solid var(--ink-15); padding: 12px 0; text-align: left; font-style: normal; background: none; }

/* Valoraciones */
.tsh-wc--product #reviews :is(h2, .woocommerce-Reviews-title) { font-size: 24px; font-weight: 500; letter-spacing: -0.03em; margin: 0 0 12px; }
.tsh-wc--product #reviews .woocommerce-noreviews { color: var(--ink-60); margin-bottom: 20px; }
.tsh-wc--product #review_form_wrapper { padding: 24px; border-radius: var(--tsh-radius); background: var(--white); }
.tsh-wc--product #reply-title { display: block; font-size: 18px; font-weight: 500; margin-bottom: 14px; }
.tsh-wc--product #review_form label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--ink); }
.tsh-wc--product #review_form :is(textarea, input[type=text], input[type=email]) { width: 100%; padding: 12px 14px; }
.tsh-wc--product #review_form p { margin: 0 0 14px; }
.tsh-wc--product #review_form .form-submit input[type=submit] {
    min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--ink); color: var(--paper-text);
    font-family: var(--font); font-size: 15px; font-weight: 500; cursor: pointer;
}
.tsh-wc--product .stars a { color: var(--ochre); }

/* Relacionados: misma tarjeta que la tienda. */
.tsh-wc--product :is(.related, .upsells) { grid-column: 1 / -1; margin-top: 64px; }
.tsh-wc--product :is(.related, .upsells) > h2 { font-size: clamp(30px, 3.4vw, 52px); font-weight: 500; letter-spacing: -0.045em; line-height: 1; margin: 0 0 28px; }
.tsh-body .tsh-wc ul.products { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 0; padding: 0; }
.tsh-body .tsh-wc ul.products::before, .tsh-body .tsh-wc ul.products::after { display: none; }
.tsh-body .tsh-wc ul.products li.product { width: auto !important; float: none !important; margin: 0 !important; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.tsh-body .tsh-wc ul.products li.product a img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin: 0 0 4px; border-radius: 2px; background: var(--ink-06); }
.tsh-body .tsh-wc ul.products li.product .woocommerce-loop-product__title { font-size: 22px; font-weight: 500; letter-spacing: -0.03em; padding: 0; margin: 0; }
.tsh-body .tsh-wc ul.products li.product .price { font-size: 15px; font-weight: 500; color: var(--ink); margin: 0; }
.tsh-body .tsh-wc ul.products li.product .button { align-self: flex-start; min-height: 40px; padding: 0 18px; font-size: 14px; margin: 4px 0 0; }
.tsh-body .tsh-wc ul.products li.product a.woocommerce-LoopProduct-link { text-decoration: none; display: flex; flex-direction: column; gap: 8px; }

/* ---------- Carrito / checkout / Mi cuenta ---------- */
.tsh-page { padding: 40px var(--gutter) 120px; }
.tsh-title--page { font-size: clamp(40px, 6vw, 96px); margin-bottom: 40px; }
.tsh-page-body { font-size: 16px; }
.tsh-page-body :is(h2, h3) { letter-spacing: -0.02em; }
.tsh-body .wc-block-cart, .tsh-body .wc-block-checkout { max-width: none; }
.tsh-body :is(.wc-block-cart, .wc-block-checkout) { color: var(--ink); }
.tsh-body :is(.wc-block-cart__sidebar, .wc-block-checkout__sidebar) .wc-block-components-sidebar-layout,
.tsh-body .wc-block-components-totals-wrapper { border-color: var(--ink-15) !important; }
.tsh-body .wc-block-cart .wc-block-cart__totals-title,
.tsh-body .wc-block-cart-items__header,
.tsh-body .wc-block-components-title,
.tsh-body .wc-block-components-checkout-step__title { font-family: var(--font); font-weight: 500 !important; letter-spacing: -0.02em; text-transform: none; }
.tsh-body .wc-block-cart-items__header { font-size: 13px !important; color: var(--ink-60); }
.tsh-body .wc-block-cart-item__image img { border-radius: var(--tsh-radius); }
.tsh-body .wc-block-components-product-name { font-size: 17px; font-weight: 500; text-decoration: none; color: var(--ink) !important; }
.tsh-body .wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
.tsh-body .wc-block-components-totals-footer-item .wc-block-components-totals-item__label { font-size: 22px; font-weight: 500; }
.tsh-body :is(.wc-block-checkout__sidebar, .wc-block-cart__sidebar) { position: sticky; top: 96px; align-self: flex-start; }
.tsh-body .wc-block-checkout__sidebar .wc-block-components-order-summary,
.tsh-body .wp-block-woocommerce-checkout-order-summary-block { border-radius: var(--tsh-radius); border-color: var(--ink-15) !important; background: var(--white); }
.tsh-body .wc-block-components-radio-control__option,
.tsh-body .wc-block-components-radio-control-accordion-option { border-radius: var(--tsh-radius) !important; box-shadow: none !important; }
.tsh-body .wc-block-components-radio-control--highlight-checked::after,
.tsh-body .wc-block-components-radio-control-accordion-option--checked-option-highlighted,
.tsh-body .wc-block-components-radio-control__option--checked-option-highlighted { box-shadow: inset 0 0 0 2px var(--ink) !important; }
.tsh-body .wc-block-components-radio-control__input:checked { border-color: var(--ink); }
.tsh-body .wc-block-components-radio-control__input:checked::before { background: var(--ink); }
.tsh-body .wc-block-components-checkbox .wc-block-components-checkbox__input:checked { background: var(--ink); border-color: var(--ink); }
.tsh-body .wc-block-components-checkbox .wc-block-components-checkbox__mark { fill: var(--paper-text); }
.tsh-body .wc-block-components-express-payment--checkout { border-radius: var(--tsh-radius); border-color: var(--ink-15); }
.tsh-body .wc-block-components-quantity-selector { border-radius: 999px; border-color: var(--ink-15); }
.tsh-body .wc-block-components-quantity-selector::after { border: 0 !important; }
.tsh-body .wc-block-cart-item__remove-link { color: var(--ink-60) !important; }
.tsh-body :is(.wc-block-cart, .wc-block-checkout) a:not(.wc-block-components-button) { color: var(--ink); text-underline-offset: 3px; }
.tsh-body .is-large.wc-block-cart .wc-block-cart-items td { border-color: var(--ink-15); }
.tsh-body .wc-block-cart .wc-block-cart__empty-cart__title { font-size: clamp(28px, 3vw, 44px); font-weight: 500; letter-spacing: -0.04em; }

/* ---------- Celular ---------- */
@media (max-width: 900px) {
    .tsh-main { padding-top: 80px; }
    .tsh-wc--product div.product { grid-template-columns: minmax(0, 1fr); }
    .tsh-biz { margin-bottom: 88px; }
    .tsh-body :is(.wc-block-checkout__sidebar, .wc-block-cart__sidebar) { position: static; }
}

/* ---------- Preventa (Tokka_Preorder::banner) ---------- */
.tsh-preorder {
    display: flex; align-items: center; gap: 12px;
    margin: 0 var(--gutter) 24px; padding: 14px 20px; border-radius: 14px;
    background: var(--mint); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.4;
}
.tsh-preorder p { margin: 0; }
.tsh-preorder .th-dot { flex: none; background: var(--brand); }

/* ---------- Página de producto en blanco (2026-09-30) ---------- */
body.tsh-product { background: var(--white); }
.tsh-wc--product .woocommerce-product-gallery img { background: var(--white); }

/* Personalizada: botón a /personalizar en lugar del formulario (Tokka_Customizer). */
.tsh-customize-cta { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 1px solid var(--ink-15); }
.tsh-customize-cta .th-btn { justify-content: center; min-height: 52px; }
.tsh-customize-cta p { margin: 0; font-size: 14px; color: var(--ink-60); }
