:root {
  --cream: #f9f5f0;
  --cream-dark: #efe9e0;
  --gold: #c9a96e;
  --gold-light: #dfc28f;
  --gold-dark: #a07840;
  --dark: #2c2c2c;
  --dark-mid: #3d3d3d;
  --gray: #888;
  --white: #ffffff;
  --frame-white: #d8d0c4;
  --frame-brown: #7b4f2e;
  --frame-black: #1a1a1a;
  --shadow-frame:
    0 25px 60px rgba(0, 0, 0, 0.35), 0 10px 20px rgba(0, 0, 0, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Tajawal", sans-serif;
  background: var(--cream);
  color: var(--dark);
  overflow-x: hidden;
}

/* ─── MODAL OVERLAY ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}
.modal-content {
  background: white;
  width: 100%;
  max-width: 500px;
  border-radius: 8px;
  padding: 32px;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 16px;
  left: 20px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  transition: color 0.2s;
}
.modal-close:hover {
  color: var(--dark);
}
.modal-header {
  font-family: "Cairo", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 24px;
  text-align: center;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── CURSOR ─── */
.cursor {
  width: 10px;
  height: 10px;
  background: var(--gold);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s;
}
.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9998;
  transition:
    transform 0.18s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 0.3s;
  opacity: 0.7;
}

/* ─── HEADER ─── */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 10px 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(249, 245, 240, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(201, 169, 110, 0.2);
  transition: all 0.4s;
}
.logo {
  width: 90px;
  height: auto;
}

nav {
  display: flex;
  gap: 32px;
}
nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--dark-mid);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.3s;
}
nav a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  right: 0;
  width: 0;
  height: 1.5px;
  background: var(--gold);
  transition: width 0.3s;
}
nav a:hover {
  color: var(--gold);
}
nav a:hover::after {
  width: 100%;
  left: 0;
  right: auto;
}

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 48px 80px;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 70% 60% at 20% 50%,
      rgba(201, 169, 110, 0.08) 0%,
      transparent 70%
    ),
    linear-gradient(135deg, #f9f5f0 0%, #efe9e0 100%);
}
.hero-pattern {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 60px,
      rgba(201, 169, 110, 0.04) 60px,
      rgba(201, 169, 110, 0.04) 61px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 60px,
      rgba(201, 169, 110, 0.04) 60px,
      rgba(201, 169, 110, 0.04) 61px
    );
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--gold);
}
.hero h1 {
  font-family: "Cairo", sans-serif;
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 900;
  line-height: 1.1;
  color: var(--dark);
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: normal;
  color: var(--gold);
  position: relative;
  display: inline-block;
}
.hero h1 em::after {
  content: "";
  position: absolute;
  bottom: 6px;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--gold);
  opacity: 0.3;
  border-radius: 2px;
}
.hero-desc {
  font-size: 17px;
  font-weight: 300;
  line-height: 1.8;
  color: #666;
  margin-bottom: 40px;
  max-width: 440px;
}
.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 36px;
  background: var(--dark);
  color: var(--white);
  border: none;
  border-radius: 2px;
  font-family: "Cairo", sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}
.btn-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.btn-hero:hover::before {
  transform: scaleX(1);
}
.btn-hero span {
  position: relative;
  z-index: 1;
}
.btn-hero svg {
  position: relative;
  z-index: 1;
  transition: transform 0.3s;
}
.btn-hero:hover svg {
  transform: translateX(-4px);
}

.hero-mobile-frames,
.hero-mobile-veil {
  display: none;
}

.hero-float {
  position: absolute;
  left: 6%;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 20px;
  align-items: flex-end;
  z-index: 2;
}
.hero-frame-preview {
  border-radius: 2px;
  box-shadow: var(--shadow-frame);
  overflow: hidden;
  animation: float 5s ease-in-out infinite;
  cursor: pointer;
  transition: transform 0.3s;
}
.hero-frame-preview:hover {
  transform: scale(1.03);
}
.hero-frame-preview img {
  display: block;
  width: 100%;
  height: auto;
  filter: brightness(0.95);
}
.hfp1 {
  width: 200px;
  border: 14px solid #1a1a1a;
  animation-delay: 0s;
}
.hfp2 {
  width: 150px;
  border: 10px solid #d8d0c4;
  box-shadow:
    var(--shadow-frame),
    inset 0 0 0 1px rgba(0, 0, 0, 0.1);
  animation-delay: 1.2s;
  margin-bottom: 20px;
}
.hfp3 {
  width: 170px;
  border: 12px solid #7b4f2e;
  animation-delay: 0.6s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

/* ─── STEPS INDICATOR ─── */
.steps-bar {
  padding: 28px 48px;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.step-item {
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0.4;
  transition: opacity 0.4s;
  cursor: pointer;
}
.step-item.active {
  opacity: 1;
}
.step-item.done {
  opacity: 0.7;
}
.step-num {
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(201, 169, 110, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cairo", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-light);
  transition: all 0.4s;
}
.step-item.active .step-num {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--dark);
}
.step-item.done .step-num {
  background: rgba(201, 169, 110, 0.2);
  border-color: var(--gold);
  color: var(--gold);
}
.step-label {
  font-size: 13px;
  font-weight: 500;
  color: #aaa;
  white-space: nowrap;
}
.step-item.active .step-label {
  color: var(--white);
}
.step-connector {
  width: 60px;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 6px;
}

/* ─── SECTIONS ─── */
.section {
  padding: 80px 48px;
}
.section-title {
  font-family: "Cairo", sans-serif;
  font-size: 36px;
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 8px;
}
.section-sub {
  font-size: 15px;
  color: var(--gray);
  margin-bottom: 48px;
  font-weight: 300;
}

/* ─── GALLERY LAYOUT (two-column) ─── */
#section-gallery {
  background: var(--cream);
}

.gallery-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 40px;
  align-items: start;
}

