/* =========================================================================
   10 Hertz Publishing — theme.css
   All visual styling lives here (Section 10). No inline styles in PHP
   templates except the single allowed exception in header.php (24.2).
   ========================================================================= */

:root {
	--font-display: 'Literata', serif;
	--font-body: 'Lato', sans-serif;
	--radius: 0.5rem;
	--shadow-soft: 0 2px 12px -2px hsl(20 12% 16% / 0.06);
	--shadow-elevated: 0 8px 30px -6px hsl(20 12% 16% / 0.12);
	--transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
	--container-max: 80rem;
	--header-height: 64px;
	--btn-radius: 0.5rem;
	--btn-height: 2.75rem;
	--btn-padding: 0 2.5rem;
	--btn-font-size: 0.875rem;
	--btn-font-weight: 700;
	--btn-letter-spacing: normal;
	--btn-text-transform: none;
	--btn-icon-padding: 0;
}

/* ---------------------------------------------------------------------
   Reset & base
   ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body {
	margin: 0;
	background-color: var(--color-background);
	color: var(--color-foreground);
	font-family: var(--font-body);
	-webkit-font-smoothing: antialiased;
	line-height: 1.5;
}
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	font-weight: inherit;
	font-size: inherit;
	margin: 0;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; background: none; border: none; cursor: pointer; padding: 0; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

img:not(.cover-img):not(.hero-bg-img):not(.theme-product-card-wrap__img):not(.theme-product-gallery__main-img):not(.theme-product-thumbnails__btn img):not(.about-section__portrait) {
	max-width: 100%;
	height: auto;
}
.cover-img, .hero-bg-img, .theme-product-card-wrap__img, .theme-product-gallery__main-img, .theme-product-thumbnails__btn img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.container-wide { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 1024px) { .container-wide { padding: 0 2rem; } }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 999; background: var(--color-primary); color: var(--color-primary-foreground); padding: 0.5rem 1rem; }
.skip-link:focus { left: 0; }

.eyebrow { display: block; font-size: 0.75rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--color-muted-foreground); margin-bottom: 0.75rem; font-weight: 700; }
.italic-normal { font-style: italic; font-weight: 400; }

/* ---------------------------------------------------------------------
   Reveal animations (Section 2.1)
   ------------------------------------------------------------------- */
.reveal-item {
	opacity: 0;
	transform: translateY(40px);
	transition: opacity 0.7s var(--transition-smooth), transform 0.7s var(--transition-smooth);
	transition-delay: calc(var(--stagger-index, 0) * 0.1s);
}
.reveal-item.is-visible { opacity: 1; transform: none; }

body.is-customizer .reveal-item,
body.is-customizer .hero-anim { opacity: 1 !important; transform: none !important; }

@media (prefers-reduced-motion: reduce) {
	.reveal-item, .hero-anim { transition: none !important; animation: none !important; opacity: 1 !important; transform: none !important; }
}

.hero-anim { opacity: 0; animation: heroFadeUp 0.8s var(--transition-smooth) forwards; animation-delay: var(--d, 0s); }
@keyframes heroFadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.animate-fade-in { animation: fadeIn 0.5s var(--transition-smooth) forwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	height: var(--btn-height);
	padding: var(--btn-padding);
	border-radius: var(--btn-radius);
	font-size: var(--btn-font-size);
	font-weight: var(--btn-font-weight);
	letter-spacing: var(--btn-letter-spacing);
	text-transform: var(--btn-text-transform);
	white-space: nowrap;
	transition: opacity 0.2s ease, background-color 0.2s ease;
}
.btn svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.btn-primary { background-color: var(--color-primary); color: var(--color-primary-foreground); }
.btn-primary:hover { opacity: 0.9; }
.btn-outline { background-color: transparent; border: 1px solid var(--color-border); color: var(--color-foreground); }
.btn-outline:hover { background-color: var(--color-secondary); }
.btn-hero-primary { background-color: var(--color-primary); color: var(--color-primary-foreground); text-transform: none; }
.btn-hero-primary:hover { opacity: 0.9; }
.btn-hero-outline {
	background-color: transparent;
	border: 1px solid color-mix(in srgb, var(--color-accent-foreground) 30%, transparent);
	color: var(--color-accent-foreground);
	text-transform: none;
}
.btn-hero-outline:hover { background-color: color-mix(in srgb, var(--color-accent-foreground) 10%, transparent); }

/* ---------------------------------------------------------------------
   Header
   ------------------------------------------------------------------- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; }
.site-header__bar { transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; background-color: transparent; }
.site-header__nav { position: relative; display: flex; align-items: center; justify-content: space-between; height: 3.5rem; }
@media (min-width: 1024px) { .site-header__nav { height: 4rem; } }

.site-header__mobile-toggle { display: block; padding: 0.5rem; color: var(--color-accent-foreground); }
.site-header__mobile-toggle .icon-menu-close { display: none; }
.site-header__mobile-toggle[aria-expanded="true"] .icon-menu-open { display: none; }
.site-header__mobile-toggle[aria-expanded="true"] .icon-menu-close { display: block; }
@media (min-width: 1024px) { .site-header__mobile-toggle { display: none; } }

.site-header__logo { position: absolute; left: 50%; transform: translateX(-50%); display: block; }
.site-logo-img { height: var(--logo-height) !important; width: auto !important; display: block; transition: filter 0.3s ease; }
.site-logo-text { display: block; line-height: var(--logo-height); font-family: var(--font-display); font-weight: 700; color: var(--color-accent-foreground); }
@media (min-width: 1024px) { .site-header__logo { position: static; transform: none; } }

.site-header__links { display: none; align-items: center; gap: 2rem; }
@media (min-width: 1024px) { .site-header__links { display: flex; } }
.theme-nav-list { display: flex; align-items: center; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.theme-nav-list .menu-item { list-style: none; }
.theme-nav-link { font-size: 0.875rem; font-weight: 500; color: color-mix(in srgb, var(--color-accent-foreground) 60%, transparent); transition: color 0.2s ease; }
.theme-nav-link:hover { color: var(--color-accent-foreground); }

.site-header__cart { position: relative; padding: 0.5rem; color: var(--color-accent-foreground); }
.site-header__cart svg { width: 1.25rem; height: 1.25rem; }
.theme-cart-count {
	position: absolute; top: -2px; right: -2px;
	width: 1.25rem; height: 1.25rem;
	display: flex; align-items: center; justify-content: center;
	font-size: 0.625rem; font-weight: 700;
	background-color: var(--color-primary); color: var(--color-primary-foreground);
	border-radius: 999px;
}
.theme-cart-count:empty { display: none; }

.site-header__mobile-menu { display: none; }
.site-header__mobile-menu.is-open { display: block; border-top: 1px solid var(--color-border); padding: 1rem 0; }
.theme-nav-list--mobile .theme-nav-list { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
.theme-nav-list--mobile .theme-nav-link { padding: 0.5rem 0; color: var(--color-muted-foreground); }

/* solid / transparent states */
.site-header .site-header__bar.is-solid,
body.theme-no-hero .site-header .site-header__bar,
.site-header__mobile-menu.is-open ~ .site-header__bar,
body[data-scrolled="true"] .site-header .site-header__bar {
	background-color: var(--color-background);
	border-bottom: 1px solid var(--color-border);
	box-shadow: var(--shadow-soft);
}
body[data-scrolled="true"] .site-header .site-logo-img,
.site-header .site-header__bar.is-solid .site-logo-img { filter: none; }
.site-header .site-header__bar:not(.is-solid) .site-logo-img { filter: brightness(0) invert(1); }
body:not([data-scrolled="true"]) .site-header .site-header__bar:not(.is-solid) .site-header__mobile-toggle,
body:not([data-scrolled="true"]) .site-header .site-header__bar:not(.is-solid) .theme-nav-link,
body:not([data-scrolled="true"]) .site-header .site-header__bar:not(.is-solid) .site-header__cart {
	color: color-mix(in srgb, var(--color-accent-foreground) 60%, transparent);
}
.site-header .site-header__bar.is-solid .theme-nav-link,
.site-header .site-header__bar.is-solid .site-header__mobile-toggle,
.site-header .site-header__bar.is-solid .site-header__cart { color: var(--color-muted-foreground); }
.site-header .site-header__bar.is-solid .theme-nav-link:hover { color: var(--color-foreground); }

