.product-detail-page{background:#f8f6f6;color:#000}
.product-detail-page .page-wrapper{width:100%;max-width:430px;margin:auto;min-height:100dvh;background:#fff;padding-bottom:calc(144px + env(safe-area-inset-bottom))}
.detail-header{height:64px;display:flex;align-items:center;justify-content:space-between;padding:4px 16px;box-shadow:0 4px 20px #00000006}
.detail-header>a:not(.detail-logo),.detail-header>button{border:0;background:none;color:#000;font-size:21px;width:30px;padding:0}
.detail-logo{width:120px;height:40px;overflow:hidden;position:relative;display:block}
.detail-logo img{width:188%;max-width:none;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}
.detail-gallery{display:flex;overflow-x:auto;scroll-snap-type:x mandatory}
.detail-gallery img,.detail-placeholder{width:100%;flex:0 0 100%;height:245px;object-fit:contain;padding:16px 24px;scroll-snap-align:start}
.detail-placeholder{display:grid;place-items:center;color:#666}
.detail-content{padding:0 18px 24px;min-height:310px}
.detail-brand{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 10px;margin:0 -6px 18px;background:#f7ebed;color:#4f171b!important;border-radius:9px;box-shadow:0 3px 12px #00000008;font-size:12px}
.detail-brand strong{overflow-wrap:anywhere}.detail-brand span{white-space:nowrap;font-weight:600}
.product-detail-page .detail-title{font-size:17px;font-weight:500;line-height:1.5;color:#000;margin:0 0 20px;overflow-wrap:anywhere}
.detail-price{font-size:18px;font-weight:500;color:#000;margin-bottom:18px}
.detail-stock,.gallery-hint{font-size:11px;color:#555}.gallery-hint{text-align:center;margin:0 0 8px}
.detail-spec-summary{display:table;padding:4px 8px;background:#f0f0f0;color:#444;font-size:14px;margin:0 0 18px;overflow-wrap:anywhere}
.detail-content h3{font-size:13px;color:#000;margin:20px 0 12px}
.detail-description{font-size:13px;line-height:1.7;overflow-wrap:anywhere;min-height:90px}
.detail-information{font-size:12px;margin-top:16px}.detail-information summary{cursor:pointer;font-weight:600}
.detail-content dl>div{display:grid;grid-template-columns:100px minmax(0,1fr);gap:12px;padding:8px 0;border-bottom:1px solid #eee}
.detail-content dd{margin:0;overflow-wrap:anywhere}
.detail-actions{position:fixed;z-index:20;bottom:calc(62px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:100%;max-width:430px;display:grid;grid-template-columns:90px 1fr 1.2fr;gap:10px;padding:12px;background:#fff;border-top:3px solid #f5f4f4}
.detail-actions button,.detail-quantity select{height:44px;width:100%;border-radius:8px;font-family:inherit;font-size:12px;font-weight:600}
.detail-quantity select{border:1px solid #d5d5d5;background:#fff;padding:0 8px;color:#000;font-weight:400}
.detail-buy{background:#4f171b;color:#fff;border:1px solid #4f171b}.detail-cart{background:#765154;color:#fff;border:1px solid #765154}
.detail-bottom-nav{position:fixed;z-index:21;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:430px;height:calc(62px + env(safe-area-inset-bottom));padding:8px 12px calc(8px + env(safe-area-inset-bottom));display:flex;align-items:center;justify-content:space-around;background:#fff;border-top:1px solid #ebdfe0}
.detail-bottom-nav a,.detail-bottom-nav button{display:grid;place-items:center;width:40px;height:40px;border:0;background:none;color:#4f171b;font-size:19.8px}.detail-bottom-nav .active{border-radius:50%;background:#4f171b;color:#fff}
@media(max-width:360px){.detail-actions{gap:6px;grid-template-columns:76px 1fr 1.2fr}.detail-brand{font-size:11px}.detail-gallery img,.detail-placeholder{height:220px}}
.detail-gallery{scrollbar-width:none}.detail-gallery::-webkit-scrollbar{display:none}
.gallery-controls{display:flex;align-items:center;justify-content:center;gap:14px;margin:0 0 12px}
.gallery-controls>button{width:32px;height:32px;border:0;background:#f7ebed;color:#4f171b;border-radius:50%;font-size:24px;line-height:1}
.gallery-dots{display:flex;justify-content:center;flex-wrap:wrap;max-width:250px}
.gallery-dots button{width:24px;height:28px;border:0;background:transparent;padding:8px;display:grid;place-items:center}
.gallery-dots button::after{content:'';width:7px;height:7px;border-radius:50%;background:#d9c3c5}
.gallery-dots button[aria-pressed="true"]::after{background:#4f171b;width:10px;height:10px}
.gallery-controls button:focus-visible{outline:2px solid #4f171b;outline-offset:2px}
.detail-gallery>img{cursor:zoom-in}.detail-gallery>img:focus-visible{outline:2px solid #4f171b;outline-offset:-3px}
.product-photo-preview{position:fixed;inset:0;margin:auto;width:100vw;height:100dvh;max-width:100vw;max-height:100dvh;padding:60px 16px 80px;border:0;background:#fff;overflow:auto}
.product-photo-preview::backdrop{background:#000b}
.product-photo-preview .preview-image{display:block;width:100%;height:100%;object-fit:contain;touch-action:pan-x pan-y pinch-zoom}
.product-photo-preview button{background:#4f171b;color:#fff;border:0;border-radius:50%;width:44px;height:44px;font-size:28px;line-height:1}
.preview-close{position:absolute;right:16px;top:calc(12px + env(safe-area-inset-top))}
.preview-controls{position:absolute;bottom:calc(16px + env(safe-area-inset-bottom));left:0;width:100%;display:flex;align-items:center;justify-content:center;gap:24px;color:#000}
.preview-controls[hidden]{display:none}
@media(min-width:768px){.product-photo-preview{width:90vw;height:90dvh;border-radius:12px}}
.product-variations{margin:20px 0;font-size:13px;color:#000}
.variation-group{margin-bottom:16px}.variation-group p{margin:0 0 8px;line-height:1.5}.variation-group strong{font-weight:600}
.variation-options{display:flex;flex-wrap:wrap;gap:7px}
.variation-options a{display:block;padding:7px 11px;border:1px solid #d8cacc;border-radius:5px;background:#fff;color:#000;font-size:12px;line-height:1.4}
.variation-options a.selected{border-color:#4f171b;background:#f7ebed;color:#4f171b;font-weight:600}
.variation-options a:focus-visible{outline:2px solid #4f171b;outline-offset:2px}
/* Emphasize the product price. */
.product-detail-page .detail-price{display:table;font-size:17px;font-weight:600;line-height:1.4;color:#4f171b;background:#faf3f4;border:1px solid #ead6d9;border-radius:6px;padding:5px 9px;margin-bottom:12px}

.detail-image-area{position:relative}
.detail-wishlist-heart{position:absolute;top:12px;right:12px;z-index:2;display:grid;place-items:center;width:40px;height:40px;padding:0;background:#fff;border:1px solid #ead6d9;border-radius:50%;color:#4f171b;cursor:pointer}
.detail-wishlist-heart svg{fill:none;stroke:currentColor;stroke-width:1.5}
.detail-wishlist-heart[aria-pressed="true"] svg{fill:currentColor}
.detail-wishlist-heart:focus-visible{outline:2px solid #4f171b;outline-offset:2px}
.product-detail-page .detail-item-number{font-size:11px;color:#666;margin:-14px 0 12px}

/* Product detail accent colors; preserve the soft brand badge tint. */
.product-detail-page .detail-brand{background:rgba(56,102,223,.08)}
.product-detail-page .detail-buy{background:#3866df;border-color:#3866df;color:#fff}
.product-detail-page .detail-cart{background:#585858;border-color:#585858;color:#fff}
.product-detail-page .detail-price{color:#3866df}

/* Readable text on white surfaces and colored controls. */
.product-detail-page :is(.detail-title,.detail-description,.detail-item-number,.detail-stock,.gallery-hint,.detail-spec-summary,.detail-header a,.detail-header button){color:#000}
.product-detail-page .detail-brand{color:#000!important}
.product-detail-page .detail-buy,.product-detail-page .detail-cart,.product-detail-page .product-photo-preview button,.product-detail-page .detail-bottom-nav .active{color:#fff}
.product-detail-page .detail-bottom-nav a:not(.active),.product-detail-page .detail-bottom-nav button:not(.active){color:#000}
.product-detail-page .cart-badge{color:#fff}

.product-detail-page .detail-brand strong{font-weight:700!important}

/* Product detail Add to Cart keeps the logo gray over the shared blue palette. */
html body.product-detail-page .detail-actions .detail-cart{background-color:#585858!important;border-color:#585858!important;color:#fff!important}
html body.product-detail-page .detail-actions .detail-cart:hover,html body.product-detail-page .detail-actions .detail-cart:active{background-color:#454545!important;border-color:#454545!important;color:#fff!important}
html body.product-detail-page .detail-actions .detail-cart:focus-visible{outline:2px solid #585858;outline-offset:3px}