/* ── Sticky Side Preview Panel ── */
.gallery-side-preview {
  position: sticky;
  top: 100px;
  height: calc(100vh - 120px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  scrollbar-width: none;
}
.gallery-side-preview::-webkit-scrollbar {
  display: none;
}

.gsp-wall {
  width: 100%;
  flex-grow: 1;
  background: #e8e0d5;
  border-radius: 8px;
  padding: 36px 40px 40px;
  position: relative;
  overflow: hidden;
  background-image:
    linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0.03) 40%,
      rgba(0, 0, 0, 0.07) 100%
    ),
    linear-gradient(
      to right,
      rgba(0, 0, 0, 0.05) 0%,
      transparent 20%,
      transparent 80%,
      rgba(0, 0, 0, 0.05) 100%
    );
  box-shadow:
    inset 0 0 60px rgba(0, 0, 0, 0.08),
    0 2px 20px rgba(0, 0, 0, 0.06);
  transition: background-color 0.4s ease;
  min-height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gsp-wall::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 85% 45% at 50% 0%,
    rgba(255, 255, 255, 0.3) 0%,
    transparent 70%
  );
  pointer-events: none;
}
.gsp-wall::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.1) 100%),
    linear-gradient(
      to right,
      rgba(0, 0, 0, 0.04) 0%,
      transparent 15%,
      transparent 85%,
      rgba(0, 0, 0, 0.04) 100%
    );
  pointer-events: none;
}

.gsp-frame-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  z-index: 2;
}

/* ─── FRAME SIZE: 30×40 portrait (180×240px) ─── */
.gsp-frame {
  width: 180px;
  height: 240px;
  border: 14px solid #7b4f2e;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    6px 10px 28px rgba(0, 0, 0, 0.4),
    12px 18px 50px rgba(0, 0, 0, 0.22);
  position: relative;
  z-index: 2;
  overflow: visible !important;
  transition:
    border-color 0.35s ease,
    border-width 0.3s ease,
    box-shadow 0.35s ease !important;
  background: #f0ebe4;
}

.gsp-frame-shadow {
  position: absolute;
  bottom: -20px !important;
  left: 6% !important;
  right: 6% !important;
  height: 30px !important;
  background: radial-gradient(
    ellipse,
    rgba(30, 15, 5, 0.55) 0%,
    transparent 70%
  ) !important;
  filter: blur(10px) !important;
  z-index: 1;
}

.gsp-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(0, 0, 0, 0.22);
  font-family: "Cairo", sans-serif;
  font-size: 11px;
  font-weight: 500;
  background: #f0ebe4;
  transition: opacity 0.3s;
  text-align: center;
  padding: 12px;
}
.gsp-placeholder svg {
  opacity: 0.3;
}
.gsp-placeholder.hidden {
  opacity: 0;
  pointer-events: none;
}

#gspImg {
  transition: opacity 0.3s ease;
}

.gsp-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.gsp-hint {
  font-family: "Cairo", sans-serif;
  font-size: 12px;
  color: var(--gray);
  font-weight: 500;
}
.gsp-badge {
  padding: 4px 12px;
  background: #4caf50;
  color: white;
  border-radius: 20px;
  font-family: "Cairo", sans-serif;
  font-size: 11px;
  font-weight: 700;
  animation: badgePop 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@keyframes badgePop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ── Controls below wall ── */
.gsp-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: white;
  border-radius: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.gsp-ctrl-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gsp-ctrl-label {
  font-family: "Cairo", sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--gray);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  min-width: 60px;
}

.gsp-ctrl-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.gsp-controls .color-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2.5px solid transparent;
  transition: all 0.2s;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.gsp-controls .color-btn.active {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.gsp-controls .color-btn.active::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.gsp-controls .white-frame.active::after {
  color: #888;
}

/* Thickness pills */
.gsp-thick-opts {
  gap: 6px;
}
.thick-pill {
  padding: 4px 10px;
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  background: white;
  border-radius: 20px;
  font-family: "Cairo", sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.thick-pill:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.thick-pill.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--dark);
}

