/* lane M: materiales, pedidos, mensajes. Shared by /materiales /pedido/<id> /pedidos /mensajes and the admin Materiales tab. */
.m-hero{display:grid;grid-template-columns:1.1fr .9fr;gap:36px;align-items:center;margin-bottom:34px}
.m-hero h1{margin-bottom:12px}
.m-hero .o-sub{font-size:17px;max-width:540px}
.m-hero-pic{border-radius:24px;min-height:300px;background:#e9e2d9 url(/img/mat/kit-solar-3kw.webp) center/cover;position:relative;overflow:hidden;box-shadow:0 24px 50px rgba(60,40,20,.14)}
.m-hero-pic .m-float{position:absolute;left:16px;right:16px;bottom:16px;background:rgba(255,255,255,.95);border-radius:16px;padding:14px 16px;box-shadow:0 10px 24px rgba(40,30,20,.16)}
.m-how{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:6px}
.m-how div{background:#fff;border:1px solid var(--o-line);border-radius:16px;padding:14px}
.m-how b{display:block;font-size:15px}.m-how span{font-size:13px;color:var(--o-mute)}
.m-how i{font-style:normal;display:inline-grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--o-acc);color:#fff;font-weight:800;font-size:13px;margin-bottom:8px}
.m-cats{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px;position:sticky;top:64px;z-index:5;background:var(--o-bg);padding:10px 0}
.m-cats button{border:1.5px solid var(--o-line);background:#fff;border-radius:99px;padding:9px 16px;font:700 14px Manrope,system-ui,sans-serif;color:var(--o-ink);cursor:pointer;min-height:42px}
.m-cats button.on{background:var(--o-ink);border-color:var(--o-ink);color:#fff}
.m-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.m-card{background:#fff;border:1px solid var(--o-line);border-radius:22px;overflow:hidden;display:flex;flex-direction:column;transition:transform .25s,box-shadow .25s}
.m-card:hover{transform:translateY(-3px);box-shadow:0 18px 36px rgba(60,40,20,.1)}
.m-card .m-pic{aspect-ratio:3/2;background:var(--o-bg2) center/cover;display:block;border:0;padding:0;cursor:pointer;width:100%}
.m-card .m-in{padding:16px 18px 18px;display:flex;flex-direction:column;gap:6px;flex:1}
.m-card h3{margin:0;font-size:18px}
.m-card p{margin:0;color:var(--o-mute);font-size:14px;line-height:1.45}
.m-price{font-weight:800;font-size:17px;margin-top:auto;padding-top:8px}
.m-price small{font-weight:600;color:var(--o-mute);font-size:13px}
.m-lead{font-size:13px;color:var(--o-green);font-weight:700}
.m-card .o-row{margin-top:10px}
.m-card .o-btn{flex:1}
.m-sec-h{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:30px 0 14px;scroll-margin-top:130px}
.m-sec-h h2{margin:0}
/* sheet */
.m-sheet{position:fixed;inset:0;z-index:70;display:none}
.m-sheet.on{display:block}
.m-sheet .m-bg{position:absolute;inset:0;background:rgba(20,18,15,.5);animation:m-fade .2s}
.m-sheet .m-panel{position:absolute;top:0;right:0;bottom:0;width:min(560px,100vw);background:var(--o-bg);overflow:auto;box-shadow:-20px 0 50px rgba(0,0,0,.2);animation:m-in .28s cubic-bezier(.2,.7,.2,1);overscroll-behavior:contain}
.m-sheet .m-top{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:10px;padding:10px 14px;background:rgba(250,248,246,.95);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-bottom:1px solid var(--o-line)}
.m-sheet .m-top b{flex:1;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.m-body{padding:18px 20px 30px}
.m-photo{aspect-ratio:3/2;border-radius:18px;background:var(--o-bg2) center/cover;margin-bottom:16px}
.m-specs{list-style:none;padding:0;margin:12px 0 18px;display:grid;gap:6px}
.m-specs li{display:flex;gap:10px;font-size:14px;align-items:flex-start}
.m-specs li:before{content:"";flex:none;width:7px;height:7px;border-radius:50%;background:var(--o-acc);margin-top:8px}
.m-pricebox{display:flex;justify-content:space-between;align-items:center;gap:12px;background:#fff;border:1px solid var(--o-line);border-radius:16px;padding:14px 16px;margin-bottom:18px;flex-wrap:wrap}
.m-pricebox b{font-size:20px}
.m-qty{display:flex;align-items:center;gap:0}
.m-qty button{width:46px;min-height:46px;border:1.5px solid var(--o-line);background:#fff;font:800 20px Manrope,sans-serif;cursor:pointer;color:var(--o-ink)}
.m-qty button:first-child{border-radius:12px 0 0 12px}.m-qty button:last-child{border-radius:0 12px 12px 0}
.m-qty input{border-radius:0!important;text-align:center;max-width:110px;border-left:0!important;border-right:0!important}
.m-qty input::-webkit-inner-spin-button,.m-qty input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.m-qty input{-moz-appearance:textfield;appearance:textfield}
.m-unit{margin-left:10px;color:var(--o-mute);font-weight:700;font-size:14px}
.m-done{text-align:center;padding:10px 0}
.m-done .m-ok{width:64px;height:64px;border-radius:50%;background:#e3f0eb;color:var(--o-green);display:grid;place-items:center;margin:0 auto 12px}
.m-done .m-ok svg{width:34px;height:34px}
@keyframes m-in{from{transform:translateX(40px);opacity:.4}}
@keyframes m-fade{from{opacity:0}}
/* shipment tracker (same motion as the landing) */
.m-track{background:#fff;border:1px solid var(--o-line);border-radius:24px;padding:24px 26px}
.m-track .m-tt{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;align-items:baseline}
.m-route{position:relative;height:104px;margin:16px 0 4px}
.m-route .m-ln{position:absolute;left:5%;right:5%;top:48px;height:3px;background:var(--o-line);border-radius:3px}
.m-route .m-fill{position:absolute;left:5%;top:48px;height:3px;background:var(--o-acc);border-radius:3px;width:0;transition:width 1.4s cubic-bezier(.2,.7,.2,1)}
.m-stop{position:absolute;top:37px;width:25px;height:25px;margin-left:-12.5px;border-radius:50%;background:var(--o-line);border:4px solid #fff;transition:background .4s;box-shadow:0 0 0 1px var(--o-line)}
.m-stop.on{background:var(--o-acc);box-shadow:0 0 0 1px var(--o-acc)}
.m-stop span{position:absolute;top:30px;left:50%;transform:translateX(-50%);white-space:nowrap;font-size:12px;font-weight:700;color:var(--o-mute);text-align:center;line-height:1.25}
.m-stop span small{display:block;font-weight:600;font-size:11px}
.m-stop.on span{color:var(--o-ink)}
.m-box{position:absolute;top:0;left:5%;width:36px;height:36px;margin-left:-18px;border-radius:50%;background:#fff;box-shadow:0 8px 18px rgba(60,40,20,.18);display:grid;place-items:center;color:var(--o-acc);transition:left 1.4s cubic-bezier(.2,.7,.2,1)}
.m-box svg{width:19px;height:19px}
.m-vt{display:none;list-style:none;margin:14px 0 0;padding:0;position:relative}
.m-vt li{position:relative;padding:0 0 18px 38px;min-height:40px}
.m-vt li:before{content:"";position:absolute;left:11px;top:22px;bottom:-4px;width:3px;background:var(--o-line)}
.m-vt li:last-child:before{display:none}
.m-vt li.on:not(.cur):before{background:var(--o-acc)}
.m-vt .m-dot{position:absolute;left:0;top:0;width:25px;height:25px;border-radius:50%;background:var(--o-line);border:4px solid #fff;box-shadow:0 0 0 1px var(--o-line)}
.m-vt li.on .m-dot{background:var(--o-acc);box-shadow:0 0 0 1px var(--o-acc)}
.m-vt li.cur .m-dot{background:#fff;box-shadow:0 6px 14px rgba(60,40,20,.2);border:0;display:grid;place-items:center;color:var(--o-acc);width:30px;height:30px;left:-2px;top:-2px;animation:m-pulse 1.8s 3}
.m-vt li.cur .m-dot svg{width:17px;height:17px}
.m-vt b{display:block;font-size:15px}.m-vt small{color:var(--o-mute);font-size:13px}
.m-vt li:not(.on) b{color:var(--o-mute)}
@keyframes m-pulse{50%{box-shadow:0 6px 14px rgba(224,98,43,.35)}}
@media(max-width:720px){.m-route{display:none}.m-vt{display:block}.m-track{padding:18px}}
.m-status{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:800;border-radius:99px;padding:5px 11px;background:#fdf1d9;color:#8a5a0b;white-space:nowrap}
.m-status.s-cotizacion{background:#eaf1f8;color:#23415f}
.m-status.s-confirmado,.m-status.s-flete,.m-status.s-puerto,.m-status.s-aduana{background:#fde9df;color:#a5401a}
.m-status.s-en_obra{background:#e3f0eb;color:var(--o-green)}
.m-status.s-cancelado{background:var(--o-bg2);color:var(--o-mute)}
.m-ev{list-style:none;padding:0;margin:0;display:grid;gap:0}
.m-ev li{display:grid;grid-template-columns:120px 1fr;gap:12px;padding:12px 0;border-bottom:1px solid var(--o-line);font-size:14px}
.m-ev li:last-child{border-bottom:0}
.m-ev time{color:var(--o-mute);font-size:13px}
.m-ord{display:grid;grid-template-columns:96px 1fr auto;gap:14px;align-items:center;background:#fff;border:1px solid var(--o-line);border-radius:18px;padding:12px;text-decoration:none!important;color:var(--o-ink)!important;transition:box-shadow .2s}
.m-ord:hover{box-shadow:0 12px 26px rgba(60,40,20,.09)}
.m-ord .m-th{width:96px;height:72px;border-radius:12px;background:var(--o-bg2) center/cover}
.m-ord b{display:block}.m-ord small{color:var(--o-mute)}
@media(max-width:560px){.m-ord{grid-template-columns:72px 1fr}.m-ord .m-th{width:72px;height:60px}.m-ord .m-status{grid-column:2;justify-self:start}}
/* messaging */
.m-chat{display:grid;grid-template-columns:340px 1fr;background:#fff;border:1px solid var(--o-line);border-radius:22px;overflow:hidden;height:calc(100vh - 150px);min-height:520px}
.m-list{border-right:1px solid var(--o-line);display:flex;flex-direction:column;min-height:0}
.m-list-h{padding:16px 16px 12px;border-bottom:1px solid var(--o-line)}
.m-list-h h1{font-size:24px;margin:0}
.m-items{overflow:auto;flex:1}
.m-it{display:grid;grid-template-columns:44px 1fr auto;gap:10px;padding:12px 14px;border-bottom:1px solid #f1ece6;text-decoration:none!important;color:var(--o-ink)!important;align-items:center}
.m-it:hover{background:#faf7f3}.m-it.on{background:var(--o-bg2)}
.m-it .o-av{width:44px;height:44px}
.m-it b{display:block;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.m-it .m-pv{display:block;font-size:13px;color:var(--o-mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.m-it .m-pj{display:block;font-size:12px;color:var(--o-green);font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.m-it.unread b,.m-it.unread .m-pv{color:var(--o-ink);font-weight:800}
.m-meta{display:grid;justify-items:end;gap:6px;font-size:12px;color:var(--o-mute)}
.m-cnt{background:var(--o-acc);color:#fff;border-radius:99px;font-weight:800;font-size:12px;min-width:22px;height:22px;display:grid;place-items:center;padding:0 6px}
.m-pref{padding:12px 16px;border-top:1px solid var(--o-line);font-size:13px;display:flex;align-items:center;gap:10px;justify-content:space-between}
.m-sw{position:relative;width:46px;height:28px;flex:none}
.m-sw input{opacity:0;width:100%;height:100%;margin:0;position:absolute;inset:0;cursor:pointer;z-index:1}
.m-sw span{position:absolute;inset:0;border-radius:99px;background:#cfc6bb;transition:background .2s}
.m-sw span:after{content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;transition:transform .2s;box-shadow:0 2px 4px rgba(0,0,0,.2)}
.m-sw input:checked+span{background:var(--o-green)}
.m-sw input:checked+span:after{transform:translateX(18px)}
.m-sw input:focus-visible+span{outline:3px solid rgba(224,98,43,.4)}
.m-conv{display:flex;flex-direction:column;min-height:0;min-width:0;background:#fcfbf9}
.m-ch{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--o-line);background:#fff}
.m-ch .m-back{display:none;width:44px;height:44px;border:0;background:var(--o-bg2);border-radius:12px;cursor:pointer;place-items:center;flex:none}
.m-ch .m-back svg{width:20px;height:20px}
.m-ch .m-who{flex:1;min-width:0}
.m-ch .m-who b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.m-ch .m-who small{color:var(--o-mute);display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.m-contact{padding:10px 16px;border-bottom:1px solid var(--o-line);font-size:13px;display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:#fffaf3}
.m-contact.ok{background:#f0f7f4}
.m-contact .m-ct{flex:1;min-width:200px;color:#4a4740}
.m-msgs{flex:1;overflow:auto;padding:18px 16px;display:flex;flex-direction:column;gap:6px;overscroll-behavior:contain}
.m-day{align-self:center;font-size:12px;font-weight:700;color:var(--o-mute);background:var(--o-bg2);border-radius:99px;padding:3px 10px;margin:10px 0 4px}
.m-b{max-width:min(76%,520px);padding:9px 13px;border-radius:16px;background:#fff;border:1px solid var(--o-line);align-self:flex-start;font-size:15px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere;animation:m-pop .25s}
.m-b.mine{align-self:flex-end;background:#fde9df;border-color:#f6d3c2}
.m-b time{display:block;font-size:11px;color:var(--o-mute);margin-top:3px;text-align:right}
.m-b .m-img{display:block;width:240px;max-width:100%;aspect-ratio:4/3;border-radius:12px;background:var(--o-bg2) center/cover;margin:2px 0 6px}
.m-sys{align-self:center;max-width:90%;text-align:center;font-size:13px;color:#1f4d41;background:#e3f0eb;border-radius:12px;padding:8px 12px}
@keyframes m-pop{from{transform:translateY(6px);opacity:0}}
.m-comp{border-top:1px solid var(--o-line);padding:10px 12px;background:#fff;display:flex;gap:8px;align-items:flex-end}
.m-comp textarea{flex:1;min-height:46px;max-height:140px;resize:none;font:500 16px Manrope,system-ui,sans-serif;border:1.5px solid var(--o-line);border-radius:14px;padding:11px 14px;outline:none}
.m-comp textarea:focus{border-color:var(--o-acc);box-shadow:0 0 0 3px rgba(224,98,43,.15)}
.m-comp .m-ib{width:46px;height:46px;border-radius:14px;border:1.5px solid var(--o-line);background:#fff;display:grid;place-items:center;cursor:pointer;flex:none;color:var(--o-ink)}
.m-comp .m-ib svg{width:22px;height:22px}
.m-comp .m-send{width:auto;padding:0 16px;background:var(--o-acc);border-color:var(--o-acc);color:#fff;font:800 15px Manrope,sans-serif}
.m-att{display:flex;gap:8px;padding:8px 12px 0;background:#fff}
.m-att .o-thumb{width:64px;height:64px}
.m-pick{flex:1;display:grid;place-items:center;text-align:center;padding:30px;color:var(--o-mute)}
.m-pick img{width:200px;border-radius:16px;margin-bottom:12px}
@media(max-width:900px){
 .m-chat{grid-template-columns:1fr;height:calc(100dvh - 64px);min-height:0;border-radius:0;border-left:0;border-right:0}
 .m-chat.m-open .m-list{display:none}.m-chat:not(.m-open) .m-conv{display:none}
 .m-list{border-right:0}.m-ch .m-back{display:grid}
 .m-chatwrap{padding:0!important}
 .m-b{max-width:84%}
}
@media(max-width:900px){.m-hero{grid-template-columns:1fr}.m-hero-pic{min-height:220px}.m-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.m-cats{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;margin-left:-16px;margin-right:-16px;padding-left:16px;padding-right:16px}.m-cats::-webkit-scrollbar{display:none}.m-cats button{flex:none}.m-sec-h{scroll-margin-top:136px}.m-grid{grid-template-columns:1fr}.m-how{grid-template-columns:1fr}.m-ev li{grid-template-columns:1fr;gap:2px}.m-body{padding:16px}}
/* admin materiales tab */
.ma-tabs{display:flex;gap:8px;margin-bottom:14px;flex-wrap:wrap}
.ma-tabs button{border:1.5px solid var(--o-line);background:#fff;border-radius:99px;padding:8px 14px;font:700 14px Manrope,sans-serif;cursor:pointer;min-height:40px}
.ma-tabs button.on{background:var(--o-ink);color:#fff;border-color:var(--o-ink)}
.ma-o{background:#fff;border:1px solid var(--o-line);border-radius:18px;padding:16px;margin-bottom:12px}
.ma-o .ma-h{display:flex;gap:12px;align-items:flex-start;flex-wrap:wrap}
.ma-o .m-th{width:84px;height:62px;border-radius:12px;background:var(--o-bg2) center/cover;flex:none}
.ma-o .ma-t{flex:1;min-width:200px}
.ma-o .ma-t b{display:block}.ma-o .ma-t small{color:var(--o-mute);display:block}
.ma-act{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;gap:10px;align-items:end;margin-top:14px;padding-top:14px;border-top:1px solid var(--o-line)}
@media(max-width:760px){.ma-act{grid-template-columns:1fr}}
.ma-p{display:grid;grid-template-columns:72px 1fr auto;gap:12px;align-items:center;background:#fff;border:1px solid var(--o-line);border-radius:16px;padding:10px 12px;margin-bottom:8px}
.ma-p .m-th{width:72px;height:52px;border-radius:10px;background:var(--o-bg2) center/cover}
.ma-p.off{opacity:.55}
