/**
 * استوديو الفوتو كارد التفاعلي — متجر نفذها
 * تصاميم عصرية، تفاعل ثلاثي الأبعاد، ولمعة سلوفان واقعية
 */

/* =========================================================
   WORKSPACE LAYOUT
   ========================================================= */
.pc-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px;
  max-width: 1360px;
  margin: 24px auto 60px;
  padding: 0 20px;
  align-items: start;
}

@media (max-width: 980px) {
  .pc-workspace {
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 16px auto 40px;
    padding: 0 14px;
  }
}

/* =========================================================
   STAGE PANEL (LEFT: MOCKUP & INTERACTIVE CARD)
   ========================================================= */
.pc-stage-panel {
  background: radial-gradient(circle at 50% 20%, rgba(236, 24, 118, 0.12) 0%, rgba(16, 2, 38, 0.95) 75%),
              linear-gradient(180deg, #1b072e 0%, #0d0119 100%);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  padding: 24px;
  position: sticky;
  top: 86px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.pc-stage-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
}

.pc-stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffd400;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.pc-stage-actions {
  display: flex;
  gap: 8px;
}

.pc-btn-icon {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 7px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.pc-btn-icon:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #ffd400;
  color: #ffd400;
  transform: translateY(-1px);
}

/* 3D Perspective Canvas */
.pc-canvas-area {
  perspective: 1200px;
  padding: 20px 10px 30px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 480px;
}

/* The Card Wrapper */
.pc-card-wrapper {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
  cursor: grab;
  user-select: none;
  filter: drop-shadow(0 24px 44px rgba(0, 0, 0, 0.75));
}

.pc-card-wrapper:active {
  cursor: grabbing;
}

/* Realistic Printed Card Container */
.pc-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.08);
  transform: translateZ(0);
}

/* The Frame PNG Layer */
.pc-card-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  z-index: 10;
  display: block;
}

/* The Slots Layer (Under the frame) */
.pc-card-slots {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
}

/* Individual Photo Slot */
.pc-slot {
  position: absolute;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3eff8;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pc-slot:hover {
  background: #ebe4f4;
}

.pc-slot.has-image {
  background: #000000;
}

/* Empty Slot Placeholder */
.pc-slot-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 12px;
  width: 100%;
  height: 100%;
  color: #79529f;
  border: 2px dashed #caaee6;
  border-radius: 8px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.pc-slot:hover .pc-slot-empty {
  border-color: var(--pink);
  color: var(--pink);
  background: rgba(236, 24, 118, 0.04);
}

.pc-slot-icon {
  font-size: 28px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.pc-slot-label {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.pc-slot-hint {
  font-size: 10px;
  opacity: 0.8;
  font-weight: 600;
}

/* User Uploaded Image Inside Slot */
.pc-slot-img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%) translate(var(--pan-x, 0px), var(--pan-y, 0px)) scale(var(--zoom, 1)) rotate(var(--rot, 0deg));
  transform-origin: center center;
  max-width: none;
  max-height: none;
  cursor: grab;
  pointer-events: auto;
  user-select: none;
  will-change: transform;
}

.pc-slot-img:active {
  cursor: grabbing;
}

/* Glossy Protective Sheen Layer (Over the frame) */
.pc-card-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  border-radius: inherit;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(255, 255, 255, 0.45) 45%,
    rgba(255, 255, 255, 0.75) 50%,
    rgba(255, 255, 255, 0.45) 55%,
    transparent 80%
  );
  background-size: 250% 250%;
  background-position: var(--sheen-x, 100%) var(--sheen-y, 100%);
  opacity: 0.65;
  mix-blend-mode: overlay;
  transition: opacity 0.3s ease;
}

.pc-card-wrapper:hover .pc-card-sheen {
  opacity: 0.9;
}

/* Slot Floating Toolbar (Active when slot has photo) */
.pc-slot-toolbar {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(16, 2, 38, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 25;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.pc-slot:hover .pc-slot-toolbar,
.pc-slot.is-active .pc-slot-toolbar {
  opacity: 1;
  pointer-events: auto;
}

.pc-tool-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  padding: 4px 6px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
}

.pc-tool-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffd400;
}

/* Stage Bottom Info Bar */
.pc-stage-footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pc-stage-tip {
  font-size: 12px;
  color: #c9b8dd;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* =========================================================
   CONTROL PANEL (RIGHT: SELECTION & CUSTOMIZATION)
   ========================================================= */
.pc-control-panel {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.pc-panel-card {
  background: linear-gradient(145deg, #240d39 0%, #170726 100%);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

/* Header & Intro */
.pc-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 38px);
  color: #ffffff;
  margin: 0 0 6px;
  font-weight: 400;
}

.pc-intro p {
  color: #d2c0e8;
  font-size: 14px;
  margin: 0;
  line-height: 1.6;
}

/* Category Filter Tabs (Single vs Strip) */
.pc-type-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0 0;
}

.pc-type-tab {
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
  text-align: right;
  transition: all 0.25s ease;
  color: #ffffff;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.pc-type-tab:hover {
  border-color: rgba(236, 24, 118, 0.6);
  transform: translateY(-2px);
}

.pc-type-tab.is-active {
  background: linear-gradient(135deg, rgba(236, 24, 118, 0.22) 0%, rgba(107, 47, 165, 0.3) 100%);
  border-color: var(--pink);
  box-shadow: 0 8px 24px rgba(236, 24, 118, 0.3);
}

.pc-type-tab-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pc-type-tab-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
}

.pc-type-tab-badge {
  background: var(--yellow);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
}

.pc-type-tab-price {
  font-size: 13px;
  color: #ffd400;
  font-weight: 700;
}

