/*
Theme Name: MargaHarinas
Theme URI: https://margaharinas.com.ar
Author: MargaHarinas
Description: Tema de bloques de MargaHarinas: materias primas para panadería directo de fábrica, con botones de WhatsApp, catálogo por fábrica y armado de pedido.
Version: 1.1.0
Requires at least: 6.5
Tested up to: 7.0
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: margaharinas
*/

:root {
	--mh-violeta: #40283A;
	--mh-naranja: #C74F39;
	--mh-cremita: #F7ECA8;
	--mh-fondo: #FBF6DC;
	--mh-texto-suave: #5A4152;
	--mh-borde: #EADFB0;
	--mh-wa-verde: #1FA855;
	--mh-wa-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.5 20.5l1.3-4A8.5 8.5 0 1 1 8 19.3z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3Cpath d='M9.2 8.4c.3-.6.6-.6.9-.6h.5c.2 0 .4.1.5.4l.7 1.7c.1.2 0 .5-.1.7l-.5.6c-.1.2-.1.4 0 .6.5.9 1.3 1.7 2.2 2.2.2.1.4.1.6 0l.6-.5c.2-.2.5-.2.7-.1l1.7.7c.3.1.4.3.4.5v.5c0 .4-.2.7-.6.9-.6.3-1.5.4-2.5 0-2-.7-3.7-2.4-4.4-4.4-.4-1-.3-1.9 0-2.5z'/%3E%3C/svg%3E");
}

html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
.wp-site-blocks > *, .mh-main > * { margin-block-start: 0 !important; margin-block-end: 0 !important; }
.mh-seccion > .mh-bajada { margin-top: 14px !important; }
@media (max-width: 600px) { .mh-marcas p { font-size: 19px; } .mh-marcas p .mh-dot { padding: 0 6px; } }
:where(section[id]) { scroll-margin-top: 90px; }
.mh-wrap { max-width: 1200px; margin-left: auto !important; margin-right: auto !important; padding-left: 24px; padding-right: 24px; box-sizing: border-box; }

/* ---------- Títulos ---------- */
.mh-titulo { font-family: var(--wp--preset--font-family--cabin-condensed); font-weight: 700; text-transform: uppercase; line-height: 1 !important; margin: 0; }
.mh-h2 { font-size: clamp(38px, 4.6vw, 60px) !important; }
.mh-h3 { font-size: 32px !important; }
.mh-band { display: inline-block; background: var(--mh-cremita); color: var(--mh-violeta); padding: 6px 18px 2px; transform: rotate(-2deg); margin-top: 10px; }
.mh-acento { color: var(--mh-naranja); background: none; }
.mh-bajada { font-size: 18px; line-height: 1.55; color: var(--mh-texto-suave); max-width: 560px; margin: 0; }