/* Wall swatches inside controls */
.wall-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
@media (hover: hover) {
  .wall-swatch:hover {
    transform: scale(1.15);
  }
}
.wall-swatch.active {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.gsp-controls .custom-color-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px dashed rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(
    red,
    orange,
    yellow,
    green,
    cyan,
    blue,
    violet,
    red
  );
  color: white;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  filter: saturate(0.8) brightness(0.95);
}
.gsp-controls .custom-color-btn:hover {
  transform: scale(1.15);
  filter: saturate(1) brightness(1.05);
}

/* ── Gallery grid wrapper ── */
.gallery-grid-wrap {
  min-width: 0;
}

/* Single-column gallery */
.gallery-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.gallery-item {
  width: 100%;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.25s,
    box-shadow 0.25s;
  background: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  transition: transform 0.4s ease;
}
.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}
.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-eye-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--dark);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition:
    transform 0.2s,
    background 0.2s;
  z-index: 10;
  opacity: 0;
}
.gallery-item:hover .gallery-eye-btn {
  opacity: 1;
}
.gallery-eye-btn:hover {
  background: white;
  transform: scale(1.1);
  color: var(--gold);
}

.gallery-selected-overlay {
  position: absolute;
  inset: 0;
  background: rgba(201, 169, 110, 0.2);
  border: 4px solid var(--gold);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.gallery-selected-overlay svg {
  background: var(--gold);
  color: white;
  border-radius: 50%;
  padding: 6px;
  width: 48px;
  height: 48px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transform: scale(0.5);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-item.selected .gallery-selected-overlay {
  opacity: 1;
}
.gallery-item.selected .gallery-selected-overlay svg {
  transform: scale(1);
}
.gallery-item.selected {
  box-shadow: 0 8px 24px rgba(201, 169, 110, 0.3);
}

.gsp-select-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 18px;
  background: var(--gold);
  color: var(--dark);
  border: none;
  border-radius: 3px;
  font-family: "Cairo", sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  justify-content: center;
  transition: all 0.25s;
  animation: fadeSlideUp 0.3s ease;
}
.gsp-select-btn:hover {
  background: var(--gold-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(201, 169, 110, 0.35);
}
@keyframes fadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Gallery grid (multi-column) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
  gap: 20px;
  justify-content: center;
  align-items: start;
}
.gallery-item {
  width: 100%;
  aspect-ratio: 3 / 4;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.35s ease;
  display: block;
}
.gallery-item:hover {
  transform: translateY(-6px);
}
.gallery-item:hover img {
  transform: scale(1.07);
}
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.35s;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}
.gallery-item:hover .gallery-overlay {
  opacity: 1;
}
.gallery-overlay-text {
  color: white;
  font-size: 14px;
  font-weight: 500;
  font-family: "Cairo", sans-serif;
}
.gallery-select-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 7px 16px;
  background: var(--gold);
  color: var(--dark);
  border: none;
  border-radius: 2px;
  font-family: "Cairo", sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-6px);
  transition: all 0.3s;
}
.gallery-item:hover .gallery-select-btn {
  opacity: 1;
  transform: translateY(0);
}
.gallery-item.selected {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  transform: translateY(-6px);
}
.gallery-item.selected::after {
  content: "✓ محدد";
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 14px;
  background: var(--gold);
  color: var(--dark);
  border-radius: 2px;
  font-family: "Cairo", sans-serif;
  font-size: 12px;
  font-weight: 700;
}

/* ─── GALLERY EYE BUTTON ─── */
.gallery-eye-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 3;
  color: white;
}
.gallery-item:hover .gallery-eye-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.gallery-eye-btn:hover {
  background: rgba(201, 169, 110, 0.55);
  border-color: var(--gold);
  transform: translate(-50%, -50%) scale(1.1) !important;
}

/* ─── IMAGE MODAL ─── */
.img-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 10, 0.82);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.img-modal-backdrop.show {
  opacity: 1;
  pointer-events: all;
}
.img-modal {
  background: var(--cream);
  border-radius: 4px;
  width: min(540px, 92vw);
  overflow: hidden;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45);
}
.img-modal-backdrop.show .img-modal {
  transform: translateY(0) scale(1);
}
.img-modal-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.img-modal-body {
  padding: 24px 28px 28px;
}
.img-modal-title {
  font-family: "Cairo", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}
.img-modal-desc {
  font-size: 14px;
  line-height: 1.9;
  color: #666;
  margin-bottom: 22px;
}
.img-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}
.img-modal-close {
  padding: 10px 22px;
  background: transparent;
  border: 1.5px solid #ccc;
  border-radius: 3px;
  font-family: "Cairo", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  transition: all 0.2s;
}
.img-modal-close:hover {
  border-color: var(--dark);
  color: var(--dark);
}
.img-modal-select {
  padding: 10px 26px;
  background: var(--gold);
  border: none;
  border-radius: 3px;
  font-family: "Cairo", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  transition: background 0.2s;
}
.img-modal-select:hover {
  background: var(--gold-dark);
  color: white;
}

