/* =====================================================
   Atom Order Totebag — Designer Styles
   ===================================================== */

.aot-designer-wrap {
  --aot-ink: #1c1c1c;
  --aot-muted: #888;
  --aot-line: #d8d2cb;
  --aot-bg: #f2ede8;
  --aot-bg2: #ebe4dc;

  font-family: 'Segoe UI', Tahoma, system-ui, sans-serif;
  direction: rtl;
  background: var(--aot-bg);
  color: var(--aot-ink);
  border-radius: 8px;
  overflow: hidden;
  margin: 24px 0;
  border: 1px solid var(--aot-line);
}

/* ── Layout ── */
.aot-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.aot-col-preview {
  background: var(--aot-bg2);
  border-left: 1px solid var(--aot-line);
  display: flex;
  align-items: center;
  justify-content: center;
}

.aot-preview-wrap {
  aspect-ratio: 9 / 10;
  overflow: hidden;
  border-radius: 6px;
}

.aot-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.aot-col-controls {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 36px;
  gap: 22px;
}

/* ── Labels ── */
.aot-lbl {
  font-size: 0.66rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--aot-muted);
  margin-bottom: 10px;
}

.aot-hr {
  border: none;
  border-top: 1px solid var(--aot-line);
}

/* ── Swatches ── */
.aot-swatches {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.aot-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.12s, transform 0.12s;
  flex-shrink: 0;
  position: relative;
  outline: none;
}

.aot-swatch:hover {
  transform: scale(1.12);
}

.aot-swatch.active {
  border-color: var(--aot-ink);
}

.aot-swatch[data-css=""],
.aot-swatch[data-css="#f8f8f6"],
.aot-swatch[data-css="#ffffff"] {
  box-shadow: inset 0 0 0 1px #bbb;
}

/* tooltip */
.aot-color-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--aot-ink);
  color: #f2ede8;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s, transform 0.18s;
  z-index: 20;
}

.aot-color-tooltip::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 5px 5px 5px;
  border-style: solid;
  border-color: transparent transparent var(--aot-ink) transparent;
}

.aot-swatch:hover .aot-color-tooltip,
.aot-swatch.active .aot-color-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* موجودی */
.aot-stock-status {
  font-size: 0.72rem;
  margin-top: 6px;
  font-weight: 500;
}

.aot-stock-status.in-stock {
  color: #2d7a3a;
}

.aot-stock-status.out-stock {
  color: #c00;
}

/* ── Pattern grid ── */
.aot-pattern-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.aot-pattern-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 5px;
  transition: border-color 0.15s, transform 0.12s;
  background: rgba(255,255,255,0.4);
  outline: none;
  width: 80px;
}

.aot-pattern-item:hover {
  transform: scale(1.06);
  border-color: var(--aot-muted);
}

.aot-pattern-item.active {
  border-color: var(--aot-ink);
  background: rgba(255,255,255,0.7);
}

.aot-pattern-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.aot-pattern-name {
  font-size: 0.6rem;
  color: var(--aot-muted);
  text-align: center;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ── Price ── */
.aot-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.aot-price-num {
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1;
}

.aot-price-unit {
  font-size: 0.76rem;
  color: var(--aot-muted);
}

.aot-price-note {
  font-size: 0.7rem;
  color: var(--aot-muted);
  margin-top: 4px;
}

/* ── Add to Cart button (shortcode mode) ── */
.aot-btn-row {
  display: flex;
  gap: 10px;
}

.aot-btn {
  flex: 1;
  padding: 13px 0;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s, background 0.15s;
  text-align: center;
}

.aot-btn:hover:not(:disabled) {
  opacity: 0.82;
}

.aot-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.aot-btn-order {
    background: #d5a770;
    color: #000000;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .aot-layout {
    grid-template-columns: 1fr;
  }

  .aot-col-preview {
    border-left: none;
    border-bottom: 1px solid var(--aot-line);
    padding: 28px 16px;
  }

  .aot-col-controls {
    padding: 24px 18px;
  }

  .aot-canvas-wrap {
    width: 240px;
    height: 267px;
  }
}