/* JCR MENU PRO v7.0 — Composition System
   Structural layer: visibly different layouts using the same backend. */
:root{--v7-radius:24px;--v7-gap:16px;--v7-section:28px;--v7-ease:cubic-bezier(.16,1,.3,1)}
body[data-corner-style="crisp"]{--v7-radius:10px}body[data-corner-style="square"]{--v7-radius:2px}
body[data-corner-style="soft"]{--v7-radius:26px}
body[data-density="airy"]{--v7-gap:22px;--v7-section:40px}body[data-density="dense"]{--v7-gap:9px;--v7-section:18px}

/* Header can now be part of the identity, not one universal bar. */
body[data-header-style="floating"] .topbar{top:8px;margin:0 10px;border:1px solid color-mix(in srgb,var(--primary) 24%,rgba(255,255,255,.12));border-radius:18px;background:color-mix(in srgb,var(--bg) 84%,transparent)!important;box-shadow:0 14px 42px rgba(0,0,0,.22)}
body[data-header-style="floating"] .topbar-in{min-height:64px}
body[data-header-style="minimal"] .topbar{background:color-mix(in srgb,var(--bg) 92%,transparent)!important;border-bottom:0;box-shadow:none!important}
body[data-header-style="minimal"] .icon-btn{background:transparent!important;border-color:transparent!important;box-shadow:none!important}
body[data-header-style="minimal"] .brand-logo{box-shadow:none;border-color:transparent}

/* Global spacing and shape language */
body[data-layout-style] .segment-landing{padding-top:var(--v7-section)}
body[data-layout-style] .content{padding-top:var(--v7-section)}
body[data-layout-style] :where(.market-home-shell,.fit-home,.beauty-home,.services-home,.hero-card,.product,.segment-highlight,.designer-cta-card,.search input){border-radius:var(--v7-radius)}

