/*
  Theme v4 (Minimal Tabs)
  - Inspired by provided reference screenshots
  - Uses shared palette variables from templates/partials/palette_vars.php

  Scope: only when body has class "theme-v4"
*/

.theme-v4{ 
  background: var(--qrbg);
  color: var(--qrtext);
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}

.theme-v4, .theme-v4 *{ box-sizing: border-box; }
.theme-v4 img{ max-width: 100%; height: auto; }

:root{
  /* JS can overwrite this based on measured sticky height */
  --v4-scroll-offset: 130px;
}

.theme-v4 .v4-shell{ width: 100%; }
.theme-v4 .v4-container{ width: min(720px, 100%); margin: 0 auto; padding: 0 16px; }

/* Sticky wrapper (topbar + category pills) */
.theme-v4 .v4-sticky{
  position: sticky;
  top: 0;
  z-index: 120;
  background: color-mix(in srgb, var(--qrbg) 90%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.theme-v4 .v4-sticky.is-scrolled{
  box-shadow: 0 18px 34px rgba(2,6,23,.14);
  background: color-mix(in srgb, var(--qrbg) 96%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--qrborder) 84%, transparent);
}
#v4StickySpacer{display:none;height:0;pointer-events:none;}
.theme-v4 .v4-sticky.is-fixed{position:fixed;top:0;left:0;right:0;width:100%;z-index:126;}
.theme-v4 .v4-sticky.is-fixed + #v4StickySpacer{display:block;}

/* ========== Topbar ========== */
.theme-v4 .v4-topbar{
  padding: 14px 0 10px;
  transition: padding .16s ease;
}
.theme-v4 .v4-sticky.is-scrolled .v4-topbar{
  padding: 10px 0 8px;
}

.theme-v4 .v4-topbar-inner{
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  gap: 10px;
}

.theme-v4 .v4-topbar-start{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  min-width:0;
}

.theme-v4 .v4-iconbtn{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--qrtext);
  display: grid;
  place-items: center;
  cursor: pointer;
  user-select: none;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.theme-v4 .v4-iconbtn:hover{
  background: var(--qrsurface);
  border-color: var(--qrborder);
}
.theme-v4 .v4-iconbtn:active{ transform: translateY(1px) scale(.99); }

.theme-v4 .v4-brand{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.theme-v4 .v4-brand-logo{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--qrborder);
  background: var(--qrsurface);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 34px;
}
.theme-v4 .v4-brand-logo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.theme-v4 .v4-brand-title{
  font-family: var(--qrfont-heading);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .01em;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theme-v4 .v4-actions{
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content:flex-end;
}

/* Language switcher: make it minimal (like TR text) */
.theme-v4 .qr-lang select{
  border: none !important;
  background: transparent !important;
  padding: 6px 18px 6px 8px !important;
  font-weight: 800;
  font-size: 12px;
  color: var(--qrtext) !important;
}
.theme-v4 .qr-lang:after{ right: 6px; opacity: .55; }

/* Info button from partial: icon-only (optional) */
.theme-v4 .qr-info-button{
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  display: grid;
  place-items: center;
}
.theme-v4 .qr-info-button span{ display:none; }
.theme-v4 .qr-info-button i{ font-size: 16px; color: var(--qrtext); opacity: .9; }
.theme-v4 .qr-info-button:hover{ background: var(--qrsurface); border-color: var(--qrborder); }

/* ========== Search bar (toggle) ========== */
.theme-v4 .v4-searchbar{
  padding: 0 0 10px;
}
.theme-v4 .v4-search-inner{
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--qrborder);
  background: var(--qrsurface);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}
.theme-v4 .v4-search-inner svg{ width: 18px; height: 18px; opacity: .7; }
.theme-v4 .v4-search-input{
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--qrtext);
  font-size: 14px;
}
.theme-v4 .v4-search-clear{
  width: 34px;
  height: 34px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  color: var(--qrtext);
  opacity: .75;
}
.theme-v4 .v4-search-clear:hover{ background: var(--qrsurface2); border-color: var(--qrborder); opacity: 1; }

.theme-v4 .v4-noresults{
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px dashed var(--qrborder);
  color: var(--qrmuted);
  background: transparent;
  font-size: 13px;
}

