/* FUJISYNC MEDIA LAYOUT CONTRACT — fixed frames fill all four edges; free-height editorial images preserve original proportions.
   Do not change without explicit owner approval. Loaded after main stylesheet. */
#root :is(.hero-media,.v5-category-img,.category-tile,.v5-category-card,.v6-product-picture,.v5-product>a,.v6-product,.card-media,.featured-photo,.v7-video-thumb,.v5-video-thumb,.v8-video-main,.v8-video-mini-grid,.v7-news-card,.v5-article-image,.v12-gallery,.v9-banner-preview,.fuji-quick-row,.main-photo,.detail-gallery .thumbs,.v25-promo-banner,.fuji-page-banner,.v12-cover,.v8-existing-image,.v8-media-grid,.v19-media-modal-grid,.v243-detail-bestseller-photo) img,
#root img:is(.v7-news-cover,.fuji-custom-image,.v12-cover){object-fit:fill!important;object-position:center!important;max-width:100%!important;}
#root :is(.v7-rich-text,.v14-rich-editor,.v8-article-figure,.editorial,.fuji-page-block) img{display:block!important;max-width:100%!important;width:auto!important;height:auto!important;max-height:none!important;object-fit:contain!important;aspect-ratio:auto!important;margin-left:auto;margin-right:auto;}
#root .hero.hero-v5>.hero-media>img{object-fit:contain!important;object-position:center!important;}
/* Admin article editor only */
#root .fuji-news-title{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
#root .fuji-news-title button{width:auto;min-height:40px;}
#root .fuji-news-editor{max-width:none;scroll-margin-top:180px;align-items:start;}
#root .fuji-news-editor>.v14-rich-wrap,#root .fuji-news-save{grid-column:1/-1;min-width:0;}
#root .fuji-news-save{display:flex;justify-content:flex-end;}
#root .fuji-news-save button{width:auto;min-height:42px;padding:10px 24px;}
#root .fuji-article-full{margin-top:20px;min-width:0;}
#root .v14-editor-toolbar select{width:auto!important;max-width:100%;min-width:100px;flex:0 1 auto;}
#root .v14-editor-toolbar button{width:auto!important;flex:0 0 auto;}
#root .v14-rich-editor{min-height:460px;white-space:pre-wrap;overflow-wrap:anywhere;}
#root .v14-rich-editor :is(ul,ol),#root .v7-rich-text :is(ul,ol){padding-inline-start:2em;}
#root .v14-rich-editor :is(h1,h2,h3,h4,h5,h6),#root .v7-rich-text :is(h1,h2,h3,h4,h5,h6){line-height:1.35;}
@media(max-width:680px){#root .v14-rich-editor{min-height:300px;}#root .fuji-news-editor{scroll-margin-top:16px;}}

/* V24.3J — owner-approved public layout contract. Fixed boxes fill all edges,
   natural-height banners and article images retain their original ratio. */
#root :is(.v5-category-img,.v6-product-picture,.featured-photo,.v7-video-thumb,.v5-article-image) img {display:block!important;width:100%!important;height:100%!important;max-height:none!important;object-fit:fill!important;}
#root :is(.v7-news-card,.category-tile,.card-media) img {display:block!important;width:100%!important;object-fit:fill!important;max-height:none!important;}
#root .v8-video-main .v7-video-thumb img,#root .v8-video-mini-grid .v7-video-thumb img,#root .product-page .v16-review-layout .v7-video-thumb img {position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:fill!important;}
#root .hero.hero-v5>.hero-media>img,#root .product-page .detail.v15-product-detail .main-photo>img,#root img.v7-news-cover,#root .fuji-page-banner img,#root img.fuji-custom-image {width:100%!important;height:auto!important;max-height:none!important;object-fit:contain!important;}
#root .product-page .v25-buy-panel .v25-promo-banner {height:auto!important;max-height:none!important;}
#root .product-page .v25-buy-panel .v25-promo-banner a {display:block;width:100%!important;height:auto!important;}
#root .product-page .v25-buy-panel .v25-promo-banner img {display:block!important;width:100%!important;height:auto!important;max-height:none!important;object-fit:contain!important;}
#root .detail-gallery .thumbs button:not(.all-photos) {width:100%!important;height:auto!important;aspect-ratio:1/1;padding:0!important;overflow:hidden;}
#root .detail-gallery .thumbs button:not(.all-photos) img {display:block!important;width:100%!important;height:100%!important;max-height:none!important;object-fit:fill!important;}
/* Compact benefits, preserve desktop rail and mobile grid. */
#root .v10-benefits-track {min-height:0!important;}
#root .v10-benefits-brand {min-height:0!important;padding:10px 16px!important;}
#root .v10-benefits-list {grid-auto-rows:auto!important;}
#root .v10-benefit {padding:8px 6px!important;}
@media(min-width:701px){
 #root .v7-product-panels {align-items:stretch!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;}
 #root .v7-product-panels>.v7-panel {min-width:0;min-height:0!important;}
 #root .v7-panel#thong-so {display:flex!important;flex-direction:column!important;}
 #root .v7-panel#thong-so .v20-specs {flex:1 1 auto!important;display:flex!important;flex-direction:column!important;gap:8px!important;}
 #root .v7-panel#thong-so .v20-spec-basic {flex:3 0 auto!important;grid-template-rows:repeat(3,minmax(min-content,1fr))!important;}
 #root .v7-panel#thong-so .v20-spec-details {flex:11 0 auto!important;display:grid!important;grid-template-rows:repeat(11,minmax(min-content,1fr))!important;align-content:stretch!important;}
 #root .v7-panel#thong-so .v20-spec-row {align-items:center!important;padding:5px 3px!important;}
 #root .v7-panel#thong-so .v20-spec-row dt {white-space:normal!important;overflow-wrap:anywhere;}
 #root .v7-panel#reviews {display:flex;flex-direction:column;}
 #root .v7-panel#reviews .v16-review-layout {flex:1;justify-content:space-between;}
}
@media(max-width:700px){
 #root .v10-benefits-brand {padding:8px!important;}
 #root .v10-benefits-list {grid-template-rows:none!important;grid-auto-rows:auto!important;padding:4px!important;}
 #root .v10-benefit {padding:6px 3px!important;gap:3px!important;}
}
/* V24.3L: desktop review and specifications share one compact, evenly spaced 14-row grid. */
@media(min-width:701px){
 #root .v7-product-panels>.v7-panel {padding:16px!important;}
 #root .v7-product-panels>.v7-panel>h2 {margin:0 0 14px!important;}
 #root .v7-panel#thong-so .v20-specs {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(14,minmax(min-content,1fr));gap:0 12px!important;align-content:stretch!important;min-height:0;}
 #root .v7-panel#thong-so .v20-spec-basic,#root .v7-panel#thong-so .v20-spec-details {display:contents!important;}
 #root .v7-panel#thong-so .v20-spec-row {margin:0!important;min-height:0!important;padding:4px 3px!important;border-bottom:1px solid #e9e4ed!important;align-items:center!important;line-height:1.35!important;}
 #root .v7-panel#thong-so .v20-spec-row.basic {grid-template-columns:minmax(0,60%) minmax(0,1fr)!important;gap:5px!important;}
 #root .v7-panel#thong-so .v20-spec-row.detail {grid-column:1/-1;grid-template-columns:minmax(0,30%) minmax(0,1fr)!important;gap:10px!important;}
 #root .v7-panel#thong-so .v20-spec-row:last-child.detail {border-bottom:0!important;}
 #root .v7-panel#thong-so .v20-spec-row dd {margin:0;overflow-wrap:anywhere;}
 #root .v7-panel#reviews .v16-review-layout {gap:10px;justify-content:space-between;}
}