/* homepage: content sits underneath the fixed transparent header */
body.theme-no-hero .site-main,
body.theme-no-hero .archive-product-main,
body.theme-no-hero .single-product-main,
body.woocommerce-checkout .site-main,
body.theme-thankyou-page .site-main {
	padding-top: var(--header-height);
}
body.woocommerce-checkout .site-main { padding-bottom: 4rem; }

/* ---------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--color-border); background-color: var(--color-accent); color: var(--color-accent-foreground); }
.site-footer__inner { padding-block: 3rem; }
.site-footer__grid { display: grid; gap: 2.5rem; }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 1.2fr auto 1fr; align-items: start; } }
.site-footer__logo { height: 4rem; width: auto; filter: brightness(0) invert(1); }
@media (min-width: 640px) { .site-footer__logo { height: 5rem; } }
.site-footer__tagline { margin-top: 0.75rem; font-size: 0.875rem; color: color-mix(in srgb, var(--color-accent-foreground) 60%, transparent); }
.site-footer__nav .theme-nav-list--footer,
.site-footer__nav ul { display: flex; flex-direction: column; gap: 0.75rem; list-style: none; margin: 0; padding: 0; }
.site-footer__nav a { font-size: 0.875rem; color: color-mix(in srgb, var(--color-accent-foreground) 60%, transparent); transition: color 0.2s ease; }
.site-footer__nav a:hover { color: var(--color-accent-foreground); }
.site-footer__contact { display: flex; flex-direction: column; gap: 1rem; padding-top: 1.5rem; border-top: 1px solid color-mix(in srgb, var(--color-accent-foreground) 10%, transparent); }
@media (min-width: 768px) { .site-footer__contact { border-top: 0; padding-top: 0.75rem; } }
.site-footer__contact-link { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: color-mix(in srgb, var(--color-accent-foreground) 60%, transparent); transition: color 0.2s ease; }
.site-footer__contact-link:hover { color: var(--color-accent-foreground); }
.site-footer__bottom { margin-top: 2.5rem; border-top: 1px solid color-mix(in srgb, var(--color-accent-foreground) 10%, transparent); padding-top: 1.5rem; }
.site-footer__copyright { font-size: 0.75rem; color: color-mix(in srgb, var(--color-accent-foreground) 40%, transparent); }

/* ---------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------- */
.hero-section { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; background-color: var(--color-accent); overflow: hidden; }
.hero-section__media { position: absolute; inset: 0; }
.hero-section__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
.hero-section__scrim { position: absolute; inset: 0; background: linear-gradient(to top, color-mix(in srgb, var(--color-accent) 80%, transparent), color-mix(in srgb, var(--color-accent) 40%, transparent), color-mix(in srgb, var(--color-accent) 60%, transparent)); }
.hero-section__content { position: relative; z-index: 10; text-align: center; padding: 5rem 1.5rem; max-width: 48rem; margin: 0 auto; }
.hero-section__eyebrow { font-size: 0.75rem; letter-spacing: 0.3em; text-transform: uppercase; color: color-mix(in srgb, var(--color-accent-foreground) 50%, transparent); margin-bottom: 1.5rem; font-weight: 500; }
.hero-section__title { font-size: 2.25rem; font-weight: 700; letter-spacing: -0.025em; color: var(--color-accent-foreground); margin-bottom: 1.5rem; line-height: 1; }
@media (min-width: 768px) { .hero-section__title { font-size: 3.75rem; } }
@media (min-width: 1024px) { .hero-section__title { font-size: 4.5rem; } }
.hero-section__subtitle { color: var(--color-accent-foreground); font-size: 1.25rem; margin-bottom: 1.5rem; max-width: 36rem; margin-left: auto; margin-right: auto; font-style: italic; }
@media (min-width: 768px) { .hero-section__subtitle { font-size: 1.5rem; } }
.hero-section__description { color: color-mix(in srgb, var(--color-accent-foreground) 70%, transparent); font-size: 1rem; margin-bottom: 2.5rem; max-width: 32rem; margin-left: auto; margin-right: auto; }
@media (min-width: 768px) { .hero-section__description { font-size: 1.125rem; } }
.hero-section__actions { display: flex; flex-direction: column; gap: 1rem; justify-content: center; }
@media (min-width: 640px) { .hero-section__actions { flex-direction: row; } }

/* ---------------------------------------------------------------------
   Section heading system (Section 2.2.5 — per-section scales)
   ------------------------------------------------------------------- */
.section-heading { font-weight: 700; letter-spacing: -0.025em; line-height: 1; }
.section-intro { text-align: center; margin-bottom: 4rem; }
.section-intro__desc { color: var(--color-muted-foreground); margin-top: 1rem; max-width: 32rem; margin-left: auto; margin-right: auto; }

.about-section { padding: 5rem 0; }
@media (min-width: 768px) { .about-section { padding: 7rem 0; } }
.about-section .section-heading { font-size: 2.25rem; }
@media (min-width: 768px) { .about-section .section-heading { font-size: 3rem; } }
@media (min-width: 1024px) { .about-section .section-heading { font-size: 3.75rem; } }

.books-section .section-heading, .childrens-section .section-heading { font-size: 1.875rem; }
@media (min-width: 768px) { .books-section .section-heading, .childrens-section .section-heading { font-size: 3rem; } }

.services-section .section-heading, .faq-section .section-heading { font-size: 1.875rem; }
@media (min-width: 768px) { .services-section .section-heading, .faq-section .section-heading { font-size: 2.25rem; } }

.cta-band__title { font-size: 1.875rem; }
@media (min-width: 768px) { .cta-band__title { font-size: 2.25rem; } }

/* ---------------------------------------------------------------------
   About
   ------------------------------------------------------------------- */