/* ─── FRAME CUSTOMIZER ─── */
#section-frame {
  background: var(--cream-dark);
}
.customizer-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 64px;
  align-items: start;
}
.controls-panel {
  position: sticky;
  top: 120px;
}
.control-group {
  margin-bottom: 40px;
}
.control-label {
  font-family: "Cairo", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.control-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
}

/* SIZE SELECTOR */
.size-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.size-btn {
  padding: 0;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  background: white;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.25s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px;
  gap: 6px;
}
.size-btn:hover,
.size-btn.active {
  border-color: var(--gold);
  background: rgba(201, 169, 110, 0.06);
}
.size-btn.active {
  box-shadow: 0 0 0 1px var(--gold);
}
.size-icon {
  display: flex;
  align-items: flex-end;
  height: 36px;
}
.size-rect {
  border: 2px solid var(--dark);
  background: rgba(0, 0, 0, 0.04);
  transition: all 0.25s;
}
.size-btn.active .size-rect {
  border-color: var(--gold);
}
.size-name {
  font-family: "Cairo", sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--dark);
}
.size-dim {
  font-size: 11px;
  color: var(--gray);
  font-weight: 300;
}

/* COLOR SWATCHES */
.color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}
.color-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.25s;
  position: relative;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.color-btn.white-frame {
  background: #d8d0c4;
  border-color: #ddd;
}
.color-btn.brown-frame {
  background: #7b4f2e;
}
.color-btn.black-frame {
  background: #1a1a1a;
}
.color-btn.active {
  transform: scale(1.15);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.color-btn.active::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.color-btn.white-frame.active::after {
  color: #888;
}
.color-label-row {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}
.color-label {
  font-size: 12px;
  color: var(--gray);
  font-weight: 500;
  width: 52px;
  text-align: center;
}

/* FRAME THICKNESS */
.thickness-options {
  display: flex;
  gap: 10px;
}
.thick-btn {
  flex: 1;
  padding: 12px;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  background: white;
  cursor: pointer;
  border-radius: 2px;
  font-family: "Cairo", sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  transition: all 0.25s;
  color: var(--dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.thick-btn:hover,
.thick-btn.active {
  border-color: var(--gold);
  background: rgba(201, 169, 110, 0.06);
  box-shadow: 0 0 0 1px var(--gold);
}
.thick-visual {
  height: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.thick-bar {
  background: var(--dark);
  border-radius: 1px;
  width: 32px;
  transition: all 0.25s;
}
.thick-btn.active .thick-bar {
  background: var(--gold);
}

/* PREVIEW PANEL */
.preview-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 40px;
  background: #e8e0d5;
  border-radius: 2px;
  position: relative;
  min-height: 500px;
  overflow: hidden;
  transition: background-color 0.4s ease;
}
.preview-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 0;
  border-radius: 2px;
}
.wall-texture {
  position: absolute;
  inset: 0;
  border-radius: 2px;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    ellipse 70% 45% at 50% -5%,
    rgba(255, 255, 255, 0.32) 0%,
    transparent 70%
  );
  transition: background 0.4s ease;
}
.preview-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 2px;
  background:
    linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.09) 100%),
    linear-gradient(
      to right,
      rgba(0, 0, 0, 0.05) 0%,
      transparent 15%,
      transparent 85%,
      rgba(0, 0, 0, 0.05) 100%
    );
  pointer-events: none;
  z-index: 1;
}
.preview-label {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(128, 128, 128, 0.7);
  text-transform: uppercase;
  font-weight: 500;
  z-index: 3;
}
.preview-live-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: rgba(140, 120, 80, 0.75);
  font-family: "Cairo", sans-serif;
  font-weight: 500;
  z-index: 3;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s;
}
.preview-live-hint::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.7);
  }
}
.preview-live-hint.hide {
  opacity: 0;
}
.frame-wrapper {
  position: relative;
  z-index: 2;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.frame-shadow {
  position: absolute;
  bottom: -20px;
  left: 5%;
  right: 5%;
  height: 30px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.35) 0%, transparent 70%);
  filter: blur(8px);
  transition: all 0.5s;
}
.frame-border {
  position: relative;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    4px 4px 12px rgba(0, 0, 0, 0.3),
    8px 8px 30px rgba(0, 0, 0, 0.2);
}
.frame-inner-shadow {
  position: absolute;
  inset: 0;
  box-shadow:
    inset 3px 3px 8px rgba(0, 0, 0, 0.3),
    inset -1px -1px 4px rgba(255, 255, 255, 0.1);
  pointer-events: none;
  z-index: 2;
}
.frame-border img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.frame-info {
  margin-top: 40px;
  z-index: 3;
  text-align: center;
  position: relative;
}

