/*
Theme Name: Cutulab Tools
Theme URI: https://tools.cutulab.cl
Author: Cutulab
Description: Tienda de bloques: inicio Por proyecto y ficha directa. Presentación nativa WooCommerce.
Version: 0.4.1
Requires at least: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: cutulab-tools
Tags: e-commerce, block-theme, full-site-editing

Token mapping: incumbent palette slugs preserved in theme.json. Hanken → body,
Bricolage → display; custom.radius.control=6px, surface=12px. Source/decisions:
DESIGN.md and docs/redesign-2026-09-10/ in the repository, not theme payload.
CSS below owns our markup only. Woo block internals, cart rows and form state
are private: use theme.json and native block attributes, never DOM rewrites.
*/

:root {
	--cl-control: 6px;
	--cl-surface: 12px;
	--cl-ease: cubic-bezier(.16, 1, .3, 1);
}
:where(.wp-site-blocks, .editor-styles-wrapper) { box-sizing: border-box; }
:where(.wp-site-blocks, .editor-styles-wrapper) *,
:where(.wp-site-blocks, .editor-styles-wrapper) *::before,
:where(.wp-site-blocks, .editor-styles-wrapper) *::after { box-sizing: inherit; }
html { scroll-padding-top: 24px; scrollbar-color: var(--wp--preset--color--primary) var(--wp--preset--color--cream); }
::selection { color: var(--wp--preset--color--white); background: var(--wp--preset--color--primary-dark); }
:where(.wp-site-blocks, .editor-styles-wrapper) :where(h1,h2,h3) { text-wrap: balance; overflow-wrap: break-word; }
:where(.wp-site-blocks, .editor-styles-wrapper) :where(a) { text-underline-offset: 5px; }
:where(.wp-site-blocks, .editor-styles-wrapper) :where(input,textarea,select) { font: inherit; caret-color: var(--wp--preset--color--primary-dark); }
:where(.wp-site-blocks, .editor-styles-wrapper) :where(input,textarea)::placeholder { color: var(--wp--preset--color--primary-dark); opacity: 1; }
:where(.wp-site-blocks, .editor-styles-wrapper) :where(a,button,input,textarea,select,summary):focus-visible { outline: 3px solid var(--wp--preset--color--primary-dark); outline-offset: 4px; }
:where(.wp-site-blocks, .editor-styles-wrapper) :where(button,a,summary) { touch-action: manipulation; }
:where(.wp-site-blocks, .editor-styles-wrapper) :where(button):disabled { cursor: not-allowed; }
:where(.wp-site-blocks, .editor-styles-wrapper) :where(img) { max-width: 100%; height: auto; }
:where(.wp-site-blocks, .editor-styles-wrapper) :where(table) { font-variant-numeric: tabular-nums; }
.cl-icon { display: block; width: 21px; height: 21px; flex: none; }
.cl-button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 48px; padding: 13px 23px; border: 1px solid transparent; border-radius: var(--cl-control); background: var(--wp--preset--color--primary-dark); color: var(--wp--preset--color--white); font: 600 1rem/1.4 var(--wp--preset--font-family--body); text-decoration: none; cursor: pointer; transition: background .2s; }
.cl-button:hover { background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--white); text-decoration: none; }
.cl-button-light { color: var(--wp--preset--color--primary-dark); background: var(--wp--preset--color--base); }
.cl-button-light:hover { background: var(--wp--preset--color--white); color: var(--wp--preset--color--primary-dark); }
.cl-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid currentColor; border-radius: 50%; color: var(--wp--preset--color--primary-dark); background: transparent; cursor: pointer; list-style: none; }
.cl-icon-button::-webkit-details-marker { display: none; }
.cl-icon-button:hover { background: var(--wp--preset--color--sky-pale); }
.cl-price, .cl-price-pending { font-variant-numeric: tabular-nums; }
.cl-price { white-space: nowrap; }
.cl-price-pending { color: var(--wp--preset--color--primary-dark); font-size: 1rem; }