/* CATALOG: commerce-first. Photo leads, products arrive sooner, fewer boxes. */
body[data-layout-style="catalog"][data-family="market"] .market-home-shell{position:relative;display:block;min-height:420px;overflow:hidden;border:0;background:#07152f;box-shadow:0 26px 80px rgba(1,14,42,.3)}
body[data-layout-style="catalog"][data-family="market"] .market-home-photo{position:absolute;inset:0;min-height:100%;background-position:center 48%;z-index:0}
body[data-layout-style="catalog"][data-family="market"] .market-home-photo:after{background:linear-gradient(90deg,rgba(1,11,31,.92) 0%,rgba(3,18,48,.66) 48%,rgba(3,16,43,.1) 78%),linear-gradient(0deg,rgba(1,10,28,.88),transparent 60%)}
body[data-layout-style="catalog"][data-family="market"] .market-home-copy{position:relative;z-index:2;min-height:420px;justify-content:flex-end;padding:38px 30px;max-width:720px;background:none!important}
body[data-layout-style="catalog"][data-family="market"] .market-home h1{font-size:clamp(42px,10vw,78px);max-width:9ch;line-height:.9;text-wrap:balance}
body[data-layout-style="catalog"][data-family="market"] .market-home-brand{position:absolute;top:26px;left:30px;margin:0}
body[data-layout-style="catalog"][data-family="market"] .market-home-photo>span{top:24px;right:24px;bottom:auto;border-radius:8px}
body[data-layout-style="catalog"][data-family="market"] .market-home-actions{margin-top:20px}

/* EDITORIAL: typography and asymmetric framing. */
body[data-layout-style="editorial"] .segment-landing{max-width:1180px;margin-inline:auto}
body[data-layout-style="editorial"][data-family="market"] .market-home-shell{grid-template-columns:minmax(0,1.1fr) minmax(260px,.9fr);background:transparent!important;border:0;box-shadow:none;overflow:visible;gap:18px}
body[data-layout-style="editorial"][data-family="market"] .market-home-copy{order:1;background:transparent!important;color:var(--text);padding:40px 4px 30px 24px}
body[data-layout-style="editorial"][data-family="market"] .market-home-photo{order:2;border-radius:var(--v7-radius);min-height:480px;box-shadow:0 28px 80px rgba(0,0,0,.24)}
body[data-layout-style="editorial"][data-family="market"] .market-home h1{font-family:Georgia,"Times New Roman",serif;font-size:clamp(54px,10vw,96px);line-height:.86;letter-spacing:-.06em;color:var(--text);max-width:8ch}
body[data-layout-style="editorial"][data-family="market"] .market-home-copy>p{color:var(--muted);max-width:34ch;font-size:15px}
body[data-layout-style="editorial"][data-family="market"] .market-home-kicker{color:var(--accent)}

/* IMMERSIVE: campaign-like hero. */
body[data-layout-style="immersive"] .segment-landing{padding-inline:0}
body[data-layout-style="immersive"] :where(.market-home-shell,.fit-home,.beauty-home,.services-home){min-height:min(72dvh,650px);border-radius:0;border-left:0;border-right:0}
body[data-layout-style="immersive"] .market-home-copy{padding-left:max(24px,calc((100vw - 1100px)/2));padding-bottom:52px}
body[data-layout-style="immersive"] .market-home h1{font-size:clamp(52px,12vw,104px);max-width:8ch}

/* MINIMAL: removes ornamental containers. */
body[data-layout-style="minimal"] :where(.market-home-shell,.product,.segment-highlight,.designer-cta-card){box-shadow:none!important}
body[data-layout-style="minimal"][data-family="market"] .market-home-shell{background:transparent!important;border:0;grid-template-columns:1fr 1fr;gap:18px}
body[data-layout-style="minimal"][data-family="market"] .market-home-copy{background:transparent!important;color:var(--text);padding:30px 0 30px 10px}
body[data-layout-style="minimal"][data-family="market"] .market-home-copy>p{color:var(--muted)}
body[data-layout-style="minimal"][data-family="market"] .market-home-photo{border-radius:var(--v7-radius);min-height:390px}

/* Hero variants get a real structural difference. */
body[data-hero-style="poster"] .market-home-shell{min-height:460px}
body[data-hero-style="poster"] .market-home-copy{justify-content:flex-end!important;align-items:flex-start}
body[data-hero-style="poster"] .market-home h1{font-size:clamp(50px,11vw,94px)!important;max-width:8ch}
body[data-hero-style="poster"] .market-home-brand{display:none}
body[data-hero-style="compact"] .market-home-shell{min-height:330px!important}
body[data-hero-style="compact"] .market-home-copy{min-height:330px!important;padding-block:26px!important}

/* Highlights: the generic three-card row is no longer the default. */
body[data-highlight-style="rail"] .market-quick-grid,body[data-highlight-style="rail"] .segment-highlights{display:flex;gap:0;border-top:1px solid color-mix(in srgb,var(--accent) 24%,var(--line));border-bottom:1px solid color-mix(in srgb,var(--accent) 18%,var(--line));overflow-x:auto;scrollbar-width:none}
body[data-highlight-style="rail"] .market-quick-grid article,body[data-highlight-style="rail"] .segment-highlight{min-width:min(78vw,280px);min-height:84px;border:0!important;border-right:1px solid var(--line)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;padding:16px 18px;display:block;color:inherit}
body[data-highlight-style="rail"] .market-quick-grid article>span,body[data-highlight-style="rail"] .segment-highlight-n{margin:0 0 8px;display:block;font-size:9px;letter-spacing:.16em;color:var(--accent)}
body[data-highlight-style="rail"] .market-quick-grid p,body[data-highlight-style="rail"] .segment-highlight p{margin-top:4px;color:var(--muted)}
body[data-highlight-style="mosaic"] .market-quick-grid,body[data-highlight-style="mosaic"] .segment-highlights{grid-template-columns:1.35fr .65fr .65fr!important}
body[data-highlight-style="mosaic"] :where(.market-quick-grid article,.segment-highlight):first-child{grid-row:span 2;min-height:160px}
body[data-highlight-style="minimal"] .market-quick-grid,body[data-highlight-style="minimal"] .segment-highlights{display:flex;gap:24px;flex-wrap:wrap}
body[data-highlight-style="minimal"] .market-quick-grid article,body[data-highlight-style="minimal"] .segment-highlight{background:transparent!important;border:0!important;box-shadow:none!important;min-height:0;padding:8px 0}

/* Product layouts */
body[data-card-style="editorial"] .grid{gap:18px}
body[data-card-style="editorial"] .product{border:0!important;background:transparent!important;box-shadow:none!important;display:flex!important;flex-direction:column!important;overflow:visible}
body[data-card-style="editorial"] .product .p-image{height:220px!important;border-radius:var(--v7-radius);overflow:hidden;background:#fff}
body[data-card-style="editorial"] .product .p-copy{padding:12px 2px 2px!important;min-height:0!important}
body[data-card-style="editorial"] .p-badge{border-radius:4px!important}
body[data-card-style="editorial"] .p-name{font-size:16px}
body[data-card-style="editorial"] .p-price{font-size:20px!important}
body[data-card-style="shelf"][data-family="market"] .grid{gap:12px}
body[data-card-style="shelf"][data-family="market"] .market-product{border:0!important;box-shadow:0 10px 34px rgba(12,28,58,.10)!important}

/* Airy/dense changes are obvious. */
body[data-density="airy"] .content{max-width:1120px;margin-inline:auto}
body[data-density="airy"] .section{margin-top:32px}
body[data-density="airy"] .grid{gap:18px}
body[data-density="dense"] .content{padding-inline:10px}
body[data-density="dense"] .section{margin-top:14px}
body[data-density="dense"] .grid{gap:7px}
body[data-density="dense"] .cat-wrap{margin-top:6px}

/* Search/category bar feels like storefront navigation, not a form dump. */
body[data-family="market"] .content>.search{position:relative;z-index:6;margin-top:4px}
body[data-family="market"] .search input{border-width:1px!important;box-shadow:none!important;background:color-mix(in srgb,var(--surface) 92%,transparent)}
body[data-family="market"] .chip{box-shadow:none!important;font-weight:800}
body[data-layout-style="editorial"] .chip{border-radius:3px!important;background:transparent!important;border-color:transparent!important;border-bottom:2px solid transparent!important}
body[data-layout-style="editorial"] .chip.active{background:transparent!important;color:var(--text)!important;border-bottom-color:var(--accent)!important}

/* Motion: noticeable but controlled. */
body[data-motion-level="dynamic"] .jcr-reveal{transition-timing-function:var(--v7-ease)!important}
@media(hover:hover) and (pointer:fine){body[data-motion-level="dynamic"] .market-primary:hover,body[data-motion-level="dynamic"] .designer-cta-action:hover{transform:translateY(-2px)}body[data-motion-level="dynamic"] .product:hover{transform:translateY(-4px)}}

/* Light market mode no longer starts with a giant blue wall. */
body[data-ui-theme="light"][data-family="market"]{background:linear-gradient(180deg,#f7f9fd,#eef3fa 62%,#f8fafc)!important}
body[data-ui-theme="light"][data-layout-style="catalog"][data-family="market"] .market-home-copy{color:#fff!important}
body[data-ui-theme="light"][data-layout-style="editorial"][data-family="market"] .market-home-copy,body[data-ui-theme="light"][data-layout-style="minimal"][data-family="market"] .market-home-copy{color:#172554!important}

@media(max-width:720px){
  body[data-header-style="floating"] .topbar{top:6px;margin-inline:7px;border-radius:15px}
  body[data-layout-style="catalog"][data-family="market"] .market-home-shell{min-height:400px;border-radius:22px}
  body[data-layout-style="catalog"][data-family="market"] .market-home-copy{min-height:400px;padding:28px 20px 26px}
  body[data-layout-style="catalog"][data-family="market"] .market-home-brand{top:18px;left:20px}
  body[data-layout-style="catalog"][data-family="market"] .market-home-photo>span{top:17px;right:14px;max-width:48%;white-space:normal;text-align:right}
  body[data-layout-style="catalog"][data-family="market"] .market-home h1{font-size:clamp(42px,13vw,64px)}
  body[data-layout-style="editorial"][data-family="market"] .market-home-shell,body[data-layout-style="minimal"][data-family="market"] .market-home-shell{grid-template-columns:1fr;gap:10px}
  body[data-layout-style="editorial"][data-family="market"] .market-home-photo,body[data-layout-style="minimal"][data-family="market"] .market-home-photo{order:-1;min-height:280px;margin:0}
  body[data-layout-style="editorial"][data-family="market"] .market-home-copy,body[data-layout-style="minimal"][data-family="market"] .market-home-copy{padding:20px 6px 8px}
  body[data-layout-style="editorial"][data-family="market"] .market-home h1{font-size:52px}
  body[data-layout-style="immersive"] :where(.market-home-shell,.fit-home,.beauty-home,.services-home){min-height:520px}
  body[data-highlight-style="mosaic"] .market-quick-grid,body[data-highlight-style="mosaic"] .segment-highlights{grid-template-columns:1.2fr .8fr!important}
  body[data-highlight-style="mosaic"] :where(.market-quick-grid article,.segment-highlight):first-child{grid-column:1/-1;grid-row:auto;min-height:110px}
  body[data-card-style="editorial"] .product .p-image{height:170px!important}
}

@media(prefers-reduced-motion:reduce){body[data-motion-level] *{scroll-behavior:auto!important}}

/* Segment-wide composition variants */
body[data-family="food"][data-layout-style="catalog"] .hero-card{min-height:360px}
body[data-family="food"][data-layout-style="catalog"] .hero-content{max-width:640px;padding:28px 24px}
body[data-family="food"][data-layout-style="editorial"] .hero-card{min-height:430px;border:0;background:transparent;box-shadow:none}
body[data-family="food"][data-layout-style="editorial"] .hero-photo{left:42%;border-radius:var(--v7-radius);overflow:hidden}
body[data-family="food"][data-layout-style="editorial"] .hero-photo:after{background:linear-gradient(90deg,var(--bg) 0%,color-mix(in srgb,var(--bg) 86%,transparent) 16%,transparent 62%)}
body[data-family="food"][data-layout-style="editorial"] .hero-content{max-width:52%;padding:38px 12px 38px 0}
body[data-family="food"][data-layout-style="editorial"] #heroName{font-family:Georgia,"Times New Roman",serif;font-size:clamp(48px,9vw,82px);letter-spacing:-.055em}
body[data-family="food"][data-layout-style="immersive"] .hero-card{min-height:min(72dvh,650px);border-radius:0;border-left:0;border-right:0}
body[data-family="food"][data-layout-style="immersive"] .hero-content{padding-bottom:54px}
body[data-family="food"][data-layout-style="minimal"] .hero-card{min-height:330px;border:0;box-shadow:none;background:transparent}
body[data-family="food"][data-layout-style="minimal"] .hero-photo{border-radius:var(--v7-radius)}
body[data-family="food"][data-layout-style="minimal"] .product{box-shadow:none}

body[data-family="fit"][data-layout-style="editorial"] .fit-home{min-height:500px;border-radius:var(--v7-radius);overflow:hidden}
body[data-family="fit"][data-layout-style="editorial"] .fit-home-inner{max-width:620px;margin-left:auto;background:linear-gradient(90deg,transparent,rgba(4,7,8,.76) 22%,rgba(4,7,8,.94));padding-left:84px}
body[data-family="fit"][data-layout-style="minimal"] .fit-home{border:0;box-shadow:none;background:transparent}
body[data-family="fit"][data-layout-style="minimal"] .fit-home-overlay{opacity:.65}
body[data-family="beauty"][data-layout-style="immersive"] .beauty-home{min-height:620px;grid-template-columns:1fr;position:relative}
body[data-family="beauty"][data-layout-style="immersive"] .beauty-home-photo{position:absolute;inset:0;min-height:100%}
body[data-family="beauty"][data-layout-style="immersive"] .beauty-home-card{position:relative;z-index:2;align-self:end;margin:24px;max-width:520px;background:color-mix(in srgb,var(--surface) 88%,transparent);backdrop-filter:blur(16px)}
body[data-family="beauty"][data-layout-style="minimal"] .beauty-home{background:transparent;border:0;box-shadow:none;gap:20px}
body[data-family="services"][data-layout-style="editorial"] .services-home{grid-template-columns:minmax(0,1.2fr) minmax(260px,.8fr);background:transparent;border:0;box-shadow:none;gap:18px}
body[data-family="services"][data-layout-style="editorial"] .services-home-copy{background:var(--surface);border:1px solid var(--line);border-radius:var(--v7-radius)}
body[data-family="services"][data-layout-style="editorial"] .services-home-visual{border-radius:var(--v7-radius);overflow:hidden}
body[data-family="services"][data-layout-style="minimal"] .services-home{background:transparent;border:0;box-shadow:none}

@media(max-width:720px){
  body[data-family="food"][data-layout-style="editorial"] .hero-card{min-height:470px}
  body[data-family="food"][data-layout-style="editorial"] .hero-photo{left:0;top:0;bottom:42%;border-radius:var(--v7-radius)}
  body[data-family="food"][data-layout-style="editorial"] .hero-photo:after{background:linear-gradient(0deg,var(--bg),transparent 68%)}
  body[data-family="food"][data-layout-style="editorial"] .hero-content{max-width:none;top:auto;bottom:0;padding:24px 4px 10px}
  body[data-family="food"][data-layout-style="editorial"] #heroName{font-size:48px}
  body[data-family="fit"][data-layout-style="editorial"] .fit-home-inner{max-width:none;margin:0;padding:28px 20px;background:linear-gradient(0deg,rgba(4,7,8,.94),rgba(4,7,8,.34))}
  body[data-family="services"][data-layout-style="editorial"] .services-home{grid-template-columns:1fr}
}

/* ==========================================================
   JCR MENU PRO v7.1 — CORREÇÃO TEMA CLARO / HEADER FLUTUANTE
   Evita conflito entre o cabeçalho flutuante do Studio Builder
   e as cores próprias da família Market no modo claro.
   ========================================================== */
body[data-ui-theme="light"][data-family="market"][data-header-style="floating"] .topbar{
  background:linear-gradient(135deg,rgba(18,58,152,.98),rgba(28,82,188,.96))!important;
  border-color:rgba(255,255,255,.24)!important;
  box-shadow:0 16px 42px rgba(18,58,152,.22)!important;
  color:#fff!important;
}
body[data-ui-theme="light"][data-family="market"][data-header-style="floating"] .brand-name{
  color:#fff!important;
}
body[data-ui-theme="light"][data-family="market"][data-header-style="floating"] .status{
  color:#dce7ff!important;
}
body[data-ui-theme="light"][data-family="market"][data-header-style="floating"] .icon-btn{
  background:rgba(255,255,255,.12)!important;
  color:#fff!important;
  border-color:rgba(255,255,255,.22)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.02)!important;
}
body[data-ui-theme="light"][data-family="market"][data-header-style="floating"] .brand-logo{
  background:#fff!important;
  border-color:rgba(255,255,255,.70)!important;
}

/* No claro, o mosaico precisa continuar parecendo composição intencional. */
body[data-ui-theme="light"][data-family="market"][data-highlight-style="mosaic"] .market-quick-grid article{
  background:linear-gradient(145deg,#ffffff,#f7faff)!important;
  border-color:#d7e2f4!important;
  color:#172554!important;
  box-shadow:0 12px 28px rgba(18,58,152,.09)!important;
}
body[data-ui-theme="light"][data-family="market"][data-highlight-style="mosaic"] .market-quick-grid article>span{
  color:#123a98!important;
}

@media(max-width:720px){
  body[data-ui-theme="light"][data-family="market"][data-header-style="floating"] .topbar{
    margin-inline:8px!important;
  }
  body[data-highlight-style="mosaic"] .market-quick-grid article:first-child{
    min-height:96px!important;
  }
}
