* { box-sizing: border-box; }
body { margin: 0; background: #f6f6f6; color: #222; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif; }
.detail { padding-bottom: 90px; }

.gallery { position: relative; background: #000; overflow: hidden; }
.gallery .slider { width: 100%; height: 100%; }
.gallery .track { display: flex; will-change: transform; }
.gallery img { width: 100%; display: block; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.gallery .pager { position: absolute; right: 10px; bottom: 10px; padding: 2px 8px; font-size: 12px; color: #fff; background: rgba(0,0,0,0.45); border-radius: 12px; }

.price-bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 10px 12px; background: #fff; }
.price-bar .price { color: #ff4d4f; font-size: 22px; font-weight: 800; margin-right: 6px; }
.price-bar .tag { display: inline-block; padding: 2px 8px; border-radius: 12px; background: #fff0f0; color: #ff4d4f; font-size: 12px; margin-right: 6px; }
.price-bar .tag.best { background: #ff4d4f; color: #fff; }
.price-bar .center { text-align: left; }
.price-bar .right { display: inline-flex; align-items: center; gap: 6px; color: #888; font-size: 12px; }

.title { margin: 10px 12px 0; font-size: 16px; line-height: 1.4; font-weight: 700; }

.badges { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; background: #fff; margin-top: 8px; }
.chip { font-size: 12px; padding: 4px 8px; background: #f5f7fa; border-radius: 12px; color: #3a4a5a; }

.promises { list-style: none; margin: 8px 0 0; padding: 10px 12px; background: #fff; color: #666; }
.promises li { margin: 6px 0; font-size: 13px; }
.promises i { color: #999; margin-right: 6px; }

.selected { display: flex; align-items: center; gap: 8px; padding: 12px; background: #fff; margin-top: 8px; }
.selected .left { color: #666; font-size: 14px; }
.selected .value { flex: 1; color: #222; font-size: 14px; }

/* Detail specs (reuse style similar to product page) */
.detail-specs { background: #fff; margin-top: 8px; padding: 12px; }
.detail-specs .block-title { font-size: 14px; color: #333; margin-bottom: 10px; }
.detail-specs .color-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.detail-specs .color-item { position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 64px; padding: 8px 6px; border: 1px solid #eee; border-radius: 8px; background: #fff; }
.detail-specs .color-item img { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; margin-bottom: 6px; }
.detail-specs .color-item span { font-size: 12px; color: #333; }
.detail-specs .color-item.active { border-color: #ff4d4f; box-shadow: 0 0 0 2px rgba(255,77,79,0.15) inset; }

.img-fallback { background: #f2f3f5; height: 300px; }

@media (min-width: 480px) { .detail { max-width: 420px; margin: 0 auto; } }

/* Shop section */
.shop { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px; padding: 14px 12px; background: #fff; margin-top: 8px; }
.shop .avatar { width: 56px; height: 56px; border-radius: 28px; object-fit: cover; border: 3px solid #ff4d4f; }
.shop .name { font-weight: 800; font-size: 16px; }
.shop .rate-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.shop .stars i { color: #ff4d4f; font-size: 12px; }
.shop .score { font-size: 13px; color: #444; }
.shop .meta { font-size: 12px; color: #8a8f99; margin-top: 4px; }
.shop .btn-enter { padding: 8px 14px; border-radius: 18px; background: #ff4d4f; color: #fff; text-decoration: none; font-weight: 700; }

.shop-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; background: #fff; padding: 12px; border-radius: 12px; margin: 8px 12px 0; box-shadow: 0 0 0 1px #f0f0f0 inset; }
.shop-metrics .metric { text-align: center; position: relative; padding: 8px 0; }
.shop-metrics .metric:not(:last-child)::after { content: ""; position: absolute; right: 0; top: 12px; bottom: 12px; width: 1px; background: #f0f0f0; }
.shop-metrics .label { color: #7a869a; font-size: 12px; }
.shop-metrics .label b { color: #555; font-weight: 700; }
.shop-metrics .sub { margin-top: 6px; font-size: 13px; color: #333; }

/* Coupons */
.coupons { position: relative; padding: 12px; background: #fff; margin-top: 8px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.coupons .row-title { color: #333; font-size: 14px; }
.coupon-list { display: flex; gap: 8px; overflow-x: auto; }
.coupon { display: inline-block; background: #fff0f0; color: #ff4d4f; border: 1px dashed #ffb3b3; padding: 4px 8px; border-radius: 6px; font-size: 12px; text-decoration: none; white-space: nowrap; }

/* Cells */
.cells { margin-top: 8px; background: #fff; }
.cell { display: flex; justify-content: space-between; align-items: center; padding: 12px; color: #333; text-decoration: none; border-top: 1px solid #f2f2f2; }
.cell:first-child { border-top: 0; }
.cell .left { font-size: 14px; color: #555; }
.cell .right { font-size: 12px; color: #999; }

/* Description */
.desc { background: #fff; margin-top: 8px; padding: 12px; }
.desc h2 { margin: 0 0 8px; font-size: 16px; }
.desc p { margin: 0 0 8px; color: #555; font-size: 14px; }
.desc ul { margin: 0; padding-left: 18px; color: #666; font-size: 14px; }
.desc li { margin: 6px 0; }

/* Recommend */
.recommend { background: #fff; margin-top: 8px; padding: 12px; }
.recommend h2 { margin: 0 0 8px; font-size: 16px; }
.rec-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rec-item { text-align: center; font-size: 12px; color: #555; }
.rec-item img { width: 100%; height: 80px; object-fit: cover; border-radius: 6px; }

/* Sticky tabs */
.sticky-tabs { position: fixed; top: -56px; left: 0; right: 0; height: 48px; background: #fff; border-bottom: 1px solid #eee; display: flex; justify-content: center; gap: 24px; align-items: flex-end; transition: top .2s; z-index: 20; }
.sticky-tabs.show { top: 0; }
.sticky-tabs a { position: relative; padding: 0 4px 10px; font-size: 16px; color: #9aa0a6; text-decoration: none; }
.sticky-tabs a.active { color: #222; font-weight: 800; }
.sticky-tabs a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 3px; background: #ff345b; border-radius: 2px; }

/* Reviews */
.reviews { background: #fff; margin-top: 8px; padding: 12px; }
.reviews .head { display: flex; justify-content: space-between; align-items: center; }
.reviews .title { font-weight: 700; font-size: 14px; }
.reviews .more { color: #999; text-decoration: none; font-size: 12px; }
.reviews .tags { display: flex; gap: 8px; margin-top: 8px; }
.reviews .tag { background: #f5f7fa; color: #3a4a5a; border-radius: 12px; font-size: 12px; padding: 4px 8px; }
.reviews .preview { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; margin-top: 10px; }
.reviews .preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.reviews .preview .text { font-size: 13px; color: #555; }
.reviews .preview.no-img { grid-template-columns: 1fr; }

/* Bottom bar */
.detail-bottom { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid #eee; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.detail-bottom .left { display: flex; gap: 16px; align-items: center; padding-left: 6px; }
.detail-bottom .mini { text-decoration: none; color: #333; font-size: 12px; display: grid; grid-template-rows: 22px auto; justify-items: center; gap: 2px; }
.detail-bottom .mini img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.detail-bottom .mini i { font-size: 20px; color: #333; }
.detail-bottom .right { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.detail-bottom .btn { height: 40px; border: 0; border-radius: 22px; font-weight: 700; }
.detail-bottom .btn.add { background: #ffe9ec; color: #ff4d6a; }
.detail-bottom .btn.buy { background: #ff3b4f; color: #fff; }


