@media(max-width:850px){
  .product-dialog{position:fixed;inset:0;top:0;bottom:0;width:100%;height:100dvh;min-height:100dvh;max-width:none;max-height:100dvh;margin:0;padding:0;background:#fff;color:#171717;overflow-x:hidden;overflow-y:auto;overscroll-behavior:none;-webkit-overflow-scrolling:touch;box-shadow:0 -160px 0 #fff,0 160px 0 #fff;font-family:"Book Antiqua Local","Book Antiqua",Palatino,serif}
  .product-dialog[open]{display:block}
  .product-dialog.product-opening::backdrop{animation:detail-backdrop-in .3s ease-out backwards}
  .product-dialog.product-closing::backdrop{animation:detail-backdrop-out .28s ease forwards}
  .product-header{position:sticky;z-index:6;top:0;height:calc(72px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 20px 0;background:#fff;display:grid;grid-template-columns:1fr 1fr 1fr;align-items:center;border:0}
  .product-header::before{content:"";position:absolute;z-index:0;left:0;right:0;top:-140px;height:140px;background:#fff}
  .product-header>a{color:#111;text-decoration:none;text-align:center;font-size:29px;line-height:1}
  .product-header>div{display:flex;justify-content:flex-end;align-items:center;gap:20px}
  .product-header .product-menu{display:flex;flex-direction:column;justify-content:center;gap:5px}
  .product-header .product-menu span{display:block;width:24px;height:1px;background:#000}
  .product-detail-main{border-bottom:1px solid #333}
  .product-dialog .dialog-gallery{position:relative;height:auto;overflow:hidden;touch-action:pan-y;background:#ddd}
  .product-dialog .dialog-close{position:fixed;z-index:12;left:14px;right:auto;top:calc(86px + env(safe-area-inset-top));width:34px;height:34px;padding:0;border:0;border-radius:50%;background:rgba(255,255,255,.62);backdrop-filter:blur(5px)}
  .product-dialog .dialog-close span{position:absolute;left:7px;top:16px;display:block;width:20px;height:1.5px;border-radius:2px;background:#222}
  .product-dialog .dialog-close span:first-child{transform:rotate(45deg)}
  .product-dialog .dialog-close span:last-child{transform:rotate(-45deg)}
  .dialog-gallery-track{display:flex;width:100%;transition:transform .48s cubic-bezier(.22,1,.36,1);will-change:transform}
  .product-dialog .dialog-gallery img{display:block;flex:0 0 100%;width:100%;min-height:0;aspect-ratio:3/4;object-fit:cover;background:#ddd;user-select:none;-webkit-user-drag:none}
  .dialog-gallery-controls{position:absolute;z-index:3;left:50%;bottom:13px;transform:translateX(-50%);height:30px;padding:0 10px;display:flex;justify-content:center;align-items:center;gap:14px;border:0;border-radius:15px;background:rgba(255,255,255,.55);backdrop-filter:blur(5px);font-size:12px}
  .dialog-gallery-controls button{padding:5px 2px;border:0;background:none;color:#111;font-family:inherit;font-size:13px}
  .dialog-title-row{min-height:86px;padding:14px 27px 16px;display:flex;justify-content:space-between;gap:18px;align-items:flex-start}
  .dialog-title-row h2{margin:0;font-size:20px;font-weight:400;line-height:1.15}
  .dialog-title-row p{margin:2px 0 0;white-space:nowrap;font-size:14px}
  .product-dialog .dialog-info{height:auto;min-height:0;padding:24px 28px 0;display:block}
  .product-option{width:47%;margin:0 0 12px}
  .product-option label{display:block;margin:0 0 7px;font-size:15px}
  .smooth-select{position:relative;width:100%}
  .smooth-select-trigger{position:relative;z-index:2;width:100%;height:44px;padding:0 20px;border:1px solid #777;border-radius:8px;background:#fff;color:#222;font-family:inherit;font-size:13px;display:flex;align-items:center;justify-content:space-between}
  .smooth-select-trigger i{width:7px;height:7px;border-right:1px solid currentColor;border-bottom:1px solid currentColor;transform:rotate(45deg) translate(-2px,2px);transition:transform .35s cubic-bezier(.22,1,.36,1)}
  .smooth-select.open .smooth-select-trigger{border-radius:8px 8px 0 0}
  .smooth-select.open .smooth-select-trigger i{transform:rotate(225deg) translate(-1px,-1px)}
  .smooth-select-menu{position:absolute;z-index:5;left:0;right:0;top:calc(100% - 1px);max-height:0;overflow:hidden;border:1px solid transparent;border-top:0;border-radius:0 0 8px 8px;background:#fff;opacity:0;transform:translateY(-8px);transform-origin:top;pointer-events:none;transition:max-height .38s cubic-bezier(.22,1,.36,1),opacity .22s ease,transform .38s cubic-bezier(.22,1,.36,1),border-color .2s}
  .smooth-select.open .smooth-select-menu{max-height:210px;border-color:#777;opacity:1;transform:translateY(0);pointer-events:auto}
  .smooth-select-menu button{display:block;width:100%;padding:11px 20px;border:0;border-top:1px solid #eee;background:#fff;color:#222;text-align:left;font-family:inherit;font-size:13px;transition:background .18s}
  .smooth-select-menu button:active{background:#f1f1f1}
  .purchase-row{display:grid;grid-template-columns:96px 1fr;gap:8px;margin-top:10px}
  .quantity-control{height:44px;border:1px solid #777;border-radius:8px;display:grid;grid-template-columns:1fr 1fr 1fr;align-items:center;text-align:center}
  .quantity-control button{height:100%;padding:0;border:0;background:none;font-family:inherit;font-size:16px}
  .add-to-bag{height:44px;margin:0;border:1px solid #777;border-radius:8px;background:#fff;color:#222;font-family:inherit;font-size:16px;display:flex;align-items:center;justify-content:center;gap:12px}
  .mini-bag{display:block;flex:0 0 22px;width:22px;height:22px;border:0;background:center/22px 22px no-repeat url("assets/bag-icon.svg")}
  .mini-bag::before{content:none}
  .paypal-button{width:100%;height:44px;margin:12px 0 0;border:0;border-radius:8px;background:#000;color:#fff;font-family:inherit;font-size:16px;display:flex;justify-content:center;align-items:center;gap:9px}
  .paypal-button img{width:70px;height:24px;object-fit:contain}
  .more-payments{display:block;width:max-content;margin:10px auto 36px;color:#222;font-size:11px;text-underline-offset:4px}
  .product-details h3{margin:0 0 10px;font-size:17px;font-weight:400}
  .product-details>.dialog-description,.product-details>.details{font-size:13px;line-height:1.5}
  .product-details>.details{margin-bottom:15px}
  .detail-gallery{margin:0 -28px;background:#ddd}
  .detail-gallery img{display:block;width:100%;aspect-ratio:3/4;object-fit:cover;border-top:10px solid #fff}
  .product-footer.footer-menu{display:block;margin:0;padding:24px 0 0;border-top:1px solid #333;background:#fff}
  .product-footer .footer-heading{margin:0;padding:0 39px 25px;font-family:inherit;font-size:31px;font-weight:400;font-style:normal;line-height:1.2;letter-spacing:0}
  .product-footer .footer-links{display:flex;flex-direction:column}
  .product-footer .footer-links a{display:flex;justify-content:space-between;align-items:center;padding:18px 39px;border-top:1px solid #333;color:#111;text-decoration:none;font-family:inherit;font-size:17px;font-weight:400;line-height:1.2}
  .product-footer .footer-links a:last-child{border-bottom:1px solid #333}
  .product-footer .footer-meta{display:block;margin:0;padding:12px 10px;text-align:center;font-size:13px}
  .product-footer .footer-meta p{margin:0}
  @keyframes detail-backdrop-out{from{background:rgba(0,0,0,.45)}to{background:rgba(0,0,0,0)}}
  @keyframes detail-backdrop-in{from{background:rgba(0,0,0,0)}to{background:rgba(0,0,0,.45)}}
}

