/*
Theme Name: CUBOX v2
Theme URI: https://cubox.gt
Author: CUBOX
Description: Tema de bloques para CUBOX Guatemala: casillero en Miami, compras por internet, CUBOX te lo compra y carga aérea y marítima. Incluye carrusel de tiendas, preguntas frecuentes, plantillas de página y contenedor con estilo de marca para herramientas HTML como el cotizador.
Version: 2.1.0
Requires at least: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cubox-v2
*/

/* ============ Base ============ */
body { -webkit-font-smoothing: antialiased; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
[id] { scroll-margin-top: 110px; }
a:focus-visible, .wp-element-button:focus-visible, button:focus-visible, summary:focus-visible {
	outline: 3px solid var(--wp--preset--color--oro); outline-offset: 3px; border-radius: 4px;
}
.cubox-section {
	padding-block: clamp(60px, 8vw, 112px);
	padding-inline: max(clamp(20px, 5vw, 64px), calc((100% - 1200px) / 2));
}
.cubox-section > * { max-width: 100%; }
.cubox-lede { font-size: 1.15rem; max-width: 62ch; }
.cubox-section > h2 { max-width: 22ch; }
.cubox-section > h2 + .cubox-lede { margin-top: 12px; }

/* ============ Top bar ============ */
.cubox-topbar { background: var(--wp--preset--color--tinta); padding: 8px clamp(20px, 5vw, 64px); font-size: .85rem; }
.cubox-topbar__inner { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; justify-content: space-between; }
.cubox-topbar p { margin: 0; color: #fff; }
.cubox-topbar a { color: #fff; text-decoration: none; }
.cubox-topbar a:hover { text-decoration: underline; }
@media (max-width: 700px) { .cubox-topbar { display: none; } }

/* ============ Header ============ */
.cubox-header-wrap { position: sticky; top: 0; z-index: 60; }
.admin-bar .cubox-header-wrap { top: 32px; }
@media (max-width: 782px) { .admin-bar .cubox-header-wrap { top: 46px; } }
@media (max-width: 600px) { .admin-bar .cubox-header-wrap { top: 0; } }
.cubox-header { background: #fff; padding: 12px clamp(20px, 5vw, 64px); border-bottom: 1px solid rgba(22,50,79,.08); transition: box-shadow .2s ease; }
.cubox-header-wrap.is-scrolled .cubox-header { box-shadow: 0 6px 24px rgba(22,50,79,.10); }
.cubox-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 1200px; margin: 0 auto; }
.cubox-logo { margin: 0 !important; }
.cubox-logo img { width: 148px; height: auto; display: block; }
.cubox-header .wp-block-navigation { font-weight: 600; font-size: .95rem; column-gap: 26px; }
.cubox-header .wp-block-navigation a:hover { color: var(--wp--preset--color--azul); }
.cubox-header__actions { display: flex; align-items: center; gap: 22px; }
@media (max-width: 980px) { .cubox-header__cta { display: none; } }

/* ============ Hero ============ */
.cubox-hero { margin: 0 !important; gap: 0 !important; }
.cubox-hero > .wp-block-column { margin: 0 !important; }
.cubox-hero__text { padding: clamp(44px, 6vw, 96px) clamp(20px, 5vw, 72px); display: flex; flex-direction: column; justify-content: center; }
.cubox-hero__text > * { max-width: 34rem; }
.cubox-hero h1 { font-size: clamp(2.5rem, 5.2vw, 4.3rem); line-height: .98; letter-spacing: -.045em; margin: 0 0 20px; }
.cubox-hero .cubox-lede { margin: 0; }
.cubox-hero .wp-block-buttons { margin-top: 30px; }
.cubox-hero__photo { margin: 0 !important; height: 100%; }
.cubox-hero__photo img { width: 100%; height: 100%; min-height: 340px; object-fit: cover; object-position: 40% 60%; display: block; }
.cubox-hero__trust { margin-top: 28px !important; font-size: .95rem; font-weight: 600; display: flex; flex-wrap: wrap; gap: 8px 26px; }
.cubox-hero__trust span { padding-left: 26px; background: url("assets/images/cubo-mini.svg") left center / 18px no-repeat; }
@media (max-width: 781px) {
	.cubox-hero__photo-col { order: -1; }
	.cubox-hero__photo img { min-height: 230px; max-height: 300px; }
}

/* ============ Quick actions ============ */
.cubox-actions { padding-top: clamp(40px, 5vw, 64px); padding-bottom: 0; }
.cubox-actions .wp-block-columns { gap: 18px; }
.cubox-action {
	background: #fff; border: 1px solid rgba(22,50,79,.12); border-radius: 14px;
	padding: 24px 22px; position: relative; transition: transform .15s ease, border-color .15s ease;
}
.cubox-action:hover { border-color: var(--wp--preset--color--azul); transform: translateY(-2px); }
.cubox-action h3 { font-size: 1.05rem; margin: 0 0 6px; }
.cubox-action p { margin: 0; font-size: .92rem; color: rgba(22,50,79,.72); }
.cubox-action h3 a { text-decoration: none; color: inherit; }
.cubox-action h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }

/* ============ Services ============ */
.cubox-services .wp-block-columns { gap: 24px; margin-top: 44px; }
.cubox-card { background: #fff; border-radius: 4px 4px 16px 16px; padding: 30px 30px 32px; border-top: 10px solid var(--wp--preset--color--azul); align-self: stretch; }
.cubox-card--celeste { border-top-color: var(--wp--preset--color--celeste); }
.cubox-card--oro { border-top-color: var(--wp--preset--color--oro); }
.cubox-card .wp-block-image { margin: 0 0 14px !important; }
.cubox-card .wp-block-image img { width: 54px; height: 54px; }
.cubox-card h3 { font-size: 1.35rem; margin: 0 0 10px; }
.cubox-card p { margin: 0 0 16px; }
.cubox-card .wp-block-buttons { margin: 0; }
.cubox-card .wp-block-button__link { background: transparent; color: var(--wp--preset--color--azul); padding: 0; font-weight: 600; border-radius: 0; text-decoration: underline; }
.cubox-card .wp-block-button__link:hover { background: transparent; color: var(--wp--preset--color--tinta); }

/* ============ Steps ============ */
.cubox-steps { counter-reset: paso; }
.cubox-steps .wp-block-columns { gap: 40px; margin-top: 44px; }
.cubox-step { counter-increment: paso; border-top: 2px solid rgba(255,255,255,.35); padding-top: 22px; }
.cubox-step::before { content: counter(paso); display: block; font-weight: 800; font-size: 3.4rem; line-height: 1; letter-spacing: -.04em; color: var(--wp--preset--color--oro); margin-bottom: 14px; }
.cubox-step h3 { color: #fff; font-size: 1.25rem; margin: 0 0 10px; }
.cubox-steps .wp-block-buttons { margin-top: 52px; }

/* ============ Store slider ============ */
.cubox-slider { position: relative; margin-top: 40px !important; }
.cubox-slider__track {
	display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
	padding: 4px 4px 18px; margin: 0 !important; scrollbar-width: thin;
}
.cubox-slider__track > * { margin: 0 !important; }
.cubox-store {
	flex: 0 0 clamp(160px, 42vw, 220px); scroll-snap-align: start;
	background: #fff; border: 1px solid rgba(22,50,79,.12); border-radius: 14px;
	min-height: 118px; display: flex; align-items: center; justify-content: center;
	padding: 20px; position: relative; text-align: center; transition: border-color .15s ease, transform .15s ease;
}
.cubox-store:hover { border-color: var(--wp--preset--color--celeste); transform: translateY(-2px); }
.cubox-store p { margin: 0; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.cubox-store a { text-decoration: none; color: var(--wp--preset--color--tinta); }
.cubox-store a::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.cubox-store .wp-block-image { margin: 0 !important; }
.cubox-store img { max-height: 54px; width: auto; object-fit: contain; }
.cubox-slider__btn {
	position: absolute; top: 44%; transform: translateY(-50%); z-index: 2;
	width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(22,50,79,.15);
	background: #fff; color: var(--wp--preset--color--tinta); font-size: 1.2rem; line-height: 1;
	cursor: pointer; box-shadow: 0 4px 16px rgba(22,50,79,.12);
}
.cubox-slider__btn:hover { background: var(--wp--preset--color--azul); color: #fff; }
.cubox-slider__btn--prev { left: -12px; }
.cubox-slider__btn--next { right: -12px; }
.cubox-slider__btn[hidden] { display: none; }
@media (max-width: 781px) { .cubox-slider__btn { display: none; } }

/* ============ Benefits ============ */
.cubox-benefits .wp-block-columns { margin-top: 40px; gap: 34px; }
.cubox-benefit + .cubox-benefit { margin-top: 26px; }
.cubox-benefit h3 { font-size: 1.05rem; margin: 0 0 6px; padding-left: 28px; background: url("assets/images/cubo-mini.svg") left 3px / 18px no-repeat; }
.cubox-benefit p { margin: 0; font-size: .95rem; padding-left: 28px; }

/* ============ Buy for you ============ */
.cubox-buy .wp-block-columns { align-items: center; gap: 48px; }
.cubox-buy h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.035em; line-height: 1.05; max-width: 22ch; }
.cubox-buy__cube { margin: 0 !important; }
.cubox-buy__cube img { width: min(220px, 60%); height: auto; display: block; margin: 0 auto; }
@media (max-width: 781px) { .cubox-buy__cube { display: none; } }

/* ============ FAQ ============ */
.cubox-faq__list { max-width: 880px; margin: 32px 0 0; }
.cubox-faq details { border-bottom: 1px solid rgba(22,50,79,.14); }
.cubox-faq summary {
	cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative;
	font-weight: 600; font-size: 1.05rem;
}
.cubox-faq summary::-webkit-details-marker { display: none; }
.cubox-faq summary::after {
	content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
	font-size: 1.6rem; font-weight: 400; color: var(--wp--preset--color--azul); line-height: 1;
}
.cubox-faq details[open] summary::after { content: "–"; }
.cubox-faq details p { margin: 0 0 20px; max-width: 70ch; }

/* ============ Contact ============ */
.cubox-contact .wp-block-columns { gap: 44px; margin-top: 36px; }
.cubox-contact .wp-block-column > *:first-child { margin-top: 0; }
.cubox-contact h3 { font-size: 1.05rem; margin: 26px 0 8px; color: var(--wp--preset--color--azul); }
.cubox-contact p { margin: 0 0 6px; }
.cubox-contact a { color: inherit; }
.cubox-form { background: #fff; border: 1px solid rgba(22,50,79,.12); border-radius: 16px; padding: 28px; }

/* ============ Final CTA ============ */
.cubox-cta { text-align: center; }
.cubox-cta > *, .cubox-cta > h2 { max-width: 760px; margin-left: auto !important; margin-right: auto !important; }
.cubox-cta h2 { font-size: clamp(2rem, 4vw, 3rem); }
.cubox-cta .wp-block-buttons { justify-content: center; margin-top: 28px; }

/* ============ Footer ============ */
.cubox-stripe { display: flex; height: 8px; }
.cubox-stripe span { flex: 1; }
.cubox-footer { background: var(--wp--preset--color--niebla); padding: 56px clamp(20px, 5vw, 64px) 32px; }
.cubox-footer__inner { max-width: 1200px; margin: 0 auto; }
.cubox-footer .wp-block-columns { gap: 36px; }
.cubox-footer h3 { font-size: .95rem; margin: 0 0 10px; }
.cubox-footer p { margin: 0 0 6px; font-size: .92rem; }
.cubox-footer a { color: inherit; }
.cubox-footer__logo { margin: 0 0 12px !important; }
.cubox-footer__logo img { width: 116px; height: auto; display: block; }
.cubox-footer__legal { border-top: 1px solid rgba(22,50,79,.12); margin-top: 32px; padding-top: 18px; font-size: .85rem; }

/* ============ Buttons ============ */
.wp-block-button.is-style-outline > .wp-block-button__link { border: 2px solid currentColor; background: transparent; color: var(--wp--preset--color--tinta); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--tinta); color: #fff; }
.cubox-btn-oro > .wp-block-button__link { background: var(--wp--preset--color--oro); color: var(--wp--preset--color--tinta); }
.cubox-btn-oro > .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--tinta); }
.cubox-btn-light > .wp-block-button__link { background: #fff; color: var(--wp--preset--color--azul); }
.wp-block-button__link { transition: background-color .15s ease, color .15s ease; }

/* ============ Inner pages ============ */


/* ============ Editor tweaks ============ */
.editor-styles-wrapper .cubox-header-wrap { position: static; }


/* ============ Page header band ============ */
.cubox-pagehead {
	background: var(--wp--preset--color--niebla);
	padding-block: clamp(48px, 6vw, 84px) clamp(36px, 4vw, 56px);
	padding-inline: max(clamp(20px, 5vw, 64px), calc((100% - 1200px) / 2));
}
.cubox-pagehead > * { max-width: 100%; }
.cubox-pagehead .wp-block-post-title,
.cubox-pagehead h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); letter-spacing: -.04em; line-height: 1.02; margin: 0; max-width: 20ch; }
.cubox-pagehead .cubox-lede { margin: 14px 0 0; }
.cubox-pagehead__back { font-size: .9rem; font-weight: 600; margin: 0 0 14px; }
.cubox-pagehead__back a { text-decoration: none; }
.cubox-pagehead__back a::before { content: "\2190"; margin-right: 8px; }

/* ============ Page content (prose) ============ */
.cubox-page { padding: clamp(44px, 6vw, 80px) clamp(20px, 5vw, 64px); }
.cubox-page > * { max-width: 100%; }
.cubox-page .wp-block-post-content > * { margin-block: 0 1.1em; }
.cubox-page h2 { margin-top: 1.8em; }
.cubox-page h3 { margin-top: 1.5em; }
.cubox-page ul, .cubox-page ol { padding-left: 1.2em; }
.cubox-page li { margin-bottom: .4em; }
.cubox-page table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.cubox-page th, .cubox-page td { border-bottom: 1px solid rgba(22,50,79,.14); padding: 12px 10px; text-align: left; }
.cubox-page th { font-weight: 700; background: var(--wp--preset--color--niebla); }
.cubox-page blockquote { border-left: 4px solid var(--wp--preset--color--oro); margin: 0 0 1.2em; padding-left: 20px; }
.cubox-page figure img { border-radius: 12px; }
.cubox-page .wp-block-table { overflow-x: auto; }

/* ============ Embedded tools (cotizador, calculadoras, widgets) ============ */
.cubox-tool {
	padding-block: clamp(36px, 5vw, 64px);
	padding-inline: max(clamp(20px, 5vw, 64px), calc((100% - 1000px) / 2));
}
.cubox-tool > * { max-width: 100%; }
.cubox-embed {
	background: #fff; border: 1px solid rgba(22,50,79,.12); border-radius: 18px;
	padding: clamp(22px, 3vw, 36px); box-shadow: 0 10px 40px rgba(22,50,79,.06);
}
.cubox-embed h2, .cubox-embed h3 { margin-top: 0; }
.cubox-embed form { margin: 0; }
.cubox-embed label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.cubox-embed input[type="text"], .cubox-embed input[type="number"], .cubox-embed input[type="email"],
.cubox-embed input[type="tel"], .cubox-embed input[type="search"], .cubox-embed input[type="date"],
.cubox-embed select, .cubox-embed textarea {
	width: 100%; max-width: 100%; box-sizing: border-box;
	font-family: inherit; font-size: 1rem; color: var(--wp--preset--color--tinta);
	background: #fff; border: 1px solid rgba(22,50,79,.24); border-radius: 10px;
	padding: 12px 14px; margin-bottom: 16px;
}
.cubox-embed select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--wp--preset--color--azul) 50%), linear-gradient(135deg, var(--wp--preset--color--azul) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.cubox-embed input:focus, .cubox-embed select:focus, .cubox-embed textarea:focus { outline: none; border-color: var(--wp--preset--color--azul); box-shadow: 0 0 0 3px rgba(9,115,186,.18); }
.cubox-embed button, .cubox-embed input[type="submit"], .cubox-embed input[type="button"], .cubox-embed .boton {
	font-family: inherit; font-weight: 600; font-size: 1rem; cursor: pointer;
	background: var(--wp--preset--color--azul); color: #fff; border: 0; border-radius: 10px;
	padding: .85em 1.6em; transition: background-color .15s ease;
}
.cubox-embed button:hover, .cubox-embed input[type="submit"]:hover, .cubox-embed input[type="button"]:hover { background: var(--wp--preset--color--tinta); }
.cubox-embed table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.cubox-embed th, .cubox-embed td { border-bottom: 1px solid rgba(22,50,79,.14); padding: 10px; text-align: left; }
.cubox-embed th { background: var(--wp--preset--color--niebla); font-weight: 700; }
.cubox-embed .resultado, .cubox-embed output {
	display: block; background: var(--wp--preset--color--niebla); border-radius: 12px;
	padding: 18px 20px; font-weight: 600; margin-top: 8px;
}
.cubox-embed iframe { width: 100%; border: 0; border-radius: 12px; display: block; }
.cubox-tool__note { font-size: .88rem; color: rgba(22,50,79,.7); max-width: 70ch; margin-top: 18px !important; }

/* ============ Archive / search ============ */
.cubox-list .wp-block-post-title { font-size: 1.4rem; margin: 0 0 6px; }
.cubox-list .wp-block-post-date { font-size: .85rem; color: rgba(22,50,79,.65); }
.cubox-list .wp-block-post-template > li { border-bottom: 1px solid rgba(22,50,79,.12); padding-bottom: 28px; margin-bottom: 28px; }
