/* Product details share the catalogue's warm surfaces, restrained type and emerald cart state. */
.ekm-product-detail.ekm-detail-backdrop {
    padding: 24px; background: #29222d70; backdrop-filter: blur(7px);
    animation: ekmDetailFade .18s ease-out;
}
.ekm-product-detail .ekm-detail-modal {
    max-width: 980px; max-height: min(900px, calc(100dvh - 48px));
    border: 1px solid #ffffffb3; border-radius: 24px; background: #fffdfb;
    box-shadow: 0 32px 100px #241c2d38; color: #342d38;
    animation: ekmDetailEnter .22s ease-out;
}
.ekm-product-detail .ekm-detail-header {
    padding: 15px 24px; border-bottom: 1px solid #eee7e1;
    background: #fbf8f4; gap: 16px; flex-shrink: 0;
}
.ekm-detail-heading { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.ekm-detail-eyebrow { color: #9b463b; font-size: 10px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; }
.ekm-detail-breadcrumbs { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; color: #766b73; font-size: 11px; }
.ekm-detail-breadcrumbs i { font-size: 8px; }
.ekm-product-detail .ekm-detail-crumb { padding: 0; border: 0; border-radius: 0; background: none; font-size: inherit; font-weight: 400; color: inherit; overflow-wrap: anywhere; }
.ekm-detail-header-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.ekm-product-detail .ekm-detail-stock-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 500; padding: 5px 9px; white-space: nowrap; }
.ekm-product-detail .ekm-detail-stock-pill.in-stock { color: #186b50; background: #edf8f1; border-color: #d0e9dc; }
.ekm-product-detail .ekm-detail-stock-pill.out-stock { color: #746b74; background: #f1eef1; border-color: #e5dfe6; }
.ekm-detail-stock-pill i { font-size: 7px; }
.ekm-product-detail .ekm-detail-modal .ekm-cart-close { width: 44px; height: 44px; flex-shrink: 0; border-color: #e8dfd8; background: #fff; color: #6c6067; font-size: 15px; }
.ekm-product-detail .ekm-detail-body { padding: 24px; min-height: 0; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #d4c5ba transparent; }
.ekm-detail-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.15fr); gap: 30px; align-items: start; }
.ekm-detail-gallery, .ekm-detail-info { min-width: 0; }
.ekm-product-detail .ekm-detail-gallery-stage { height: 340px; padding: 48px 34px 26px; border: 1px solid #eee7e0; border-radius: 18px; background: radial-gradient(ellipse at 50% 45%, #fff 35%, #f5f0e9); }
.ekm-product-detail .ekm-detail-slide-preview { height: 100%; justify-content: center; }
.ekm-product-detail .ekm-detail-modal .ekm-demo-modal-img { width: 100%; height: 100%; max-height: 260px; object-fit: contain; border-radius: 10px; }
.ekm-product-detail .ekm-detail-modal .ekm-gallery-nav { width: 44px; height: 44px; border-color: #e9e1d9; box-shadow: 0 3px 12px #41332808; color: #715e50; }
.ekm-product-detail .ekm-detail-modal .ekm-gallery-nav.prev { left: 8px; }
.ekm-product-detail .ekm-detail-modal .ekm-gallery-nav.next { right: 8px; }
.ekm-product-detail .ekm-detail-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ekm-product-detail .ekm-detail-thumb { width: 64px; height: 64px; padding: 6px; background: #fff; border: 1px solid #e8e0d9; border-radius: 12px; justify-content: center; transition: border-color .15s, box-shadow .15s; }
.ekm-product-detail .ekm-detail-thumb.active { border-color: #c31e0b; background: #fff; box-shadow: 0 0 0 2px #c31e0b12; }
.ekm-product-detail .ekm-detail-modal .ekm-demo-thumb-img { width: 48px; height: 48px; }
.ekm-product-detail .ekm-detail-modal .ekm-visual-badges-left { top: 12px; left: 12px; }
.ekm-product-detail .ekm-detail-modal .ekm-visual-badges-right { top: 12px; right: 12px; }
.ekm-product-detail .ekm-detail-modal .ekm-visual-badge-cart { color: #17694e; border: 1px solid #c5e4d4; background: #edf8f0; font-size: 11px; font-weight: 500; padding: 5px 8px; }
.ekm-product-detail .ekm-detail-modal .ekm-badge-discount { font-size: 11px; font-weight: 500; padding: 5px 8px; }
.ekm-detail-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ekm-product-detail .ekm-detail-modal .ekm-spec-tag { font-size: 10px; font-weight: 400; border-color: #e8e0d8; color: #70615a; padding: 4px 8px; background: #fff; }
.ekm-product-detail .ekm-detail-modal .ekm-brand-tag { max-width: 100%; margin-right: 3px; padding: 4px 8px; font-size: 10px; font-weight: 500; color: #7b5a32; border-color: #eadbc7; background: #f7efe2; }
.ekm-product-detail .ekm-detail-title { font-size: 24px; font-weight: 600; line-height: 1.35; letter-spacing: -.55px; margin: 0 0 18px; color: #332c36; overflow-wrap: anywhere; }
.ekm-product-detail .ekm-detail-price-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px; border: 1px solid #ede2d7; border-radius: 16px; background: linear-gradient(125deg, #faf3e9, #fffaf4); margin-bottom: 22px; }
.ekm-detail-price-label { display: block; font-size: 11px; font-weight: 400; color: #756454; margin-bottom: 6px; }
.ekm-product-detail .ekm-detail-main-price { display: block; font-size: 30px; line-height: 1.15; font-weight: 600; letter-spacing: -.8px; color: #342b29; font-variant-numeric: tabular-nums; }
.ekm-product-detail .ekm-detail-main-price small { font-size: 17px; font-weight: 400; color: #796857; }
.ekm-product-detail .ekm-detail-modal .ekm-unit-cost { display: block; border: 0; background: none; padding: 0; margin-top: 8px; color: #6b5a4d; font-size: 12px; font-weight: 400; }
.ekm-product-detail .ekm-detail-modal .ekm-old-price { font-size: 11px; font-weight: 400; margin-top: 6px; color: #8b7766; }
.ekm-product-detail .ekm-detail-pallet-price { border-left: 1px solid #e6d7c5; padding-left: 16px; }
.ekm-detail-pallet-price>span { display: block; color: #756454; font-size: 10px; font-weight: 400; margin-bottom: 5px; }
.ekm-detail-pallet-price>strong { display: block; font-size: 16px; font-weight: 500; color: #574335; font-variant-numeric: tabular-nums; }
.ekm-product-detail .ekm-detail-section-label { font-size: 12px; font-weight: 500; color: #5b4e56; margin-bottom: 10px; }
.ekm-detail-section-label i { margin-right: 6px; color: #a9834f; }
.ekm-product-detail .ekm-detail-logistics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1px solid #ece5df; border-radius: 14px; overflow: hidden; }
.ekm-product-detail .ekm-detail-stat-card { gap: 5px; padding: 13px 14px; border: 0; border-radius: 0; background: #fff; min-width: 0; }
.ekm-detail-stat-card:nth-child(odd) { border-right: 1px solid #f0eae5; }
.ekm-detail-stat-card:nth-child(-n+2) { border-bottom: 1px solid #f0eae5; }
.ekm-product-detail .ekm-detail-modal .ekm-stat-label { color: #7a6b74; font-size: 10px; font-weight: 400; }
.ekm-product-detail .ekm-detail-modal .ekm-stat-value { color: #453843; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.ekm-product-detail .ekm-detail-order-bar { flex-shrink: 0; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 24px; padding: 18px 24px; background: #fbf8f4; border-top: 1px solid #eae0d7; }
.ekm-detail-order-summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; }
.ekm-detail-order-total { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; gap: 3px; }
.ekm-detail-order-total>span { font-size: 10px; color: #7d6d73; font-weight: 400; }
.ekm-detail-order-total>strong { font-size: 17px; line-height: 1.3; color: #453339; font-weight: 600; font-variant-numeric: tabular-nums; }
.ekm-product-detail .ekm-detail-modal .ekm-unit-switch { width: auto; height: 48px; padding: 4px; flex-shrink: 0; gap: 2px; border: 1px solid #e8ddd3; background: #f0e9e2; border-radius: 12px; }
.ekm-product-detail .ekm-detail-modal .ekm-unit-opt { font-weight: 500; font-size: 12px; min-height: 38px; padding: 7px 12px; border-radius: 8px; line-height: 1.2; }
.ekm-product-detail .ekm-detail-modal .ekm-unit-opt.active, .ekm-product-detail .ekm-detail-modal .ekm-unit-opt.active-palet { color: #7d3227; background: #fff; box-shadow: 0 2px 5px #4735220b; }
.ekm-product-detail .ekm-detail-modal .ekm-order-controls { display: flex; flex-direction: row; gap: 10px; min-width: 0; }
.ekm-product-detail .ekm-detail-modal .ekm-qty-stepper { min-width: 0; height: 48px; border: 1px solid #d8ccc1; border-radius: 11px; flex: 0 0 138px; background: #fff; overflow: hidden; }
.ekm-product-detail .ekm-detail-modal .ekm-step-btn { width: 42px; min-height: 46px; padding: 0; font-size: 15px; color: #70564a; background: #fff; }
.ekm-product-detail .ekm-detail-modal .ekm-qty-input { width: 50px; min-width: 0; height: 46px; font-size: 16px !important; font-weight: 500; padding: 0; color: #49363a; }
.ekm-product-detail .ekm-detail-modal .ekm-add-btn { min-width: 0; min-height: 48px; height: auto; flex: 1; padding: 10px 14px; border: 1px solid #b92612; border-radius: 11px; background: linear-gradient(110deg, #c52b17, #b81f0e); color: #fff; font-weight: 500; font-size: 13px; box-shadow: 0 4px 10px #b9231215; line-height: 1.35; }
.ekm-product-detail .ekm-detail-modal .ekm-add-btn i { color: inherit; }
.ekm-product-detail .ekm-detail-modal .ekm-add-btn.added { background: #117754; border-color: #117754; }
.ekm-product-detail .ekm-detail-modal .ekm-disabled-btn { grid-column: 1 / -1; min-height: 48px; border-radius: 11px; background: #f0ebed; border-color: #e3dce0; color: #7e7179; font-size: 13px; font-weight: 400; }
.ekm-detail-modal button:focus-visible, .ekm-detail-modal input:focus-visible { outline: 3px solid #bf8c55; outline-offset: 3px; }
@media(hover:hover) and (pointer:fine) {
    .ekm-product-detail .ekm-detail-modal .ekm-add-btn:hover { background: #a91e0d; border-color: #a91e0d; transform: translateY(-1px); }
    .ekm-product-detail .ekm-detail-modal .ekm-add-btn.added:hover { background: #0c6143; border-color: #0c6143; }
}
@media(max-width:767.98px) {
    .ekm-product-detail.ekm-detail-backdrop { padding: 12px; }
    .ekm-product-detail .ekm-detail-modal { border-radius: 20px; max-height: calc(100dvh - 24px); }
    .ekm-product-detail .ekm-detail-header { padding: 10px 16px; gap: 10px; }
    .ekm-detail-header-actions { gap: 8px; }
    .ekm-product-detail .ekm-detail-body { padding: 18px; }
    .ekm-detail-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
    .ekm-product-detail .ekm-detail-gallery-stage { height: 235px; padding: 40px 36px 18px; }
    .ekm-product-detail .ekm-detail-modal .ekm-demo-modal-img { max-height: 178px; }
    .ekm-product-detail .ekm-detail-title { font-size: 21px; margin-bottom: 14px; }
    .ekm-product-detail .ekm-detail-price-box { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 20px; padding: 15px; }
    .ekm-product-detail .ekm-detail-main-price { font-size: 28px; }
    .ekm-product-detail .ekm-detail-pallet-price { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-left: 0; border-top: 1px solid #e6d7c5; padding: 10px 0 0; }
    .ekm-detail-pallet-price>span { margin-bottom: 0; }
    .ekm-product-detail .ekm-detail-order-bar { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 12px 18px max(12px, env(safe-area-inset-bottom)); }
}
@media(max-width:389px) {
    .ekm-product-detail.ekm-detail-backdrop { padding: 8px; }
    .ekm-product-detail .ekm-detail-modal { max-height: calc(100dvh - 16px); }
    .ekm-product-detail .ekm-detail-header { padding: 8px 12px; }
    .ekm-product-detail .ekm-detail-body { padding: 14px; }
    .ekm-product-detail .ekm-detail-stock-pill { font-size: 10px; padding: 4px 7px; }
    .ekm-detail-breadcrumbs { font-size: 10px; }
    .ekm-product-detail .ekm-detail-price-box { gap: 10px; padding: 12px; }
    .ekm-detail-pallet-price>strong { font-size: 14px; }
    .ekm-product-detail .ekm-detail-order-bar { padding-left: 14px; padding-right: 14px; }
    .ekm-product-detail .ekm-detail-modal .ekm-qty-stepper { flex-basis: 128px; }
    .ekm-product-detail .ekm-detail-modal .ekm-step-btn { width: 40px; }
    .ekm-product-detail .ekm-detail-modal .ekm-qty-input { width: 46px; }
}
@keyframes ekmDetailFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ekmDetailEnter { from { opacity: .5; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
@media(prefers-reduced-motion:reduce) {
    .ekm-product-detail.ekm-detail-backdrop, .ekm-product-detail .ekm-detail-modal { animation: none; }
    .ekm-detail-modal *, .ekm-detail-modal *::before, .ekm-detail-modal *::after { animation: none !important; transition: none !important; }
}

/* Zoom stays inside the photograph; pointer motion never invokes a server render. */
.ekm-product-detail .product-image-zoom { display:block; width:100%; min-width:0; overflow:hidden; border-radius:12px; }
.ekm-product-detail .product-zoom-button { display:block; position:relative; width:100%; height:100%; min-height:0; padding:0; border:0; border-radius:12px; background:transparent; overflow:hidden; cursor:zoom-in; -webkit-tap-highlight-color:transparent; }
.ekm-product-detail .product-zoom-button:focus-visible { outline:3px solid #b79a72; outline-offset:-3px; }
.ekm-product-detail .product-zoom-button:disabled { cursor:default; }
.ekm-product-detail .product-image-zoom .ekm-demo-modal-img { display:block; transition:transform .22s ease-out; transform-origin:var(--zoom-x,50%) var(--zoom-y,50%); user-select:none; pointer-events:none; }
.ekm-product-detail .product-image-zoom:is([data-hovering="true"],[data-pinned="true"]) .ekm-demo-modal-img { transform:scale(2.2); }
.ekm-product-detail .product-image-zoom[data-pinned="true"] .product-zoom-button { cursor:zoom-out; touch-action:none; }
.product-zoom-hint { position:absolute; bottom:8px; left:50%; transform:translateX(-50%); display:inline-flex; align-items:center; justify-content:center; gap:7px; padding:7px 12px; border:1px solid #e7dcca; border-radius:30px; background:#fffcf2ed; color:#896c48; font-size:10px; font-weight:500; white-space:nowrap; pointer-events:none; box-shadow:0 2px 8px #3a2f3510; }
.product-zoom-button:disabled .product-zoom-hint { display:none; }
@media(prefers-reduced-motion:reduce) { .ekm-product-detail .product-image-zoom .ekm-demo-modal-img { transition:none; } }

.ekm-product-detail .product-image-zoom .ekm-demo-modal-img { max-height:none; }
