/* Reserve the normal scrollbar track even while the background is locked. */
html{scrollbar-gutter:stable}
.ph-mini-quote:not([open]){display:none}
body.wp-theme-qianmiao .ph-mini-quote[open]{display:flex;flex-direction:column;position:fixed;inset:0 0 0 auto;margin:0;width:420px;max-width:100vw;height:100vh;height:100dvh;max-height:100vh;max-height:100dvh;padding:0;border:0;border-left:1px solid #dde5ec;border-radius:0;background:#fff;color:#15304c;box-shadow:-16px 0 60px #0d294533;animation:ph-quote-enter .22s ease-out;box-sizing:border-box;text-align:left;overflow:hidden}
.ph-mini-quote::backdrop{background:rgba(10,28,45,.28)}
body.wp-theme-qianmiao .ph-mini-quote[open]{right:0;max-width:var(--ph-quote-viewport-width,100vw);scrollbar-gutter:auto}
.ph-mini-quote__head{display:flex;justify-content:space-between;align-items:center;padding:max(20px,env(safe-area-inset-top)) 20px 10px;gap:12px;flex-shrink:0}
.ph-mini-quote__head>div>span{font-size:10px;font-weight:700;color:#b94a0c;letter-spacing:.12em}
body.wp-theme-qianmiao .ph-mini-quote__head h2{font-size:21px;line-height:1.3;margin:0;color:#15304c}
.ph-mini-quote__head h2 small{font-size:14px;color:#718195;font-weight:500}
.ph-mini-quote [data-mini-close]{width:36px;height:36px;border:1px solid #e0e7ed;border-radius:50%;background:#f6f8fa;color:#51677d;display:grid;place-items:center;padding:0;cursor:pointer;flex-shrink:0}
.ph-mini-quote__intro{font-size:13px;line-height:1.6;color:#64758a;margin:0;padding:0 22px 16px;flex-shrink:0}
.ph-mini-quote__items{flex:1 1 auto;overflow:auto;overscroll-behavior:contain;padding:0 22px;min-height:0}
.ph-mini-quote__item{padding:16px 0;border-top:1px solid #e6ebef}
.ph-mini-quote__info strong{display:block;font-size:14px;line-height:1.5;color:#17324e;overflow-wrap:anywhere}
.ph-mini-quote__info small{display:block;font-size:12px;color:#6d7e90;margin-top:3px;overflow-wrap:anywhere}
.ph-mini-quote__controls{display:flex;align-items:center;justify-content:space-between;margin-top:12px;gap:12px}
.ph-mini-quote__controls label{display:flex;align-items:center;gap:9px;font-size:12px;color:#63758a}
.ph-mini-quote__controls input{box-sizing:border-box;width:76px;height:36px;border:1px solid #ccd8e2;border-radius:8px;padding:5px 8px;font-size:16px;background:#fff;color:#15304c}
.ph-mini-quote__controls button{font-size:12px;background:none;border:0;color:#a64720;text-decoration:underline;text-underline-offset:3px;cursor:pointer;min-height:36px;padding:5px}
.ph-mini-quote__notice{font-size:12px;line-height:1.4;color:#556d83;margin:0;padding:0 22px;flex-shrink:0}
.ph-mini-quote__notice:not(:empty){padding-top:10px;padding-bottom:10px}
.ph-mini-quote__foot{padding:18px 22px max(22px,env(safe-area-inset-bottom));background:#f7f9fb;border-top:1px solid #e1e8ee;display:grid;gap:12px;flex-shrink:0}
.ph-mini-quote__primary{display:flex;align-items:center;justify-content:center;gap:10px;border-radius:9px;background:#cd4c05;color:#fff;font-size:14px;font-weight:700;min-height:46px;padding:10px;text-decoration:none}
.ph-mini-quote__primary:hover{background:#b64000;color:#fff}
.ph-mini-quote__browse{font-size:13px;text-align:center;color:#224666;text-decoration:underline;text-underline-offset:3px}
.ph-mini-quote__foot small{font-size:11px;line-height:1.5;text-align:center;color:#6c7c8c}
.ph-mini-quote__empty{padding:24px 6px 30px;text-align:center}
.ph-mini-quote__empty strong{font-size:15px}.ph-mini-quote__empty p{font-size:13px;line-height:1.7;color:#6b7d8e;margin:8px 0 0}
.ph-mini-quote :is(a,button,input):focus-visible{outline:2px solid #e7661c;outline-offset:3px}
@keyframes ph-quote-enter{from{transform:translateX(100%)}to{transform:translateX(0)}}
@media(max-width:600px){body.wp-theme-qianmiao .ph-mini-quote[open]{width:min(420px,var(--ph-quote-viewport-width,100vw))}}
@media(prefers-reduced-motion:reduce){body.wp-theme-qianmiao .ph-mini-quote[open]{animation:none}}

/* The entire title + introduction share one uninterrupted surface. */
.ph-mini-quote__top{flex:0 0 auto;background:linear-gradient(115deg,#fff4e9 0%,#f4f8fc 100%);border-bottom:1px solid #e4eaf0;width:100%}
/* Compact, illustrated enquiry cards. All decoration stays inside the drawer. */
.ph-mini-quote__head{gap:12px;background:transparent}
.ph-mini-quote__head>div{flex:1;min-width:0}
.ph-mini-quote__emblem{display:grid;place-items:center;flex:0 0 auto;width:36px;height:36px;border-radius:11px;background:#fff;color:#b94a0c;border:1px solid #f0d8c5;box-shadow:0 3px 9px #7a49200a}
body.wp-theme-qianmiao .ph-mini-quote__head h2{display:flex;align-items:center;gap:9px;font-size:21px}
.ph-mini-quote__head h2 small{display:inline-grid;place-items:center;min-width:24px;height:24px;padding:0 6px;border-radius:7px;background:#e8edf3;color:#405c77;font-size:12px;font-weight:700}
.ph-mini-quote [data-mini-close]{background:#ffffffc9;transition:background .15s,color .15s}
.ph-mini-quote [data-mini-close]:hover{background:#fff0e6;color:#ba4608}
.ph-mini-quote__intro{background:transparent;border-bottom:0;margin:0;padding:0 20px 18px;font-size:12px;line-height:1.6}
.ph-mini-quote__items{background:linear-gradient(#f4f7fa,#fafbfc);padding:18px 18px 24px}
.ph-mini-quote__item{display:grid;grid-template-columns:44px minmax(0,1fr);column-gap:12px;row-gap:14px;padding:16px;border:1px solid #e0e7ee;border-radius:13px;background:#fff;box-shadow:0 3px 10px #16324e05;margin-bottom:12px}
.ph-mini-quote__product-icon{display:grid;place-items:center;width:44px;height:48px;border-radius:10px;background:linear-gradient(140deg,#fff7ee,#f7eadc);color:#a26131;border:1px solid #eedccb}
.ph-mini-quote__product-icon:has(img){background:#fff;border-color:#e3e8ed;overflow:hidden}
.ph-mini-quote__product-icon img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
.ph-mini-quote__info{align-self:center;min-width:0}
.ph-mini-quote__info small{font-size:11px;line-height:1.5;margin-top:4px}
.ph-mini-quote__controls{grid-column:1/-1;margin-top:0;padding-top:12px;border-top:1px solid #edf0f4;gap:8px}
.ph-mini-quote__quantity{display:flex;align-items:center;gap:8px;color:#6b7d8f;font-size:11px}
.ph-mini-quote__stepper{display:flex;align-items:center;border:1px solid #d5e0e9;border-radius:9px;background:#f8fafc;overflow:hidden}
/* Keep keyboard focus inside the segmented control so the wrapper cannot clip it. */
.ph-mini-quote .ph-mini-quote__stepper :is(button,input):focus-visible{outline:2px solid #48677e;outline-offset:-3px;box-shadow:none}
.ph-mini-quote__controls .ph-mini-quote__step{width:36px;min-height:38px;padding:0;border:0;background:transparent;color:#254b6c;font-size:18px;line-height:1;text-decoration:none;display:grid;place-items:center}
.ph-mini-quote__controls .ph-mini-quote__step:hover{background:#eaf0f6}
.ph-mini-quote__controls .ph-mini-quote__step[aria-disabled=true]{color:#a4b3bf;cursor:default;background:transparent}
.ph-mini-quote__controls input{width:46px;height:38px;padding:4px;border:0;border-inline:1px solid #e0e7ee;border-radius:0;text-align:center;appearance:textfield;-moz-appearance:textfield;font-size:14px}
.ph-mini-quote__controls input::-webkit-inner-spin-button,.ph-mini-quote__controls input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.ph-mini-quote__controls .ph-mini-quote__remove{display:inline-flex;align-items:center;gap:4px;text-decoration:none;color:#8c654f;font-size:11px;padding:6px;border-radius:6px}
.ph-mini-quote__controls .ph-mini-quote__remove:hover{background:#fff0e8;color:#a44110}
.ph-mini-quote__notice{background:#f7f9fb}
.ph-mini-quote__foot{background:#fff;box-shadow:0 -5px 20px #15324f05;padding-top:20px}
.ph-mini-quote__primary{gap:9px;box-shadow:0 5px 12px #bd46051a;transition:background .15s}
.ph-mini-quote__primary>svg{flex-shrink:0}
.ph-mini-quote__primary>svg:last-child{margin-left:auto}
.ph-mini-quote__primary>svg:first-child{margin-right:auto}
.ph-mini-quote__browse{font-size:12px;text-decoration:none;padding:5px}
.ph-mini-quote__browse:hover{text-decoration:underline}
.ph-mini-quote__empty{padding:32px 16px;background:#fff;border:1px dashed #d4e0e9;border-radius:13px}
@media(max-width:600px){.ph-mini-quote__controls input{font-size:16px}}
@media(max-width:350px){.ph-mini-quote__items{padding:14px 12px}.ph-mini-quote__item{padding:12px}.ph-mini-quote__head{padding-left:18px;padding-right:18px}.ph-mini-quote__controls .ph-mini-quote__step{width:32px}.ph-mini-quote__foot{padding-left:18px;padding-right:18px}}
@media(prefers-reduced-motion:reduce){.ph-mini-quote [data-mini-close],.ph-mini-quote__primary{transition:none}}
/* Phone: leave a narrow backdrop while keeping the contents readable. */
@media(max-width:600px){
 body.wp-theme-qianmiao .ph-mini-quote[open]{width:calc(var(--ph-quote-viewport-width,100vw) * .82)}
 .ph-mini-quote__head{padding:max(16px,env(safe-area-inset-top)) 14px 9px;gap:9px}
 .ph-mini-quote__emblem{width:32px;height:32px;border-radius:9px}
 .ph-mini-quote__emblem svg{width:18px;height:18px}
 .ph-mini-quote__head>div>span{font-size:8px;letter-spacing:.08em}
 body.wp-theme-qianmiao .ph-mini-quote__head h2{font-size:17px;gap:5px;white-space:nowrap}
 .ph-mini-quote__head h2 small{font-size:10px;min-width:18px;height:20px;padding:0 4px}
 .ph-mini-quote [data-mini-close]{width:36px;height:36px;border-radius:50%}
 .ph-mini-quote [data-mini-close] svg{width:16px;height:16px}
 .ph-mini-quote__intro{padding:0 14px 14px;font-size:11px;line-height:1.6}
 .ph-mini-quote__items{padding:12px 10px 18px}
 .ph-mini-quote__item{padding:12px 10px;grid-template-columns:40px minmax(0,1fr);column-gap:8px;row-gap:10px;border-radius:11px}
 .ph-mini-quote__product-icon{width:40px;height:44px;border-radius:8px}
 .ph-mini-quote__product-icon svg{width:20px;height:20px}
 .ph-mini-quote__info strong{font-size:13px;line-height:1.4}
 .ph-mini-quote__info small{font-size:10px}
 .ph-mini-quote__quantity>span{display:none}
 .ph-mini-quote__controls{gap:5px;padding-top:10px}
 .ph-mini-quote__controls .ph-mini-quote__step{width:28px;min-height:36px}
 .ph-mini-quote__controls input{width:34px;height:36px}
 .ph-mini-quote__controls .ph-mini-quote__remove{gap:2px;padding:4px 2px;font-size:10px}
 .ph-mini-quote__controls .ph-mini-quote__remove svg{width:12px;height:12px}
 .ph-mini-quote__foot{padding:16px 12px max(18px,env(safe-area-inset-bottom));gap:10px}
 .ph-mini-quote__primary{font-size:12px;gap:6px;padding:10px 8px;line-height:1.4}
 .ph-mini-quote__primary>svg:first-child{display:none}
 .ph-mini-quote__primary>svg:last-child{margin-left:0;width:14px}
 .ph-mini-quote__browse{font-size:11px;line-height:1.5;padding:2px}
 .ph-mini-quote__foot small{font-size:10px}
 .ph-mini-quote__notice{padding-inline:12px;font-size:11px}
}