/* Header: native details panels remain usable without JavaScript. */
.cl-header { position: relative; z-index: 20; color: var(--wp--preset--color--primary-dark); }
.cl-header-inner, .cl-footer-inner { width: min(1280px, calc(100% - 40px)); margin-inline: auto; }
.cl-header-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 74px; }
.cl-wordmark { display: inline-flex; align-items: baseline; gap: 5px; color: inherit; font: 800 28px/.95 var(--wp--preset--font-family--display); letter-spacing: -.04em; text-decoration: none; white-space: nowrap; }
.cl-wordmark:hover { color: inherit; text-decoration: none; }
.cl-wordmark small { font: 600 12px/1 var(--wp--preset--font-family--body); letter-spacing: -.02em; }
.cl-header-actions { display: flex; align-items: center; gap: 8px; }
.cl-desktop-nav { display: none; }
.cl-header-panel > .cl-panel { box-sizing: border-box; position: absolute; top: calc(100% - 2px); right: 0; z-index: 30; width: min(480px, 100%); padding: 24px; border: 1px solid var(--wp--preset--color--accent); border-radius: var(--cl-surface); background: var(--wp--preset--color--base); box-shadow: 0 12px 28px #0000001a; }
.cl-mobile-menu .cl-panel { display: grid; gap: 8px; }
.cl-mobile-menu .cl-panel a { padding-block: 12px; }
.cl-search-form label { display: block; font-weight: 600; margin-bottom: 12px; }
.cl-search-form > div { display: flex; gap: 8px; }
.cl-search-form input[type="search"] { box-sizing: border-box; width: 100%; min-width: 0; min-height: 48px; padding: 12px; border: 1px solid var(--wp--preset--color--primary-dark); border-radius: var(--cl-control); background: var(--wp--preset--color--white); color: var(--wp--preset--color--contrast); }
.cl-search-form button { padding-inline: 16px; }

/* Main templates own spacing; native block contents own behavior. */
.cl-main { padding-block: 24px 64px; }
.cl-home-main { padding-block: 0 54px; }
.cl-catalog-main { padding-block: 24px 64px; }
.cl-reading-main { min-height: 55vh; padding-block: 32px 64px; }
.cl-checkout-main { padding-block: 32px 64px; }
.cl-catalog-title { margin-block: 12px 24px; }
.cl-catalog-toolbar { margin-block: 24px; }
.cl-catalog-link { margin-block: 32px 0; text-align: center; }
.cl-categories { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.cl-categories a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 14px; border-radius: var(--cl-control); color: var(--wp--preset--color--primary-dark); text-decoration: none; }
.cl-categories a:hover { background: var(--wp--preset--color--sky-pale); }
.cl-categories a[aria-current="page"] { background: var(--wp--preset--color--primary-dark); color: var(--wp--preset--color--white); }

/* A: a worktable, not a campaign. Unenhanced output exposes every linked project. */
.cl-intro { padding: 24px 0 28px; }
.cl-intro h1 { max-width: 11ch; margin: 0; font-size: clamp(42px, 12vw, 50px); letter-spacing: -.04em; }
.cl-intro p { max-width: 33ch; margin: 18px 0 0; }
.cl-workspace { overflow: hidden; border-radius: var(--cl-surface); background: var(--wp--preset--color--cream); }
.cl-project-choices { display: flex; padding: 8px; gap: 4px; }
.cl-project-choice { display: flex; align-items: center; justify-content: center; flex: 1; min-width: 0; min-height: 56px; padding: 10px 6px; border-radius: var(--cl-control); font: 600 15px/1.2 var(--wp--preset--font-family--display); color: var(--wp--preset--color--contrast); text-align: center; text-decoration: none; }
.cl-project-choice small, .cl-project-choice .cl-icon { display: none; }
.cl-project-choice:hover { background: var(--wp--preset--color--sky-pale); text-decoration: none; }
.cl-project-choice[aria-pressed="true"] { color: var(--wp--preset--color--primary-dark); background: var(--wp--preset--color--base); }
.cl-project-stage { display: grid; background: var(--wp--preset--color--sky-pale); }
.cl-project-stage[hidden] { display: none; }
.cl-project-scene { margin: 0; background: var(--wp--preset--color--warm); }
.cl-project-scene img { display: block; width: 100%; height: 225px; object-fit: contain; }
.cl-project-scene figcaption { padding: 8px 12px; font-size: 12px; background: var(--wp--preset--color--base); }
.cl-project-copy { display: flex; flex-direction: column; align-items: start; padding: 24px; }
.cl-project-copy h2 { margin: 0; max-width: 15ch; font-size: 29px; }
.cl-project-copy > p { margin-block: 12px 0; max-width: 35ch; }
.cl-project-product { width: 100%; padding-top: 24px; margin-top: auto; }
.cl-project-product > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 16px; font-size: 14px; }
.cl-project-product .cl-button { width: 100%; }
.cl-workspace-foot { display: flex; justify-content: space-between; align-items: start; gap: 24px; margin-top: 14px; font-size: 12px; }
.cl-workspace-foot a { font-weight: 600; }
.cl-project-products { padding-block: 54px; }
.cl-project-products > h2 { margin-block: 0 28px; }
.cl-evidence-change { animation: cl-evidence .32s var(--cl-ease); }
@keyframes cl-evidence { from { filter: brightness(1.07); } to { filter: brightness(1); } }