.about-section__grid { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: start; }
@media (min-width: 1024px) { .about-section__grid { grid-template-columns: 5fr 7fr; gap: 5rem; } }
.about-section__portrait-col { display: flex; flex-direction: column; gap: 2rem; }
.about-section__portrait-wrap { position: relative; width: 100%; max-width: 24rem; margin-left: auto; margin-right: auto; }
@media (min-width: 1024px) { .about-section__portrait-wrap { margin-left: 0; margin-right: 0; } }
.about-section__portrait-frame { aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow-elevated); filter: grayscale(1); transition: filter 0.7s ease; }
.about-section__portrait-wrap:hover .about-section__portrait-frame { filter: grayscale(0); }
.about-section__portrait { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.about-section__portrait-frame-deco { position: absolute; bottom: -1rem; left: -0.75rem; width: 7rem; height: 7rem; border-left: 2px solid var(--color-primary); border-bottom: 2px solid var(--color-primary); z-index: -1; }
@media (max-width: 639px) { .about-section__portrait-frame-deco { display: none; } }
.about-section__quote-block { max-width: 24rem; margin-left: auto; margin-right: auto; text-align: center; }
@media (min-width: 1024px) { .about-section__quote-block { margin-left: 0; margin-right: 0; text-align: left; } }
.about-section__quote { font-family: var(--font-display); font-style: italic; color: var(--color-primary); font-size: 1.25rem; line-height: 1.3; }
@media (min-width: 1024px) { .about-section__quote { font-size: 1.5rem; } }
.about-section__quote-author { margin-top: 0.75rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.25em; font-weight: 700; }
.about-section__heading { margin-bottom: 2.5rem; }
.about-section__body { display: flex; flex-direction: column; gap: 1.5rem; font-size: 1.125rem; line-height: 1.7; color: color-mix(in srgb, var(--color-foreground) 90%, transparent); }
.about-section__lead { font-size: 1.25rem; padding-top: 0.5rem; color: var(--color-foreground); }
@media (min-width: 768px) { .about-section__lead { font-size: 1.4rem; } }
.about-section__divider { margin-top: 3rem; display: flex; align-items: center; gap: 1rem; }
.about-section__divider-line { height: 1px; width: 3rem; background-color: var(--color-primary); }
.about-section__divider-dots { display: flex; gap: 0.5rem; }
.about-section__divider-dots span { display: block; width: 0.375rem; height: 0.375rem; background-color: var(--color-primary); transform: rotate(45deg); }
.about-section__divider-dots span:nth-child(2) { opacity: 0.4; }
.about-section__divider-dots span:nth-child(3) { opacity: 0.2; }

/* ---------------------------------------------------------------------
   Product grids & cards
   ------------------------------------------------------------------- */
.books-section { padding: 5rem 0; background-color: var(--color-secondary); }
@media (min-width: 768px) { .books-section { padding: 7rem 0; } }
.childrens-section { padding: 5rem 0; }
@media (min-width: 768px) { .childrens-section { padding: 7rem 0; } }

.theme-product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
@media (min-width: 768px) { .theme-product-grid--books { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; } }
@media (min-width: 768px) { .theme-product-grid--childrens { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; } }
@media (min-width: 1024px) { .theme-product-grid--childrens { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* .theme-product-grid--archive removed (Plan Revisión 6, Sección 4): the archive
   no longer uses a bespoke <div> wrapper — it now emits the standard WooCommerce
   `ul.products` via woocommerce_product_loop_start()/_end(). See the defensive
   "Archive / shop" grid rules further below. */

.theme-product-card-wrap { display: flex; flex-direction: column; height: 100%; }
.theme-product-card-wrap__frame {
	position: relative;
	aspect-ratio: 2 / 3;
	background-color: var(--color-card);
	overflow: hidden;
	border-radius: 0.125rem;
	box-shadow: 4px 6px 16px -2px hsl(20 12% 16% / 0.15);
	transition: box-shadow 0.5s ease, transform 0.3s cubic-bezier(0.2,0.8,0.2,1);
}
.theme-product-card-wrap:hover .theme-product-card-wrap__frame { box-shadow: 6px 10px 24px -4px hsl(20 12% 16% / 0.22); transform: translateY(-8px); }
.theme-product-card-wrap__scrim { position: absolute; inset: 0; background: linear-gradient(to top, color-mix(in srgb, var(--color-foreground) 20%, transparent), transparent); opacity: 0; transition: opacity 0.5s ease; }
.theme-product-card-wrap:hover .theme-product-card-wrap__scrim { opacity: 1; }
.theme-product-card-wrap__badge { position: absolute; top: 0.75rem; left: 0.75rem; padding: 0.375rem 0.75rem; background-color: var(--color-primary); color: var(--color-primary-foreground); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; border-radius: 0.125rem; z-index: 2; }
.theme-product-card-wrap__overlay { position: absolute; bottom: 0.75rem; left: 0.75rem; right: 0.75rem; display: flex; align-items: center; gap: 0.5rem; opacity: 0; transition: opacity 0.3s ease; z-index: 2; }
.theme-product-card-wrap:hover .theme-product-card-wrap__overlay { opacity: 1; }
.theme-product-card-wrap__overlay svg { color: var(--color-primary-foreground); width: 1rem; height: 1rem; }
.theme-product-card-wrap__overlay span { font-size: 0.75rem; color: var(--color-primary-foreground); font-weight: 500; }
.theme-product-card-wrap__spine { position: absolute; top: 0; left: 0; bottom: 0; width: 3px; background-color: color-mix(in srgb, var(--color-foreground) 10%, transparent); border-radius: 0.125rem 0 0 0.125rem; }
.theme-product-card-wrap__info { margin-top: 1rem; }
.theme-product-card-wrap__title { font-size: 1rem; font-weight: 600; transition: color 0.3s ease; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.theme-product-card-wrap:hover .theme-product-card-wrap__title { color: var(--color-primary); }
.theme-product-card-wrap__cat { font-size: 0.875rem; color: var(--color-muted-foreground); margin-top: 0.125rem; }
.theme-product-card-wrap__cat a { color: inherit; }
.theme-product-card-wrap__price { font-size: 0.875rem; font-weight: 700; color: var(--color-primary); margin-top: 0.125rem; }

/* Section 4 / Section 7 (Revisión 6): both the archive fallback and the
   Children's Books grid now inherit the base 2:3 frame and the base 1rem
   (16px/24px, Literata) title from the rules above — the 1:1 aspect-ratio
   and 0.875rem title-size overrides that used to apply here are REMOVED,
   not just split, per the approved plan. */

/* ---------------------------------------------------------------------
   What We Publish
   ------------------------------------------------------------------- */
.services-section { padding: 4rem 0 5rem; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
@media (min-width: 768px) { .services-section { padding: 5rem 0; } }
.services-section__grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 640px) { .services-section__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; } }
@media (min-width: 1024px) { .services-section__grid { gap: 2.5rem; } }
.services-section__item { text-align: center; }
@media (min-width: 640px) { .services-section__item { text-align: left; } }
.services-section__icon { width: 3rem; height: 3rem; border-radius: 999px; border: 1px solid var(--color-border); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; margin-left: auto; margin-right: auto; color: var(--color-primary); }
@media (min-width: 640px) { .services-section__icon { margin-left: 0; margin-right: 0; } }
.services-section__title { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.5rem; }
.services-section__desc { font-size: 0.875rem; color: var(--color-muted-foreground); line-height: 1.6; }

/* ---------------------------------------------------------------------
   FAQ / Accordion / Trust badges
   ------------------------------------------------------------------- */
.faq-section { padding: 5rem 0; background-color: var(--color-secondary); }
@media (min-width: 768px) { .faq-section { padding: 7rem 0; } }
.faq-section__container { max-width: 48rem; margin: 0 auto; }

.theme-accordion { width: 100%; }
.theme-accordion__item { border-bottom: 1px solid var(--color-border); }
.theme-accordion__trigger { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 1.25rem 0; font-weight: 600; font-family: var(--font-display); text-align: left; }
.theme-accordion__trigger-inner { display: flex; align-items: center; gap: 0.75rem; }
.theme-accordion__icon { color: var(--color-primary); flex-shrink: 0; }
.theme-accordion__chevron { transition: transform 0.2s ease; flex-shrink: 0; }
.theme-accordion__trigger[aria-expanded="true"] .theme-accordion__chevron { transform: rotate(180deg); }
.theme-accordion__content { overflow: hidden; height: 0; transition: height 0.2s ease; }
.theme-accordion__content-inner { padding: 0 0 1.25rem 0; color: var(--color-muted-foreground); line-height: 1.6; font-family: var(--font-body); }

.trust-badges { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 3rem; padding-top: 3rem; border-top: 1px solid var(--color-border); }
@media (min-width: 640px) { .trust-badges { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.trust-badges__item { display: flex; align-items: flex-start; gap: 1rem; }
.trust-badges__icon { width: 2.5rem; height: 2.5rem; border-radius: 999px; border: 1px solid var(--color-border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 0.125rem; color: var(--color-foreground); }
.trust-badges__title { font-size: 1rem; font-weight: 700; margin-bottom: 0.25rem; }
.trust-badges__desc { font-size: 0.875rem; color: var(--color-muted-foreground); }

/* ---------------------------------------------------------------------
   Contact CTA band
   ------------------------------------------------------------------- */
.cta-band { position: relative; padding: 5rem 0; color: var(--color-accent-foreground); overflow: hidden; }
@media (min-width: 768px) { .cta-band { padding: 7rem 0; } }
.cta-band__media { position: absolute; inset: 0; }
.cta-band__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta-band__scrim { position: absolute; inset: 0; background-color: color-mix(in srgb, var(--color-accent) 80%, transparent); }
.cta-band__inner { position: relative; z-index: 10; text-align: center; max-width: 42rem; margin: 0 auto; }
.cta-band__desc { color: color-mix(in srgb, var(--color-accent-foreground) 70%, transparent); margin-bottom: 2rem; }
.cta-band__actions { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; }
@media (min-width: 640px) { .cta-band__actions { flex-direction: row; } }
.cta-band__meta { margin-top: 2rem; font-size: 0.875rem; color: color-mix(in srgb, var(--color-accent-foreground) 70%, transparent); }
.cta-band__meta a:hover { color: var(--color-accent-foreground); }
.cta-band__meta p { margin-top: 0.125rem; }

/* ---------------------------------------------------------------------
   Single product
   ------------------------------------------------------------------- */
.single-product-main { padding-top: 6rem; padding-bottom: 5rem; }
@media (min-width: 1024px) { .single-product-main { padding-top: 7rem; } }
.single-product__back { padding: 1.5rem 0; }
.theme-back-link { display: inline-flex; align-items: center; font-size: 0.875rem; color: var(--color-muted-foreground); }
.theme-back-link:hover { color: var(--color-foreground); }
.theme-back-link svg { margin-right: 0.5rem; }

.theme-product-layout { display: grid; grid-template-columns: 1fr; gap: 2.5rem; padding-bottom: 5rem; min-width: 0; }
@media (min-width: 1024px) { .theme-product-layout { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.theme-product-gallery, .theme-product-info { min-width: 0; max-width: 100%; }
.theme-product-gallery__main { position: relative; aspect-ratio: 2 / 3; max-width: 24rem; margin: 0 auto 1rem; background-color: var(--color-secondary); overflow: hidden; border-radius: var(--radius); }
.theme-product-thumbnails { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; flex-wrap: wrap; max-width: 100%; }
.theme-product-thumbnails__btn { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border: 2px solid transparent; opacity: 0.6; border-radius: 0.375rem; transition: opacity 0.2s ease, border-color 0.2s ease; }
.theme-product-thumbnails__btn:hover { opacity: 1; }
.theme-product-thumbnails__btn.is-active { border-color: var(--color-primary); opacity: 1; }

.theme-product-info { padding: 0 0 2.5rem; }
@media (min-width: 1024px) { .theme-product-info { padding: 2.5rem 0; } }
.theme-product-info__cat { font-size: 0.75rem; line-height: 1rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--color-muted-foreground); }
.theme-product-info__title.product-title { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; line-height: 1.2; margin-top: 0.5rem; margin-bottom: 1rem; }
@media (min-width: 768px) { .theme-product-info__title.product-title { font-size: 1.875rem; } }
.theme-product-info__price { font-size: 1.5rem; line-height: 1.3334; font-weight: 700; color: var(--color-primary); margin-bottom: 1.5rem; }
.theme-product-info__stock.is-oos { color: var(--color-destructive); font-weight: 600; margin-bottom: 1rem; }
.theme-product-info__desc { color: var(--color-muted-foreground); line-height: 1.625; margin-bottom: 2rem; overflow-wrap: break-word; word-break: break-word; }
.theme-product-info__desc p { margin-bottom: 1em; }

.theme-quantity-wrapper { display: flex; align-items: center; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.theme-quantity-wrapper button { padding: 0.75rem 1rem; transition: background-color 0.2s ease; }
.theme-quantity-wrapper button:hover { background-color: var(--color-secondary); }
.theme-qty-input { width: 3rem; min-width: 48px; text-align: center; font-weight: 600; border: none; background: transparent; appearance: textfield; }
.theme-qty-input::-webkit-outer-spin-button, .theme-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.theme-add-to-cart-area { display: flex; align-items: stretch; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2rem; }
.single-product .single_add_to_cart_button, .theme-add-to-cart-area .theme-btn-primary { flex: 1 1 auto; min-width: 160px; }

.theme-coming-soon-box { margin-bottom: 2rem; padding: 1rem; background-color: var(--color-secondary); border-radius: var(--radius); border: 1px solid var(--color-border); }
.theme-coming-soon-box__title { font-size: 0.875rem; font-weight: 600; font-family: var(--font-display); margin-bottom: 0.25rem; }
.theme-coming-soon-box__note { font-size: 0.875rem; color: var(--color-muted-foreground); }

.theme-product-info__details { border-top: 1px solid var(--color-border); padding-top: 2rem; }
.theme-product-info__details-heading { font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }
.theme-product-info__details-list ul { display: flex; flex-direction: column; gap: 0.5rem; }
.theme-product-info__details-list li { font-size: 0.875rem; color: var(--color-muted-foreground); display: flex; align-items: flex-start; overflow-wrap: break-word; word-break: break-word; }
.theme-product-info__details-list li::before { content: '\2713'; color: var(--color-primary); margin-right: 0.75rem; flex-shrink: 0; font-weight: 700; }

/* Add-to-cart button style overrides (Section 11.4.1) */
.single_add_to_cart_button.button,
.add_to_cart_button.button,
a.single_add_to_cart_button,
a.add_to_cart_button {
	background-color: var(--color-primary) !important;
	color: var(--color-primary-foreground) !important;
	border: none !important;
	border-radius: var(--btn-radius) !important;
	min-height: var(--btn-height) !important;
	padding: var(--btn-padding) !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-family: var(--font-body) !important;
	font-size: var(--btn-font-size) !important;
	font-weight: var(--btn-font-weight) !important;
	letter-spacing: var(--btn-letter-spacing) !important;
	text-transform: var(--btn-text-transform) !important;
	cursor: pointer !important;
	transition: opacity 0.2s ease !important;
}
.single_add_to_cart_button.button:hover,
.add_to_cart_button.button:hover {
	opacity: 0.85 !important;
	background-color: var(--color-primary) !important;
	color: var(--color-primary-foreground) !important;
}
.single_add_to_cart_button.button:disabled,
.single_add_to_cart_button.button.disabled,
.add_to_cart_button.button:disabled,
.add_to_cart_button.button.disabled {
	cursor: not-allowed !important;
	opacity: 0.4 !important;
	pointer-events: none !important;
}
.single_add_to_cart_button.button:disabled:hover,
.single_add_to_cart_button.button.disabled:hover,
.add_to_cart_button.button:disabled:hover,
.add_to_cart_button.button.disabled:hover {
	opacity: 0.4 !important;
	background-color: var(--color-primary) !important;
}
.ajax_add_to_cart.theme-btn-loading { opacity: 0.6 !important; pointer-events: none !important; cursor: wait !important; }
.single-product .single_add_to_cart_button.loading::after,
.ajax_add_to_cart.loading::after { display: none !important; }

.woocommerce-page a.added_to_cart.wc-forward,
.single-product a.added_to_cart.wc-forward,
body a.added_to_cart.wc-forward { display: none !important; }

.single-product .variations.shop_attributes tbody,
.single-product .variations tbody tr,
.single-product .variations tbody td { display: block; width: 100%; }
.single-product .variations tbody td.label { padding-bottom: 0.25rem; }
.single-product .variations tbody td.value { padding-top: 0; }
.theme-attr-select-hidden { display: none !important; }

.single-product .woocommerce-message,
.single-product .woocommerce-info { display: none; }
#theme-cart-drawer .woocommerce-message { display: none; }

/* ---------------------------------------------------------------------
   Generic page title (base rule — Section 6/9 fix: this class previously
   had no font-size anywhere except the archive-specific override below,
   so on Checkout/Cart/My Account/generic pages it fell through to the
   browser default 16px/24px). Literata 36px/40px matches the Checkout H1
   target and is shared by Cart/My Account per Section 13.7.
   ------------------------------------------------------------------- */
.page-title { font-family: var(--font-display); font-weight: 700; font-size: 1.875rem; line-height: 1.111; margin-bottom: 1.5rem; }
@media (min-width: 768px) { .page-title { font-size: 2.25rem; line-height: 1.111; } }

/* ---------------------------------------------------------------------
   Archive / shop
   ------------------------------------------------------------------- */
.archive-product-main { padding-top: 6rem; padding-bottom: 5rem; }
.theme-page-container { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.archive-product-main .page-title { font-size: 1.875rem; font-weight: 700; margin-bottom: 2rem; }
.theme-empty-state { text-align: center; padding: 4rem 0; color: var(--color-muted-foreground); }

/* Section 4 (Revisión 6) — semantic ul.products > li.product grid, defensive:
   targets the WooCommerce-core body classes (always present regardless of
   which archive-product.php ultimately rendered the page) IN ADDITION TO
   the theme's own .archive-product-main wrapper, so the grid still applies
   even if that wrapper were ever absent. */
body.woocommerce.post-type-archive-product ul.products,
body.woocommerce.tax-product_cat ul.products,
.archive-product-main ul.products {
	display: grid;
	list-style: none;
	margin: 0 0 2rem;
	padding: 0;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem;
}
@media (min-width: 768px) {
	body.woocommerce.post-type-archive-product ul.products,
	body.woocommerce.tax-product_cat ul.products,
	.archive-product-main ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
@media (min-width: 1024px) {
	body.woocommerce.post-type-archive-product ul.products,
	body.woocommerce.tax-product_cat ul.products,
	.archive-product-main ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}
body.woocommerce ul.products li.product,
.archive-product-main ul.products li.product { margin: 0; list-style: none; }

/* ---------------------------------------------------------------------
   Cart drawer
   ------------------------------------------------------------------- */
#theme-cart-overlay { position: fixed; inset: 0; background-color: color-mix(in srgb, var(--color-foreground) 20%, transparent); z-index: 50; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
body.cart-open #theme-cart-overlay { opacity: 1; pointer-events: auto; }

#theme-cart-drawer {
	position: fixed; top: 0; right: 0; height: 100%; width: 100%; max-width: 28rem;
	background-color: var(--color-background); z-index: 51; box-shadow: var(--shadow-elevated);
	display: flex; flex-direction: column;
	transform: translateX(100%); transition: transform 0.35s var(--transition-smooth);
	pointer-events: none;
}
body.cart-open #theme-cart-drawer { transform: translateX(0); pointer-events: auto; }
#theme-cart-drawer.is-updating { opacity: 0.6; pointer-events: none; }

.theme-cart-drawer__header { display: flex; align-items: center; justify-content: space-between; padding: 1.5rem; border-bottom: 1px solid var(--color-border); }
.theme-cart-drawer__title { font-size: 1.125rem; font-weight: 700; }
.theme-cart-drawer__close:hover { opacity: 0.6; }
.theme-cart-drawer__empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem; text-align: center; }
.theme-cart-drawer__empty-icon { color: var(--color-muted-foreground); margin-bottom: 1rem; }
.theme-cart-drawer__empty-text { color: var(--color-muted-foreground); margin-bottom: 1.5rem; }
.theme-cart-drawer__items { flex: 1; overflow: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 1.5rem; }
.theme-cart-drawer__item { display: flex; gap: 1rem; }
.theme-cart-drawer__item-img { position: relative; width: 5rem; height: 6rem; flex-shrink: 0; background-color: var(--color-secondary); overflow: hidden; display: block; }
#theme-cart-drawer .theme-cart-drawer__item-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.theme-cart-drawer__item-info { flex: 1; min-width: 0; }
.theme-cart-drawer__item-name { font-size: 0.875rem; font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-cart-drawer__item-name:hover { opacity: 0.7; }
.theme-cart-drawer__item-price, .theme-cart-drawer__item-variation { font-size: 0.875rem; color: var(--color-muted-foreground); margin-top: 0.125rem; }
.theme-cart-drawer__item-controls { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.75rem; }
.theme-cart-drawer__qty-btn { padding: 0.25rem; border-radius: 0.25rem; transition: background-color 0.2s ease; }
.theme-cart-drawer__qty-btn:hover { background-color: var(--color-secondary); }
.theme-cart-drawer__qty { font-size: 0.875rem; width: 1.5rem; text-align: center; }
.theme-cart-drawer__remove { margin-left: auto; font-size: 0.875rem; color: var(--color-muted-foreground); }
.theme-cart-drawer__remove:hover { color: var(--color-foreground); }
.theme-cart-drawer__footer { padding: 1.5rem; border-top: 1px solid var(--color-border); display: flex; flex-direction: column; gap: 1rem; }
.theme-cart-drawer__subtotal-row { display: flex; justify-content: space-between; font-size: 0.875rem; }
.theme-cart-drawer__subtotal-value { font-weight: 500; }
.theme-cart-drawer__shipping-note { font-size: 0.875rem; color: var(--color-muted-foreground); }
.theme-cart-drawer__checkout-btn { width: 100%; }
.theme-cart-drawer__empty-btn { width: 100%; font-size: 0.875rem; height: 2.25rem; padding: 0 0.75rem; }

/* ---------------------------------------------------------------------
   Contact modal
   ------------------------------------------------------------------- */
#theme-contact-modal-overlay { position: fixed; inset: 0; background-color: rgba(0,0,0,0.8); z-index: 60; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
body.contact-modal-open #theme-contact-modal-overlay { opacity: 1; pointer-events: auto; }
#theme-contact-modal {
	position: fixed; left: 50%; top: 50%; z-index: 61; width: 100%; max-width: 32rem;
	transform: translate(-50%, -48%) scale(0.95); opacity: 0; pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}
body.contact-modal-open #theme-contact-modal { opacity: 1; transform: translate(-50%, -50%) scale(1); pointer-events: auto; }
.theme-modal__panel { background-color: var(--color-background); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-elevated); padding: 1.5rem; max-height: 90vh; overflow-y: auto; position: relative; }
.theme-modal__close { position: absolute; right: 1rem; top: 1rem; opacity: 0.7; }
.theme-modal__close:hover { opacity: 1; }
.theme-modal__title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; padding-right: 1.5rem; }
.theme-modal__description { color: var(--color-muted-foreground); margin-bottom: 1rem; }
.theme-modal__email { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--color-muted-foreground); margin-bottom: 1.25rem; }
.theme-modal__email:hover { color: var(--color-foreground); }
.theme-modal__form { display: flex; flex-direction: column; gap: 1rem; }
.theme-modal__form-row { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .theme-modal__form-row { grid-template-columns: 1fr 1fr; } }
.theme-modal__field label { font-size: 0.875rem; font-weight: 500; margin-bottom: 0.375rem; display: block; }
.theme-modal__field input, .theme-modal__field textarea {
	width: 100%; padding: 0.625rem 0.75rem; background-color: var(--color-background);
	border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 0.875rem;
	resize: none;
}
.theme-modal__field input:focus, .theme-modal__field textarea:focus { outline: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 50%, transparent); }
.theme-modal__error { color: var(--color-destructive); font-size: 0.875rem; }
.theme-modal__form-actions { display: flex; justify-content: flex-end; }
.theme-modal__success { text-align: center; padding: 2rem 0; }
.theme-modal__success-icon { width: 3.5rem; height: 3.5rem; background-color: var(--color-primary); color: var(--color-primary-foreground); border-radius: 999px; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.theme-modal__success h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.theme-modal__success p { color: var(--color-muted-foreground); font-size: 0.875rem; }

/* ---------------------------------------------------------------------
   Announcement popup
   ------------------------------------------------------------------- */
#theme-announcement-popup {
	position: fixed; bottom: 1.5rem; left: 1rem; right: 1rem; z-index: 55;
	background-color: var(--color-accent); color: var(--color-accent-foreground);
	border-radius: 0.75rem; box-shadow: var(--shadow-elevated); padding: 1.25rem;
	border: 1px solid color-mix(in srgb, var(--color-accent-foreground) 10%, transparent);
	transform: translateY(100px); opacity: 0; transition: transform 0.4s var(--transition-smooth), opacity 0.4s var(--transition-smooth);
}
@media (min-width: 640px) { #theme-announcement-popup { left: auto; right: 1.5rem; max-width: 24rem; } }
#theme-announcement-popup.is-visible { transform: translateY(0); opacity: 1; }
.theme-announcement__close { position: absolute; top: 0.75rem; right: 0.75rem; color: color-mix(in srgb, var(--color-accent-foreground) 40%, transparent); }
.theme-announcement__close:hover { color: var(--color-accent-foreground); }
.theme-announcement__title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: 0.75rem; }
.theme-announcement__items { display: flex; flex-direction: column; gap: 0.5rem; }
.theme-announcement__item { display: flex; align-items: center; gap: 0.625rem; }
.theme-announcement__item svg { color: var(--color-primary); flex-shrink: 0; }
.theme-announcement__item span { font-size: 0.875rem; color: color-mix(in srgb, var(--color-accent-foreground) 70%, transparent); }

/* ---------------------------------------------------------------------
   404
   ------------------------------------------------------------------- */
.theme-404-main { min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 6rem 0; }
.theme-404__inner { text-align: center; }
.theme-404__code { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; }
.theme-404__message { font-size: 1.25rem; color: var(--color-muted-foreground); margin-bottom: 1rem; }
.theme-404__link { color: var(--color-primary); text-decoration: underline; }
.theme-404__link:hover { opacity: 0.9; }

/* ---------------------------------------------------------------------
   Classic Checkout (Plan de recuperación, Sección 3.1) — styles the
   markup produced by woocommerce/checkout/form-checkout.php and
   woocommerce/checkout/review-order.php: form.theme-checkout-columns >
   .theme-checkout-form-col (#customer_details + woocommerce_checkout_payment())
   + .theme-checkout-summary-col (#order_review).
   ------------------------------------------------------------------- */
body.woocommerce-checkout .entry-content { width: 100%; }
body.woocommerce-checkout .page-title { max-width: var(--container-max); margin: 0 auto 1.5rem; }
body.woocommerce-checkout h2, body.woocommerce-checkout h3 { font-family: var(--font-display); font-weight: 700; }

body.woocommerce-checkout form.checkout.theme-checkout-columns {
	display: block;
}
@media (min-width: 1024px) {
	body.woocommerce-checkout form.checkout.theme-checkout-columns {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 4rem;
		align-items: start;
	}
	body.woocommerce-checkout .theme-checkout-summary-col { order: 1; }
	body.woocommerce-checkout .theme-checkout-form-col { order: 2; }
}
body.woocommerce-checkout .theme-checkout-form-col,
body.woocommerce-checkout .theme-checkout-summary-col { min-width: 0; }

body.woocommerce-checkout .theme-checkout-heading {
	font-size: 1.25rem; font-weight: 700; margin: 2rem 0 1.25rem;
}
body.woocommerce-checkout .theme-checkout-form-col > #customer_details > .theme-checkout-heading:first-child { margin-top: 0; }

body.woocommerce-checkout #customer_details { display: block; }
body.woocommerce-checkout .theme-checkout-field-group { margin-bottom: 0.5rem; }
body.woocommerce-checkout #customer_details .form-row { margin-bottom: 1rem; }
body.woocommerce-checkout .theme-field-half { display: inline-block; width: calc(50% - 0.5rem); }
body.woocommerce-checkout .theme-field-half:nth-of-type(odd) { margin-right: 1rem; }
body.woocommerce-checkout .theme-field-third { display: inline-block; width: calc(33.333% - 0.667rem); margin-right: 1rem; }
body.woocommerce-checkout .theme-field-third:last-of-type { margin-right: 0; }
body.woocommerce-checkout .theme-field-full,
body.woocommerce-checkout .form-row-wide { display: block; width: 100%; }

body.woocommerce-checkout .form-row label.screen-reader-text {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
body.woocommerce-checkout .input-text,
body.woocommerce-checkout select,
body.woocommerce-checkout textarea {
	width: 100%; height: 46px; padding: 12px 16px; font-size: 0.875rem; line-height: 1.4286;
	font-family: var(--font-body); border: 1px solid var(--color-border); border-radius: var(--radius);
	background-color: var(--color-background); color: var(--color-foreground); box-sizing: border-box;
}
body.woocommerce-checkout textarea { height: auto; min-height: 86px; resize: vertical; }
body.woocommerce-checkout #order_comments { width: 100%; max-width: 36rem; min-height: 86px; }
body.woocommerce-checkout .input-text:focus,
body.woocommerce-checkout select:focus,
body.woocommerce-checkout textarea:focus {
	outline: none; border-color: var(--color-primary);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 30%, transparent);
}

body.woocommerce-checkout #order_review_heading { font-size: 2.25rem; line-height: 1.111; font-family: var(--font-display); font-weight: 700; margin-bottom: 1.5rem; }
body.woocommerce-checkout #order_review,
body.woocommerce-checkout .woocommerce-checkout-review-order { background-color: var(--color-secondary); border-radius: var(--radius); padding: 2rem; }
body.woocommerce-checkout .woocommerce-checkout-review-order-table { width: 100%; border-collapse: collapse; }
body.woocommerce-checkout .woocommerce-checkout-review-order-table th,
body.woocommerce-checkout .woocommerce-checkout-review-order-table td { padding: 0.75rem 0; border-bottom: 1px solid var(--color-border); text-align: left; }
body.woocommerce-checkout .woocommerce-checkout-review-order-table .product-total,
body.woocommerce-checkout .woocommerce-checkout-review-order-table td.product-total { text-align: right; }
body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot tr:last-child th,
body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot tr:last-child td { border-bottom: none; }
body.woocommerce-checkout .theme-cart-empty-row td { padding-top: 1.25rem; border-bottom: none; }
body.woocommerce-checkout .theme-cart-empty-btn { width: 100%; }

/* Order Summary line items — thumbnail + quantity stepper + remove
   (reuses the exact data-cart-* attributes/endpoint of the drawer). */
body.woocommerce-checkout .theme-order-item { display: flex; gap: 0.75rem; align-items: flex-start; }
body.woocommerce-checkout .theme-order-item__thumb { flex-shrink: 0; width: 3.5rem; }
body.woocommerce-checkout .theme-order-item__thumb img {
	width: 3.5rem; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--radius); display: block;
}
body.woocommerce-checkout .theme-order-item__info { min-width: 0; flex: 1; }
body.woocommerce-checkout .theme-order-item__name { font-weight: 500; color: var(--color-foreground); }
body.woocommerce-checkout .theme-order-item__controls {
	display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem;
}
body.woocommerce-checkout .theme-order-item__qty-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 1.5rem; height: 1.5rem; border: 1px solid var(--color-border); border-radius: 999px;
	background: transparent; color: var(--color-foreground); cursor: pointer; transition: background-color 0.2s ease;
}
body.woocommerce-checkout .theme-order-item__qty-btn:hover { background-color: var(--color-secondary); }
body.woocommerce-checkout .theme-order-item__qty { font-size: 0.875rem; min-width: 1.25rem; text-align: center; }
body.woocommerce-checkout .theme-order-item__remove {
	background: transparent; border: none; color: var(--color-muted-foreground);
	font-size: 0.75rem; text-decoration: underline; cursor: pointer; margin-left: 0.5rem;
}
body.woocommerce-checkout .theme-order-item__remove:hover { color: var(--color-destructive); }
/* [data-cart-qty-update].is-pending / [data-cart-remove].is-pending below
   already cover these buttons generically — no page-scoped duplicate needed. */
#order_review.is-updating { opacity: 0.6; pointer-events: none; }

body.woocommerce-checkout .woocommerce-checkout-payment { margin-top: 2rem; }
body.woocommerce-checkout ul.payment_methods { list-style: none; margin: 0 0 1rem; padding: 0; }
body.woocommerce-checkout ul.payment_methods li { padding: 0.75rem 0; border-bottom: 1px solid var(--color-border); }
body.woocommerce-checkout #place_order,
body.woocommerce-checkout .wc-proceed-to-checkout .checkout-button {
	width: 100%; height: 44px; display: inline-flex; align-items: center; justify-content: center;
	background-color: var(--color-primary) !important; color: var(--color-primary-foreground) !important;
	border: none !important; border-radius: var(--btn-radius) !important; font-weight: 700 !important;
	text-transform: none !important; font-family: var(--font-body); cursor: pointer;
	transition: opacity 0.2s ease;
}
body.woocommerce-checkout #place_order:hover { opacity: 0.9; }
body.woocommerce-checkout .woocommerce-privacy-policy-text,
body.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
	margin-top: 1rem; font-size: 0.75rem; color: var(--color-muted-foreground);
}
body.woocommerce-checkout .woocommerce-form-login-toggle,
body.woocommerce-checkout .woocommerce-form-register { font-size: 0.8125rem; color: var(--color-muted-foreground); }

/* ---------------------------------------------------------------------
   Thank-you page
   ------------------------------------------------------------------- */
body.theme-thankyou-page { overflow-x: hidden; }
body.theme-thankyou-page .theme-thankyou { max-width: var(--container-max); margin: 0 auto; padding: 2rem 1.25rem 5rem; }
body.theme-thankyou-page .woocommerce-order-details table { width: 100%; table-layout: fixed; }
body.theme-thankyou-page .woocommerce-order h2,
body.theme-thankyou-page .woocommerce-order-details__title { font-family: var(--font-display); padding: 0 0 1rem 0; }
body.theme-thankyou-page .woocommerce-order-details tfoot th { text-align: left; }
body.theme-thankyou-page .woocommerce-order-details tfoot td { text-align: right; }
@media (min-width: 768px) {
	body.theme-thankyou-page .woocommerce-customer-details { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
	body.theme-thankyou-page .woocommerce-customer-details address { min-width: 0; }
}

/* ---------------------------------------------------------------------
   Cart / My Account width parity (Section 13.7)
   ------------------------------------------------------------------- */
body.woocommerce-cart .theme-page-container,
body.woocommerce-account .theme-page-container { max-width: var(--container-max); }

/* ---------------------------------------------------------------------
   Classic Cart page (Plan Revisión 6, Sección 13) — cart.php is NOT
   overridden; all of this is CSS-only styling of WooCommerce's own
   default classic cart template + the theme's own woocommerce_cart_actions
   "Empty Cart" button.
   ------------------------------------------------------------------- */
body.woocommerce-cart .woocommerce-cart-form { margin-bottom: 2rem; }
body.woocommerce-cart table.shop_table.cart {
	width: 100%; border-collapse: collapse; margin-bottom: 2rem;
}
body.woocommerce-cart table.shop_table.cart thead th {
	text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
	color: var(--color-muted-foreground); padding: 0.75rem 0.5rem; border-bottom: 1px solid var(--color-border);
}
body.woocommerce-cart table.shop_table.cart tbody td {
	padding: 1rem 0.5rem; border-bottom: 1px solid var(--color-border); vertical-align: middle;
}
body.woocommerce-cart table.shop_table.cart .product-remove { width: 2.5rem; text-align: center; }
body.woocommerce-cart table.shop_table.cart .product-remove a.remove {
	display: inline-flex; align-items: center; justify-content: center;
	width: 1.75rem; height: 1.75rem; border-radius: 999px; font-size: 1.125rem; line-height: 1;
	color: var(--color-muted-foreground) !important; background: transparent !important; text-decoration: none;
	transition: color 0.2s ease, background-color 0.2s ease;
}
body.woocommerce-cart table.shop_table.cart .product-remove a.remove:hover {
	color: var(--color-destructive) !important; background-color: var(--color-secondary) !important;
}
body.woocommerce-cart table.shop_table.cart .product-thumbnail img {
	width: 4.5rem; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--radius); display: block;
}
body.woocommerce-cart table.shop_table.cart .product-name a { font-weight: 500; color: var(--color-foreground); }
body.woocommerce-cart table.shop_table.cart .product-name a:hover { color: var(--color-primary); }
body.woocommerce-cart table.shop_table.cart .product-price,
body.woocommerce-cart table.shop_table.cart .product-subtotal { font-weight: 600; white-space: nowrap; }
body.woocommerce-cart table.shop_table.cart .quantity { display: inline-flex; }
body.woocommerce-cart table.shop_table.cart input.qty {
	width: 4rem; height: 2.75rem; padding: 0 0.5rem; text-align: center;
	border: 1px solid var(--color-border); border-radius: var(--radius);
	background-color: var(--color-background); color: var(--color-foreground); font-size: 0.875rem;
}
body.woocommerce-cart table.shop_table.cart input.qty:focus {
	outline: none; border-color: var(--color-primary);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 30%, transparent);
}

