/* Desktop only. Mobile styles are in 2/product-detail.css. */
/* Product detail presentation; all data stays in the existing PHP model. */
main.ent-product-detail{background:#fff;padding-bottom:20px}
.ent-product-detail .mkorg-site-layout{row-gap:20px}
.ent-product-detail .shop-wrap.mkorg-site-layout{width:var(--shop-container)}
.ent-product-overview{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:30px;background:#fff;border-radius:14px;align-items:start;box-shadow:0 3px 16px #14334704}
.ent-product-gallery{min-width:0}
.ent-gallery-stage{position:relative;border:1px solid var(--liuer-border);border-radius:12px;overflow:hidden;background:#fff}
.ent-gallery-track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain;outline-offset:-3px;-webkit-overflow-scrolling:touch}
.ent-gallery-track::-webkit-scrollbar{display:none}
.ent-gallery-slide{position:relative;display:grid;place-items:center;flex:0 0 100%;min-width:0;aspect-ratio:1;border:0;padding:20px;background:#fff;scroll-snap-align:start;scroll-snap-stop:always;cursor:zoom-in}
.ent-gallery-slide>picture{display:block!important;width:100%;height:100%;min-height:0}
.ent-gallery-slide img{width:100%;height:100%;min-height:0;object-fit:contain;user-select:none;-webkit-user-drag:none}
.ent-gallery-slide>.mkorg-media-placeholder{min-height:240px}
.ent-gallery-arrow{display:grid;place-items:center;position:absolute;top:50%;transform:translateY(-50%);z-index:2;cursor:pointer}
.ent-gallery-arrow--prev{left:10px}
.ent-gallery-arrow--next{right:10px}
.ent-gallery-arrow>.mkorg-icon{width:17px;height:17px}

.ent-gallery-stage>.ent-gallery-arrow:disabled{opacity:0;pointer-events:none}
.ent-gallery-thumbs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:14px}
.ent-gallery-status{margin:10px 0 0;font-size:13px;line-height:1.5;color:#667382}
.ent-gallery-thumb,
.ent-lightbox-thumb {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 0;
    width: 100%;
    aspect-ratio: 1;
    padding: 8px;
    overflow: hidden;
    border: 1px solid var(--liuer-border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.ent-gallery-thumb picture,.ent-lightbox-thumb picture{display:block!important;width:100%;height:100%}
.ent-gallery-thumb img,.ent-lightbox-thumb img{width:100%;height:100%;object-fit:contain}
.ent-gallery-thumb.is-active,.ent-lightbox-thumb.is-active{border-color:var(--liuer-accent);}
.ent-gallery-thumb:hover,.ent-lightbox-thumb:hover{border-color:var(--liuer-accent)}
.ent-gallery-thumb--more::after{content:"";position:absolute;inset:0;background:rgb(0 0 0 / 58%)}
.ent-gallery-thumb__more{position:absolute;inset:0;z-index:1;display:grid;place-items:center;color:#fff;font-size:24px;font-weight:700}
/* Product title and review score. */
.ent-product-info{min-width:0;padding-top:3px}
.ent-product-info h1{margin:0;color:#182b3d;font-weight:700;font-size:28px;line-height:1.3;overflow-wrap:anywhere}
.ent-product-rating{display:inline-flex;align-items:center;gap:7px;margin-top:12px;color:#7b8592;font-size:15px;line-height:1.5}
.ent-product-rating__star{color:#f5b301;font-size:23px;line-height:1}
.ent-product-rating strong{color:#202124;font-size:17px;font-weight:700}
.ent-product-rating:hover{color:var(--liuer-accent)}
/* Promotion text comes from the existing tom_tat_km product field. */
.ent-product-promotion{margin-top:20px;padding:15px 15px 15px;border:1px solid var(--liuer-accent);border-radius:12px;background:linear-gradient(110deg,#fff,color-mix(in srgb, var(--liuer-accent) 8%, #fff))}
.ent-product-promotion h2{display:flex;align-items:center;gap:8px;margin:0;color:#202124;font-size:15px;font-weight:700;line-height:1}
.ent-product-promotion h2 .mkorg-icon{position:relative;top:-1px;}
.ent-product-promotion__intro{display:flex;align-items:flex-start;gap:8px;margin:18px 0 12px;color:#384254;font-size:14px;line-height:1.6}
.ent-product-promotion__intro>span{display:grid;place-items:center;flex:0 0 22px;height:22px;border-radius:50%;background:linear-gradient(135deg,color-mix(in srgb, var(--liuer-accent) 45%, #fff),var(--liuer-accent));color:#fff;font-size:13px;line-height:1}
.ent-product-promotion__content{color:#202124;font-size:14px;line-height:1.6;overflow-wrap:anywhere}
.ent-product-promotion__content p{position:relative;margin:0 0 12px;padding:10px 10px 10px 30px;border-radius:10px;background:color-mix(in srgb, var(--liuer-accent) 8%, #fff)}
.ent-product-promotion__content p::before{content:"";position:absolute;top:18px;left:14px;width:6px;height:6px;border-radius:50%;background:linear-gradient(135deg,color-mix(in srgb, var(--liuer-accent) 45%, #fff),var(--liuer-accent))}
.ent-product-promotion__content>:first-child{margin-top:0}
.ent-product-promotion__content>:last-child{margin-bottom:0}
.ent-product-promotion__content ul,.ent-product-promotion__content ol{padding-left:18px}
.ent-product-promotion__content li::marker{color:var(--liuer-accent)}
.ent-product-promotion__content img{max-width:100%;height:auto}
.ent-product-price-box{position:relative;margin-top:20px;padding:17px 18px;border-radius:10px;background:#f2f7fb;border:1px solid var(--liuer-border)}
.ent-price-label{display:block;color:#6b8192;font-size:11px;margin-bottom:5px}
.ent-price-line{display:flex;align-items:baseline;flex-wrap:wrap;gap:7px 10px}
.ent-price-line>strong{font-size:clamp(25px,2.4vw,32px);font-weight:700;line-height:1.25;letter-spacing:-.035em;color:var(--liuer-accent);white-space:nowrap}
.ent-price-line>del{font-size:12px;color:#93a0ab;white-space:nowrap}
.ent-discount{position:absolute;top:14px;right:14px;font-size:10px;font-weight:700;color:#c6443d;background:#fff0ee;border-radius:4px;padding:3px 6px;white-space:nowrap}
.ent-product-price-box>small{display:block;color:#6a8091;font-size:11px;margin-top:8px}
.ent-product-actions{display:grid;gap:10px;margin-top:16px}
.ent-product-cta,.ent-product-secondary{display:flex;align-items:center;justify-content:center;min-width:0;min-height:62px;padding:10px 12px;border:0;border-radius:10px;color:#fff;text-align:center}
.ent-product-cta{background:linear-gradient(180deg,#e94e60 0%,#df0020 100%)}
.ent-product-secondary{background:#2f80ed}
.ent-product-cta:hover,.ent-product-secondary:hover{color:#fff}
.ent-product-cta:focus-visible,.ent-product-secondary:focus-visible{outline:3px solid var(--liuer-accent);outline-offset:3px}
.ent-product-actions>a>span{display:grid;gap:3px;min-width:0}
.ent-product-actions strong{font-size:15px;font-weight:700;line-height:1.25}
.ent-product-actions small{font-size:13px;font-weight:400;line-height:1.4}
.ent-product-information{margin:24px 0 18px}
.ent-product-description {
    min-width: 0;
    padding: 15px;
    border-radius: 10px;
    scroll-margin-top: 135px;
    border: 1px solid var(--liuer-border);
}
.ent-product-description>h2 {
    margin: 0 0 15px;
    color: #202124;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.ent-product-description-preview{position:relative;min-width:0}
.ent-product-description-preview.is-collapsed{max-height:600px;overflow:hidden}
.ent-product-description-preview.is-collapsed::after{content:"";position:absolute;right:0;bottom:0;left:0;height:64px;background:linear-gradient(to bottom,transparent,#fff);pointer-events:none}
.ent-product-description-toggle{display:flex;align-items:center;justify-content:center;gap:16px;width:100%;min-height:48px;margin-top:10px;padding:10px;border:0;background:#fff;color:var(--liuer-accent);font-size:15px;font-weight:500;line-height:1.5;cursor:pointer}
.ent-product-description-toggle[hidden]{display:none}
.ent-product-description-toggle::after{content:"";width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-2px) rotate(45deg)}
.ent-product-description-toggle[aria-expanded="true"]::after{transform:translateY(2px) rotate(225deg)}
.ent-product-features {
    padding: 15px;
    margin-bottom: 18px;
    border: 1px solid var(--liuer-border);
    border-radius: 10px;
    background: color-mix(in srgb, var(--liuer-accent) 8%, #fff);
}
.ent-product-features-title {
    margin: 0 0 10px;
    color: var(--liuer-accent);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}
.ent-product-description .entry-content {
    font-size: 15px;
    color: #3d4147;
    line-height: 1.5;
}
.ent-product-description .entry-content p{margin:0 0 14px}
.ent-product-description .entry-content>:last-child{margin-bottom:0}
.ent-product-description .entry-content ul,.ent-product-description .entry-content ol{margin:0 0 14px;padding-left:22px}
.ent-product-description .entry-content li{margin-bottom:8px}
.ent-product-content {
    min-width: 0;
    padding: 0px;
    border-radius: 10px;
    background: #fff;
}
.ent-product-content h2,.ent-product-content h3,.ent-product-content h4{margin:24px 0 12px;color:#202124;font-weight:700;line-height:1.4;text-align:left;scroll-margin-top:16px}
.ent-product-content>:first-child{margin-top:0}
.ent-product-content h2{font-size:20px}
.ent-product-content h3{font-size:17px}
.ent-product-content h4{font-size:15px}
.ent-product-content table{width:100%;margin:18px 0;border-collapse:collapse;text-align:left}
.ent-product-content th,.ent-product-content td{padding:12px;border:1px solid var(--liuer-border);vertical-align:top}
.ent-product-content th{background:#F4F5F7;font-weight:600}
.ent-product-table-scroll{max-width:100%;margin:18px 0;overflow-x:auto;overscroll-behavior-x:contain}
.ent-product-content .ent-product-table-scroll table{display:table;min-width:640px;max-width:none;margin:0}
.ent-product-table-scroll th:first-child,.ent-product-table-scroll td:first-child{white-space:nowrap}
.ent-product-table-scroll caption{padding-bottom:10px;text-align:left;font-weight:600}
.ent-product-table-scroll:focus-visible{outline:2px solid var(--liuer-accent);outline-offset:3px}
.ent-product-content figure{max-width:100%;margin:20px 0}
.ent-product-content figcaption{margin-top:8px;font-size:12px;text-align:center;color:#667382}
.ent-product-toc{margin-bottom:18px;text-align:left}
.ent-product-toc>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 16px;border-radius:10px;background:#e5e7eb;color:#41454b;font-size:15px;font-weight:600;line-height:1.5;list-style:none;cursor:pointer}
.ent-product-toc>summary::-webkit-details-marker{display:none}
.ent-product-toc>summary::after{content:"";flex:0 0 9px;width:9px;height:9px;margin-right:3px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-2px) rotate(45deg)}
.ent-product-toc[open]>summary::after{transform:translateY(3px) rotate(225deg)}
.ent-product-toc nav{margin-top:10px;padding:16px;border-radius:10px;background:#e5e7eb}
.ent-product-description .ent-product-toc ol{margin:0;padding:0;list-style:none;counter-reset:product-content-index}
.ent-product-description .ent-product-toc ol ol{padding-left:24px}
.ent-product-description .ent-product-toc li{margin:0;counter-increment:product-content-index}
.ent-product-toc a{display:block;padding:4px 0;color:#4b5058;font-size:14px;line-height:1.65;overflow-wrap:anywhere}
.ent-product-toc a::before{content:counters(product-content-index,".") ". "}
.ent-product-toc a:hover{color:var(--liuer-accent)}
.ent-product-toc summary:focus-visible{outline:2px solid var(--liuer-accent);outline-offset:3px}
.ent-product-panel{min-width:0;margin:0 0 18px;padding:23px;background:#fff;border:1px solid var(--liuer-border);border-radius:12px;scroll-margin-top:135px}
.ent-panel-heading{display:flex;align-items:center;gap:9px;margin-bottom:18px}
.ent-panel-heading h2{font-size:19px;line-height:1.3;color:#233d52;letter-spacing:-.025em;font-weight:650;margin:0}
.ent-product-panel .entry-content{font-size:13px;color:#586d7e;line-height:1.85}
.ent-product-panel .entry-content p{margin:0 0 15px}
.ent-product-panel .entry-content p:last-child{margin-bottom:0}
.ent-product-panel .entry-content h2,.ent-product-panel .entry-content h3{margin:22px 0 10px;font-size:16px;color:#2e475b;font-weight:600;line-height:1.4}
.ent-product-detail #shop-product-reviews{scroll-margin-top:135px}
/* Related products: compact cards, four per desktop row. */
.ent-related-section{margin-top:28px}
.ent-related-section .shop-section__head{margin-bottom:16px;flex-wrap:wrap}
.ent-related-section .shop-section__head a{display:inline-flex;align-items:center;gap:6px;margin-left:auto;color:var(--liuer-accent);font-size:13px;font-weight:500;line-height:1.5}
.ent-related-section .shop-section__head a::after{width:10px;height:10px}
.ent-related-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;min-width:0}
.ent-related-grid .shop-product-card{min-width:0;overflow:hidden;border:1px solid var(--liuer-border);border-radius:10px;background:#fff}
.ent-related-grid .shop-product-card__link{display:flex;flex-direction:column;height:100%;color:inherit}
.ent-related-grid .shop-product-card__media{display:grid;place-items:center;height:180px;min-width:0;min-height:0;padding:12px;background:#fff}
.ent-related-grid .shop-product-card__media>picture{display:block!important;width:100%;height:100%;min-height:0}
.ent-related-grid .shop-product-card__media img{display:block;width:100%;height:100%;min-height:0;object-fit:contain}
.ent-related-grid .shop-product-card__body{display:flex;flex:1;flex-direction:column;gap:8px;min-width:0;padding:12px}
.ent-related-grid .shop-product-card h3{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;min-height:40px;margin:0;overflow:hidden;color:#202124;font-size:14px;font-weight:600;line-height:1.4}
.ent-related-grid .shop-price{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 8px;margin:0;padding:0}
.ent-related-grid .shop-price strong{color:var(--liuer-accent);font-size:15px;font-weight:700;white-space:nowrap}
.ent-related-grid .shop-price del{color:#8793a1;font-size:12px;white-space:nowrap}
.ent-related-grid .shop-stars{gap:5px;margin:auto 0 0;color:var(--shop-rating-color);font-size:12px}
.ent-related-grid .shop-stars>span:not(.shop-stars-icons){color:#8793a1}
.ent-related-grid .shop-stars-icons i{width:12px;height:12px}
.ent-related-grid .shop-product-card__cta{margin:0;font-size:13px}
.ent-gallery-lightbox{width:min(1000px,calc(100vw - 32px));height:min(640px,calc(100dvh - 32px));max-height:calc(100dvh - 32px);padding:0;border:0;border-radius:12px;background:#fff;color:#243e53;overflow:hidden;overscroll-behavior:contain}
.ent-gallery-lightbox[open]{display:flex;flex-direction:column}
.ent-gallery-lightbox::backdrop{background:#0a1926cf;backdrop-filter:blur(4px)}
.ent-lightbox-header{display:flex;flex:0 0 auto;align-items:center;justify-content:space-between;gap:16px;padding:14px 20px;border-bottom:1px solid var(--liuer-border)}
.ent-lightbox-header strong{min-width:0;margin-right:auto;font-size:14px;font-weight:600;line-height:1.4}
.ent-lightbox-count{flex:0 0 auto;color:#8192a0;font-size:12px;white-space:nowrap}
.ent-lightbox-header>button{flex-shrink:0;display:grid;place-items:center;width:32px;height:32px;border:0;border-radius:50%;background:#f1f5f8;cursor:pointer}
.ent-lightbox-body{display:grid;flex:1;grid-template-columns:minmax(0,1fr) minmax(240px,.45fr);grid-template-rows:minmax(0,1fr);gap:20px;min-height:0;padding:20px}
.ent-lightbox-body--single{grid-template-columns:minmax(0,1fr)}
.ent-lightbox-stage{position:relative;display:grid;place-items:center;min-width:0;min-height:0;padding:20px}
.ent-lightbox-stage>picture{display:block!important;width:100%;height:100%;min-height:0}
.ent-lightbox-stage img{display:block;width:100%;height:100%;object-fit:contain}
.ent-lightbox-stage>.ent-gallery-arrow:disabled{opacity:.3;pointer-events:none}
.ent-lightbox-thumbs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-content:start;gap:12px;min-height:0;padding:2px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#d4e1ea transparent}
body:has(.ent-gallery-lightbox[open]){overflow:hidden}
.ent-product-detail button:focus-visible,.ent-product-detail a:focus-visible{outline:2px solid var(--liuer-accent);outline-offset:3px}
.ent-gallery-track{scroll-behavior:auto}
