.product-detail { max-width: 1040px; margin: 24px auto 40px; padding: 0 16px; }
.product-extra-grid { display: grid; grid-template-columns: minmax(0,1fr); align-items: start; gap: 16px; margin-top: 18px; }
.product-extra-card { min-width: 0; overflow: hidden; border: 1px solid #eee6de; border-radius: 18px; background: #fff; }
.customer-ui .product-delivery-info h2 { display: flex; align-items: center; gap: 10px; margin: 0; padding: 14px 16px; border-bottom: 1px solid #f0e9e3; font-size: 17px !important; font-weight: 700; }
.product-info-icon { width: 24px; height: 24px; flex-shrink: 0; color: #ff7900; }
.product-delivery-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; margin: 0 16px; }
.product-delivery-row + .product-delivery-row { border-top: 1px solid #f1ece7; }
.customer-ui .product-delivery-row h3 { margin: 0 0 3px; font-size: 14px !important; font-weight: 700; color: #142b40; }
.product-delivery-row p { margin: 0; font-size: 13px; line-height: 1.7; color: #7b8794; }
.product-detail-tabs { display: flex; gap: 6px; padding: 0 6px; border-bottom: 1px solid #eee6de; }
.product-detail-tabs button { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; background: white; color: #7c8188; font: inherit; font-size: 14px; cursor: pointer; }
.product-detail-tabs button[aria-selected=true] { color: #ff7900; border-bottom-color: #ff7900; font-weight: 700; }
.product-detail-tabs button:focus-visible { outline: 2px solid #ffad6c; outline-offset: -3px; }
.product-tab-panel { padding: 18px; font-size: 14px; line-height: 1.9; color: #233e54; overflow-wrap: anywhere; }
.product-tab-panel[hidden] { display: none; }
.product-facebook-player { width: 100%; overflow: hidden; border-radius: 10px; background: #f6f7f9; }
.product-facebook-player iframe { display: block; width: 100%; height: 300px; border: 0; }
.product-tab-empty { color: #7b8794; margin: 0; }
@media(max-width:640px) { .product-extra-grid { grid-template-columns: 1fr; gap: 14px; } }
.product-gallery { --product-stage-height: 300px; position: relative; min-width: 0; align-self: start; background: #fff8f1; }
.product-gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.product-gallery-track::-webkit-scrollbar { display: none; }
.product-gallery-track .product-photo { flex: 0 0 100%; min-width: 0; height: var(--product-stage-height); padding: 8px; box-sizing: border-box; scroll-snap-align: start; }
.product-gallery-track .product-photo img { width: 100%; height: 100%; max-height: 100%; object-fit: contain; border-radius: 9px; }
.product-photo-open { display: block; width: 100%; height: 100%; min-width: 0; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.product-photo-open:focus-visible { outline: 2px solid #ff7900; outline-offset: 2px; }
.product-image-dialog { position: fixed; inset: 0; margin: auto; padding: 44px 12px 12px; width: fit-content; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); box-sizing: border-box; overflow: auto; border: 0; border-radius: 16px; background: #fff; }
.product-image-dialog::backdrop { background: #101522cc; backdrop-filter: blur(3px); }
.product-image-dialog > img { display: block; width: auto; height: auto; max-width: calc(100vw - 48px); max-height: calc(100dvh - 100px); object-fit: contain; margin: auto; }
.product-image-close { position: absolute; top: 2px; right: 4px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; color: #24334b; background: white; font: 30px/1 Arial,sans-serif; cursor: pointer; }
.product-gallery-controls { position: absolute; top: 0; left: 0; right: 0; height: var(--product-stage-height); display: flex; justify-content: space-between; align-items: center; padding: 0 6px; pointer-events: none; }
.product-gallery-controls button { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 36px; height: 36px; margin: 0; padding: 0; box-sizing: border-box; border: 1px solid #edd9c7; border-radius: 50%; background: #fffffff0; color: #24334b; font-family: Arial, sans-serif; font-size: 23px; line-height: 1; cursor: pointer; pointer-events: auto; box-shadow: 0 2px 8px #0001; }
.product-gallery-controls [data-gallery-prev] { left: 6px; }
.product-gallery-controls [data-gallery-next] { right: 6px; }
.product-gallery-controls span { position: absolute; right: 10px; bottom: 8px; padding: 2px 8px; border-radius: 12px; background: #fffffff0; font-size: 11px; color: #666; }
.product-gallery-thumbs { display: flex; gap: 6px; padding: 6px 10px 10px; overflow-x: auto; scrollbar-width: none; }
.product-gallery-thumbs::-webkit-scrollbar { display: none; }
.product-gallery-thumbs button { width: 44px; height: 44px; flex-shrink: 0; padding: 2px; background: white; border: 2px solid transparent; border-radius: 7px; cursor: pointer; }
.product-gallery-thumbs button[aria-current] { border-color: #ff6b35; }
.product-gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.product-video-link { display: block; margin: 16px 0; padding: 12px; background: #edf4ff; border: 1px solid #cdddf7; border-radius: 10px; color: #1864c4; text-decoration: none; font-weight: 600; }
.product-back { display: inline-block; margin-bottom: 18px; color: #004e89; text-decoration: none; font-weight: 600; }
.product-panel { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid #eee; border-radius: 24px; background: #fff; box-shadow: 0 8px 30px #1920390a; }
.product-photo { display: flex; align-items: center; justify-content: center; padding: 24px; background: #fff8f1; }
.product-photo img { display: block; width: 100%; max-height: 480px; object-fit: contain; border-radius: 14px; }
.product-info { padding: 32px; min-width: 0; }
.product-category { color: #777; font-size: 14px; }
.product-info h1 { margin: 8px 0 12px; line-height: 1.6; overflow-wrap: anywhere; }
.product-stock { display: inline-block; margin: 0; padding: 5px 12px; border-radius: 20px; background: #e6f8ec; color: #167c40; font-size: 14px; }
.product-stock.is-empty { color: #b42318; background: #feeceb; }
.product-amount { margin: 18px 0; color: #ff6b35; font-size: 28px; font-weight: 800; }
.product-description { margin: 20px 0; border-top: 1px solid #eee; padding-top: 16px; overflow-wrap: anywhere; }
.product-description h2 { margin: 0 0 8px; font-size: 17px; }
.product-description p { color: #666; line-height: 1.8; }
.product-order label { display: block; margin-bottom: 8px; font-weight: 600; }
.product-detail:has(.product-order) { padding-bottom: 110px; }
.product-order { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 190; width: min(720px,calc(100% - 24px)); margin: 0; padding: 12px; box-sizing: border-box; border: 1px solid #eee; border-radius: 18px; background: #fff; box-shadow: 0 6px 30px #19203926; }
.product-order label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.product-order .product-quantity-callout { top: -35px; left: 8px; width: auto; height: auto; margin: 0; padding: 6px 10px; overflow: visible; clip-path: none; border: 1px solid #ffd7ba; border-radius: 9px; background: #fff5eb; color: #bd4c16; font-size: 12px; font-weight: 600; line-height: 1.4; box-shadow: 0 3px 10px #0000000a; cursor: pointer; }
.product-quantity-callout::after { content: ''; position: absolute; bottom: -5px; left: 28px; width: 8px; height: 8px; border-right: 1px solid #ffd7ba; border-bottom: 1px solid #ffd7ba; background: #fff5eb; transform: rotate(45deg); }
@media (max-width: 768px) { .product-order { bottom: calc(12px + env(safe-area-inset-bottom,0px)); } }
.product-actions { display: flex; gap: 12px; }
.product-actions input { width: 80px; min-width: 0; min-height: 48px; border: 1px solid #ddd; border-radius: 12px; text-align: center; font: inherit; }
.product-actions button { flex: 1; min-height: 48px; padding: 10px; border: 0; border-radius: 12px; background: linear-gradient(120deg, #ff7b29, #f45120); color: white; font: inherit; font-weight: 700; cursor: pointer; }
.product-actions button { position: relative; overflow: hidden; isolation: isolate; }
.product-actions button::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg,transparent 30%,#ffffff12 42%,#ffffff40 50%,#ffffff12 58%,transparent 70%); transform: translateX(-130%); animation: product-cart-shine 5s ease-in-out infinite; }
@keyframes product-cart-shine { 0%,65% { transform: translateX(-130%); } 90%,100% { transform: translateX(130%); } }
@media(prefers-reduced-motion:reduce) { .product-actions button::after { animation: none; display: none; } }
.product-unavailable { width: 100%; padding: 14px; border: 0; border-radius: 12px; background: #e9edf2; color: #64748b; font: inherit; }
.product-empty { padding: 40px 24px; text-align: center; background: white; border-radius: 24px; }
@media (max-width: 640px) {
    .product-detail { margin-top: 10px; padding-left: 12px; padding-right: 12px; }
    .product-back { margin-bottom: 10px; font-size: 14px; }
    .product-gallery { --product-stage-height: clamp(180px,52vw,240px); }
    .product-panel { grid-template-columns: 1fr; border-radius: 18px; }
    .product-photo { padding: 16px; }
    .product-photo img { max-height: 300px; }
    .product-info { padding: 14px; }
    .product-info h1 { margin: 5px 0 8px; }
    .product-amount { margin: 10px 0; }
}

.product-actions .product-order-back{display:flex;align-items:center;justify-content:center;flex:0 0 44px;min-height:48px;border:1px solid #ffd5bd;border-radius:12px;background:#fff5ec;color:#d9521e;text-decoration:none;font-size:26px;font-weight:700}.product-order-back:focus-visible{outline:3px solid #004e89;outline-offset:2px}@media(max-width:400px){.product-actions{gap:8px}.product-actions input{width:60px}.product-actions button{font-size:13px}}

.product-order .product-quantity-callout{left:68px;top:-30px}.product-order .product-quantity-callout::after{left:32px}@media(max-width:400px){.product-order .product-quantity-callout{left:62px}.product-order .product-quantity-callout::after{left:26px}}

/* Brand placeholder remains visible until the actual image has loaded. */
.product-photo-open,
.product-gallery-thumbs button,
.product-image-dialog { background: #fff url('../images/logo.jpg') center / 110px auto no-repeat; }
.product-gallery-thumbs button { background-size: 36px auto; }
.product-photo-open img,
.product-gallery-thumbs img,
.product-image-dialog > img { opacity: 0; transition: opacity .2s ease; }
.product-photo-open img.product-image-ready,
.product-gallery-thumbs img.product-image-ready,
.product-image-dialog > img.product-image-ready { opacity: 1; background: #fff; }
@media (prefers-reduced-motion: reduce) {
    .product-photo-open img, .product-gallery-thumbs img, .product-image-dialog > img { transition: none; }
}