body.woocommerce-cart .coupon { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
body.woocommerce-cart .coupon .input-text {
	height: 2.75rem; padding: 0 1rem; border: 1px solid var(--color-border); border-radius: var(--radius);
	background-color: var(--color-background); color: var(--color-foreground); font-size: 0.875rem;
}
body.woocommerce-cart button[name="apply_coupon"],
body.woocommerce-cart button[name="update_cart"],
body.woocommerce-cart .theme-cart-empty-btn {
	height: 2.75rem; padding: 0 1.5rem; border-radius: var(--btn-radius);
	background-color: transparent; border: 1px solid var(--color-border); color: var(--color-foreground);
	font-weight: 600; font-size: 0.875rem; cursor: pointer; transition: background-color 0.2s ease;
}
body.woocommerce-cart button[name="apply_coupon"]:hover,
body.woocommerce-cart button[name="update_cart"]:hover,
body.woocommerce-cart .theme-cart-empty-btn:hover { background-color: var(--color-secondary); }
body.woocommerce-cart button[name="apply_coupon"]:disabled,
body.woocommerce-cart button[name="update_cart"]:disabled { cursor: not-allowed; opacity: 0.5; }
body.woocommerce-cart .theme-cart-actions-row { margin-top: 1rem; }

body.woocommerce-cart .cart-collaterals { margin-top: 2rem; }
@media (min-width: 1024px) {
	body.woocommerce-cart .cart-collaterals { display: flex; justify-content: flex-end; }
}
body.woocommerce-cart .cart_totals {
	background-color: var(--color-secondary); border-radius: var(--radius); padding: 2rem;
	width: 100%;
}
@media (min-width: 1024px) { body.woocommerce-cart .cart_totals { max-width: 24rem; } }
body.woocommerce-cart .cart_totals h2 { font-size: 1.25rem; margin-bottom: 1rem; }
body.woocommerce-cart .cart_totals table { width: 100%; border-collapse: collapse; }
body.woocommerce-cart .cart_totals table th,
body.woocommerce-cart .cart_totals table td { padding: 0.6rem 0; border-bottom: 1px solid var(--color-border); text-align: left; }
body.woocommerce-cart .cart_totals table tr:last-child th,
body.woocommerce-cart .cart_totals table tr:last-child td { border-bottom: none; font-weight: 700; }
body.woocommerce-cart .cart_totals table td { text-align: right; }
body.woocommerce-cart .wc-proceed-to-checkout { margin-top: 1.5rem; }
body.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
	display: inline-flex; align-items: center; justify-content: center; width: 100%;
	height: 44px; background-color: var(--color-primary) !important; color: var(--color-primary-foreground) !important;
	border-radius: var(--btn-radius) !important; font-weight: 700 !important; text-decoration: none !important;
	text-transform: none !important;
}
body.woocommerce-cart .wc-proceed-to-checkout .checkout-button:hover { opacity: 0.9; }

