/* Product-specific luxury frames and image viewers. */
.personalized-frame {
  --frame-accent: #b58a42;
  --frame-soft: #eadcc2;
  border: 1px solid var(--frame-accent);
  background: linear-gradient(145deg, #fffdf9, var(--frame-soft));
  box-shadow: 0 12px 28px #231a0d14, inset 0 0 0 5px #fff9;
  isolation: isolate;
}
.personalized-frame::before,
.personalized-frame::after,
.personalized-frame .frame-corners::before,
.personalized-frame .frame-corners::after {
  content: "";
  position: absolute;
  z-index: 3;
  pointer-events: none;
}
.personalized-frame img { position: relative; z-index: 1; }
.frame-tone-1 { --frame-accent: #b58a42; --frame-soft: #eadcc2; }
.frame-tone-2 { --frame-accent: #76634d; --frame-soft: #ded5c8; }
.frame-tone-3 { --frame-accent: #8f6b63; --frame-soft: #ead8d4; }
.frame-tone-4 { --frame-accent: #65756f; --frame-soft: #d8e0dc; }
.frame-tone-5 { --frame-accent: #82704a; --frame-soft: #e7dfc8; }
.frame-tone-6 { --frame-accent: #5f6269; --frame-soft: #d9dadd; }
.frame-style-1::before { inset: 6px; border: 1px solid #fff9; box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--frame-accent) 55%,transparent); }
.frame-style-1::after { left: 50%; bottom: 6px; width: 30%; height: 2px; transform: translateX(-50%); background: var(--frame-accent); }
.frame-style-2::before { inset: 7px; border: 1px solid #fff8; border-radius: 48% 48% 2px 2px / 6% 6% 2px 2px; }
.frame-style-2::after { inset: 12px; border-left: 2px solid var(--frame-accent); border-right: 2px solid var(--frame-accent); opacity: .75; }
.frame-style-3::before { inset: 7px; border: 1px solid color-mix(in srgb,var(--frame-accent) 72%,white); }
.frame-style-3::after { top: 7px; left: 50%; width: 38%; height: 6px; transform: translateX(-50%); border-left: 1px solid var(--frame-accent); border-right: 1px solid var(--frame-accent); background: #fff9; }
.frame-style-4::before { inset: 6px; border-top: 2px solid var(--frame-accent); border-bottom: 2px solid var(--frame-accent); }
.frame-style-4::after { inset: 11px 7px; border-left: 1px solid #fff; border-right: 1px solid #fff; opacity: .9; }
.personalized-frame .frame-corners { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.personalized-frame .frame-corners::before { top: 6px; left: 6px; width: 18px; height: 18px; border-top: 3px solid var(--frame-accent); border-left: 3px solid var(--frame-accent); }
.personalized-frame .frame-corners::after { right: 6px; bottom: 6px; width: 18px; height: 18px; border-right: 3px solid var(--frame-accent); border-bottom: 3px solid var(--frame-accent); }
.product-img.personalized-frame { padding: 7px; transition: transform .28s ease, box-shadow .28s ease; }
.product-card:hover .product-img.personalized-frame { transform: translateY(-3px); box-shadow: 0 18px 34px #231a0d20, inset 0 0 0 5px #fff9; }
.product-img.personalized-frame .badge { z-index: 4; left: 18px; top: 18px; border: 1px solid color-mix(in srgb,var(--frame-accent) 55%,white); }
.card-zoom-trigger {
  position: absolute; right: 17px; bottom: 17px; z-index: 4;
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 34px; border: 1px solid #fff9; border-radius: 999px;
  background: #0b0a09d9; color: #fff; padding: 0 11px;
  font: 600 10px 'DM Sans','Microsoft YaHei',sans-serif; letter-spacing: .08em;
  cursor: zoom-in; backdrop-filter: blur(7px);
}
.card-zoom-trigger span { font-size: 17px; line-height: 1; }
.card-zoom-trigger:hover,.card-zoom-trigger:focus-visible { background: var(--frame-accent); outline: 2px solid #fff; outline-offset: 2px; }

.image-lightbox {
  position: fixed; inset: 0; margin: auto;
  width: min(1120px,calc(100% - 24px)); height: min(900px,calc(100% - 24px));
  max-width: none; max-height: none; border: 0; padding: 0; overflow: hidden;
  background: #0d0c0b; color: #fff; box-shadow: 0 40px 120px #000b;
}
.image-lightbox::backdrop { background: #060504e8; backdrop-filter: blur(10px); }
.image-lightbox-shell { height: 100%; display: grid; grid-template-rows: auto 1fr auto; }
.image-lightbox-toolbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 18px; border-bottom: 1px solid #ffffff20; }
.image-lightbox-toolbar>div:first-child { display: grid; gap: 3px; }
.image-lightbox-toolbar span { color: #caa866; font-size: 10px; letter-spacing: .16em; }
.image-lightbox-toolbar b { font: 400 20px 'Libre Caslon Display',serif; }
.image-lightbox-toolbar>div:last-child { display: flex; gap: 8px; }
.image-lightbox-toolbar button { min-width: 44px; height: 44px; border: 1px solid #ffffff35; background: #ffffff0d; color: #fff; font-size: 15px; cursor: pointer; }
.image-lightbox-toolbar button:last-child { font-size: 28px; }
.image-lightbox-stage { overflow: auto; display: grid; place-items: center; min-height: 0; padding: 18px; overscroll-behavior: contain; }
.image-lightbox-stage img { display: block; width: auto; max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; touch-action: pinch-zoom; transition: width .25s ease,max-width .25s ease; }
.image-lightbox-stage img.zoomed { width: min(1500px,190vw); max-width: none; max-height: none; cursor: zoom-out; }
.image-lightbox-shell>p { margin: 0; padding: 12px 18px 16px; text-align: center; color: #c3bcb2; font-size: 12px; }

.product-photo.personalized-frame { position: relative; display: block; width: 100%; padding: 10px; appearance: none; cursor: zoom-in; text-align: left; }
.product-photo.personalized-frame img { display: block; }
.product-zoom-hint { position: absolute; right: 25px; bottom: 25px; z-index: 4; display: inline-flex; align-items: center; gap: 7px; border: 1px solid #fff9; border-radius: 999px; background: #0b0a09db; color: #fff; padding: 10px 14px; font: 600 11px 'DM Sans','Microsoft YaHei',sans-serif; backdrop-filter: blur(7px); }
.product-zoom-hint i { font-style: normal; font-size: 18px; }
.product-photo.personalized-frame:hover .product-zoom-hint,.product-photo.personalized-frame:focus-visible .product-zoom-hint { background: var(--frame-accent); }
.product-lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 12px; background: #060504eb; backdrop-filter: blur(10px); }
.product-lightbox-shell { width: min(1120px,100%); height: min(900px,100%); margin: auto; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; background: #0d0c0b; color: #fff; box-shadow: 0 40px 120px #000b; }
.product-lightbox-toolbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 18px; border-bottom: 1px solid #ffffff20; }
.product-lightbox-toolbar>div:first-child { display: grid; gap: 3px; }
.product-lightbox-toolbar span { color: #caa866; font-size: 10px; letter-spacing: .16em; }
.product-lightbox-toolbar b { font: 400 20px 'Libre Caslon Display',serif; }
.product-lightbox-toolbar>div:last-child { display: flex; gap: 8px; }
.product-lightbox-toolbar button { min-width: 44px; height: 44px; border: 1px solid #ffffff35; background: #ffffff0d; color: #fff; font-size: 15px; cursor: pointer; }
.product-lightbox-toolbar button:last-child { font-size: 28px; }
.product-lightbox-stage { overflow: auto; display: grid; place-items: center; min-height: 0; padding: 18px; overscroll-behavior: contain; }
.product-lightbox-stage img { display: block; width: auto; max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; touch-action: pinch-zoom; transition: width .25s ease,max-width .25s ease; }
.product-lightbox-stage img.zoomed { width: min(1500px,190vw); max-width: none; max-height: none; cursor: zoom-out; }
.product-lightbox-shell>p { margin: 0; padding: 12px 18px 16px; text-align: center; color: #c3bcb2; font-size: 12px; }

@media(max-width:560px){
  .product-img.personalized-frame { padding: 5px; }
  .product-img.personalized-frame .badge { left: 11px; top: 11px; }
  .card-zoom-trigger { right: 11px; bottom: 11px; width: 38px; min-height: 38px; justify-content: center; padding: 0; }
  .card-zoom-trigger:not(:focus) { font-size: 0; }
  .card-zoom-trigger span { font-size: 18px; }
  .product-photo.personalized-frame { padding: 7px; }
  .product-zoom-hint { right: 17px; bottom: 17px; }
  .image-lightbox,.product-lightbox-shell { height: calc(100% - 10px); }
  .image-lightbox-toolbar,.product-lightbox-toolbar { min-height: 62px; padding: 9px 11px; }
  .image-lightbox-stage,.product-lightbox-stage { padding: 8px; }
}
@media(prefers-reduced-motion:reduce){.product-img.personalized-frame,.image-lightbox-stage img,.product-lightbox-stage img{transition:none}}
