@font-face { font-family: EngravingScript; src: url('/static/fonts/engraving/script.ttf'); font-display: swap; }
@font-face { font-family: EngravingBlock; src: url('/static/fonts/engraving/block.ttf'); font-display: swap; }
@font-face { font-family: EngravingClassic; src: url('/static/fonts/engraving/classic.ttf'); font-display: swap; }
@font-face { font-family: EngravingMincho; src: url('/static/fonts/engraving/mincho.ttf'); font-display: swap; }
@font-face { font-family: EngravingGothic; src: url('/static/fonts/engraving/gothic.ttf'); font-display: swap; }
@font-face { font-family: EngravingHand; src: url('/static/fonts/engraving/hand.ttf'); font-display: swap; }
.products-grid-free .product-configurable { touch-action: pan-y pinch-zoom; cursor: default; }
.product-configurable .product-link, .product-configurable .product-href-btn { display: none !important; }
.product-configurable .product-info { padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: baseline; }
.product-configurable .product-name { grid-column: 1; grid-row: 1; margin: 0; font-size: 22px; line-height: 1.3; }
.product-configurable .product-price { grid-column: 2; grid-row: 1; font-size: 21px; line-height: 1.3; white-space: nowrap; }
.product-specs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.product-specs .product-size, .product-specs .product-leadtime { display: inline; margin: 0; font-size: 12px; line-height: 1.5; letter-spacing: 0; }
.product-specs br { display: none; }
.product-specs [contenteditable] * { font: inherit !important; letter-spacing: inherit !important; }
.product-configurable .engraving-form { grid-column: 1 / -1; }
.product-configurable { scroll-margin-top: 90px; }
.product-gallery { position: relative; user-select: none; }
.product-gallery-viewport { overflow: hidden; touch-action: pan-y; }
.product-gallery-track { display: flex; transition: transform .25s ease; }
.product-gallery-track .product-image { flex: 0 0 100%; min-width: 0; aspect-ratio: auto; height: 320px; }
.product-gallery-track .product-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gallery-nav { position: absolute; top: 45%; width: 34px; height: 34px; border: 1px solid #ded6ce; border-radius: 50%; background: #fffffff2; color: #6d4e3c; font-size: 26px; line-height: 1; cursor: pointer; }
.gallery-prev { left: 10px; } .gallery-next { right: 10px; }
.gallery-dots { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); display: flex; justify-content: center; gap: 4px; padding: 0; border-radius: 14px; background: #ffffffbf; }
.gallery-dots button { width: 24px; height: 24px; padding: 7px; border: 0; background: transparent; cursor: pointer; }
.gallery-dots button::after { content: ''; display: block; width: 10px; height: 10px; border-radius: 50%; background: #d8d0c8; }
.gallery-dots button[aria-pressed=true]::after { background: #b97150; }
.gallery-edit { position: absolute; left: 10px; top: 10px; border: 0; border-radius: 18px; padding: 8px 12px; color: white; background: #302d28c9; cursor: pointer; }
.gallery-nav[hidden], .gallery-edit[hidden], .gallery-dots[hidden] { display: none; }
.gallery-editor { margin: auto; width: min(460px, calc(100% - 24px)); max-height: 80dvh; overflow: auto; border: 1px solid #d6d0c8; border-radius: 12px; padding: 18px; color: #302d28; background: #fff; }
.gallery-editor::backdrop { background: #0006; }
.gallery-editor header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.gallery-editor h2 { font-size: 18px; margin: 0; }
.gallery-editor p { font-size: 13px; }
.gallery-editor button { cursor: pointer; padding: 8px 10px; border: 1px solid #d6d0c8; background: #faf7f3; color: #302d28; border-radius: 6px; }
.gallery-editor button:disabled { opacity: .4; cursor: default; }
.gallery-editor ol { list-style: none; margin: 12px 0; padding: 0; }
.gallery-editor li { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 8px 0; border-bottom: 1px solid #eee; }
.gallery-editor img { width: 60px; height: 60px; object-fit: contain; }
.gallery-editor-status { margin-top: 10px; min-height: 1.5em; }
.engraving-form { border: 0; padding: 0; margin-top: 8px; text-align: left; user-select: text; }
.engraving-form h4 { margin: 0 0 6px; color: #493a30; font: 600 18px/1.5 var(--font-body); }
.engraving-intro, .engraving-note { color: #81766d; font-size: 12px; line-height: 1.65; margin: 0 0 10px; }
.engraving-ring { padding: 10px; margin: 0 0 8px; border-radius: 10px; background: #faf7f4; }
.engraving-fields { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 8px; }
.engraving-fields label { display: block; min-width: 0; font-size: 12px; font-weight: 600; color: #493d34; }
.engraving-fields input, .engraving-fields select { display: block; width: 100%; min-width: 0; height: 40px; margin-top: 4px; border: 1px solid #d4ccc4; border-radius: 7px; padding: 7px 9px; background: #fff; color: #372f29; font: 16px/1.3 sans-serif; }
.engraving-fields select { padding-left: 6px; padding-right: 3px; background: #f7f0e9; }
.engraving-fields input:focus, .engraving-fields select:focus { outline: 2px solid #bd805e; outline-offset: 2px; }
.engraving-fields input[aria-invalid=true] { border-color: #ab3e28; }
.engraving-preview-row { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 8px; margin-top: 6px; }
.engraving-preview-row > span { font-size: 10px; color: #766b62; }
.engraving-preview { min-height: 38px; padding: 2px 8px; background: #f3ebe2; border-radius: 8px; text-align: center; color: #714324; overflow-wrap: anywhere; }
.engraving-preview-text { font-size: 28px; line-height: 1.2; white-space: pre-wrap; }
.engraving-preview.is-empty .engraving-preview-text { font: 12px/2 sans-serif; color: #9c9186; }
.engraving-preview[aria-busy=true] .engraving-preview-text { visibility: hidden; }
.engraving-error, .engraving-form-error { color: #a13d28; font-size: 12px; line-height: 1.5; margin: 6px 0 0; }
.engraving-error:empty, .engraving-form-error:empty { display: none; }
.engraving-order { display: flex; align-items: center; justify-content: center; gap: 18px; width: min(100%, 280px); margin: 24px auto 4px; min-height: 48px; padding: 12px 24px; border: 0; border-radius: 28px; background: #bb704d; color: #fff; font: 600 16px/1.4 sans-serif; cursor: pointer; }
.engraving-order:hover { background: #a85e3d; }
.engraving-order:disabled { opacity: .6; cursor: wait; }
.product-configurable .engraving-order { width: 100%; margin: 12px auto 0; }
@media (max-width: 767px) {
  .product-gallery-track .product-image { height: clamp(80px, calc(100svh - 490px), 190px); }
  .product-configurable .product-info { padding: 12px; }
  .product-configurable .product-name { font-size: 21px; }
  .product-configurable .product-price { font-size: 20px; }
  .engraving-fields label { font-size: 11px; line-height: 1.4; }
  .engraving-ring { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) { .product-gallery-track { transition: none; } }
