﻿/* FUYAO 3D Studio v4 Upgrade · Visual Contrast, Mobile Toolbar, Inquiry Modal & 11-Lang Switcher */

/* 1) High-contrast luxury studio backdrop so clear/white/frosted glass bottles pop with crisp silhouette */
.studio-stage[data-bg="dark"],
.studio-stage[data-bg="studio"] {
  background: radial-gradient(circle at 50% 42%, #2b3531 0%, #151c19 100%) !important;
}
.studio-stage[data-bg="light"] {
  background: radial-gradient(circle at 50% 44%, #e5e8ec 0%, #c6ccd4 100%) !important;
}
.studio-stage canvas {
  filter: contrast(1.06) saturate(1.04);
}

/* 2) Mobile 390px toolbar fix: prevent BG: Light clipping & add sticky bottom CTA */
@media (max-width: 900px) {
  .studio-viewctl {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    padding: 8px 10px !important;
    overflow: visible !important;
  }
  .studio-viewctl button {
    width: 100% !important;
    min-width: 0 !important;
    padding: 7px 4px !important;
    font-size: 11.5px !important;
    white-space: nowrap !important;
    text-align: center !important;
  }
  body {
    padding-bottom: 66px !important;
  }
  .fy-studio-mobile-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(20, 32, 27, 0.96);
    border-top: 1px solid rgba(201, 164, 110, 0.35);
    backdrop-filter: blur(8px);
  }
  .fy-studio-mobile-cta__meta {
    color: #e8e2d6;
    font-size: 11.5px;
    line-height: 1.25;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .fy-studio-mobile-cta__meta strong {
    display: block;
    color: #fff;
    font-size: 12.5px;
  }
  .fy-studio-mobile-cta__btn {
    flex: 0 0 auto;
    background: #c9a46e;
    color: #111916;
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
  }
}
@media (min-width: 901px) {
  .fy-studio-mobile-cta { display: none !important; }
}

/* 3) Topbar clickable 11-language switcher */
.fy-studio-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(20, 44, 36, 0.18);
  background: #fff;
  color: #142c24;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.fy-studio-lang-btn:hover {
  background: #f4f1ea;
  border-color: #142c24;
}
.fy-studio-lang-panel {
  position: fixed;
  top: 56px;
  right: 16px;
  z-index: 9999;
  width: 340px;
  max-width: calc(100vw - 24px);
  background: #faf8f5;
  border: 1px solid rgba(20, 44, 36, 0.14);
  border-radius: 14px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
  padding: 10px;
  display: none;
}
.fy-studio-lang-panel[data-open="true"] {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
.fy-studio-lang-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.fy-studio-lang-grid .fy-lang-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: #1b2420;
  font-size: 12.5px;
  background: #fff;
  border: 1px solid rgba(20, 44, 36, 0.08);
}
.fy-studio-lang-grid .fy-lang-item:hover,
.fy-studio-lang-grid .fy-lang-item.is-active {
  background: #142c24;
  color: #fff;
  border-color: #142c24;
}

/* 4) 3D Spec Inquiry Modal */
.fy-3d-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: rgba(12, 18, 16, 0.68);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.fy-3d-modal-backdrop[hidden] { display: none !important; }
.fy-3d-modal {
  width: 100%;
  max-width: 680px;
  max-height: 92vh;
  overflow-y: auto;
  background: #faf8f5;
  color: #18211e;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(20, 44, 36, 0.14);
}
.fy-3d-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #142c24;
  color: #fff;
  border-radius: 15px 15px 0 0;
}
.fy-3d-modal__head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.fy-3d-modal__close {
  background: transparent;
  border: 0;
  color: #e2dcd0;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.fy-3d-modal__body {
  padding: 18px 20px 22px;
}
.fy-3d-modal__summary {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  padding: 12px;
  background: #fff;
  border: 1px solid rgba(20, 44, 36, 0.1);
  border-radius: 12px;
  margin-bottom: 16px;
  align-items: center;
}
.fy-3d-modal__thumb {
  width: 112px;
  height: 112px;
  border-radius: 8px;
  object-fit: contain;
  background: #1b2420;
  border: 1px solid rgba(20, 44, 36, 0.1);
}
.fy-3d-modal__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.fy-3d-modal__pill {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f0ece4;
  color: #142c24;
  font-weight: 600;
}
.fy-3d-modal__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 600px) {
  .fy-3d-modal__grid { grid-template-columns: 1fr; }
  .fy-3d-modal__summary { grid-template-columns: 84px 1fr; }
  .fy-3d-modal__thumb { width: 84px; height: 84px; }
}
.fy-3d-modal__field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #2b3833;
  margin-bottom: 4px;
}
.fy-3d-modal__field input,
.fy-3d-modal__field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid #cfc9be;
  background: #fff;
  font-size: 13.5px;
  color: #18211e;
}
.fy-3d-modal__field--full { grid-column: 1 / -1; }
.fy-3d-modal__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.fy-3d-modal__submit {
  background: #142c24;
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 11px 22px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}
.fy-3d-modal__submit:disabled { opacity: 0.6; cursor: wait; }
.fy-3d-modal__status {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  display: none;
}
.fy-3d-modal__status.is-ok { display: block; background: #e8f5ee; color: #114b2d; border: 1px solid #9bd3b5; }
.fy-3d-modal__status.is-err { display: block; background: #fdeeee; color: #8c1d18; border: 1px solid #f2b8b5; }

.fy-3d-modal__field input[type="file"] {
  padding: 6px 8px;
  border: 1px dashed #b9b2a4;
  background: #f5f2eb;
  font-size: 12px;
}
