.partner-product[data-product-id] { cursor:pointer; }
.partner-product-name > button { border:0; padding:0; background:none; color:inherit; font:inherit; text-align:inherit; line-height:inherit; cursor:pointer; }
.partner-store #galleryModal { width:640px; max-width:calc(100vw - 32px); padding:0; overflow:hidden; border-radius:16px; }
.partner-store #galleryModal[open] { display:flex; flex-direction:column; }
.partner-store .product-detail-header { display:flex; align-items:center; justify-content:space-between; flex-shrink:0; gap:12px; padding:12px 18px; border-bottom:1px solid var(--line); }
.product-detail-header h3 { margin:0; font-size:15px; line-height:1.8; overflow-wrap:anywhere; }
.product-detail-close { display:grid; place-items:center; width:40px; height:40px; flex:0 0 40px; background:none; border:0; border-radius:8px; color:var(--ink-soft); cursor:pointer; }
.product-detail-close:hover { background:var(--primary-light); }
.product-detail-close svg { width:20px; height:20px; }
.product-detail-body { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:18px; padding:18px; overflow:auto; overscroll-behavior:contain; min-height:0; }
.product-detail-media { min-width:0; align-self:start; }
.partner-store #galleryModalBody { display:flex; flex-direction:column; gap:6px; background:#f8f9fc; padding:10px; border-radius:12px; }
.partner-store #galleryModal .gallery-stage { position:relative; width:100%; aspect-ratio:1; min-height:0; height:auto; padding:8px; border:0; border-radius:12px; background:white; overflow:hidden; }
.partner-store #galleryModal .gallery-main-image { width:100%; height:100%; max-height:none; object-fit:contain; }
.partner-store #galleryModal .gallery-thumbs { display:flex; flex-direction:row; justify-content:center; flex-wrap:wrap; gap:8px; max-height:none; width:100%; padding:4px; overflow:visible; }
.partner-store #galleryModal .gallery-thumb { flex:0 0 44px; width:44px; height:44px; padding:4px; border:1px solid var(--line); border-radius:9px; background:#fff; }
.partner-store #galleryModal .gallery-thumb.active { border:2px solid var(--primary); box-shadow:0 2px 8px #3b5bdb20; }
.partner-store #galleryModal .gallery-thumb img { width:100%; height:100%; object-fit:contain; }
.partner-store #galleryModal .gallery-counter { display:none; }
.partner-store #galleryModal .gallery-thumbs:has(> :only-child) { display:none; }
#detailGalleryStatus { font-size:12px; color:var(--ink-soft); line-height:1.8; }
#detailGalleryStatus:empty { display:none; }
.product-detail-info { display:flex; flex-direction:column; gap:10px; min-width:0; }
#detailProductName { margin:0; font-size:16px; line-height:1.8; overflow-wrap:anywhere; }
#detailProductBrand { color:var(--ink-soft); font-size:12px; }
#detailProductPrices { display:grid; gap:10px; margin:4px 0; }
.detail-price { display:flex; justify-content:space-between; align-items:center; gap:10px; font-size:13px; }
.detail-price > span,.detail-price small { color:var(--ink-soft); }
.detail-price > div { text-align:left; }
.detail-price strong { font-size:18px; color:var(--primary); }
.detail-price del { display:block; color:var(--ink-lighter); font-size:12px; }
#detailProductStock { color:var(--teal); font-size:13px; }
#detailProductStock.unavailable { color:var(--red); }
.product-detail-actions { display:grid; gap:8px; margin-top:auto; padding-top:10px; }
.product-detail-actions .btn { width:100%; min-height:44px; border-radius:8px; }
.product-detail-actions .btn-outline { color:var(--primary); border-color:var(--primary); background:var(--primary-light); }
.product-detail-actions .btn-gold { background:var(--primary); }
html:has(.partner-store #galleryModal[open]),body.partner-store:has(#galleryModal[open]) { overflow-y:hidden; }
@media(max-width:600px) {
  .partner-store #galleryModal { width:400px; max-width:calc(100vw - 24px); max-height:calc(100dvh - 24px); border-radius:16px; }
  .partner-store .product-detail-header { padding:8px 12px; gap:8px; }
  .product-detail-header h3 { font-size:14px; }
  .product-detail-body { grid-template-columns:minmax(0,1fr); padding:12px; gap:12px; }
  .product-detail-media { width:min(100%,190px); justify-self:center; }
  .product-detail-info { text-align:center; gap:8px; }
  #detailProductPrices { gap:8px; margin:2px 0; }
  #detailProductName { font-size:15px; }
  .detail-price { max-width:300px; width:100%; margin:auto; }
  .product-detail-actions { padding-top:8px; }
}