/* ─── CUSTOM COLOR PICKER BUTTON ─── */
.custom-color-wrap {
  position: relative;
  display: inline-block;
}
.custom-color-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px dashed rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(
    red,
    orange,
    yellow,
    green,
    cyan,
    blue,
    violet,
    red
  );
  color: white;
  transition: all 0.25s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  filter: saturate(0.8) brightness(0.95);
}
.custom-color-btn:hover {
  transform: scale(1.12);
  filter: saturate(1) brightness(1.05);
}

/* ─── TOTAL ROW IN SUMMARY ─── */
.summary-total-row {
  margin-top: 12px;
  padding-top: 16px !important;
  border-top: 1px solid rgba(201, 169, 110, 0.3) !important;
  border-bottom: none !important;
}

.no-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(0, 0, 0, 0.2);
  font-size: 13px;
  font-weight: 500;
  font-family: "Cairo", sans-serif;
  width: 100%;
  height: 100%;
  background: #f0ebe4;
}
.no-image-placeholder svg {
  opacity: 0.3;
}

.frame-info-title {
  font-family: "Cairo", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--dark-mid);
  letter-spacing: 1px;
}
.frame-info-sub {
  font-size: 12px;
  color: var(--gray);
  margin-top: 4px;
}

/* ─── FORM SECTION ─── */
#section-order {
  background: var(--cream);
}
.order-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 500px;
  margin: 0 auto;
}
.order-summary {
  background: var(--dark);
  border-radius: 2px;
  padding: 40px;
  color: white;
  position: sticky;
  top: 100px;
}
.order-summary h3 {
  font-family: "Cairo", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 28px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}
.summary-row:last-of-type {
  border-bottom: none;
}
.summary-key {
  color: #888;
  font-weight: 400;
}
.summary-val {
  color: white;
  font-weight: 600;
  font-family: "Cairo", sans-serif;
}
.order-preview-thumb {
  width: 100%;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 2px;
}
.order-preview-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.no-thumb {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 13px;
  font-family: "Cairo", sans-serif;
}

/* FORM */
.form-group {
  margin-bottom: 24px;
}
.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
  font-family: "Cairo", sans-serif;
  letter-spacing: 0.5px;
}
.form-label span {
  color: var(--gold);
  margin-right: 2px;
}
.form-input {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  background: white;
  border-radius: 2px;
  font-family: "Tajawal", sans-serif;
  font-size: 15px;
  color: var(--dark);
  outline: none;
  transition: all 0.25s;
  direction: rtl;
}
.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.12);
}
textarea.form-input {
  resize: none;
  min-height: 100px;
  line-height: 1.6;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.btn-submit {
  width: 100%;
  padding: 18px;
  background: var(--dark);
  color: var(--white);
  border: none;
  border-radius: 2px;
  font-family: "Cairo", sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.35s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}
.btn-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.btn-submit:hover::before {
  transform: scaleX(1);
}
.btn-submit:hover {
  color: var(--dark);
}
.btn-submit span,
.btn-submit svg {
  position: relative;
  z-index: 1;
}

/* ─── TOAST ─── */
.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--dark);
  color: white;
  padding: 16px 32px;
  border-radius: 2px;
  font-family: "Cairo", sans-serif;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-right: 3px solid var(--gold);
  pointer-events: none;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success {
  border-color: #4caf50;
}
.toast.error {
  border-color: #f44336;
}

/* ─── NEXT BUTTON ─── */
.next-btn-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 48px;
}
.btn-next {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: var(--gold);
  color: var(--dark);
  border: none;
  border-radius: 2px;
  font-family: "Cairo", sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}
.btn-next:hover {
  background: var(--gold-dark);
  color: white;
  transform: translateX(-4px);
}
.btn-next:disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ─── FOOTER ─── */
footer {
  background: var(--dark);
  color: #555;
  padding: 40px 48px;
  text-align: center;
  font-size: 13px;
  font-weight: 300;
}
footer span {
  color: var(--gold);
}

