/* Bát Tràng Việt Nam: product preview v2 */
body.tax-product_cat .product-small .box-image .grid-tools:has(.quick-view){
  display:flex!important;justify-content:flex-end;inset:auto 8px 8px auto;width:auto;
  transform:none!important;opacity:1!important;visibility:visible!important;pointer-events:none;
}
body.tax-product_cat .product-small .box-image .quick-view{
  display:inline-flex!important;align-items:center;justify-content:center;gap:7px;
  min-width:44px;min-height:44px;width:auto!important;margin:0;padding:0 11px;
  border:1px solid #e6d8cf;border-radius:50px;background:#fffcfaee!important;color:#683b2b!important;
  box-shadow:0 2px 8px #2c190e26;font-size:12px;line-height:1.25;font-weight:700;
  text-transform:none;pointer-events:auto;
}
body.tax-product_cat .product-small .quick-view svg{display:block;width:18px;height:18px;flex:none;pointer-events:none}
body.tax-product_cat .product-small .quick-view .btvn-qv-trigger-text{pointer-events:none}
body.tax-product_cat .product-small .quick-view:is(:hover,:focus-visible){
  color:#fff!important;background:#803e2a!important;border-color:#803e2a;
}
body.tax-product_cat .product-small .quick-view:focus-visible{
  outline:2px solid #803e2a;outline-offset:2px;box-shadow:0 0 0 2px #fff;
}
@media (hover:hover) and (pointer:fine) and (min-width:850px){
  body.tax-product_cat .product-small .box-image .quick-view{
    opacity:0;transform:translateY(4px);pointer-events:none;transition:opacity .16s ease,transform .16s ease;
  }
  body.tax-product_cat .product-small:is(:hover,:focus-within) .box-image .quick-view{
    opacity:1;transform:none;pointer-events:auto;
  }
}
@media (hover:none),(pointer:coarse),(max-width:849px){
  body.tax-product_cat .product-small .box-image .quick-view{width:44px!important;padding:0;background:#fffaf2e8!important}
  body.tax-product_cat .product-small .box-image .quick-view:focus-visible{background:#803e2a!important;color:#fff!important}
  body.tax-product_cat .product-small .quick-view .btvn-qv-trigger-text{display:none}
}
@media (prefers-reduced-motion:reduce){
  body.tax-product_cat .product-small .quick-view{transition:none!important}
}
body.tax-product_cat .mfp-bg:has(+ .mfp-wrap .product-quick-view-container){background:#201712;opacity:.69}
body.tax-product_cat .mfp-wrap:has(.product-quick-view-container) .mfp-container{padding:16px 12px}
body.tax-product_cat .mfp-content:has(.product-quick-view-container){width:min(890px,100%);max-width:100%}
body.tax-product_cat .product-lightbox:has(.product-quick-view-container){width:100%;max-width:none;background:transparent;box-shadow:none}
body.tax-product_cat .product-quick-view-container{
  --qv-text:#35251e;--qv-accent:#8c412b;--qv-border:#e9ded6;--qv-soft:#faf5ef;
  max-height:calc(100vh - 64px);max-height:calc(100dvh - 64px);overflow:auto;overscroll-behavior:contain;
  border:1px solid var(--qv-border);border-radius:18px;background:#fffdfb;color:var(--qv-text);
  box-shadow:0 20px 64px #27140942;text-align:left;
}
body.tax-product_cat .mfp-wrap.btvn-qv-ready>.mfp-close{display:none!important}
body.tax-product_cat:has(.mfp-wrap.btvn-qv-ready) #btvn-ssa{display:none!important}
.btvn-qv-top{
  position:sticky;top:0;z-index:12;display:flex;align-items:center;justify-content:space-between;
  gap:12px;min-height:59px;padding:6px 12px 6px 22px;
  border-bottom:1px solid var(--qv-border);background:#fffdfb;color:#594034;
}
.btvn-qv-top span{font-size:14px;font-weight:700;line-height:1.3}
body.tax-product_cat .product-quick-view-container .btvn-qv-close{
  display:grid;place-items:center;width:44px;height:44px;min-height:44px;margin:0;padding:0;
  border:1px solid var(--qv-border);border-radius:50%;background:var(--qv-soft);color:var(--qv-text);
  font:400 25px/1 Arial,sans-serif;box-shadow:none;
}
body.tax-product_cat .product-quick-view-container>.row.product{width:100%;max-width:none;margin:0;align-items:flex-start}
body.tax-product_cat .product-quick-view-container .product-gallery{padding:16px 0 16px 16px!important;background:transparent}
body.tax-product_cat .product-quick-view-container .product-gallery-slider{
  overflow:hidden;border-radius:12px;background:var(--qv-soft);
}
body.tax-product_cat .product-quick-view-container .product-gallery-slider img{
  display:block;width:100%;height:auto;max-height:min(54dvh,435px);object-fit:contain;
}
.btvn-qv-pager{
  display:flex;align-items:center;justify-content:center;gap:6px;margin:8px 0 0;
}
.btvn-qv-pager[hidden],.btvn-qv-thumbnails[hidden],.btvn-qv-count[hidden]{display:none!important}
.btvn-qv-count{
  position:absolute;top:9px;right:9px;z-index:3;padding:4px 8px;border-radius:20px;
  background:#31231ee6;color:#fff;font-size:12px;font-weight:700;line-height:1.25;
  font-variant-numeric:tabular-nums;pointer-events:none;
}
.btvn-qv-thumbnails{
  position:relative;display:flex;gap:6px;min-width:0;max-width:100%;overflow-x:auto;
  padding:3px 2px 4px;scrollbar-width:thin;scrollbar-color:#cbb8ab transparent;
}
body.tax-product_cat .product-quick-view-container .btvn-qv-pager :is(.btvn-qv-prev,.btvn-qv-next){
  display:grid;place-items:center;min-width:44px;min-height:44px;width:44px;height:44px;margin:0;padding:0;
  border:1px solid var(--qv-border);border-radius:50%;background:#fffdfb;color:#693b2a;
  font:400 23px/1 Arial,sans-serif;box-shadow:none;flex:none;
}
body.tax-product_cat .product-quick-view-container .btvn-qv-thumb{
  display:grid;place-items:center;flex:none;width:52px;height:52px;min-height:0;margin:0;padding:2px;
  border:2px solid transparent;border-radius:8px;background:var(--qv-soft);overflow:hidden;box-shadow:none;
}
body.tax-product_cat .product-quick-view-container .btvn-qv-thumb img{
  display:block;width:100%;height:100%;object-fit:contain;border-radius:4px;
}
body.tax-product_cat .product-quick-view-container .btvn-qv-thumb[aria-current="true"]{border-color:var(--qv-accent)}
body.tax-product_cat .product-quick-view-container .btvn-qv-thumb:is(:hover,:focus-visible){border-color:#9a674f}
body.tax-product_cat .product-quick-view-container :is(.btvn-qv-close,.btvn-qv-prev,.btvn-qv-next):is(:hover,:focus-visible){
  background:#f2e6dc;color:#583024;border-color:#b58e79;
}
body.tax-product_cat .product-quick-view-container .btvn-qv-has-pager .flickity-page-dots{display:none!important}
body.tax-product_cat .product-quick-view-container .product-lightbox-inner{padding:22px 24px 24px!important}
body.tax-product_cat .product-quick-view-container .product-lightbox-inner :is(h1,.product-title){
  margin:0 0 14px;color:var(--qv-text);font-size:clamp(19px,1.9vw,25px);font-weight:700;line-height:1.25;overflow-wrap:anywhere;
}
body.tax-product_cat .product-quick-view-container :is(.is-divider,.woocommerce-product-details__short-description,.product-short-description,.product_meta,.battrang-quick-order-wrapper,.battrang-quick-order-btn,.battrang-quick-order-modal,.battrang-buttons-container,.btvn-preview-retail-quote[hidden]){display:none!important}
body.tax-product_cat .product-quick-view-container .price-wrapper{margin:0 0 14px}
body.tax-product_cat .product-quick-view-container .price-wrapper .price{margin:0;color:var(--qv-accent);font-size:clamp(18px,2vw,24px);line-height:1.22}
body.tax-product_cat .product-quick-view-container .price-wrapper .amount{color:inherit}
body.tax-product_cat .product-quick-view-container form.cart{margin:0 0 10px}
body.tax-product_cat .product-quick-view-container.btvn-qv-retail form.cart{
  display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 10px;
}
body.tax-product_cat .product-quick-view-container.btvn-qv-retail .quantity{margin:0;flex:none}
body.tax-product_cat .product-quick-view-container.btvn-qv-retail .quantity :is(input,button){height:44px;min-height:44px}
body.tax-product_cat .product-quick-view-container form.cart .single_add_to_cart_button{
  display:inline-flex!important;align-items:center;justify-content:center;flex:1 0 auto;width:auto!important;
  min-width:0!important;max-width:none!important;height:auto!important;min-height:44px;
  margin:0!important;padding:8px 12px!important;white-space:normal!important;line-height:1.2!important;
  border:1px solid #7a3a26;border-radius:8px;background:#87412d!important;color:#fff!important;
  font-size:14px;font-weight:700;letter-spacing:0;text-transform:none;
}
body.tax-product_cat .product-quick-view-container form.cart .single_add_to_cart_button:is(:hover,:focus-visible){background:#692d20!important}
body.tax-product_cat .product-quick-view-container .btvn-preview-details{
  display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:2px 0;
  color:#753d29;font-size:14px;font-weight:700;text-decoration:none;
}
body.tax-product_cat .product-quick-view-container .btvn-preview-details:is(:hover,:focus-visible){
  text-decoration:underline;text-underline-offset:4px;
}
body.tax-product_cat .product-quick-view-container .btvn-preview-details:focus-visible{outline:2px solid #74351e;outline-offset:2px}
body.tax-product_cat .product-quick-view-container .custom-form-quick-quote:not([hidden]){
  padding:12px;margin:0 0 6px;border:1px solid var(--qv-border);border-radius:10px;background:var(--qv-soft);
}
@media(min-width:850px){
  body.tax-product_cat .product-quick-view-container .btvn-qv-top{
    display:block;min-height:0;height:0;padding:0;border:0;background:none;pointer-events:none;
  }
  body.tax-product_cat .product-quick-view-container .btvn-qv-top span{display:none}
  body.tax-product_cat .product-quick-view-container .btvn-qv-close{
    position:absolute;top:12px;right:12px;pointer-events:auto;
  }
  body.tax-product_cat .product-quick-view-container>.row.product{
    display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);align-items:stretch;
  }
  body.tax-product_cat .product-quick-view-container>.row.product::before,
  body.tax-product_cat .product-quick-view-container>.row.product::after{display:none}
  body.tax-product_cat .product-quick-view-container :is(.product-gallery,.product-info){
    width:100%;max-width:none;min-width:0;
  }
  body.tax-product_cat .product-quick-view-container .product-gallery{
    display:flex;flex-direction:column;justify-content:center;padding:20px!important;
  }
  body.tax-product_cat .product-quick-view-container .product-gallery-slider img{max-height:min(60dvh,465px)}
  body.tax-product_cat .product-quick-view-container .btvn-qv-thumb{width:48px;height:48px}
  body.tax-product_cat .product-quick-view-container .product-info{
    display:flex;align-items:center;padding:0!important;border-left:1px solid #eee3db;background:#faf6f2;
  }
  body.tax-product_cat .product-quick-view-container .product-lightbox-inner{
    width:100%;padding:58px clamp(24px,3vw,38px) 50px!important;
  }
  body.tax-product_cat .product-quick-view-container .product-lightbox-inner :is(h1,.product-title){margin-bottom:16px}
  body.tax-product_cat .product-quick-view-container .price-wrapper{margin-bottom:20px}
  body.tax-product_cat .product-quick-view-container.btvn-qv-retail form.cart{
    padding-top:16px;border-top:1px solid var(--qv-border);margin-bottom:8px;
  }
}
@media(max-width:849px){
  body.tax-product_cat .mfp-content:has(.product-quick-view-container){width:min(440px,100%)}
  body.tax-product_cat .product-quick-view-container .product-gallery{padding:12px 12px 0!important}
  body.tax-product_cat .product-quick-view-container .product-gallery-slider img{max-height:min(37dvh,338px)}
  body.tax-product_cat .product-quick-view-container .product-lightbox-inner{padding:10px 16px 16px!important}
  .btvn-qv-top{min-height:54px;padding:4px 8px 4px 16px}
  .btvn-qv-pager{margin-top:4px}
}
@media(min-width:1024px){body .custom-nav-wrapper{right:20px;left:auto;bottom:calc(max(20px,env(safe-area-inset-bottom)) + 132px);width:60px;border:1px solid #eadcd3;background:#fffdfa;box-shadow:0 5px 18px #3720131f}body .custom-nav-wrapper:is(:hover,:focus-within){width:168px}body .custom-nav-wrapper .custom-nav-link{flex-direction:row-reverse;padding-inline:14px}body .custom-nav-wrapper .custom-nav-text{margin:0 12px 0 0;opacity:0;transform:translateX(8px)}body .custom-nav-wrapper:is(:hover,:focus-within) .custom-nav-text{opacity:1;transform:none}body .custom-nav-wrapper .custom-nav-link:focus-visible{outline:2px solid #8d3a1c;outline-offset:-3px}body .custom-nav-wrapper :is(.custom-cart-count,.btvn-cart-count){right:5px;left:auto}}

.btvn-do-tho-entry,
.btvn-do-tho-dialog,
.btvn-do-tho-image-viewer {
  --do-tho-text: #36261e;
  --do-tho-accent: #843f2a;
  --do-tho-border: #eaded5;
  --do-tho-soft: #faf3ed;
  color: var(--do-tho-text);
}

.btvn-do-tho-entry {
  margin: 16px 0 20px;
  padding: 16px;
  border: 1px solid var(--do-tho-border);
  border-radius: 12px;
  background: #fffaf5;
}

.single-product .btvn-do-tho-entry {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.single-product .btvn-do-tho-product-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  margin: 10px 0 14px;
  padding: 9px 12px;
}

.btvn-do-tho-entry h2,
.btvn-do-tho-head h2 {
  margin: 0 0 9px;
  color: inherit;
  font-size: clamp(17px, 2vw, 23px);
  line-height: 1.2;
}

.btvn-do-tho-entry-actions,
.btvn-do-tho-foot-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: 8px;
}

.btvn-do-tho-entry > small { display: block; margin-top: 8px; }
.btvn-do-tho-sets { flex: 0 1 auto; }
.btvn-do-tho-set-links { display: grid; gap: 8px; padding: 10px 0 2px; }
.btvn-do-tho-set-links a { color: var(--do-tho-accent); text-decoration: underline; }
.single-product .btvn-do-tho-contents { display: block; }
.btvn-do-tho-contents summary { width: 100%; }
.btvn-do-tho-contents summary::after { content: '+'; margin-left: 8px; }
.btvn-do-tho-contents[open] summary::after { content: '−'; }
.btvn-do-tho-contents ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 4px 16px;
  margin: 10px 0 0 16px;
}
.btvn-do-tho-contents li { margin: 0; }
#btvn-do-tho-mua-le { scroll-margin-top: 115px; }

.btvn-do-tho-entry :is(.btvn-do-tho-primary, .btvn-do-tho-secondary, summary),
.btvn-do-tho-dialog :is(.btvn-do-tho-primary, .btvn-do-tho-secondary),
.btvn-do-tho-image-viewer .btvn-do-tho-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 8px 13px;
  border: 1px solid var(--do-tho-accent);
  border-radius: 8px;
  background: #fffdfa;
  color: var(--do-tho-accent);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  text-align: center;
  text-transform: none;
  cursor: pointer;
}

.btvn-do-tho-entry .btvn-do-tho-primary,
.btvn-do-tho-dialog .btvn-do-tho-primary { background: var(--do-tho-accent); color: #fff; }
.btvn-do-tho-entry .btvn-do-tho-primary:hover,
.btvn-do-tho-dialog .btvn-do-tho-primary:hover { background: #692e21; }
.btvn-do-tho-product-entry .btvn-do-tho-primary {
  background: #fffdfa;
  color: var(--do-tho-accent);
}
.btvn-do-tho-product-entry .btvn-do-tho-primary:hover { background: var(--do-tho-soft); }
.btvn-do-tho-dialog .btvn-do-tho-primary:disabled { opacity: .55; cursor: default; }
.btvn-do-tho-sets summary::after { content: '+'; margin-left: 8px; }
.btvn-do-tho-sets[open] summary::after { content: '−'; }

.btvn-do-tho-dialog:not([open]),
.btvn-do-tho-image-viewer:not([open]),
.btvn-do-tho-dialog [hidden] { display: none !important; }

.btvn-do-tho-dialog[open] {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(900px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100% - 36px);
  max-height: calc(100dvh - 36px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--do-tho-border);
  border-radius: 16px;
  background: #fffdfa;
  box-shadow: 0 14px 48px rgb(45 26 18 / .26);
  font-size: 16px;
  line-height: 1.35;
}

.btvn-do-tho-dialog::backdrop { background: rgb(41 27 20 / .58); }
.btvn-do-tho-image-viewer::backdrop { background: rgb(41 27 20 / .78); }
.btvn-do-tho-image-viewer {
  position: fixed;
  inset: 0;
  width: min(680px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--do-tho-border);
  border-radius: 14px;
  background: #fffdfa;
}
.btvn-do-tho-image-viewer img {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 110px);
  object-fit: contain;
}
.btvn-do-tho-image-viewer .btvn-do-tho-head { align-items: center; }
.btvn-do-tho-image-viewer .btvn-do-tho-secondary { flex: none; }
html:has(.btvn-do-tho-dialog[open]) { overflow: hidden; }

.btvn-do-tho-head,
.btvn-do-tho-foot { padding: 13px 18px; }

.btvn-do-tho-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  border-bottom: 1px solid var(--do-tho-border);
}

.btvn-do-tho-head h2 { margin-bottom: 4px; }
.btvn-do-tho-head p { margin: 0; color: #6c4d3d; }
.btvn-do-tho-head h2:focus { outline: none; }

.btvn-do-tho-dialog .btvn-do-tho-close {
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--do-tho-border);
  border-radius: 50%;
  background: var(--do-tho-soft);
  color: var(--do-tho-text);
  font: 400 26px/1 Arial, sans-serif;
}

.btvn-do-tho-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 18px;
}

.btvn-do-tho-load { margin: 8px 0; }
.btvn-do-tho-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  min-inline-size: 0;
  border: 0;
}

.btvn-do-tho-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.btvn-do-tho-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--do-tho-border);
  border-radius: 10px;
  background: #fff;
}