/* Empty-cart state (native message + "Return to shop" link) */
body.woocommerce-cart .cart-empty {
	text-align: center; padding: 3rem 1rem; color: var(--color-muted-foreground); font-size: 1rem;
}
body.woocommerce-cart .wc-empty-cart-message ~ p.return-to-shop,
body.woocommerce-cart p.return-to-shop { text-align: center; margin-top: 1rem; }
body.woocommerce-cart p.return-to-shop .button {
	display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 2rem;
	background-color: var(--color-primary) !important; color: var(--color-primary-foreground) !important;
	border-radius: var(--btn-radius) !important; font-weight: 700 !important; text-decoration: none !important;
}

/* Mobile: single column, no horizontal overflow at 375px */
@media (max-width: 767px) {
	body.woocommerce-cart table.shop_table.cart,
	body.woocommerce-cart table.shop_table.cart thead,
	body.woocommerce-cart table.shop_table.cart tbody,
	body.woocommerce-cart table.shop_table.cart tr { display: block; width: 100%; }
	body.woocommerce-cart table.shop_table.cart thead { display: none; }
	body.woocommerce-cart table.shop_table.cart tr {
		display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding: 1rem 0;
		border-bottom: 1px solid var(--color-border);
	}
	body.woocommerce-cart table.shop_table.cart td { display: flex; align-items: center; border-bottom: none; padding: 0; flex: 1 1 auto; min-width: 0; }
	body.woocommerce-cart table.shop_table.cart .product-thumbnail { flex: 0 0 auto; }
	body.woocommerce-cart .cart_totals,
	body.woocommerce-cart .coupon { max-width: 100%; }
}