/* ─── SUCCESS OVERLAY ─── */
.success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
}
.success-overlay.show {
  display: flex;
}
.success-box {
  background: var(--cream);
  border-radius: 2px;
  padding: 60px;
  text-align: center;
  max-width: 480px;
  animation: popIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.success-icon {
  width: 70px;
  height: 70px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 28px;
}
.success-box h2 {
  font-family: "Cairo", sans-serif;
  font-size: 26px;
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 12px;
}
.success-box p {
  font-size: 15px;
  color: var(--gray);
  line-height: 1.7;
}
.btn-close-success {
  margin-top: 32px;
  padding: 14px 36px;
  background: var(--dark);
  color: white;
  border: none;
  border-radius: 2px;
  font-family: "Cairo", sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s;
}
.btn-close-success:hover {
  background: var(--gold);
  color: var(--dark);
}

/* ─── GALLERY HOVER NUMBER ─── */
.gallery-hover-number {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cairo", sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 4;
  pointer-events: none;
}
.gallery-item:hover .gallery-hover-number {
  opacity: 1;
}

/* ─── DOWNLOAD PROTECTION ─── */
img {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* ─── LIGHTBOX SLIDER ─── */
#lightboxOverlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
#lightboxOverlay.lb-visible {
  opacity: 1;
  pointer-events: all;
}
.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 4, 0.93);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  cursor: pointer;
}
.lb-close {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 10;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: all 0.25s;
}
.lb-close:hover {
  background: rgba(201, 169, 110, 0.35);
  border-color: var(--gold);
  transform: rotate(90deg) scale(1.1);
}
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: all 0.25s;
}
.lb-nav:hover {
  background: rgba(201, 169, 110, 0.3);
  border-color: var(--gold);
  transform: translateY(-50%) scale(1.1);
}
.lb-prev {
  left: 20px;
}
.lb-next {
  right: 20px;
}
.lb-main {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: min(580px, 98vw);
  max-height: 95vh;
}
.lb-img-wrap {
  position: relative;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  transition:
    opacity 0.22s ease,
    transform 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
#lbImg {
  display: block;
  width: 100%;
  max-height: 55vh;
  object-fit: contain;
  background: #111;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.lb-select-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
  padding: 28px 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lb-select-btn {
  padding: 9px 22px;
  background: var(--gold);
  color: var(--dark);
  border: none;
  border-radius: 3px;
  font-family: "Cairo", sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  letter-spacing: 0.3px;
}
.lb-select-btn:hover {
  background: var(--gold-dark);
  color: white;
  transform: scale(1.04);
}
.lb-counter {
  font-family: "Cairo", sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 600;
  background: rgba(0, 0, 0, 0.4);
  padding: 5px 12px;
  border-radius: 20px;
  backdrop-filter: blur(6px);
}
.lb-thumb-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 8px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  width: 100%;
}
.lb-thumb-strip::-webkit-scrollbar {
  display: none;
}
.lb-thumb {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  background-size: cover;
  background-position: center;
  border-radius: 3px;
  cursor: pointer;
  opacity: 0.5;
  border: 2px solid transparent;
  transition: all 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.lb-thumb:hover {
  opacity: 0.85;
  transform: scale(1.08);
}
.lb-thumb.lb-thumb-active {
  opacity: 1;
  border-color: var(--gold);
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(201, 169, 110, 0.5);
}

/* ─── REALISTIC FRAME ENHANCEMENTS ─── */

.gsp-wire {
  display: none;
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 55%;
  height: 14px;
  z-index: 3;
  pointer-events: none;
}

.gsp-frame-wrap {
  overflow: visible !important;
}

.gsp-mat {
  position: absolute;
  inset: 0;
  background: #d8d0c4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow:
    inset 2px 2px 5px rgba(0, 0, 0, 0.1),
    inset -1px -1px 3px rgba(0, 0, 0, 0.07);
}

.gsp-bevel {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  box-shadow:
    inset 3px 3px 0 rgba(255, 255, 255, 0.2),
    inset -3px -3px 0 rgba(0, 0, 0, 0.25),
    inset 5px 5px 0 rgba(255, 255, 255, 0.07),
    inset -5px -5px 0 rgba(0, 0, 0, 0.12);
}

#gspImg {
  position: relative;
  z-index: 1;
  background: #d8d0c4;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: opacity 0.3s ease;
}

.gsp-mat .gsp-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(0, 0, 0, 0.22);
  font-family: "Cairo", sans-serif;
  font-size: 11px;
  font-weight: 500;
  background: #d8d0c4;
  transition: opacity 0.3s;
  text-align: center;
  padding: 12px;
  z-index: 2;
}
.gsp-mat .gsp-placeholder.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1200px) {
  .section {
    padding: 80px 32px;
  }
  .hero {
    padding: 120px 32px 80px;
  }
  header {
    padding: 10px 32px;
  }
}