/* ========== Category Tabs ========== */
.theme-v4 .v4-tabs{
  padding: 6px 0 12px;
  border-top: 1px solid var(--qrborder);
  border-top: 1px solid color-mix(in srgb, var(--qrborder) 70%, transparent);
}

.theme-v4 .v4-tabs-inner{
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-v4 .v4-tabs-track{
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 5px;
  scroll-snap-type: x proximity;
  border-radius: 18px;
  border: 1px solid var(--qrborder);
  background: var(--qrsurface);
  box-shadow: 0 10px 22px rgba(0,0,0,.04);
  scrollbar-width: thin;
}
.theme-v4 .v4-tabs-track::-webkit-scrollbar{ height: 8px; }
.theme-v4 .v4-tabs-track::-webkit-scrollbar-thumb{ background: var(--qrborder); border-radius: 999px; }

/* Scroll hint fades (shown only when the category bar overflows) */
.theme-v4 .v4-tabs-track::before,
.theme-v4 .v4-tabs-track::after{
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: 26px;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--qr-anim-fast, .12s) var(--qr-ease, ease);
  z-index: 2;
}
.theme-v4 .v4-tabs-track::before{
  left: 2px;
  background: linear-gradient(to right, var(--qrsurface), transparent);
}
.theme-v4 .v4-tabs-track::after{
  right: 2px;
  background: linear-gradient(to left, var(--qrsurface), transparent);
}
.theme-v4 .v4-tabs-track.has-overflow:not(.at-start)::before{ opacity: 1; }
.theme-v4 .v4-tabs-track.has-overflow:not(.at-end)::after{ opacity: 1; }