.btvn-do-tho-row.is-selected { border-color: #af735a; background: #fffbf8; }
.btvn-do-tho-pick {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  margin: 0;
  padding: 5px;
  cursor: pointer;
  font-weight: 700;
}
.btvn-do-tho-dialog .btvn-do-tho-check {
  justify-self: center;
  flex: none;
  width: 23px;
  height: 23px;
  margin: 0;
  accent-color: var(--do-tho-accent);
  cursor: pointer;
}

.btvn-do-tho-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.btvn-do-tho-identity a { display: block; color: var(--do-tho-text); font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.btvn-do-tho-identity a:hover { text-decoration: underline; }
.btvn-do-tho-identity small { color: #705547; }
.btvn-do-tho-thumb { flex: 0 0 96px; min-width: 0; }
.btvn-do-tho-dialog .btvn-do-tho-zoom {
  display: grid;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--do-tho-border);
  border-radius: 7px;
  background: var(--do-tho-soft);
  color: var(--do-tho-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
}
.btvn-do-tho-thumb img { display: block; width: 100%; aspect-ratio: 1; height: auto; object-fit: contain; }
.btvn-do-tho-zoom span { padding: 4px 1px; font-size: 13px; line-height: 1.25; }

.btvn-do-tho-controls {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.btvn-do-tho-dialog .btvn-do-tho-controls :is(select, input) {
  width: auto;
  min-height: 46px;
  max-width: 100%;
  margin: 0;
  border: 1px solid #d7c6bb;
  border-radius: 7px;
  color: var(--do-tho-text);
  font-size: 16px;
  box-shadow: none;
}

.btvn-do-tho-dialog .btvn-do-tho-controls input {
  width: 54px;
  padding-inline: 3px;
  text-align: center;
  appearance: textfield;
}
.btvn-do-tho-controls input::-webkit-inner-spin-button,
.btvn-do-tho-controls input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.btvn-do-tho-quantity { display: inline-flex; align-items: center; gap: 8px; color: #604438; }
.btvn-do-tho-stepper { display: flex; gap: 4px; }
.btvn-do-tho-dialog .btvn-do-tho-stepper button {
  width: 46px;
  min-height: 46px;
  margin: 0;
  padding: 0;
  border: 1px solid #d7c6bb;
  border-radius: 7px;
  background: var(--do-tho-soft);
  color: var(--do-tho-accent);
  font: 700 22px/1 Arial, sans-serif;
}
.btvn-do-tho-dialog .btvn-do-tho-stepper button:disabled { opacity: .45; }
.btvn-do-tho-price { display: block; color: var(--do-tho-accent); font-size: 16px; }
.btvn-do-tho-error { grid-column: 1 / -1; color: #81332c; }
.btvn-do-tho-error:empty,
.btvn-do-tho-feedback:empty { display: none; }

.btvn-do-tho-foot { border-top: 1px solid var(--do-tho-border); background: #fff8f2; }
.btvn-do-tho-totals { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; margin-bottom: 8px; }
.btvn-do-tho-totals strong { color: var(--do-tho-accent); }
.btvn-do-tho-feedback { margin: 0 0 8px; }
.btvn-do-tho-foot-actions > * { flex: 1 1 auto; }
.btvn-do-tho-dialog .btvn-do-tho-foot-actions .btvn-do-tho-primary { min-height: 48px; font-size: 16px; }
.btvn-do-tho-entry :is(a, button, summary):focus-visible,
.btvn-do-tho-dialog :is(a, button, input, select):focus-visible { outline: 2px solid var(--do-tho-accent); outline-offset: 2px; }

@media (max-width: 680px) {
  .btvn-do-tho-product-entry .btvn-do-tho-primary { width: 100%; }
  .btvn-do-tho-dialog[open] {
    inset: auto 0 0;
    width: 100%;
    max-height: 94dvh;
    border-radius: 16px 16px 0 0;
  }
  .btvn-do-tho-rows { grid-template-columns: minmax(0, 1fr); }
  .btvn-do-tho-dialog .btvn-do-tho-controls select { width: 100%; }
  .btvn-do-tho-head, .btvn-do-tho-body, .btvn-do-tho-foot { padding-inline: 12px; }
  .btvn-do-tho-foot { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}

.btvn-line-quick[hidden] { display: none !important; }
.single-product .btvn-line-quick { display: block; margin: 14px 0 0; }
.btvn-line-quick-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.btvn-line-quick-header h2 { margin: 0; }
.btvn-line-quick-line { margin: 6px 0 12px; color: #634b3f; }
.btvn-line-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.btvn-line-quick .btvn-line-quick-card {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 8px;
  border: 1px solid #dfd0c5;
  border-radius: 10px;
  background: #fff;
  color: #36261e;
  font: inherit;
  line-height: 1.3;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
}
.btvn-line-quick .btvn-line-quick-card:hover,
.btvn-line-quick .btvn-line-quick-card:focus-visible {
  border-color: #843f2a;
  background: #fff9f2;
  color: #36261e;
}
.btvn-line-quick-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 6px;
  background: #f9f0e8;
}
.btvn-line-quick-price { color: #843f2a; font-weight: 700; }
.btvn-line-quick-pick { color: #703925; font-size: 14px; text-decoration: underline; }

@media (max-width: 849px) {
  .btvn-line-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.btvn-altar-guide.btvn-do-tho-dialog {
  width: min(900px, calc(100% - 32px));
}

.btvn-altar-guide .btvn-do-tho-head { align-items: center; }
.btvn-altar-guide .btvn-do-tho-body { overscroll-behavior: contain; }
.btvn-altar-guide .btvn-do-tho-foot { background: #fffaf5; }

.btvn-do-tho-item-categories {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}
.btvn-do-tho-item-categories > a {
  display: flex;
  align-items: center;
  min-height: 44px;
}
.btvn-do-tho-item-categories > :is(button, .btvn-do-tho-all-items) { grid-column: 1 / -1; }

.btvn-altar-guide :is(.btvn-do-tho-primary, .btvn-do-tho-secondary),
.btvn-do-tho-entry-actions > .btvn-do-tho-primary,
.btvn-do-tho-entry-actions > .btvn-do-tho-sets > summary {
  min-height: 48px;
  font-size: 16px;
}

.btvn-altar-fields {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin: 0;
}

.btvn-altar-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  color: inherit;
  font-size: 16px;
  font-weight: 700;
}

.btvn-altar-field :is(select, input),
.btvn-altar-contact textarea {
  width: 100%;
  min-width: 0;
  min-height: 49px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #b9a598;
  border-radius: 8px;
  background-color: #fff;
  box-shadow: none;
  color: #36261e;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
}

.btvn-altar-field select { padding-right: 29px; }
.btvn-altar-fields > button { justify-self: start; }
.btvn-altar-fields > .btvn-altar-field:has(input) { grid-column: 1 / -1; }
.btvn-altar-fields > .btvn-altar-measure { grid-column: 1 / -1; margin: 0; }
.btvn-altar-measure .btvn-altar-field { max-width: 320px; margin-bottom: 8px; }
.btvn-altar-guide .btvn-altar-change-size {
  min-height: 44px;
  margin: 0 0 4px;
  padding: 0 4px;
  color: #773923;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
}
.btvn-altar-guide :is(h3, h4) { color: inherit; }
.btvn-altar-guide h3 { margin: 0 0 8px; font-size: 21px; line-height: 1.2; }
.btvn-altar-guide h4 { margin: 12px 0 8px; font-size: 18px; }
.btvn-altar-guide p { margin: 0 0 10px; color: #60483c; }
.btvn-altar-guide details { margin: 8px 0; }
.btvn-altar-guide details summary {
  display: list-item;
  padding: 8px 0;
  color: #773923;
  font-weight: 700;
  cursor: pointer;
}
.btvn-altar-guide details p { margin: 0 0 8px; }

.btvn-altar-result,
.btvn-altar-ready {
  padding: 14px 0 0;
  margin-top: 10px;
  border-top: 1px solid var(--do-tho-border);
}

.btvn-altar-result h3 { scroll-margin-top: 10px; }

.btvn-altar-items {
  display: grid;
  gap: 0;
  margin: 10px 0 0;
  border: 1px solid var(--do-tho-border);
  border-radius: 10px;
  list-style: none;
}

.btvn-altar-items > li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  padding: 0 12px;
  border-bottom: 1px solid var(--do-tho-border);
}

.btvn-altar-items > li:last-child { border: 0; }
.btvn-altar-items label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  margin: 0;
  padding: 5px 0;
  color: inherit;
  font-size: 16px;
  font-weight: 500;
}
.btvn-altar-items label strong { margin-left: auto; }
.btvn-altar-items input {
  flex: none;
  width: 21px;
  height: 21px;
  margin: 0;
  accent-color: var(--do-tho-accent);
}
.btvn-altar-skipped label { color: #715d51; text-decoration: line-through; }
.btvn-altar-item-link {
  display: flex;
  flex: none;
  align-items: center;
  min-height: 44px;
  padding: 4px;
  color: #773923;
  font-weight: 700;
  text-decoration: underline;
}
.btvn-altar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.btvn-altar-contact p { margin: 6px 0 0; font-size: 15px; }
.btvn-altar-contact textarea { min-height: 82px; margin-top: 8px; }
.btvn-altar-contact-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.btvn-do-tho-foot-actions + .btvn-altar-contact { margin-top: 8px; }
.btvn-do-tho-dialog .btvn-do-tho-needed { margin: 0 0 7px; color: #783923; font-size: 15px; }
.btvn-altar-guide .btvn-do-tho-body > a { margin-top: 12px; }

.btvn-altar-ready-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.btvn-altar-ready-card {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 118px;
  padding: 9px;
  border: 1px solid var(--do-tho-border);
  border-radius: 12px;
  background: #fff;
  color: inherit;
}
.btvn-altar-ready-card:hover { border-color: var(--do-tho-accent); color: inherit; }
.btvn-altar-ready-card img {
  display: block;
  width: 128px;
  height: 128px;
  border-radius: 7px;
  background: #faf3ed;
  object-fit: contain;
}
.btvn-altar-ready-card div { display: grid; gap: 5px; }
.btvn-altar-ready-card strong { font-size: 16px; line-height: 1.3; }
.btvn-altar-ready-card span { color: #773923; font-weight: 700; }
.btvn-altar-ready-card .btvn-altar-buy { text-decoration: underline; }

@media (max-width: 640px) {
  .btvn-altar-guide.btvn-do-tho-dialog { width: 100%; }
  .btvn-altar-fields,
  .btvn-altar-ready-grid { grid-template-columns: minmax(0, 1fr); }
  .btvn-altar-fields > button { justify-self: stretch; }
  .btvn-altar-ready-card { grid-template-columns: 112px 1fr; gap: 9px; }
  .btvn-altar-ready-card img { width: 112px; height: 112px; }
}

.btvn-do-tho-product-entry .btvn-do-tho-primary {
  background: var(--do-tho-accent);
  color: #fff;
}
.btvn-do-tho-product-entry .btvn-do-tho-primary:hover { background: #692e21; }
.btvn-do-tho-modes {
  position: sticky;
  z-index: 1;
  top: -12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: -12px 0 10px;
  padding: 10px 0;
  background: #fffdfa;
}
.btvn-do-tho-modes .btvn-do-tho-secondary { min-height: 48px; font-size: 15px; }
.btvn-do-tho-modes [aria-pressed="true"] { background: #f3e3d8; color: #672e20; }
.btvn-do-tho-current {
  display: block;
  margin-bottom: 3px;
  color: #773923;
  font-size: 13px;
  font-weight: 700;
}
.btvn-do-tho-thumb { flex-basis: 108px; }

.btvn-altar-set-photo { margin: 0 0 12px; }
.btvn-altar-photo-open {
  position: relative;
  display: block;
  width: min(100%, 520px);
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--do-tho-border);
  border-radius: 10px;
  background: #f8f0e8;
  color: #36261e;
  overflow: hidden;
}
.btvn-altar-photo-open img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 350px;
  object-fit: contain;
}
.btvn-altar-photo-open span {
  position: absolute;
  bottom: 9px;
  right: 9px;
  padding: 7px 10px;
  border-radius: 6px;
  background: #fffaf5;
  font-weight: 700;
}
.btvn-altar-set-photo figcaption { margin-top: 5px; font-size: 14px; color: #60483c; }
.btvn-altar-item-photo { flex: 0 0 68px; padding: 4px 0; }
.btvn-altar-item-photo img {
  display: block;
  width: 68px;
  height: 68px;
  object-fit: contain;
  border-radius: 7px;
  background: #f8f0e8;
}

@media (max-width: 420px) {
  .btvn-do-tho-product-entry > :is(button, a) { width: 100%; }
  .btvn-altar-item-photo { flex-basis: 56px; }
  .btvn-altar-item-photo img { width: 56px; height: 56px; }
}

.btvn-do-tho-image-viewer:has(.btvn-do-tho-photo-controls:not([hidden])) img {
  max-height: calc(100dvh - 172px);
}
.btvn-do-tho-photo-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}
.btvn-do-tho-photo-controls[hidden] { display: none; }
.btvn-do-tho-photo-controls button:disabled { opacity: .45; }