@media (max-width: 960px) {
  .cursor,
  .cursor-ring {
    display: none;
  }
  .gallery-eye-btn {
    display: none !important;
  }
  .wall-swatch:hover,
  .gsp-controls .color-btn:hover,
  .gsp-controls .custom-color-btn:hover {
    transform: none;
  }

  header {
    padding: 14px 20px;
  }
  nav {
    display: none;
  }

  .hero {
    padding: 0;
    min-height: 100svh;
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-end;
  }
  .hero-bg {
    background:
      radial-gradient(
        ellipse 100% 60% at 50% 30%,
        rgba(201, 169, 110, 0.12) 0%,
        transparent 70%
      ),
      linear-gradient(180deg, #f9f5f0 0%, #efe9e0 100%);
  }
  .hero-mobile-frames {
    display: flex;
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
  }
  .hero-mobile-frame {
    position: absolute;
    overflow: hidden;
    box-shadow:
      0 20px 60px rgba(0, 0, 0, 0.3),
      0 8px 20px rgba(0, 0, 0, 0.2);
  }
  .hero-mobile-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.92);
    pointer-events: none;
    -webkit-user-drag: none;
  }
  .hmf1 {
    width: 52vw;
    height: 68vw;
    top: 8%;
    left: -4vw;
    border: 10px solid #1a1a1a;
    transform: rotate(-4deg);
    animation: float 6s ease-in-out infinite;
    z-index: 2;
  }
  .hmf2 {
    width: 44vw;
    height: 58vw;
    top: 5%;
    right: -2vw;
    border: 8px solid #7b4f2e;
    transform: rotate(3.5deg);
    animation: float 5s ease-in-out infinite 0.8s;
    z-index: 3;
  }
  .hmf3 {
    width: 38vw;
    height: 50vw;
    top: 18%;
    left: 50%;
    transform: translateX(-50%) rotate(-1deg);
    border: 8px solid #d8d0c4;
    box-shadow:
      0 20px 60px rgba(0, 0, 0, 0.35),
      inset 0 0 0 1px rgba(0, 0, 0, 0.12);
    animation: float 7s ease-in-out infinite 1.5s;
    z-index: 4;
  }
  .hero-mobile-veil {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 5;
    background: linear-gradient(
      to bottom,
      rgba(249, 245, 240, 0) 0%,
      rgba(249, 245, 240, 0.08) 28%,
      rgba(249, 245, 240, 0.72) 55%,
      rgba(249, 245, 240, 0.97) 70%,
      #f9f5f0 100%
    );
    pointer-events: none;
  }
  .hero-content {
    position: relative;
    z-index: 6;
    max-width: 100%;
    padding: 0 24px 56px;
    text-align: center;
  }
  .hero-eyebrow {
    justify-content: center;
    margin-bottom: 16px;
  }
  .hero h1 {
    font-size: clamp(34px, 9vw, 52px);
    margin-bottom: 14px;
    line-height: 1.15;
  }
  .hero-desc {
    font-size: 15px;
    margin-bottom: 28px;
    max-width: 100%;
    color: #555;
  }
  .btn-hero {
    width: 100%;
    justify-content: center;
    padding: 17px 28px;
    font-size: 16px;
  }
  .hero-float {
    display: none;
  }

  .section {
    padding: 56px 20px;
  }
  .section-title {
    font-size: 28px;
  }
  .customizer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .preview-panel {
    order: -1;
    padding: 40px 20px;
  }
  .order-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .order-summary {
    position: static;
    padding: 28px 24px;
  }
  .steps-bar {
    padding: 16px 12px;
    gap: 0;
  }
  .step-label {
    display: none;
  }
  .step-connector {
    width: 24px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .next-btn-row {
    margin-top: 32px;
  }

  /* Gallery layout: stack on mobile */
  .gallery-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .gallery-side-preview {
    position: static;
    height: auto;
    max-height: none;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 16px;
  }
  .gsp-wall {
    padding: 32px 20px 40px;
    min-height: 280px;
    flex-grow: 0;
  }

  /* ─── FRAME SIZE on mobile: scaled 30×40 ─── */
  .gsp-frame {
    width: min(52vw, 180px);
    height: min(66vw, 240px);
    border-width: 11px;
  }

  .gsp-controls {
    padding: 14px;
    gap: 10px;
  }
  .gsp-ctrl-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .gsp-ctrl-label {
    min-width: unset;
  }
  .gsp-ctrl-swatches {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }
  /* Wall upload row: horizontal with wrapping */
  .gsp-ctrl-row:last-child {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  /* btn-next full width on mobile */
  .btn-next {
    width: 100%;
    justify-content: center;
  }

  .gallery-grid {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 20px;
    scrollbar-width: thin;
  }
  .gallery-grid::-webkit-scrollbar {
    height: 6px;
  }
  .gallery-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
  }
  .gallery-grid::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
  }
  .gallery-item {
    width: 140px;
    height: auto;
    aspect-ratio: 3 / 4;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: clamp(30px, 8vw, 38px);
  }
  .hero-desc {
    font-size: 14px;
  }
  .hero-content {
    padding: 0 18px 44px;
  }

  /* ── Controls: tighter on small phones ── */
  .gsp-controls {
    padding: 12px;
    gap: 10px;
  }
  .gsp-ctrl-label {
    font-size: 9px;
  }
  .gsp-ctrl-swatches {
    gap: 6px;
  }
  .wall-swatch {
    width: 16px;
    height: 16px;
  }
  .gsp-controls .color-btn {
    width: 22px;
    height: 22px;
  }
  .thick-pill {
    padding: 3px 8px;
    font-size: 10px;
  }
  .wall-upload-btn {
    font-size: 10px;
    padding: 5px 11px;
    gap: 5px;
  }

  /* btn-next full width on small screens */
  .btn-next {
    width: 100%;
    justify-content: center;
  }

  /* wall preview height on very small screens */
  .gsp-wall {
    min-height: 240px;
    padding: 24px 16px 32px;
  }

  /* frame size on very small screens */
  .gsp-frame {
    width: min(48vw, 150px);
    height: min(62vw, 200px);
    border-width: 10px;
  }
  .hmf1 {
    width: 58vw;
    height: 76vw;
  }
  .hmf2 {
    width: 48vw;
    height: 62vw;
  }
  .hmf3 {
    width: 42vw;
    height: 54vw;
  }
  .steps-bar {
    padding: 14px 8px;
  }
  .step-num {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
  .section {
    padding: 48px 16px;
  }
  header {
    padding: 12px 16px;
  }
  .logo {
    width: 70px;
  }
  .order-summary {
    padding: 20px 16px;
  }
  .success-box {
    padding: 36px 24px;
  }
  .lb-nav {
    width: 40px;
    height: 40px;
  }
  .lb-prev {
    left: 8px;
  }
  .lb-next {
    right: 8px;
  }
  .lb-thumb {
    width: 48px;
    height: 48px;
  }
  .lb-select-bar {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    padding: 20px 14px 12px;
  }
  .gallery-item {
    width: 120px;
  }
}