.pc-type-tab-note {
  font-size: 11px;
  color: #c0acd7;
}

/* Template Selector Grid */
.pc-templates-section h2 {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pc-template-count {
  font-size: 12px;
  color: #c9b8dd;
  font-weight: 600;
}

.pc-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Custom Scrollbar */
.pc-template-grid::-webkit-scrollbar {
  width: 6px;
}
.pc-template-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 99px;
}
.pc-template-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 99px;
}

.pc-template-card {
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 10px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pc-template-card:hover {
  border-color: rgba(255, 212, 0, 0.6);
  transform: translateY(-3px);
  background: rgba(0, 0, 0, 0.5);
}

.pc-template-card.is-selected {
  border-color: var(--yellow);
  background: rgba(255, 212, 0, 0.08);
  box-shadow: 0 0 0 2px var(--yellow), 0 8px 20px rgba(0, 0, 0, 0.4);
}

.pc-template-thumb {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  display: block;
}

.pc-template-card--strip .pc-template-thumb {
  aspect-ratio: 1 / 2.8;
}

.pc-template-name {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-template-badge {
  font-size: 10px;
  color: var(--pink-light);
  font-weight: 700;
}

/* Bulk Upload Bar */
.pc-upload-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pc-upload-btn-main {
  background: linear-gradient(135deg, #ec1876 0%, #a218ec 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  padding: 14px 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(236, 24, 118, 0.35);
  transition: all 0.2s ease;
}

.pc-upload-btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(236, 24, 118, 0.5);
  filter: brightness(1.1);
}

/* Live Photo Adjustments */
.pc-adjust-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(0, 0, 0, 0.45);
  border: 1.5px solid rgba(255, 212, 0, 0.35);
  border-radius: 20px;
  padding: 18px 20px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
}

.pc-adjust-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.pc-slot-selector-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.pc-slot-tab-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.pc-slot-tab-btn.is-active {
  background: var(--yellow);
  color: var(--ink);
  border-color: var(--yellow);
}

.pc-adjust-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pc-adjust-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pc-adjust-label {
  font-size: 13px;
  color: #d0c0e5;
  font-weight: 700;
}

.pc-adjust-slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 190px;
}

.pc-slider {
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.2);
  accent-color: var(--yellow);
  cursor: pointer;
}

.pc-btn-tool-sm {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-size: 14px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s;
}

.pc-btn-tool-sm:hover {
  background: var(--yellow);
  color: var(--ink);
}

.pc-zoom-val {
  font-size: 13px;
  font-weight: 800;
  color: #ffd400;
  min-width: 44px;
  text-align: center;
}

.pc-adjust-actions-row {
  display: flex;
  gap: 10px;
}

.pc-btn-tool-pill {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.pc-btn-tool-pill:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #ffd400;
  color: #ffd400;
}

.pc-adjust-hint {
  font-size: 11px;
  color: #c9b8dd;
  margin: 0;
  line-height: 1.4;
}

/* Pricing, Quantity & Summary */
.pc-order-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pc-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pc-price-label {
  font-size: 14px;
  color: #d0c0e5;
  font-weight: 600;
}

.pc-unit-price {
  font-size: 16px;
  color: #ffd400;
  font-weight: 800;
}

.pc-qty-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pc-qty-stepper {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  overflow: hidden;
}

.pc-stepper-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  width: 38px;
  height: 38px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s;
}

.pc-stepper-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffd400;
}

.pc-qty-val {
  min-width: 44px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
}

.pc-min-notice {
  font-size: 12px;
  color: #ff9ec9;
  background: rgba(236, 24, 118, 0.12);
  border: 1px dashed rgba(236, 24, 118, 0.35);
  padding: 8px 12px;
  border-radius: 10px;
  line-height: 1.4;
}

.pc-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.pc-total-label {
  font-size: 16px;
  color: #ffffff;
  font-weight: 800;
}

.pc-total-val {
  font-size: 26px;
  font-family: var(--font-display);
  color: #ffd400;
}

/* Action Buttons */
.pc-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pc-btn-cart {
  background: var(--yellow);
  color: var(--ink);
  border: none;
  border-radius: 16px;
  padding: 16px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 24px rgba(255, 212, 0, 0.35);
  transition: all 0.2s ease;
}

.pc-btn-cart:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(255, 212, 0, 0.5);
  filter: brightness(1.05);
}

.pc-btn-whatsapp {
  background: #25d366;
  color: #ffffff;
  border: none;
  border-radius: 16px;
  padding: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.pc-btn-whatsapp:hover {
  background: #20ba5a;
  transform: translateY(-1px);
}

/* Quality Guarantee Badges */
.pc-features-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

.pc-feature-item {
  font-size: 12px;
  color: #c9b8dd;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Hidden file inputs */
.pc-file-hidden {
  display: none;
}

/* =========================================================
   STICKY MOBILE BOTTOM BAR
   ========================================================= */
@media (max-width: 980px) {
  .pc-stage-panel {
    position: static;
    top: auto;
    padding: 18px;
    border-radius: 20px;
  }
  .pc-canvas-area {
    min-height: 400px;
    padding: 10px 0;
  }
}

/* =========================================================
   INTERACTIVE FEEDBACK & GUIDANCE MODALS
   ========================================================= */
.pc-feedback-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 2, 18, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 20px;
}

.pc-feedback-box {
  background: linear-gradient(145deg, rgba(38, 14, 62, 0.98), rgba(20, 5, 35, 0.98));
  border: 1.5px solid rgba(255, 212, 0, 0.4);
  border-radius: 24px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(236, 24, 118, 0.25);
  padding: 32px 24px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  animation: pcPopIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pcPopIn {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.pc-feedback-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

