/* Reset & base */
* { box-sizing: border-box; }
@font-face {
  font-family: vazir;
  font-style: normal;
  font-weight: 100;
  src: url("./fonts/Vazir/Vazir-Thin.eot");
  src: url("./fonts/Vazir/Vazir-Thin.woff") format("woff"),
    url("./fonts/Vazir/Vazir-Thin.ttf") format("ttf"),
    url("./fonts/Vazir/Vazir-Thin.woff2") format("woff2");
}
@font-face {
  font-family: 'Vazir';
  font-style: normal;
  font-weight: 300;
  src: url("./fonts/Vazir/Vazir-Light.eot");
  src: url("./fonts/Vazir/Vazir-Light.woff") format("woff"),
    url("./fonts/Vazir/Vazir-Light.ttf") format("ttf"),
    url("./fonts/Vazir/Vazir-Light.woff2") format("woff2");
}

@font-face {
  font-family: vazir;
  font-style: normal;
  font-weight: 400;
  src: url("./fonts/Vazir/Vazir-Medium.eot");
  src: url("./fonts/Vazir/Vazir-Medium.woff") format("woff"),
    url("./fonts/Vazir/Vazir-Medium.ttf") format("ttf"),
    url("./fonts/Vazir/Vazir-Medium.woff2") format("woff2");
}
@font-face {
  font-family: vazir;
  font-style: normal;
  font-weight: 950;
  src: url("./fonts/Vazir/Vazir-Bold.eot");
  src: url("./fonts/Vazir/Vazir-Bold.woff") format("woff"),
    url("./fonts/Vazir/Vazir-Bold.ttf") format("ttf"),
    url("./fonts/Vazir/Vazir-Bold.woff2") format("woff2");
}

body, button, input, select, textarea, label, h1, h2, h3, h4, h5, h6 {
  font-family: 'Vazir', sans-serif !important;
  direction: rtl;
}
body {
  background: #0b0d12;
  color: #e6e9ef;
  line-height: 1.8;
  background-image: url('backgroundimage.jpg') ;
  background-repeat: no-repeat center center; 
  background-size: cover;
  font-size:20px;
}
.container { width: min(1100px, 92%); margin-inline: auto; }