/* ─── WALL UPLOAD BUTTON ─── */
.wall-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border: 1.5px dashed rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  font-family: "Cairo", sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray);
  cursor: pointer;
  transition: all 0.2s;
  background: white;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
}
.wall-upload-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201, 169, 110, 0.06);
}

.wall-upload-clear {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #999;
  transition: all 0.2s;
  flex-shrink: 0;
}
.wall-upload-clear:hover {
  border-color: #f44336;
  color: #f44336;
  background: #fff5f5;
}

/* ─── WALL WITH PHOTO ─── */
.gsp-wall.has-wall-photo {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  overflow: visible !important; /* allow frame to be dragged outside default bounds */
  padding: 0 !important; /* no padding — frame is freely positioned by JS */
}

/* Frame-wrap becomes freely draggable when photo mode is on */
.gsp-wall.has-wall-photo .gsp-frame-wrap {
  position: absolute !important;
  cursor: grab !important;
  touch-action: none;
  user-select: none;
  z-index: 10;
}
.gsp-wall.has-wall-photo .gsp-frame-wrap:active {
  cursor: grabbing !important;
}

/* Resize handle — bottom-left corner */
.frame-resize-handle {
  position: absolute;
  bottom: -11px;
  left: -11px;
  width: 24px;
  height: 24px;
  background: var(--gold);
  border-radius: 50%;
  cursor: nwse-resize;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  touch-action: none;
}
.frame-resize-handle svg {
  pointer-events: none;
}
.gsp-wall.has-wall-photo .frame-resize-handle {
  display: flex;
}

/* Toolbar above frame */
.frame-toolbar {
  position: absolute;
  top: -36px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 6px;
  background: rgba(20, 15, 10, 0.78);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 5px 10px;
  z-index: 20;
  white-space: nowrap;
  pointer-events: none;
}
.gsp-wall.has-wall-photo .frame-toolbar {
  display: flex;
}
.frame-toolbar span {
  font-family: "Cairo", sans-serif;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
}

/* Reset button inside wall */
.frame-reset-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.9);
  font-family: "Cairo", sans-serif;
  font-size: 10px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 20px;
  z-index: 15;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}
.gsp-wall.has-wall-photo .frame-reset-btn {
  display: flex;
}
.frame-reset-btn:hover {
  background: rgba(201, 169, 110, 0.8);
  color: #1a1a1a;
}

/* Drag/pinch hint pill */
.pinch-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.85);
  font-family: "Cairo", sans-serif;
  font-size: 10px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  z-index: 15;
  pointer-events: none;
  display: none;
  opacity: 1;
  transition: opacity 0.6s;
  white-space: nowrap;
}
.gsp-wall.has-wall-photo .pinch-hint {
  display: block;
}
.pinch-hint.hide {
  opacity: 0;
}

/* Dim wall color row when photo is active */
.gsp-wall.has-wall-photo ~ .gsp-controls #wallColorRow {
  opacity: 0.35;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* Dim the overlay gradients slightly when a real photo is shown */
.gsp-wall.has-wall-photo::before {
  background: radial-gradient(
    ellipse 85% 45% at 50% 0%,
    rgba(255, 255, 255, 0.12) 0%,
    transparent 70%
  );
}
.gsp-wall.has-wall-photo::after {
  background:
    linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(
      to right,
      rgba(0, 0, 0, 0.06) 0%,
      transparent 15%,
      transparent 85%,
      rgba(0, 0, 0, 0.06) 100%
    );
}

/* Color swatches become slightly transparent on top of a photo */
.gsp-wall.has-wall-photo ~ .gsp-controls .wall-swatch {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