/* ---------------------------------------------------------------------
   WooCommerce notices (Cart + Checkout) — no unstyled browser bullets.
   The existing context-scoped hides (.single-product, #theme-cart-drawer)
   above are unaffected; this adds POSITIVE styling everywhere else these
   notices can legitimately appear (Cart, Checkout, My Account).
   ------------------------------------------------------------------- */
.woocommerce-error, .woocommerce-message, .woocommerce-info {
	list-style: none; margin: 0 0 1.5rem; padding: 1rem 1.25rem; border-radius: var(--radius);
	border-left: 4px solid var(--color-primary); background-color: var(--color-secondary);
	color: var(--color-foreground); font-size: 0.875rem; line-height: 1.5;
}
.woocommerce-error { border-left-color: var(--color-destructive); }
.woocommerce-error li, .woocommerce-message li, .woocommerce-info li { list-style: none; margin: 0; }

/* ---------------------------------------------------------------------
   Pending/mutation-lock state (Plan Revisión 6, Sección 14) — applied to
   the specific control that was clicked while its AJAX request is
   in-flight, in addition to the whole-drawer .is-updating lock.
   ------------------------------------------------------------------- */
[data-cart-qty-update].is-pending,
[data-cart-remove].is-pending,
[data-cart-empty].is-pending {
	opacity: 0.5; pointer-events: none; cursor: wait;
}