/* Header */
.site-header { position: sticky; top: 0; backdrop-filter: blur(6px); background: rgba(11,13,18,0.55); border-bottom: 1px solid #1a1f2b; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 5px 0; }
.brand { font-weight: 800; letter-spacing: 1px; }
.brand span { color: #747985; }
.nav { display: flex; gap: 20px; }
.nav-link { color: #9aa4b2; text-decoration: none; font-size: 0.95rem; }
.nav-link.is-active, .nav-link:hover { color: #fff; }

/* Layout */
.main-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  padding: 28px 0 40px;
}
.panel {
  background: linear-gradient(180deg, #141822 0%, #78797c 100% );
  border: 1px solid #1a2030;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}



/* Design / Preview */
.design-head .title { margin: 0 0 4px; font-size: 1.35rem; }
.design-head .subtitle { margin: 0 0 18px; color: #aeb6c2; font-size: 0.95rem; }

.preview-wrap { display: grid; grid-template-columns: 1fr; gap: 14px; }
.preview {
  position: relative;
  height: 360px;
  background: radial-gradient(1000px 300px at 50% -20%, rgba(93,139,255,0.2), transparent),
              radial-gradient(600px 220px at 10% 100%, rgba(59,241,255,0.07), transparent),
              #0c0f16;
  border: 1px solid #1a2030;
  border-radius: 14px;
  overflow: hidden;
}
.axes {
  display: flex; gap: 12px; align-items: center;
  color: #8aa2ff; font-weight: 600; letter-spacing: 0.5px;
}
.axis { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; border: 1px dashed #2b3550; }
.axis.x { color: #ffd166; }
.axis.y { color: #06d6a0; }
.axis.z { color: #5d8bff; }

.box {
  --box-color: #3a6cff;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 80px;
  background: var(--box-color);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.35), inset 0 0 30px rgba(255,255,255,0.08);
}
.legend { display: flex; gap: 18px; color: #aeb6c2; }
.legend strong { color: #fff; }

/* Form */
.form { display: grid; gap: 14px; }
.form-row { display:flow-root; gap: 8px; }
.form-row.inline-2 { grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row label { color: #bdc6d4; font-size: 1 rem; }
input[type="number"], input[type="text"], textarea {
  width: 100%;
  background: #ffffff;
  color: #050506;
  border: 1px solid #263048;
  border-radius: 5px;
  padding: 2.7px 2.7px;
  outline: none;
}
input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { appearance: textfield; }
textarea { resize: vertical; }

.color-row { grid-template-columns: 1fr 1fr; align-items: center; gap: 10px; }
.color-hex { direction: ltr; font-family: 'Vazir', SFMono-Regular, Menlo, Consolas, 'Courier New', monospace; }

.actions { display: flex; gap: 10px; margin-top: 10px; }
.btn {
  appearance: none;
  border: 1px solid #2a3550;
  background: #121826;
  color: #e6e9ef;
  padding: 20px 25px;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 10px;
}
.btn.primary { background: linear-gradient(135deg, #5d8bff, #3a6cff); border: none; }
.btn:hover { filter: brightness(1.07); }

.status { min-height: 1.2em; color: #aeb6c2; margin: 6px 0 0; }

/* Footer */
.site-footer { border-top: 1px solid #1a1f2b; padding: 18px 0 26px; margin-top: 24px; color: #aeb6c2; }

/* 3D cube container */
.cube-container {
  perspective: 600px;
  width: 250px;
  height: 250px;
}

.cube {
  width: 100px;
  height: 100px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(-20deg) rotateY(30deg);
  transition: transform 0.3s;
  margin: auto;
}

.cube-face {
  position: absolute;
  width: 100px;
  height: 100px;
  background: #3a6cff;
  border: 1px solid #000;
  opacity: 0.9;
}

.front  { transform: translateZ(50px); }
.back   { transform: rotateY(180deg) translateZ(50px); }
.right  { transform: rotateY(90deg) translateZ(50px); }
.left   { transform: rotateY(-90deg) translateZ(50px); }
.top    { transform: rotateX(90deg) translateZ(50px); }
.bottom { transform: rotateX(-90deg) translateZ(50px); }


.preview-3d-scene {
  perspective: 800px;
  width: 100%;
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

.cube {
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(-20deg) rotateY(30deg);
  transition: all 0.3s ease;
}

.face {
  position: absolute;
  background: var(--box-color, #3a6cff);
  opacity: 0.9;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* موقعیت وجه‌ها */
.front  { transform: translateZ(var(--depth)); width: var(--width); height: var(--height); }
.back   { transform: rotateY(180deg) translateZ(var(--depth)); width: var(--width); height: var(--height); }
.right  { transform: rotateY(90deg) translateZ(calc(var(--width) / 2)); width: var(--depth); height: var(--height); left: calc(var(--width) / 2); }
.left   { transform: rotateY(-90deg) translateZ(calc(var(--width) / 2)); width: var(--depth); height: var(--height); right: calc(var(--width) / 2); }
.top    { transform: rotateX(90deg) translateZ(calc(var(--height) / 2)); width: var(--width); height: var(--depth); top: calc(var(--height) / 2); }
.bottom { transform: rotateX(-90deg) translateZ(calc(var(--height) / 2)); width: var(--width); height: var(--depth); bottom: calc(var(--height) / 2); }

/* نوع درب‌ها */
.cube.slide .top {
  background: linear-gradient(to top, var(--box-color), #fff3);
}
.cube.separate .top,
.cube.separate .bottom {
  border: 2px dashed rgba(255,255,255,0.3);
}
.cube.magnetic .top {
  box-shadow: inset 0 -8px 12px rgba(255,255,255,0.2);
}

.image-preview {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
}

.box-image-wrapper {
  position: relative;
  display: inline-block;
  transition: transform 0.3s ease;
}

.box-image-wrapper img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.color-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: multiply;
  opacity: 0.5;
  border-radius: 8px;
  pointer-events: none;
}

.box-preview-container {
  position: relative;
  /* display: flex; */
  flex-direction: column;
  align-items: center;
}
.box-view {
  position: relative;

  
}
.box-preview-img {
  width: 100%;
  display: block;
  border-radius: 8px;
  margin-top: -35px;
  height: auto;
}
.dimension-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.dimension-overlay text {
  font-size: 14px;
  fill: white;
  font-weight: 500;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.4);
  stroke-width: 2px;
}

.legend-box {
  top: 3px;
  right: 3px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 0px;
  line-height: 1.8;
  position: relative;
  background: rgba(0, 0, 0, 0.9);
  color: #ffffff;
  padding: 10px 15px;
  border-radius: 10px;
  margin-bottom: 40px; /* فاصله از تصویر */
  font-size: 1rem;
  width: 99%;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 900px) {
  .main-grid { grid-template-columns: .8fr; display:contents; }
  .panel {margin-top: 5px;}
}


.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-line {
  width: 30px;
  height: 2px;
  background: white;
}

.legend-line.x {
  transform: rotate(0deg);
}

.legend-line.y {
  transform: rotate(-45deg);
}

.legend-line.z {
  transform: rotate(90deg);
}

.legend-label {
  font-weight: bold;
}


.legend-row {
  font-weight: bold;
}
.nav-bar {
  background-color: #fff;
  padding: 7px 20px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-links li {
  position: relative;
}

#contactToggle {
  background-color: #5a5c5f;
  color: white;
  padding: 6px 12px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 25px;
  height: 50px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #f1f1f1;
  padding: 10px 12px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  z-index: 999;
  min-width: 150px;
  font-size: 14px;
  color: #333;
}

.checkbox-options {
  margin-top: 10px;
  display: flex; 
  gap: 6px;
  font-size: 14px;
}

/* استایل دکمه‌های تب */
.tab-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 40px;
  border: 1px solid #aaa;
  background-color: #3e4144;
  cursor: pointer;
  font-size: 15px;
  font-weight: bolder;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.tab-btn.active {
  background-color: #e0e0e0;
}

.tab-btn:hover {
  background-color: #c0c3c6;
  color: white;
  border-color: #5e646a;
}

/* مخفی‌سازی فرم‌ها */
.form-tab {
  display: none;
}

.form-tab.active-form {
  display: block;
}

/* کمی زیباسازی فرم‌ها */
.product-form-container form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-form-container label {
  font-weight: bold;
}

.product-form-container input,
.product-form-container select,
.product-form-container textarea {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.logo img {
  height: 60px; 
  object-fit: contain;
  padding: 1px 10px;
  margin-top: 10px;
}


.big-input {
  width: 100%;      /* عرض کامل والد */
  max-width: 400px; /* حداکثر عرض */
  height: 50px;
  padding: 10px;
  font-size: 18px;
}

.big-checkbox{
  width: 20px;      /* بعضی مرورگرها تاثیر کم دارند */
  height: 20px;     /* بعضی مرورگرها تاثیر کم دارند */
  transform: scale(1.5); /* بزرگ‌تر کردن چک‌باکس */
  margin-right: 8px;
}

.site-footer {
  background-color:rgba(11,13,18,0.75);
  color: #fcfbfb;
  padding: 40px 20px 10px;
  font-family: 'Vazir';
  border-top: 1px solid #222020;
  margin-top: 50px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

.footer-section {
  flex: 1 1 200px;
  min-width: 250px;
}

.footer-section h3 {
  margin-bottom: 10px;
  color: #afadbc;
  font-size: 24px;
}

.footer-section p {
  margin: 5px 0;
  font-size: 18px;
  line-height: 1.6;
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  padding-top: 10px;
  border-top: 1px solid #424040;
  font-size: 16px;
  color: #777;
}

.price-display {
  font-size: 20px;
  color: #989a9d;
  margin: 10px 0;
  font-weight: bolder;
}

/* استایل کلی منوی انتخاب رنگ */
#color {
  appearance: none;
  background-color: #fff;
  padding: 8px;
  border-radius: 6px;
  font-size: 1rem;
  border: 1px solid #ccc;
}

/* هر رنگ با تصویر پس‌زمینه‌اش */
#color option[value="black"] {
  background: url("black.jpg") left center / 40px 20px no-repeat;
  padding-left: 50px;
}

#color option[value="blue"] {
  background: url("blue.jpg") left center / 40px 20px no-repeat;
  padding-left: 50px;
}

#color option[value="red"] {
  background: url("red.jpg") left center / 40px 20px no-repeat;
  padding-left: 50px;
}

#color option[value="green"] {
  background: url("green.jpg") left center / 40px 20px no-repeat;
  padding-left: 50px;
}

#color option[value="kraft"] {
  background: url("kraft.jpg") left center / 40px 20px no-repeat;
  padding-left: 50px;
}

#color option[value="turquoise"] {
  background: url("turquoise.jpg") left center / 40px 20px no-repeat;
  padding-left: 50px;
}

/* برای زیبایی بیشتر وقتی باز میشه */
#color option {
  background-color: #fff;
  font-size: 1rem;
}
.color-select-wrapper {
  display: flex;
  align-items: center;
  gap: 3px;
}

#color-preview {
  width: 200px;
  height: 50px;
  border-radius: 6px;
  border: 1px solid #aaa;
  background-size: cover;
  background-position: center;
  background-color: #f0f0f0;
}

#color-custom {
  appearance: none;
  background-color: #fff;
  padding: 8px;
  border-radius: 6px;
  font-size: 1rem;
  border: 1px solid #ccc;
}

#color-custom option[value="black"] {
  background: url("black.jpg") left center / 40px 20px no-repeat;
  padding-left: 50px;
}

#color-custom option[value="blue"] {
  background: url("blue.jpg") left center / 40px 20px no-repeat;
  padding-left: 50px;
}

#color-custom option[value="red"] {
  background: url("red.jpg") left center / 40px 20px no-repeat;
  padding-left: 50px;
}

#color-custom option[value="green"] {
  background: url("green.jpg") left center / 40px 20px no-repeat;
  padding-left: 50px;
}

#color-custom option[value="kraft"] {
  background: url("kraft.jpg") left center / 40px 20px no-repeat;
  padding-left: 50px;
}

#color-custom option[value="turquoise"] {
  background: url("turquoise.jpg") left center / 40px 20px no-repeat;
  padding-left: 50px;
}

/* برای زیبایی بیشتر وقتی باز میشه */
#color-custom option {
  background-color: #fff;
  font-size: 1rem;
}
.color-select-wrapper {
  display: flex;
  align-items: center;
  gap: 3px;
}

#color-custom-preview {
  width: 200px;
  height: 50px;
  border-radius: 6px;
  border: 1px solid #aaa;
  background-size: cover;
  background-position: center;
  background-color: #f0f0f0;
}