.mestra-wc-showroom{padding-top:55px;padding-bottom:80px}.mestra-wc-heading{margin-bottom:36px}.mestra-wc-heading h1{font-size:clamp(32px,4vw,54px);margin:12px 0}.mestra-wc-layout{display:grid;grid-template-columns:minmax(210px,260px) minmax(0,1fr);gap:28px}.mestra-wc-filters{align-self:start;background:linear-gradient(145deg,#fafbfc,#eff2f5);border:1px solid #e3e7eb;border-radius:18px;padding:24px;display:grid;gap:12px}.mestra-wc-filters h2{font-size:20px;margin:0 0 10px}.mestra-wc-filters label{font-size:13px;font-weight:700}.mestra-wc-filters select,.mestra-wc-results input,.mestra-wc-results select,.mestra-wc-dialog input:not([type=checkbox]),.mestra-wc-dialog textarea,.mestra-wc-dialog select{max-width:100%;width:100%;padding:12px;border:1px solid #d7dce1;border-radius:9px;background:white;color:#26313a}.mestra-wc-filters button,.mestra-wc-pages button{border:1px solid #ccd4dc;border-radius:9px;background:#fff;padding:10px;cursor:pointer}.mestra-wc-results{min-width:0}.mestra-wc-results .ref-product-toolbar{display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap;margin-bottom:22px}.mestra-wc-results .mestra-product-actions{display:flex;gap:12px;flex-wrap:wrap}.mestra-wc-results .ref-product-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.mestra-wc-card{overflow:hidden;background:linear-gradient(150deg,#fff,#f1f3f5);border:1px solid #e2e6eb;border-radius:16px}.mestra-wc-open{width:100%;height:100%;border:0;background:none;padding:0;text-align:left;color:inherit;cursor:pointer;display:flex;flex-direction:column}.mestra-wc-open .ref-picture{display:flex;align-items:center;justify-content:center;width:100%;height:220px;padding:18px;background:#fff}.mestra-wc-open img{width:100%;height:100%;object-fit:contain}.mestra-wc-card-body{padding:20px;display:flex;flex-direction:column;gap:9px;flex:1}.mestra-wc-card-body strong{font-size:19px}.mestra-wc-card-body span{font-size:14px}.mestra-wc-card-body em{font-style:normal;font-weight:700;margin-top:auto}.mestra-wc-pages{display:flex;gap:8px;justify-content:center;margin-top:30px}.mestra-wc-pages button:disabled{background:#dce4eb}.mestra-wc-dialog{width:min(1000px,94vw);max-height:90vh;border:0;border-radius:18px;padding:35px;box-shadow:0 20px 90px #0005;color:#26313a}.mestra-wc-dialog::backdrop{background:#15212cc2}.mestra-wc-close{position:absolute;top:10px;right:18px;background:transparent;border:0;font-size:32px;cursor:pointer}.mestra-wc-detail-grid{display:grid;grid-template-columns:42% 1fr;gap:34px}.mestra-wc-gallery{display:grid;gap:12px;align-content:start}.mestra-wc-gallery img{width:100%;max-height:360px;object-fit:contain;border-radius:12px;background:#f5f6f7}.mestra-wc-detail-grid h2{font-size:30px}.mestra-wc-detail-grid h3{margin:24px 0 12px}.mestra-wc-detail-grid dl{display:grid;grid-template-columns:1fr 1fr;gap:10px}.mestra-wc-detail-grid dt{font-weight:700}.mestra-wc-detail-grid dd{margin:0}.mestra-wc-dialog form{display:grid;gap:12px}.mestra-wc-dialog form label{display:grid;gap:6px;font-size:14px}.mestra-wc-dialog .mestra-wc-privacy{display:flex;align-items:flex-start}.mestra-wc-dialog form button{background:#243b51;color:#fff;border:0;padding:13px;border-radius:8px;cursor:pointer}.mestra-wc-hp{position:absolute!important;left:-10000px}.mestra-wc-card:focus-within,.mestra-wc-card:hover{box-shadow:0 7px 24px #182d401a}@media(max-width:900px){.mestra-wc-results .ref-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){.mestra-wc-layout,.mestra-wc-detail-grid{grid-template-columns:1fr}.mestra-wc-results .ref-product-grid{grid-template-columns:1fr}.mestra-wc-dialog{padding:24px}.mestra-wc-open .ref-picture{height:200px}}

/* v15: keep the modal independent of inherited theme dialog and grid rules. */
body .mestra-wc-dialog[open]{box-sizing:border-box;position:fixed!important;inset:0!important;margin:auto!important;width:min(1080px,94vw)!important;max-width:1080px!important;min-width:0!important;max-height:90dvh!important;overflow-y:auto!important;overflow-x:hidden!important;padding:clamp(20px,3vw,36px)!important;display:block!important;transform:none!important;}
body .mestra-wc-dialog *,body .mestra-wc-dialog *::before,body .mestra-wc-dialog *::after{box-sizing:border-box;min-width:0;overflow-wrap:anywhere;}
body .mestra-wc-dialog .mestra-wc-detail-grid{display:grid!important;grid-template-columns:minmax(0,42%) minmax(0,1fr)!important;gap:clamp(18px,3vw,36px)!important;width:100%!important;}
body .mestra-wc-dialog .mestra-wc-detail-grid h2{font-size:clamp(22px,2.4vw,30px)!important;line-height:1.25;overflow-wrap:anywhere;}
body .mestra-wc-dialog .mestra-wc-gallery img{max-width:100%;height:auto;}
body .mestra-wc-dialog .mestra-wc-close{position:sticky;top:0;float:right;z-index:3;}
.mestra-wc-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 26px;}
.mestra-wc-tabs button{padding:15px 10px;background:#f4f5f7;border:1px solid #dfe2e6;border-radius:6px;font-weight:700;cursor:pointer;color:#17232f;}
.mestra-wc-tabs button.is-active{background:#c5003e;color:#fff;border-color:#c5003e;}
@media(max-width:700px){.mestra-wc-tabs{grid-template-columns:repeat(2,minmax(0,1fr));}body .mestra-wc-dialog .mestra-wc-detail-grid{grid-template-columns:minmax(0,1fr)!important;}body .mestra-wc-dialog[open]{width:96vw!important;max-height:94dvh!important;padding:20px!important;}}

/* v15.1: prevent intrinsic-width content from creating a horizontal modal scrollbar. */
html body dialog#mestra-wc-dialog.mestra-wc-dialog[open]{
  width:min(1080px,calc(100vw - 32px))!important;
  max-width:calc(100vw - 32px)!important;
  min-width:0!important;
  overflow-x:clip!important;
  overflow-y:auto!important;
  scrollbar-gutter:stable;
  contain:layout;
}
#mestra-wc-dialog #mestra-wc-detail,
#mestra-wc-dialog .mestra-wc-detail-grid,
#mestra-wc-dialog .mestra-wc-detail-grid > div,
#mestra-wc-dialog .mestra-wc-gallery{min-width:0!important;max-width:100%!important;}
#mestra-wc-dialog :is(img,video,iframe,svg,canvas){max-width:100%!important;height:auto;}
#mestra-wc-dialog :is(table,pre,code){max-width:100%;white-space:normal;overflow-wrap:anywhere;word-break:break-word;}
#mestra-wc-dialog table{width:100%!important;table-layout:fixed;}
#mestra-wc-dialog :is(td,th,p,li,dd,h2,h3,a){overflow-wrap:anywhere;word-break:normal;}
#mestra-wc-dialog :is(input,select,textarea,button){min-width:0;max-width:100%;}
#mestra-wc-dialog .mestra-wc-detail-grid{grid-template-columns:minmax(0,42fr) minmax(0,58fr)!important;}
@media(max-width:700px){
  html body dialog#mestra-wc-dialog.mestra-wc-dialog[open]{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;padding:18px!important;}
  #mestra-wc-dialog .mestra-wc-detail-grid{grid-template-columns:minmax(0,1fr)!important;}
}

/* v16 – product page layout aligned to the original MESTRA reference mockup.
   Scoped to the WooCommerce showroom to preserve all other theme pages. */
.mestra-wc-showroom{padding-top:12px;padding-bottom:70px}
.mestra-wc-showroom .mestra-wc-heading.r4-product-hero{
 display:flex!important;align-items:center;min-height:330px;margin:0 0 20px!important;
 border-radius:5px;overflow:hidden;
 background-color:#f2f5f8!important;
 background-image:linear-gradient(90deg,rgba(255,255,255,.97) 0%,rgba(255,255,255,.90) 27%,rgba(255,255,255,.45) 47%,rgba(255,255,255,0) 69%),url('../reference/mestra-produkte-showroom-header.png')!important;
 background-size:cover!important;background-position:center center!important;background-repeat:no-repeat!important;
}
.mestra-wc-showroom .mestra-wc-heading .r4-hero-copy{position:relative;z-index:1;width:min(58%,680px);padding:38px clamp(22px,3.2vw,45px);box-sizing:border-box}
.mestra-wc-showroom .mestra-wc-heading h1{font-size:clamp(29px,3vw,43px);line-height:1.08;letter-spacing:-.045em;margin:11px 0;color:#1b2732}
.mestra-wc-showroom .mestra-wc-heading p{font-size:14px;line-height:1.5;max-width:500px;color:#43505a}
.mestra-wc-showroom .mestra-wc-heading .ref-kicker{font-size:12px;font-weight:800;letter-spacing:.12em;color:#bd003b}
.mestra-wc-showroom .mestra-wc-tabs{margin:17px 0 24px;gap:10px}
.mestra-wc-showroom .mestra-wc-tabs button{border-radius:6px;background:linear-gradient(135deg,#f8f9fa,#eef1f4);border:1px solid #e4e6e9;color:#1a222b;font-size:15px;font-weight:800;min-height:60px;transition:background .15s}
.mestra-wc-showroom .mestra-wc-tabs button.is-active{background:#cd003b;color:#fff;border-color:#cd003b}
.mestra-wc-showroom .mestra-wc-layout{grid-template-columns:minmax(205px,24%) minmax(0,1fr);gap:22px}
.mestra-wc-showroom .mestra-wc-filters{border-radius:6px;background:linear-gradient(145deg,#f9fafb,#eef1f4);padding:22px 18px;border:1px solid #e3e6e9;gap:10px}
.mestra-wc-showroom .mestra-wc-filters h2{font-size:18px}
.mestra-wc-showroom .mestra-wc-filters select{border-radius:5px;padding:11px}
.mestra-wc-showroom .mestra-wc-results .ref-product-grid{gap:16px}
.mestra-wc-showroom .mestra-wc-card{border-radius:6px;background:linear-gradient(145deg,#fff,#f4f6f8);border:1px solid #e4e7ea}
.mestra-wc-showroom .mestra-wc-open .ref-picture{height:210px;background:linear-gradient(145deg,#fff,#f8f9fa);padding:18px}
.mestra-wc-showroom .mestra-wc-card-body{padding:16px;gap:8px}
.mestra-wc-showroom .mestra-wc-card-body strong{font-size:16px;line-height:1.3}
.mestra-wc-showroom .mestra-wc-card-body span{font-size:12px;line-height:1.5}
.mestra-wc-showroom .mestra-wc-card-body em{color:#bd003b;font-size:13px}
@media(max-width:900px){.mestra-wc-showroom .mestra-wc-layout{grid-template-columns:minmax(190px,28%) minmax(0,1fr)}}
@media(max-width:700px){.mestra-wc-showroom .mestra-wc-heading.r4-product-hero{min-height:300px;background-position:62% center!important;background-image:linear-gradient(90deg,rgba(255,255,255,.98),rgba(255,255,255,.86) 60%,rgba(255,255,255,.22)),url('../reference/mestra-produkte-showroom-header.png')!important}.mestra-wc-showroom .mestra-wc-heading .r4-hero-copy{width:100%;padding:26px 22px}.mestra-wc-showroom .mestra-wc-layout{grid-template-columns:minmax(0,1fr)}.mestra-wc-showroom .mestra-wc-tabs button{font-size:12px;min-height:52px}.mestra-wc-showroom .mestra-wc-results .ref-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:460px){.mestra-wc-showroom .mestra-wc-results .ref-product-grid{grid-template-columns:1fr}.mestra-wc-showroom .mestra-wc-tabs{gap:6px}.mestra-wc-showroom .mestra-wc-tabs button{padding:10px 5px}}

/* v17: original mockup controls; existing banner intentionally untouched. */
.mestra-wc-showroom .mestra-wc-tabs{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0 22px}
.mestra-wc-showroom .mestra-wc-tabs button{min-height:55px;border-radius:5px;font-size:14px;display:flex;align-items:center;justify-content:center;gap:10px}
.mestra-wc-showroom .mestra-wc-tabs button span{font-size:23px;font-weight:400;line-height:1}
.mestra-wc-showroom .mestra-wc-layout{grid-template-columns:minmax(215px,26%) minmax(0,1fr);gap:22px}
.mestra-wc-showroom .mestra-wc-filters{display:block;padding:0 0 15px;border:0;background:none;border-radius:0}
.mestra-wc-showroom .mestra-wc-filters h2{margin:0;padding:0 0 14px;font-size:18px}
.mestra-wc-showroom .mestra-filter-group{border-top:1px solid #e0e4e8;padding:0}
.mestra-wc-showroom .mestra-filter-group:last-of-type{border-bottom:1px solid #e0e4e8}
.mestra-wc-showroom .mestra-filter-group summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;padding:15px 0;font-size:13px;font-weight:750;color:#18232e}
.mestra-wc-showroom .mestra-filter-group summary::-webkit-details-marker{display:none}
.mestra-wc-showroom .mestra-filter-group summary::after{content:'›';font-size:22px;line-height:12px;color:#c9003c;transition:transform .2s}
.mestra-wc-showroom .mestra-filter-group[open] summary::after{transform:rotate(90deg)}
.mestra-wc-showroom .mestra-filter-options{display:grid;gap:9px;padding:0 0 16px;max-height:290px;overflow-y:auto}
.mestra-wc-showroom .mestra-filter-check{display:flex;align-items:flex-start;gap:7px;font-size:12px;font-weight:400;line-height:1.4;cursor:pointer}
.mestra-wc-showroom .mestra-filter-check input{accent-color:#c9003c;flex:none;margin:2px 0 0}
.mestra-wc-showroom #mestra-wc-subwrap{padding:5px 0 0 15px}
.mestra-wc-showroom #mestra-wc-subwrap strong{display:block;font-size:12px;margin:0 0 10px}
.mestra-wc-showroom #mestra-wc-reset{margin-top:15px;border:1px solid #d8dfe5;border-radius:5px;padding:9px 13px;font-size:12px;background:#fff}
.mestra-wc-showroom .ref-product-toolbar{display:flex;flex-direction:column;align-items:stretch!important;gap:12px!important;margin-bottom:16px!important}
.mestra-wc-showroom .mestra-wc-searchbox{position:relative;display:flex;align-items:center;width:100%;border:1px solid #cbd3db;border-radius:5px;background:#fff;height:44px}
.mestra-wc-showroom .mestra-wc-searchbox span{padding:0 11px;color:#47566a;font-size:21px}
.mestra-wc-showroom .mestra-wc-searchbox input{flex:1;width:100%;min-width:0;border:0!important;outline-offset:-3px;padding:9px 9px 9px 0!important;background:transparent!important;font-size:13px}
.mestra-wc-showroom .mestra-wc-toolbar-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%}
.mestra-wc-showroom .mestra-wc-toolbar-bottom b{font-size:13px}
.mestra-wc-showroom .mestra-wc-sortlabel{display:flex;align-items:center;gap:8px;font-size:12px;white-space:nowrap}
.mestra-wc-showroom .mestra-wc-sortlabel select{width:auto;min-width:130px;padding:8px!important;border-radius:5px;font-size:12px}
.mestra-wc-showroom .mestra-wc-open .ref-picture{height:175px;padding:10px;background:linear-gradient(140deg,#f9fafb,#eff2f4)}
.mestra-wc-showroom .mestra-wc-card-body{padding:12px;gap:6px}
.mestra-wc-showroom .mestra-wc-card-body strong{font-size:14px;line-height:1.25}
.mestra-wc-showroom .mestra-wc-card-body small{font-size:10px;color:#c9003c;font-weight:750}
.mestra-wc-showroom .mestra-wc-card-body em{font-size:12px}
@media(max-width:800px){.mestra-wc-showroom .mestra-wc-layout{grid-template-columns:1fr}.mestra-wc-showroom .mestra-wc-tabs button{font-size:12px}}
@media(max-width:520px){.mestra-wc-showroom .mestra-wc-tabs{grid-template-columns:1fr}.mestra-wc-showroom .mestra-wc-toolbar-bottom{flex-wrap:wrap}}

/* v18: four accessible section tabs and uncropped product thumbnails */
.mestra-wc-showroom .mestra-wc-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.mestra-wc-showroom .mestra-wc-tabs button{display:flex;align-items:center;justify-content:center;gap:10px;min-width:0;padding:12px 10px;line-height:1.25}
.mestra-wc-showroom .mestra-wc-tabs button svg{display:block;flex:0 0 24px;width:24px;height:24px;stroke:currentColor}
.mestra-wc-showroom .mestra-wc-tabs button span{font-size:inherit;font-weight:inherit;line-height:inherit}
.mestra-wc-showroom .mestra-wc-tabs button:focus-visible{outline:3px solid #bd003b;outline-offset:3px}
.mestra-wc-showroom .mestra-wc-card .ref-picture{display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important;box-sizing:border-box!important;height:210px!important;padding:16px!important;}
.mestra-wc-showroom .mestra-wc-card .ref-picture img{display:block!important;position:static!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center center!important;transform:none!important;aspect-ratio:auto!important;}
@media(max-width:850px){.mestra-wc-showroom .mestra-wc-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.mestra-wc-showroom .mestra-wc-tabs button{gap:7px;font-size:12px;padding:10px 5px}.mestra-wc-showroom .mestra-wc-tabs button svg{width:20px;height:20px;flex-basis:20px}.mestra-wc-showroom .mestra-wc-card .ref-picture{height:190px!important}}
