/* Khaydee 8.2.16 — Marketplace image-first refresh. Restrict to public product/listing UI. */
body:not(.kd80-admin-area) .kd70-product-page,
body:not(.kd80-admin-area) .kd68-product-grid{font-family:"IBM Plex Sans Thai","Noto Sans Thai",system-ui,sans-serif!important}
body:not(.kd80-admin-area) .kd70-product-page h1{font-weight:600!important;letter-spacing:-.025em;line-height:1.35;font-size:clamp(1.23rem,2vw,1.7rem)!important}
body:not(.kd80-admin-area) .kd70-product-page h2{font-weight:600!important;line-height:1.45}
body:not(.kd80-admin-area) .kd70-product-page p,
body:not(.kd80-admin-area) .kd70-description{font-weight:400!important;line-height:1.85!important;letter-spacing:0!important}
body:not(.kd80-admin-area) .kd70-product-page .kd70-price{font-weight:700!important;color:#ed580d!important}
body:not(.kd80-admin-area) .kd70-product-layout{gap:20px!important}
body:not(.kd80-admin-area) .kd70-gallery,
body:not(.kd80-admin-area) .kd70-detail-card,
body:not(.kd80-admin-area) .kd70-seller-card,
body:not(.kd80-admin-area) .kd70-safe-card{border:1px solid #e7ebf1!important;border-radius:20px!important;box-shadow:0 7px 26px rgba(15,23,42,.045)!important}
body:not(.kd80-admin-area) .kd70-detail-card{padding:clamp(16px,2.2vw,28px)!important}
body:not(.kd80-admin-area) .kd70-meta-grid>*{font-weight:400!important}
/* Desktop & tablet gallery: natural aspect ratio without crop; soft image-matched background. */
body:not(.kd80-admin-area) .kd816-gallery{padding:10px!important;overflow:hidden}
.kd816-gallery-layout{display:grid;grid-template-columns:74px minmax(0,1fr);gap:10px;align-items:stretch;min-width:0}
.kd816-gallery .kd70-thumb-strip{display:flex!important;flex-direction:column!important;overflow-y:auto!important;overflow-x:hidden!important;gap:8px!important;max-height:520px;padding:2px!important;margin:0!important;scrollbar-width:thin}
.kd816-gallery .kd70-thumb-strip button{width:68px!important;height:68px!important;min-width:68px!important;min-height:68px!important;max-width:68px!important;flex:none!important;padding:2px!important;border-radius:12px!important;background:#f3f5f8!important;overflow:hidden!important;border:2px solid transparent!important}
.kd816-gallery .kd70-thumb-strip button.active{border-color:#f36c21!important;box-shadow:0 0 0 2px rgba(243,108,33,.13)}
.kd816-gallery .kd70-thumb-strip img{width:100%!important;height:100%!important;object-fit:contain!important;border-radius:8px!important}
.kd816-photo-stage{position:relative;min-width:0;overflow:hidden;border-radius:16px;background:#e9edf3;isolation:isolate;min-height:350px}
.kd816-photo-backdrop{position:absolute;inset:-25px;z-index:0;overflow:hidden;pointer-events:none;background:linear-gradient(120deg,#e9edf1,#f3f5f8)}
.kd816-photo-backdrop img{width:100%;height:100%;object-fit:cover;filter:blur(28px) brightness(.86) saturate(.8);opacity:.48;transform:scale(1.1)}
.kd816-photo-stage .kd70-main-photo{display:flex!important;justify-content:center;align-items:center;min-height:350px!important;height:min(520px,53vw)!important;max-height:520px!important;width:100%!important;aspect-ratio:auto!important;background:transparent!important;border:0!important;padding:12px!important;position:relative;z-index:1;cursor:zoom-in}
.kd816-photo-stage .kd70-main-photo>img{display:block!important;max-width:100%!important;max-height:100%!important;width:auto!important;height:auto!important;object-fit:contain!important;box-shadow:0 3px 16px rgba(15,23,42,.1);border-radius:5px}
.kd816-photo-stage .kd70-main-photo>span{position:absolute;bottom:12px;right:12px;left:auto!important;color:#fff!important;background:rgba(15,23,42,.72)!important;border-radius:999px!important;padding:8px 12px!important;font-size:.76rem!important;backdrop-filter:blur(8px)}
.kd816-stage-arrow{position:absolute;top:50%;transform:translateY(-50%);width:38px;height:38px;border:1px solid rgba(255,255,255,.7);border-radius:50%;background:rgba(255,255,255,.9);color:#15213a;box-shadow:0 3px 16px rgba(0,0,0,.14);z-index:3;display:grid;place-items:center;transition:background .2s}
.kd816-stage-arrow:hover{background:#fff}.kd816-prev{left:12px}.kd816-next{right:12px}
.kd816-stage-count{position:absolute;bottom:14px;left:14px;z-index:3;border-radius:999px;padding:5px 10px;background:rgba(17,24,39,.68);font-size:.75rem;color:#fff;pointer-events:none}
/* Full viewport lightbox with optional native fullscreen + zoom/pan. */
.kd8211-lightbox{background:rgba(9,13,23,.97)!important;backdrop-filter:blur(8px)}
.kd8211-lightbox .kd828-lb-slide img{transition:transform .14s ease;will-change:transform}
.kd816-zoom-tools{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);z-index:10006;display:flex;align-items:center;gap:4px;padding:6px;background:rgba(25,33,50,.93);border:1px solid rgba(255,255,255,.2);border-radius:999px;color:#fff;box-shadow:0 6px 28px rgba(0,0,0,.25)}
.kd816-zoom-tools button{display:grid;place-items:center;width:35px;height:35px;background:transparent;border:0;border-radius:50%;color:#fff;font-size:.85rem}
.kd816-zoom-tools button:hover,.kd816-zoom-tools button:focus-visible{background:#475569;outline:none}
#kd816ZoomLabel{font-size:.72rem;min-width:45px;text-align:center;font-weight:600}
.kd816-is-zoomed{cursor:grab}
/* Product cards: brighter imagery, regular-weight text, strong price, compact metadata. */
body:not(.kd80-admin-area) .kd68-product-grid{gap:14px!important}
body:not(.kd80-admin-area) .kd68-product-card{min-width:0;border:1px solid #e9ecf2!important;border-radius:16px!important;overflow:hidden!important;background:#fff!important;box-shadow:0 3px 14px rgba(15,23,42,.045)!important;transition:transform .2s,box-shadow .2s,border-color .2s;color:#1a2540!important}
body:not(.kd80-admin-area) .kd68-product-card:hover{transform:translateY(-3px);box-shadow:0 12px 30px rgba(15,23,42,.1)!important;border-color:#fbc49c!important}
body:not(.kd80-admin-area) .kd68-product-card .kd68-product-img{aspect-ratio:1/1!important;position:relative;overflow:hidden;background:#f1f3f7!important;border-radius:0!important;margin:0!important}
body:not(.kd80-admin-area) .kd68-product-card .kd68-product-img>img{width:100%!important;height:100%!important;object-fit:cover!important;transition:transform .25s}
body:not(.kd80-admin-area) .kd68-product-card:hover .kd68-product-img>img{transform:scale(1.025)}
body:not(.kd80-admin-area) .kd68-product-card .kd68-product-body{padding:11px 12px 12px!important}
body:not(.kd80-admin-area) .kd68-product-card .kd68-product-body h3{font-family:"IBM Plex Sans Thai","Noto Sans Thai",system-ui,sans-serif!important;font-size:.89rem!important;font-weight:500!important;line-height:1.52!important;letter-spacing:0!important;margin:0 0 7px!important;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.95em}
body:not(.kd80-admin-area) .kd68-product-card .kd68-price{font-size:1.07rem!important;line-height:1.4;font-weight:700!important;color:#ec580c!important;letter-spacing:-.015em}
body:not(.kd80-admin-area) .kd68-product-card .kd68-meta,body:not(.kd80-admin-area) .kd68-product-card .kd68-meta *{font-size:.74rem!important;color:#66758a!important;font-weight:400!important;line-height:1.5}
.kd816-card-badge{position:absolute;top:9px;left:9px;padding:5px 9px;border-radius:8px;background:#132a53;color:#fff;font-size:.65rem;font-weight:600;letter-spacing:.035em;z-index:2}
.kd816-card-badge.kd816-hot{background:#f97316}.kd816-card-badge.kd816-vip{background:#d97706}
@media(max-width:960px){.kd816-gallery-layout{grid-template-columns:minmax(0,1fr)}.kd816-gallery .kd70-thumb-strip{order:2;display:flex!important;flex-direction:row!important;max-height:76px!important;overflow-x:auto!important;overflow-y:hidden!important}.kd816-gallery .kd70-thumb-strip button{width:64px!important;height:64px!important;min-width:64px!important;min-height:64px!important}.kd816-photo-stage{order:1}}
@media(max-width:700px){.kd816-gallery{display:none!important}.kd828-mobile-gallery{background:#e9edf1!important}.kd828-mobile-slide{background:radial-gradient(ellipse at 50% 40%,#f5f7fa,#dbe2e9)!important}.kd828-mobile-slide img{object-fit:contain!important;max-width:100%!important;max-height:100%!important}.kd816-zoom-tools{bottom:max(12px,env(safe-area-inset-bottom));padding:5px}.kd816-zoom-tools button{width:33px;height:33px}.kd8211-lightbox .kd70-lb-count{top:16px!important}.kd70-product-page .kd70-detail-card{border-radius:14px!important}}
@media(max-width:550px){body:not(.kd80-admin-area) .kd68-product-grid{gap:8px!important}body:not(.kd80-admin-area) .kd68-product-card .kd68-product-body{padding:9px!important}body:not(.kd80-admin-area) .kd68-product-card .kd68-product-body h3{font-size:.83rem!important}body:not(.kd80-admin-area) .kd68-product-card .kd68-price{font-size:.97rem!important}}
@media(prefers-reduced-motion:reduce){.kd816-photo-stage *,.kd68-product-card *{transition:none!important}}
