/* Existing visual style, with real source images always shown in full. */
.category-card:last-child img{object-fit:contain}
.scene-card img{object-fit:contain}
.variation-grid a{display:block;color:var(--navy);font-size:12px;font-weight:800;text-align:center}
.variation-grid a img{height:150px;width:100%;object-fit:contain;background:#f1f7fd;border:2px solid transparent;border-radius:4px;padding:4px}
.variation-grid a.is-active img{border-color:var(--blue)}
.variation-grid a span{display:block;margin-top:5px}
.catalog-source-note{color:var(--muted);font-size:11px;margin-top:12px}
.page-product .spec-list{margin-top:12px}
.page-product .detail-lower{grid-template-columns:1fr}
.page-product .related-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:600px){.page-product .related-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Product image viewer: original images, contained without cropping. */
.gallery-expand{display:block;position:relative;width:100%;height:100%;padding:0;border:0;background:transparent;cursor:zoom-in}
.gallery-expand>img{display:block;width:100%;height:100%;object-fit:contain}
.gallery-expand:focus-visible{outline:3px solid var(--blue);outline-offset:-3px}
.gallery-expand__hint{position:absolute;bottom:10px;left:12px;display:flex;align-items:center;gap:6px;padding:5px 9px;border-radius:4px;background:rgba(255,255,255,.94);color:var(--blue);font-size:11px;font-weight:800;pointer-events:none}
#gallery-count{pointer-events:none}
.page-product.gallery-modal-open{position:fixed;left:0;right:0;width:100%;overflow:hidden}
.product-lightbox{position:fixed;inset:0;width:min(1200px,calc(100vw - 48px));max-width:calc(100vw - 48px);height:min(860px,calc(100vh - 48px));height:min(860px,calc(100dvh - 48px));max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px);margin:auto;padding:0;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--navy);box-shadow:0 16px 60px rgba(5,28,59,.3);overflow:hidden}
.product-lightbox[open]{display:flex;flex-direction:column}
.product-lightbox::backdrop{background:rgba(5,28,59,.76)}
.product-lightbox__header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-shrink:0;padding:14px 20px;border-bottom:1px solid var(--line)}
.product-lightbox__header>div{min-width:0}
.product-lightbox__header h2{margin:0 0 3px;font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#lightbox-count{font-size:12px;color:var(--muted)}
.product-lightbox__close,.product-lightbox__arrow{display:grid;place-items:center;width:44px;height:44px;flex-shrink:0;padding:0;border:1px solid var(--line);border-radius:5px;background:#fff;color:var(--blue)}
.product-lightbox__close:hover,.product-lightbox__arrow:hover{background:var(--pale)}
.product-lightbox button:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
.product-lightbox__viewer{position:relative;flex:1;min-height:0;padding:20px 64px;background:#f5f9ff}
.product-lightbox__viewer>img{display:block;width:100%;height:100%;object-fit:contain}
.product-lightbox__arrow{position:absolute;top:50%;transform:translateY(-50%);font-size:32px;line-height:1}
.product-lightbox__arrow--prev{left:12px}
.product-lightbox__arrow--next{right:12px}
.product-lightbox__thumbs{display:flex;gap:12px;flex-shrink:0;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;padding:14px 20px calc(14px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--line);background:#fff}
.product-lightbox__thumbs button{width:90px;height:78px;flex-shrink:0;padding:4px;border:2px solid transparent;border-radius:4px;background:var(--pale)}
.product-lightbox__thumbs button.is-active{border-color:var(--blue)}
.product-lightbox__thumbs img{width:100%;height:100%;object-fit:contain}
@media(max-width:600px){
  .product-lightbox{width:calc(100vw - 16px);max-width:calc(100vw - 16px);height:calc(100vh - 16px);height:calc(100dvh - 16px);max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px)}
  .product-lightbox__header{gap:10px;padding:10px 12px}
  .product-lightbox__header h2{font-size:15px}
  .product-lightbox__viewer{padding:12px 48px}
  .product-lightbox__arrow{width:36px;height:44px}
  .product-lightbox__arrow--prev{left:6px}
  .product-lightbox__arrow--next{right:6px}
  .product-lightbox__thumbs{gap:9px;padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px))}
  .product-lightbox__thumbs button{width:72px;height:64px}
}

.filter-search{margin-bottom:18px}
.filter-search>label{display:block;font-size:13px;font-weight:800;margin-bottom:8px}
.filter-search__input{display:flex;align-items:center;gap:7px;padding:9px 10px;background:#fff;border:1px solid #c5d5eb;border-radius:4px;color:var(--blue)}
.filter-search__input:focus-within{border-color:var(--blue);box-shadow:0 0 0 2px rgba(7,83,174,.1)}
.filter-search__input input{width:100%;min-width:0;background:none;border:0;outline:none;font-size:12px;color:var(--navy)}
.filter-search>small,.filter-note{display:block;font-size:10px;line-height:1.6;color:var(--muted);margin:6px 0 0}
.filter-note{margin:0 0 14px}
.filter-options label{gap:7px}
.filter-option__count{margin-left:auto;color:var(--muted);font-size:10px;flex-shrink:0}
.filter-panel fieldset[hidden]{display:none}
.filter-options input:disabled{cursor:wait}

.filter-backdrop{display:none}
/* Keep the heading outside the scroll area of the viewport-sized mobile drawer. */
@media(max-width:800px){
  .page-products.filter-drawer-open{position:fixed;left:0;right:0;width:100%;overflow:hidden}
  .page-products .filter-backdrop:not([hidden]){display:block;position:fixed;inset:0;z-index:90;background:rgba(7,32,67,.5)}
  .page-products .filter-panel{
    inset:0 auto auto 0;
    height:100vh;
    height:100dvh;
    max-height:100vh;
    max-height:100dvh;
    min-height:0;
    align-self:stretch;
    overflow:hidden;
    padding:0;
    box-shadow:5px 0 18px rgba(7,32,67,.16);
  }
  .page-products #filters{display:flex;flex-direction:column;height:100%;min-height:0}
  .page-products .filter-heading{flex-shrink:0;margin:0;padding:20px 20px 15px;background:#f2f8ff}
  .page-products .filter-body{flex:1;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;padding:0 20px calc(20px + env(safe-area-inset-bottom,0px))}
}

/* Purchase links only; other site buttons keep their existing design. */
.market-actions{gap:12px;margin-top:18px}
.market-actions .market-button{display:flex;align-items:center;justify-content:center;gap:10px;min-height:56px;padding:13px 16px;border-radius:6px;font-size:14px;font-weight:800;line-height:1.4;white-space:nowrap;transition:background .18s,box-shadow .18s,transform .18s}
.market-actions a.market-button--rakuten{background:#bf0000;border-color:#bf0000;color:#fff;box-shadow:0 4px 10px rgba(191,0,0,.16)}
.market-actions a.market-button--amazon{background:#ffbf57;border-color:#edaa3c;color:#172536;box-shadow:0 4px 10px rgba(192,123,22,.16)}
.market-actions a.market-button--rakuten:hover{background:#a90000;border-color:#a90000;box-shadow:0 6px 14px rgba(191,0,0,.23);transform:translateY(-2px)}
.market-actions a.market-button--amazon:hover{background:#ffb438;border-color:#e7a12c;box-shadow:0 6px 14px rgba(192,123,22,.23);transform:translateY(-2px)}
.market-actions .market-button:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
.market-actions .market-button:only-child{grid-column:1/-1}
.market-actions .market-button .icon:last-child{margin-left:3px}
@media(max-width:550px){.market-actions{grid-template-columns:1fr;gap:10px}.market-actions .market-button{min-height:52px}}
@media(prefers-reduced-motion:reduce){.market-actions .market-button{transition:none}.market-actions .market-button:hover{transform:none}}
.product-card__bottom>.card-cart:only-child{margin-left:auto}