/* Editorial close. Actual product media, never generated substitutes. */
.cl-story { display: flex; flex-direction: column-reverse; background: var(--wp--preset--color--cream); }
.cl-story-photos { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 14px; padding: 24px; background: var(--wp--preset--color--warm); }
.cl-story-photos img { display: block; width: 100%; height: 260px; object-fit: contain; }
.cl-story-photos img:last-child { margin-top: 28px; }
.cl-story-copy { padding: 32px 24px; }
.cl-story-copy h2 { max-width: 14ch; margin-block: 0 20px; }
.cl-story-copy p { max-width: 45ch; }
.cl-story-copy a { display: inline-flex; align-items: center; gap: 12px; margin-top: 12px; padding-block: 10px; font-weight: 600; }

/* Product 1: title → photographs → price/order → facts on a phone. */
.cl-product-sheet { display: grid; gap: 24px; }
.cl-product-title, .cl-product-gallery, .cl-product-purchase { min-width: 0; margin: 0; }
.cl-product-title h1 { margin: 0; font-size: clamp(42px, 4.4vw, 64px); }
.cl-product-title p { max-width: 36ch; }
.cl-product-purchase { display: flex; flex-direction: column; gap: 18px; }
.cl-product-facts dl { margin: 0; }
.cl-product-facts dl > div { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(0, 1.7fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--wp--preset--color--accent); }
.cl-product-facts dt { color: var(--wp--preset--color--primary-dark); font-size: 14px; }
.cl-product-facts dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.cl-photo-note { color: var(--wp--preset--color--primary-dark); font-size: 13px; }
.cl-product-details { margin-block: 54px; }
.cl-product-related { padding-top: 24px; }

/* Footer: real configured destinations; no simulated signup or empty WhatsApp. */
.cl-footer { padding: 44px 0 32px; background: var(--wp--preset--color--primary-dark); color: var(--wp--preset--color--base); }
.cl-footer :where(h2,h3,a) { color: inherit; }
.cl-footer :focus-visible { outline-color: var(--wp--preset--color--base); }
.cl-footer-top { display: grid; gap: 32px; }
.cl-footer-top h2 { max-width: 15ch; margin: 0; }
.cl-footer-top h3 { font: 600 23px/1.2 var(--wp--preset--font-family--body); margin-block: 0 16px; }
.cl-footer-top p { max-width: 44ch; }
.cl-footer-top .cl-button { margin-top: 12px; color: var(--wp--preset--color--primary-dark); }
.cl-footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 36px; }
.cl-footer-links a { padding-block: 10px; font-size: 14px; }
.cl-footer-bottom { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 16px; border-top: 1px solid var(--wp--preset--color--accent); padding-top: 24px; margin-top: 24px; font-size: 13px; }
.cl-footer-bottom p { max-width: 24ch; margin: 0; }