.theme-v4 .v4-tab{
  flex: 0 0 auto;
  border: 1px solid transparent;
  background: transparent;
  color: var(--qrmuted);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .01em;
  text-transform: none;
  white-space: nowrap;
  scroll-snap-align: start;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.theme-v4 .v4-tab:hover{ background: var(--qrsurface2); border-color: var(--qrborder); color: var(--qrtext); }
.theme-v4 .v4-tab.is-active{
  background: var(--qrsurface2);
  border-color: var(--qrborder);
  color: var(--qrtext);
}

/* View toggle button on the right */
.theme-v4 .v4-viewbtn{
  width: 44px;
  height: 44px;
  border-radius: 18px;
  border: 1px solid var(--qrborder);
  background: var(--qrsurface);
  box-shadow: 0 10px 22px rgba(0,0,0,.04);
  display: grid;
  place-items: center;
  cursor: pointer;
  user-select: none;
  transition: transform .12s ease;
}
.theme-v4 .v4-viewbtn:active{ transform: translateY(1px) scale(.99); }
.theme-v4 .v4-viewbtn svg{ width: 18px; height: 18px; opacity: .75; }

/* only show active icon */
.theme-v4 .v4-ico{ display:none; }
.theme-v4[data-view="grid"] .v4-ico-grid{ display:block; }
.theme-v4[data-view="list"] .v4-ico-list{ display:block; }
.theme-v4[data-view="minimal"] .v4-ico-min{ display:block; }

/* ========== Main content ========== */
.theme-v4 .v4-main{ padding: 14px 0 90px; }
.theme-v4 .v4-section{ scroll-margin-top: var(--v4-scroll-offset); margin-top: 8px; }

.theme-v4 .v4-section-title{
  font-family: var(--qrfont-heading);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: .01em;
  text-transform: none;
  margin: 18px 0 10px;
}

.theme-v4 .v4-section-divider{
  height: 1px;
  width: 100%;
  background: var(--qrborder);
  opacity: .75;
  margin-bottom: 12px;
}

/* product container depends on view */
.theme-v4 .v4-products{ margin-top: 10px; }

.theme-v4[data-view="grid"] .v4-products{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 640px){
  .theme-v4[data-view="grid"] .v4-products{ grid-template-columns: 1fr; }
  .theme-v4[data-view="grid"] .v4-item{ padding: 12px; gap: 12px; align-items: flex-start; }
  .theme-v4[data-view="grid"] .v4-thumb{ width: 72px; height: 72px; flex-basis: 72px; border-radius: 16px; }
  .theme-v4[data-view="grid"] .v4-meta{ min-width: 0; }
  .theme-v4[data-view="grid"] .v4-name{ font-size: 14px; -webkit-line-clamp: 2; }
  .theme-v4[data-view="grid"] .v4-desc{ display: -webkit-box; -webkit-line-clamp: 2; }
  .theme-v4[data-view="grid"] .v4-price{ font-size: 13px; }
}

.theme-v4[data-view="list"] .v4-products{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.theme-v4[data-view="minimal"] .v4-products{
  display: flex;
  flex-direction: column;
}

.theme-v4 .v4-item{
  border-radius: 18px;
  border: 1px solid var(--qrborder);
  background: var(--qrsurface);
  padding: 12px 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: 0 10px 22px rgba(0,0,0,.04);
  cursor: pointer;
  user-select: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.theme-v4 .v4-item:hover{ box-shadow: 0 16px 32px rgba(0,0,0,.06); }
.theme-v4 .v4-item:active{ transform: translateY(1px); }

.theme-v4 .v4-thumb{
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 1px solid var(--qrborder);
  background: var(--qrsurface2);
  background: color-mix(in srgb, var(--qrsurface2) 80%, var(--qrsurface) 20%);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 64px;
  position: relative;
}


/* v4 Thumb placeholder (brand logo) while product image loads */
.theme-v4{
  --v4-brand-logo: none; /* set by JS from body[data-logo] */
}
.theme-v4 .v4-thumb::before{
  content: '';
  position: absolute;
  inset: 0;
  background-color: transparent;
  background-image: var(--v4-brand-logo);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 68%;
  opacity: .9;
  filter: saturate(.0) contrast(1.08);
  pointer-events: none;
  z-index: 0;
  transition: opacity 160ms ease;
}
.theme-v4 .v4-thumb.v4-thumb--loaded::before{
  opacity: 0;
}

/* ensure badges stay above */
.theme-v4 .v4-thumb .qr-badges{ z-index: 2; }
.theme-v4 .v4-thumb img{ width: 100%; height: 100%; object-fit: contain; padding: 6px; display:block; position: relative; z-index: 1; }

/* Product badges (overlay on thumbnail) */
.theme-v4 .qr-badges{
  position: absolute;
  top: 6px;
  left: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.theme-v4 .qr-badges.qr-badges--inline{
  position: static;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-v4 .qr-badge{
  width: 22px;
  height: 22px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--qrprimary) 18%, var(--qrborder) 82%);
  background: color-mix(in srgb, var(--qrprimary) 14%, var(--qrsurface) 86%);
  color: var(--qrprimary);
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
}

.theme-v4 .qr-badge svg{ width: 14px; height: 14px; }

/* Larger touch-friendly badges inside modal */
.theme-v4 .v4-modal-badges .qr-badge{
  width: 28px;
  height: 28px;
  border-radius: 12px;
}

.theme-v4 .v4-modal-badges .qr-badge svg{ width: 16px; height: 16px; }

.theme-v4 .v4-meta{ flex: 1; min-width: 0; }
.theme-v4 .v4-row{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.theme-v4 .v4-name{
  font-family: var(--qrfont-heading);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .01em;
  text-transform: none;
  color: var(--qrtext);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.theme-v4 .v4-price{
  font-weight: 900;
  font-size: 12px;
  color: var(--qrprimary);
  white-space: nowrap;
}

.theme-v4 .v4-desc{
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--qrmuted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* LIST VIEW overrides (cream rows + left accent line, no thumb) */
.theme-v4[data-view="list"] .v4-item{
  background: var(--qrsurface2);
  box-shadow: none;
  border-color: var(--qrborder);
  border-color: color-mix(in srgb, var(--qrborder) 65%, transparent);
  position: relative;
}
.theme-v4[data-view="list"] .v4-item::before{
  content:"";
  position:absolute;
  left:0;
  top:10px;
  bottom:10px;
  width:3px;
  border-radius: 999px;
  background: var(--qraccent);
}
.theme-v4[data-view="list"] .v4-thumb{ display:none; }
.theme-v4[data-view="list"] .v4-item{ padding-left: 14px; }
.theme-v4[data-view="list"] .v4-name{ font-size: 12px; }
.theme-v4[data-view="list"] .v4-desc{ -webkit-line-clamp: 1; }

/* MINIMAL VIEW overrides (no cards) */
.theme-v4[data-view="minimal"] .v4-item{
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 12px 0;
  gap: 0;
}
.theme-v4[data-view="minimal"] .v4-item + .v4-item{ border-top: 1px solid var(--qrborder); }
.theme-v4[data-view="minimal"] .v4-thumb{ display:none; }
.theme-v4[data-view="minimal"] .v4-desc{ -webkit-line-clamp: 1; }
.theme-v4[data-view="minimal"] .v4-price{ font-size: 13px; opacity: .9; }

.theme-v4 .v4-item.is-hidden{ display:none !important; }
.theme-v4 .v4-section.is-hidden{ display:none !important; }

/* ========== Drawer (hamburger) ========== */
.theme-v4 .v4-drawer-backdrop{
  position: fixed;
  inset: 0;
  background: var(--qroverlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 5000;
}
.theme-v4 .v4-drawer-backdrop.is-open{ opacity: 1; pointer-events: auto; }

.theme-v4 .v4-drawer{
  position: fixed;
  top: 0;
  left: -320px;
  width: 300px;
  max-width: 86vw;
  height: 100vh;
  background: var(--qrsurface);
  border-right: 1px solid var(--qrborder);
  box-shadow: 18px 0 60px rgba(0,0,0,.18);
  z-index: 5001;
  transition: left .2s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
}
.theme-v4 .v4-drawer.is-open{ left: 0; }

.theme-v4 .v4-drawer-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--qrborder);
}
.theme-v4 .v4-drawer-title{ font-family: var(--qrfont-heading); font-weight: 900; }
.theme-v4 .v4-drawer-close{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid var(--qrborder);
  background: var(--qrsurface2);
  cursor: pointer;
}

.theme-v4 .v4-drawer-body{ padding: 14px 16px 18px; overflow-y: auto; }
.theme-v4 .v4-drawer-label{ font-size: 12px; font-weight: 900; color: var(--qrmuted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }

.theme-v4 .v4-drawer-cat{
  width: 100%;
  text-align: left;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid var(--qrborder);
  background: var(--qrsurface2);
  color: var(--qrtext);
  font-weight: 800;
  letter-spacing: .01em;
  text-transform: none;
  margin-bottom: 10px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========== Product modal (simple, premium) ========== */
.theme-v4 .v4-modal-backdrop{
  position: fixed;
  inset: 0;
  background: var(--qroverlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 6000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--qr-anim-med) var(--qr-ease);
}
.theme-v4 .v4-modal-backdrop.is-open{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@supports ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) {
  .theme-v4 .v4-modal-backdrop{
    background: color-mix(in srgb, var(--qroverlay) 65%, transparent 35%);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}

.theme-v4 .v4-modal{
  width: min(520px, 100%);
  background: var(--qrsurface);
  border: 1px solid var(--qrborder);
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(0,0,0,.25);
  overflow: hidden;
  transform: translateY(10px) scale(.98);
  opacity: 0;
  transition: transform var(--qr-anim-med) var(--qr-ease), opacity var(--qr-anim-med) var(--qr-ease);
}

.theme-v4 .v4-modal-backdrop.is-open .v4-modal{
  transform: translateY(0) scale(1);
  opacity: 1;
}

.theme-v4 .v4-modal-head{ display:flex; justify-content:flex-end; padding:12px 12px 0; position:relative; z-index:4; }
.theme-v4 .v4-modal-hero{
  background: var(--qrsurface2);
  border-bottom: 1px solid var(--qrborder);
  padding: 12px 14px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-v4 .v4-modal-hero img{
  width: 100%;
  max-height: 42vh;
  object-fit: contain;
  border-radius: 14px;
  background: transparent;
  border: 0;
  padding: 0;
}

.theme-v4 .v4-modal-body{ padding: 14px 16px 18px; }
.theme-v4 .v4-modal-badges{ margin-top: 10px; }
.theme-v4 .v4-modal-badges .qr-badges{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.theme-v4 .v4-modal-title{ font-family: var(--qrfont-heading); font-weight: 900; font-size: 18px; letter-spacing:.02em; }
.theme-v4 .v4-modal-price{ margin-top: 8px; font-weight: 900; color: var(--qrprimary); }
.theme-v4 .v4-modal-desc{ margin-top: 10px; font-size: 13px; line-height: 1.45; color: var(--qrmuted); white-space: pre-line; }

.theme-v4 .v4-modal-close{
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid var(--qrborder);
  background: var(--qrsurface);
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 4;
}

/* Small devices tweaks */
@media (max-width: 420px){
  .theme-v4 .v4-container{ padding: 0 14px; }
  .theme-v4 .v4-topbar-inner{ grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 8px; }
  .theme-v4 .v4-actions{ gap: 6px; }
  .theme-v4 .v4-brand{ gap: 8px; }
  .theme-v4 .v4-brand-title{ font-size: 15px; }
  .theme-v4 .v4-tab{ padding: 8px 11px; font-size: 11px; }
  .theme-v4 .v4-viewbtn{ width: 42px; height: 42px; border-radius: 16px; }
  .theme-v4 .v4-name{ font-size: 13px; }
  .theme-v4 .v4-price{ font-size: 12px; }
  .theme-v4[data-view="grid"] .v4-item{ padding: 11px; gap: 10px; }
  .theme-v4[data-view="grid"] .v4-thumb{ width: 68px; height: 68px; flex-basis: 68px; }
}
.theme-v4 .qr-pm-wrap{margin-top:14px}
.theme-v4 .qr-pm-list li{background:rgba(255,255,255,.06);color:var(--qrtext)}
.theme-v4 .qr-pm-chip,.theme-v4 .qr-pm-state{background:rgba(255,255,255,.06);color:var(--qrtext);border-color:rgba(255,255,255,.08)}
.theme-v4 .qr-pm-title,.theme-v4 .qr-pm-list strong{color:var(--qrtext)}
.theme-v4 .qr-pm-note{color:var(--qrmuted)}


/* Semantic polish + image staging overrides */
.theme-v4 .v4-item,
.theme-v4 .v4-modal,
.theme-v4 .v4-drawer,
.theme-v4 .v4-search-inner,
.theme-v4 .v4-tabs-track{
  box-shadow: var(--qr-card-shadow, 0 12px 30px rgba(2,6,23,.08));
}

.theme-v4 .v4-drawer-backdrop,
.theme-v4 .v4-modal-backdrop{
  background: color-mix(in srgb, var(--qroverlay) 72%, transparent 28%);
}

.theme-v4 .v4-thumb,
.theme-v4 .v4-modal-hero{
  background: var(--qrimage-stage);
  border-color: var(--qrimage-border);
}

.theme-v4 .v4-thumb{
  padding: 6px;
}

.theme-v4 .v4-thumb img{
  background: var(--qrimage-panel);
  border: 1px solid var(--qrimage-border);
  box-sizing: border-box;
  padding: 8px;
}
.theme-v4 .v4-modal-hero img{
  background: transparent;
  border: 0;
  box-sizing: border-box;
  padding: 0;
}

.theme-v4 .v4-modal{
  max-height: min(88vh, 760px);
  display: flex;
  flex-direction: column;
  border-radius: 24px;
}

.theme-v4 .v4-modal-body{
  overflow: auto;
  overscroll-behavior: contain;
}

.theme-v4[data-view="list"] .v4-item::before{
  background: var(--qrprimary);
  opacity: .78;
}

.theme-v4 .qr-inline-flag--promo,
.theme-v4 .qr-pm-flag--promo{
  background: var(--qrpromo-bg);
  color: var(--qrpromo-text);
  border-color: var(--qrpromo-border);
}

.theme-v4 .qr-inline-flag--soldout,
.theme-v4 .qr-pm-state--state{
  background: var(--qrstate-bg);
  color: var(--qrstate-text);
  border-color: var(--qrstate-border);
}

.theme-v4 .qr-pm-chip,
.theme-v4 .qr-pm-list li{
  background: var(--qrchip-bg);
  border-color: var(--qrchip-border);
  color: var(--qrchip-text);
}