/* ---------- Botones ---------- */
.wp-block-button.mh-btn .wp-block-button__link { background: var(--mh-naranja); color: #FFF8E0; font-weight: 700; font-size: 18px; padding: 15px 26px; border-radius: 999px; min-height: 50px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.wp-block-button.mh-btn .wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(64,40,58,.25); color: #ffffff; }
.wp-block-button.mh-btn-borde .wp-block-button__link { background: transparent; color: var(--mh-cremita); border: 2px solid var(--mh-cremita); font-weight: 700; font-size: 18px; padding: 13px 26px; border-radius: 999px; min-height: 50px; box-sizing: border-box; text-decoration: none; }
.wp-block-button.mh-btn-violeta .wp-block-button__link { background: var(--mh-violeta); color: var(--mh-cremita); }
.mh-wa .wp-block-button__link::before { content: ""; width: 22px; height: 22px; background: currentColor; -webkit-mask: var(--mh-wa-icon) center / contain no-repeat; mask: var(--mh-wa-icon) center / contain no-repeat; flex-shrink: 0; }

/* ---------- Encabezado ---------- */
.mh-header { background: var(--mh-violeta); position: sticky; top: 0; z-index: 40; box-shadow: 0 2px 14px rgba(0,0,0,.18); }
.admin-bar .mh-header { top: 32px; }
.mh-header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; padding-top: 14px; padding-bottom: 14px; }
.mh-logo { margin: 0 !important; }
.mh-logo img { height: 46px !important; width: auto !important; display: block; }
.mh-nav { font-weight: 600; font-size: 16px; color: var(--mh-cremita); gap: 8px 26px; }
.mh-nav a { color: var(--mh-cremita) !important; text-decoration: none; }
.mh-nav a:hover { color: #ffffff !important; }
.mh-nav .wp-block-navigation__responsive-container.is-menu-open { background: var(--mh-violeta) !important; color: var(--mh-cremita) !important; }
.mh-nav .wp-block-navigation__responsive-container.is-menu-open a { font-size: 24px; }
.mh-nav .wp-block-navigation__responsive-container-open, .mh-nav .wp-block-navigation__responsive-container-close { color: var(--mh-cremita); }
.mh-header .mh-btn .wp-block-button__link { font-size: 16px; padding: 11px 20px; min-height: 44px; }
@media (max-width: 1100px) { .mh-header .wp-block-buttons { display: none; } }
@media (max-width: 720px) { .mh-logo img { height: 38px !important; } }

/* ---------- Hero ---------- */
.mh-hero { background: var(--mh-violeta); color: var(--mh-cremita); margin: 0 !important; }
.mh-hero-inner { display: flex !important; flex-wrap: wrap !important; align-items: center !important; gap: 56px !important; padding-top: 72px; padding-bottom: 96px; margin: 0 auto !important; }
.mh-hero-texto { flex: 1 1 480px !important; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.mh-hero-texto > * { margin: 0 !important; }
.mh-hero h1 { font-size: clamp(44px, 6.4vw, 84px) !important; line-height: .98 !important; letter-spacing: -0.5px; color: var(--mh-cremita); }
.mh-hero .mh-bajada { color: #F3E6C4; font-size: 20px; }
.mh-checks { list-style: none; padding: 0 !important; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-weight: 600; font-size: 16px; }
.mh-checks li { display: flex; align-items: center; gap: 8px; }
.mh-checks li::before { content: ""; width: 18px; height: 18px; flex-shrink: 0; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C74F39' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.mh-hero-foto { flex: 1 1 360px !important; min-width: 0; position: relative; display: flex; justify-content: center; }
.mh-hero-foto .wp-block-image { width: 100%; max-width: 470px; aspect-ratio: 1 / 1; border: 10px solid var(--mh-cremita); border-radius: 22px; overflow: hidden; transform: rotate(2deg); box-shadow: 0 28px 60px rgba(0,0,0,.45); margin: 0 !important; box-sizing: border-box; }
.mh-hero-foto .wp-block-image img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; display: block; }
.mh-sticker { position: absolute; left: 0; bottom: 34px; top: auto; width: max-content !important; height: auto !important; margin: 0 !important; background: var(--mh-naranja); color: #FFF8E0; font-family: var(--wp--preset--font-family--cabin-condensed); font-weight: 700; font-size: 26px; text-transform: uppercase; padding: 10px 20px 6px; border-radius: 12px; transform: rotate(-5deg); box-shadow: 0 12px 24px rgba(0,0,0,.35); z-index: 2; }

/* ---------- Franja de marcas ---------- */
.mh-marcas { background: var(--mh-cremita); border-bottom: 3px solid var(--mh-violeta); margin: 0 !important; }
.mh-marcas p { margin: 0 auto; padding: 26px 24px; text-align: center; font-family: var(--wp--preset--font-family--cabin-condensed); font-weight: 700; font-size: 23px; text-transform: uppercase; color: var(--mh-violeta); line-height: 1.5; }
.mh-marcas p .mh-dot { color: var(--mh-naranja); padding: 0 12px; }

/* ---------- Productos ---------- */
.mh-seccion { padding-top: 88px; padding-bottom: 40px; margin-top: 0 !important; }
.mh-seccion-cab { display: flex !important; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 40px; margin-bottom: 40px; }
.mh-seccion-cab > * { margin: 0 !important; }
.mh-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 26px; }
.mh-grid > * { margin: 0 !important; }
@media (max-width: 400px) { .mh-grid { grid-template-columns: 1fr; } }
.mh-card { background: #ffffff; border-radius: 20px; overflow: hidden; display: flex !important; flex-direction: column; box-shadow: 0 6px 22px rgba(64,40,58,.10); border: 2px solid var(--mh-borde); }
.mh-card > .wp-block-image { margin: 0 !important; height: 220px; overflow: hidden; background: var(--mh-borde); }
.mh-card > .wp-block-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.mh-card:hover > .wp-block-image img { transform: scale(1.04); }
.mh-card-cuerpo { padding: 24px; display: flex !important; flex-direction: column; gap: 12px; flex-grow: 1; }
.mh-card-cuerpo > * { margin: 0 !important; }
.mh-card-cuerpo .mh-desc { flex-grow: 1; font-size: 16px; line-height: 1.55; color: var(--mh-texto-suave); }
.mh-card-cuerpo .wp-block-button, .mh-card-cuerpo .wp-block-button__link { width: 100%; }
.mh-etiqueta { align-self: flex-start; background: var(--mh-violeta); color: var(--mh-cremita); font-weight: 700; font-size: 13px !important; letter-spacing: .6px; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; }

/* ---------- Pasos ---------- */
.mh-pasos { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-top: 40px !important; }
.mh-pasos > * { margin: 0 !important; }
.mh-paso { background: var(--mh-violeta); color: var(--mh-cremita); border-radius: 18px; padding: 26px 22px; display: flex !important; flex-direction: column; gap: 10px; }
.mh-paso > * { margin: 0 !important; }
.mh-paso .mh-num { font-family: var(--wp--preset--font-family--cabin-condensed); font-weight: 700; font-size: 48px; line-height: 1; color: var(--mh-naranja); }
.mh-paso .mh-paso-tit { font-weight: 700; font-size: 19px; }
.mh-paso .mh-paso-txt { font-size: 15px; line-height: 1.5; color: #E9DDB8; }
.mh-paso.mh-paso-final { background: var(--mh-naranja); color: #FFF8E0; }
.mh-paso.mh-paso-final .mh-num { color: var(--mh-cremita); }
.mh-paso.mh-paso-final .mh-paso-txt { color: #FFF1D6; }

/* ---------- Armá tu pedido ---------- */
.mh-pedido-sec { background: var(--mh-cremita); border-top: 3px solid var(--mh-violeta); border-bottom: 3px solid var(--mh-violeta); margin-top: 80px !important; }
.mh-pedido { display: flex; flex-wrap: wrap; gap: 44px; align-items: flex-start; padding-top: 84px; padding-bottom: 84px; }
.mh-pedido-izq { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 100px; }
.mh-pedido-izq p { margin: 0; font-size: 18px; line-height: 1.55; color: #4E3646; }
.mh-resumen { background: var(--mh-violeta); color: var(--mh-cremita); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.mh-resumen strong { font-size: 17px; }
.mh-resumen ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.mh-resumen li { display: flex; gap: 8px; align-items: center; }
.mh-resumen li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mh-naranja); flex-shrink: 0; }
.mh-resumen .mh-vacio { font-size: 15px; color: #E9DDB8; }
.mh-enviar { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--mh-naranja); color: #FFF8E0 !important; text-decoration: none; font-weight: 700; font-size: 18px; padding: 14px 22px; border-radius: 999px; min-height: 50px; box-sizing: border-box; margin-top: 4px; }
.mh-enviar::before { content: ""; width: 20px; height: 20px; background: currentColor; -webkit-mask: var(--mh-wa-icon) center / contain no-repeat; mask: var(--mh-wa-icon) center / contain no-repeat; }
.mh-pedido-der { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.mh-grupo h3 { margin: 0 0 12px; font-family: var(--wp--preset--font-family--cabin-condensed); font-weight: 700; font-size: 24px; text-transform: uppercase; color: var(--mh-violeta); }
.mh-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.mh-chip { cursor: pointer; font: inherit; background: #ffffff; color: var(--mh-violeta); border: 2px solid var(--mh-violeta); border-radius: 999px; padding: 10px 16px; font-size: 15px; font-weight: 600; min-height: 44px; }
.mh-chip[aria-pressed="true"] { background: var(--mh-violeta); color: var(--mh-cremita); font-weight: 700; }
.mh-chip[aria-pressed="true"]::before { content: "✓ "; }
.mh-chip:focus-visible, .mh-enviar:focus-visible { outline: 3px solid var(--mh-naranja); outline-offset: 2px; }
@media (max-width: 860px) { .mh-pedido-izq { position: static; } }

/* ---------- Nosotros ---------- */
.mh-nosotros { display: flex !important; flex-wrap: wrap; gap: 56px; align-items: center; padding-top: 96px; padding-bottom: 96px; margin-top: 0 !important; }
.mh-nosotros-foto { flex: 1 1 380px !important; min-width: 0; position: relative; }
.mh-nosotros-foto .wp-block-image { margin: 0 !important; border-radius: 22px; overflow: hidden; aspect-ratio: 5 / 4; box-shadow: 0 20px 44px rgba(64,40,58,.25); }
.mh-nosotros-foto .wp-block-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mh-dato { position: absolute; right: -10px; bottom: -22px; background: var(--mh-violeta); color: var(--mh-cremita); border-radius: 16px; padding: 18px 22px; transform: rotate(-3deg); box-shadow: 0 14px 30px rgba(0,0,0,.3); margin: 0 !important; font-size: 15px; font-weight: 600; line-height: 1.2; }
.mh-dato strong { display: block; font-family: var(--wp--preset--font-family--cabin-condensed); font-size: 44px; line-height: 1; }
.mh-nosotros-texto { flex: 1 1 440px !important; min-width: 0; display: flex !important; flex-direction: column; gap: 18px; }
.mh-nosotros-texto > * { margin: 0 !important; }
.mh-nosotros-texto p { font-size: 18px; line-height: 1.65; color: #4E3646; }
.mh-nosotros-texto .mh-firma { font-family: var(--wp--preset--font-family--cabin-condensed); font-weight: 700; font-size: 26px; text-transform: uppercase; color: var(--mh-violeta); }
@media (max-width: 480px) { .mh-dato { right: 8px; } }

/* ---------- Preguntas ---------- */
.mh-faq-sec { max-width: 900px; padding-top: 40px; padding-bottom: 96px; margin-top: 0 !important; }
.mh-faq-sec > .mh-h2 { text-align: center; margin-bottom: 30px !important; }
.mh-faq-lista { display: flex !important; flex-direction: column; gap: 12px; }
.mh-faq-lista > * { margin: 0 !important; }
.mh-faq { background: #ffffff; border: 2px solid var(--mh-borde); border-radius: 16px; padding: 0 22px; }
.mh-faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font-weight: 700; font-size: 19px; min-height: 44px; }
.mh-faq summary::-webkit-details-marker { display: none; }
.mh-faq summary::after { content: "+"; font-size: 30px; line-height: 1; color: var(--mh-naranja); transition: transform .2s ease; }
.mh-faq[open] summary::after { transform: rotate(45deg); }
.mh-faq p { margin: 0 0 20px; font-size: 17px; line-height: 1.6; color: #4E3646; }

/* ---------- Cierre ---------- */
.mh-cta { background: var(--mh-naranja); color: #FFF8E0; margin: 0 !important; }
.mh-cta-inner { display: flex !important; flex-direction: column; align-items: center; text-align: center; gap: 22px; padding-top: 80px; padding-bottom: 80px; max-width: 1000px; }
.mh-cta-inner > * { margin: 0 !important; }
.mh-cta h2 { font-size: clamp(40px, 5.4vw, 72px) !important; color: #FFF8E0; }
.mh-cta p { font-size: 20px; line-height: 1.55; max-width: 620px; }
.mh-cta .wp-block-button__link { font-size: 20px !important; padding: 18px 32px !important; }

/* ---------- Pie ---------- */
.mh-footer { background: var(--mh-violeta); color: var(--mh-cremita); margin: 0 !important; }
.mh-footer-inner { display: flex !important; flex-wrap: wrap; justify-content: space-between; gap: 28px 48px; align-items: flex-start; padding-top: 48px; padding-bottom: 110px; }
.mh-footer-inner > * { margin: 0 !important; }
.mh-footer a { color: var(--mh-cremita); }
.mh-footer a:hover { color: #ffffff; }
.mh-footer .mh-col { display: flex !important; flex-direction: column; gap: 10px; font-size: 16px; }
.mh-footer .mh-col > * { margin: 0 !important; }
.mh-footer .mh-col-tit { font-family: var(--wp--preset--font-family--cabin-condensed); font-weight: 700; font-size: 20px; text-transform: uppercase; }
.mh-footer .mh-logo img { height: 54px !important; }
.mh-footer .mh-pie-txt { font-size: 15px; line-height: 1.55; color: #E9DDB8; max-width: 360px; }
.mh-footer .mh-copy { flex-basis: 100%; font-size: 14px; color: #CDBFA0; border-top: 1px solid rgba(247,236,168,.2); padding-top: 18px; }

/* ---------- Botón flotante de WhatsApp ---------- */
.mh-wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: flex; align-items: center; gap: 10px; background: var(--mh-wa-verde); color: #ffffff !important; text-decoration: none; font-weight: 700; font-size: 17px; padding: 14px 20px 14px 16px; border-radius: 999px; box-shadow: 0 12px 28px rgba(0,0,0,.3); min-height: 56px; box-sizing: border-box; transition: transform .15s ease; }
.mh-wa-float:hover { transform: scale(1.05); }
.mh-wa-float::before { content: ""; width: 28px; height: 28px; background: currentColor; -webkit-mask: var(--mh-wa-icon) center / contain no-repeat; mask: var(--mh-wa-icon) center / contain no-repeat; }
.mh-wa-float .mh-cta-corto { display: none; }
@media (max-width: 600px) { .mh-wa-float .mh-cta-largo { display: none; } .mh-wa-float .mh-cta-corto { display: inline; } .mh-wa-float { right: 14px; bottom: 14px; font-size: 16px; } }

/* ---------- Videos ---------- */
.mh-videos-sec { padding-top: 40px; padding-bottom: 72px; margin-top: 0 !important; }
.mh-ig .wp-block-button__link::before { content: ""; width: 20px; height: 20px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='3' width='18' height='18' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='17.5' cy='6.5' r='1' fill='black'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='3' width='18' height='18' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='17.5' cy='6.5' r='1' fill='black'/%3E%3C/svg%3E") center / contain no-repeat; }
.mh-videos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .mh-videos { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; } .mh-video { scroll-snap-align: start; } }
.mh-video { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 20px; overflow: hidden; background: var(--mh-violeta); box-shadow: 0 14px 30px rgba(64,40,58,.22); text-decoration: none; transition: transform .2s ease; }
.mh-video:hover { transform: translateY(-4px); }
.mh-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mh-video-pie { position: absolute; left: 0; right: 0; top: 0; padding: 16px 16px 44px; background: linear-gradient(to bottom, rgba(64,40,58,.95), rgba(64,40,58,0)); color: var(--mh-cremita); display: flex; flex-direction: column; gap: 4px; }
.mh-video-pie strong { font-family: var(--wp--preset--font-family--cabin-condensed); font-size: 22px; text-transform: uppercase; line-height: 1.05; }
.mh-video-pie span { font-size: 14px; font-weight: 600; color: #FFE9C9; }