@media (min-width: 760px) {
	.cl-header-inner, .cl-footer-inner { width: min(1280px, calc(100% - 80px)); }
	.cl-main, .cl-catalog-main, .cl-reading-main, .cl-checkout-main { padding-block: 32px 80px; }
	.cl-home-main { padding-bottom: 84px; }
	.cl-intro { display: grid; grid-template-columns: 1.6fr 1fr; gap: 50px; align-items: end; padding: 43px 0 42px; }
	.cl-intro h1 { font-size: clamp(50px, 6vw, 84px); }
	.cl-intro p { max-width: 31ch; font-size: 18px; margin-bottom: 15px; }
	.cl-workspace { display: grid; grid-template-columns: 170px minmax(0, 1fr); }
	.cl-project-choices { flex-direction: column; padding: 12px; }
	.cl-project-choice { justify-content: space-between; flex: none; text-align: left; min-height: 100px; padding: 18px 10px; font-size: 18px; }
	.cl-project-choice small { display: block; margin-top: 6px; font: 400 13px/1.4 var(--wp--preset--font-family--body); }
	.cl-project-choice .cl-icon { display: block; width: 18px; }
	.cl-project-stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 405px; }
	.cl-project-scene { display: flex; flex-direction: column; min-width: 0; }
	.cl-project-scene img { flex: 1; height: 375px; min-height: 0; }
	.cl-project-copy { padding: 28px; }
	.cl-project-copy h2 { font-size: clamp(28px, 3vw, 40px); max-width: 11ch; }
	.cl-project-copy > p { margin-top: 20px; }
	.cl-project-product { padding-top: 32px; }
	.cl-workspace-foot { font-size: 13px; }
	.cl-project-products { padding-block: 84px; }
	.cl-story { display: grid; grid-template-columns: 1fr 1fr; }
	.cl-story-copy { padding: 48px; align-self: center; }
	.cl-story-photos { padding: 32px; }
	.cl-story-photos img { height: 320px; }
	.cl-story-photos img:last-child { margin-top: 56px; }
	.cl-product-sheet { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px 40px; align-items: start; }
	.cl-product-title { grid-column: 2; grid-row: 1; }
	.cl-product-gallery { grid-column: 1; grid-row: 1 / 3; }
	.cl-product-purchase { grid-column: 2; grid-row: 2; }
	.cl-product-details { margin-block: 76px; }
	.cl-footer { padding: 64px 0 42px; }
	.cl-footer-top { grid-template-columns: 1.4fr 1fr; gap: 60px; }
}
@media (min-width: 1000px) {
	.cl-header-inner { min-height: 90px; gap: 28px; }
	.cl-wordmark { font-size: 33px; }
	.cl-wordmark small { font-size: 14px; }
	.cl-desktop-nav { display: flex; gap: 30px; align-items: center; }
	.cl-desktop-nav a { font-size: 15px; text-decoration: none; }
	.cl-desktop-nav a:hover { text-decoration: underline; }
	.cl-mobile-menu { display: none; }
	.cl-workspace { grid-template-columns: 215px minmax(0, 1fr); }
	.cl-project-choice { font-size: 21px; padding: 22px 16px; }
	.cl-project-copy { padding: 38px; }
	.cl-product-sheet { column-gap: 64px; }
}
@media (max-width: 380px) {
	.cl-header-inner { gap: 8px; }
	.cl-header-inner .cl-wordmark { font-size: 24px; gap: 3px; }
	.cl-header-inner .cl-wordmark small { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
	.cl-evidence-change { animation: none; }
	.cl-button { transition: none; }
}
