/* Photo Frame Studio – product page */
.gfs-studio { --gfs-p: #E8115B; --gfs-ink: #16163A; --gfs-muted: #6B6474; --gfs-line: #F0DDE3; margin: 0 0 18px; padding: 16px; border: 1.5px solid var(--gfs-line); border-radius: 18px; background: #fff; box-shadow: 0 8px 28px rgba(43, 11, 30, .06); }
.gfs-studio__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.gfs-studio__head > div { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gfs-studio__icon { flex: 0 0 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--gfs-p); color: #fff; }
.gfs-studio__title { font-size: 16px; color: var(--gfs-ink); }
.gfs-req { color: #E53935; }
.gfs-studio__sub { font-size: 12.5px; color: var(--gfs-muted); }
.gfs-btn-preview { flex: 0 0 auto; padding: 8px 14px; border: 1.5px solid var(--gfs-p); border-radius: 99px; background: #fff; color: var(--gfs-p); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.gfs-btn-preview:hover { background: #FFEBF2; }
.gfs-studio__body { display: flex; flex-direction: column; gap: 16px; }
.gfs-stage { display: flex; justify-content: center; padding: 10px; border-radius: 14px; background: #F7F1F3; }
.gfs-stage canvas { display: block; max-width: 100%; border-radius: 4px; box-shadow: 0 10px 28px rgba(0, 0, 0, .18); touch-action: none; }
.gfs-panel { display: flex; flex-direction: column; gap: 14px; }
.gfs-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.gfs-field__label { font-size: 13px; font-weight: 800; color: var(--gfs-ink); }
.gfs-field__count { align-self: flex-end; font-size: 11.5px; color: var(--gfs-muted); }
.gfs-input { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1.5px solid var(--gfs-line); border-radius: 12px; background: #FEFBFC; font: inherit; font-size: 15px; color: var(--gfs-ink); }
textarea.gfs-input { resize: vertical; line-height: 1.45; }
.gfs-input:focus { outline: none; border-color: var(--gfs-p); background: #fff; box-shadow: 0 0 0 3px rgba(232, 17, 91, .08); }
.gfs-input--date { height: 46px; font-weight: 700; }
.gfs-photos { display: flex; flex-direction: column; gap: 8px; }
.gfs-photos__hint { font-size: 12px; color: var(--gfs-muted); }
.gfs-photos__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.gfs-tile { position: relative; aspect-ratio: 1; padding: 0; overflow: hidden; border: 1.5px dashed #E6B8C7; border-radius: 12px; background: #FEF8FA; color: var(--gfs-p); cursor: pointer; }
.gfs-tile canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.gfs-tile__num { position: absolute; left: 5px; top: 4px; z-index: 1; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: var(--gfs-p); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
.gfs-tile__plus { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 300; }
.gfs-tile.has-photo { border-style: solid; border-color: transparent; }
.gfs-tile.has-photo .gfs-tile__plus { display: none; }
.gfs-tile.is-active { border: 2.5px solid var(--gfs-p); box-shadow: 0 0 0 3px rgba(232, 17, 91, .15); }
.gfs-tile.is-missing { border-color: #E53935; background: #FFF4F4; animation: gfsShake .4s ease 1; }
@keyframes gfsShake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.gfs-photoctl { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: #FFEBF2; }
.gfs-photoctl[hidden] { display: none; }
.gfs-photoctl strong { font-size: 13px; }
.gfs-range { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 700; }
.gfs-range input { width: 100%; accent-color: var(--gfs-p); }
.gfs-photoctl__btns { display: flex; gap: 8px; }
.gfs-chip { padding: 7px 14px; border: 1.5px solid var(--gfs-line); border-radius: 99px; background: #fff; color: var(--gfs-ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.gfs-chip--danger { color: #C62828; }
.gfs-error { margin: 12px 0 0; padding: 10px 14px; border-radius: 10px; background: #FDECEC; color: #C62828; font-weight: 600; font-size: 14px; }
.gfs-error[hidden] { display: none; }
.gfs-toast { position: fixed; left: 50%; top: 50%; z-index: 100000; display: none; align-items: center; gap: 14px; max-width: calc(100vw - 32px); padding: 18px 22px; border-radius: 16px; background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); transform: translate(-50%, -50%); }
.gfs-toast.is-on { display: flex; }
.gfs-toast span:last-child { display: flex; flex-direction: column; gap: 2px; }
.gfs-toast small { color: var(--gfs-muted, #6B6474); }
.gfs-spin { flex: 0 0 26px; width: 26px; height: 26px; border: 3px solid #F0DDE3; border-top-color: #E8115B; border-radius: 50%; animation: gfsSpin .8s linear infinite; }
@keyframes gfsSpin { to { transform: rotate(360deg); } }
body.gfs-busy::after { content: ""; position: fixed; inset: 0; z-index: 99999; background: rgba(30, 8, 15, .35); }
body.gfs-busy form.cart button[type="submit"], body.gfs-busy .gpc-sticky__btn { pointer-events: none; opacity: .6; }
.gfs-lightbox { position: fixed; inset: 0; z-index: 100000; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(22, 8, 13, .8); }
.gfs-lightbox.is-open { display: flex; }
.gfs-lightbox__box { position: relative; max-width: 100%; max-height: 100%; }
.gfs-lightbox__box img { display: block; max-width: min(92vw, 820px); max-height: 88vh; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.gfs-lightbox__x { position: absolute; right: -12px; top: -12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #fff; color: #16163A; font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
/* Desktop: live preview in the product-photo column */
.gfs-left { position: sticky; top: 90px; align-self: start; }
.gfs-left__bar { display: flex; gap: 4px; width: max-content; margin: 0 0 12px auto;padding: 4px; border: 1.5px solid #F0DDE3; border-radius: 99px; background: #fff; }
.gfs-left__bar button { padding: 7px 16px; border: 0; border-radius: 99px; background: transparent; color: #16163A; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.gfs-left__bar button.is-active { background: #E8115B; color: #fff; }
.gfs-left .gfs-stage { padding: 16px; }
body.admin-bar .gfs-left { top: 120px; }
.gfs-left .gfs-stage canvas { border-radius: 6px; }
/* The gallery stays rendered off-screen (so its slider keeps its size) while the frame is shown. */
.gfs-has-left:not(.gfs-show-photos) .gfs-left .woocommerce-product-gallery { position: absolute !important; left: -10000px; top: 0; width: 600px !important; visibility: hidden; }
.gfs-has-left.gfs-show-photos .gfs-left .gfs-left__slot { display: none; }
.woocommerce.single-product div.product .gfs-left div.images.woocommerce-product-gallery { top: 0; }
@media (max-width: 480px) {
	.gfs-studio { padding: 12px; }
	.gfs-studio__sub { display: none; }
	.gfs-photos__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
