/* Sell/Edit Listing Page Styles */

.sell-page {
  background: var(--bg-cream);
  padding: 48px 0 80px;
  min-height: calc(100vh - 300px);
}

.page-header {
  margin-bottom: 40px;
  text-align: center;
}

.page-header h1 {
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.page-description {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
}

/* Form */
.sell-form {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 48px;
}

.form-section {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.section-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}

.section-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Photo Upload */
.photo-upload-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.photo-upload-slot {
  position: relative;
  aspect-ratio: 3/4;
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.photo-upload-slot:hover {
  border-color: var(--primary-color);
}

.photo-upload-slot.primary {
  grid-column: span 2;
  grid-row: span 2;
}

.photo-input {
  display: none;
}

.photo-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  background: var(--bg-light);
  transition: background 0.2s;
}

.photo-label:hover {
  background: var(--bg-cream);
}

.photo-label svg {
  width: 32px;
  height: 32px;
  stroke: var(--text-secondary);
}

.photo-upload-slot.primary .photo-label svg {
  width: 48px;
  height: 48px;
}

.photo-label span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.photo-upload-slot.primary .photo-label span {
  font-size: 16px;
}

.photo-upload-slot:not(.primary) .photo-label span {
  font-size: 28px;
  font-weight: 300;
}

.photo-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Form Groups */
.form-group {
  margin-bottom: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: var(--bg-white);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(232, 111, 56, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-hint {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* Input with Prefix */
.input-with-prefix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix {
  position: absolute;
  left: 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  pointer-events: none;
}

.form-input.with-prefix {
  padding-left: 36px;
}

/* Checkboxes */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.checkbox-input {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
}

.checkbox-input:checked {
  accent-color: var(--primary-color);
}

.checkbox-label {
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
}

/* Pricing Info */
.pricing-info {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  margin-top: 24px;
}

.pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 15px;
}

.pricing-row:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}

.pricing-row.total {
  font-size: 18px;
  font-weight: 600;
  padding-top: 16px;
  color: var(--primary-color);
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.form-actions .btn {
  min-width: 140px;
}

/* Responsive */
@media (max-width: 768px) {
  .sell-page {
    padding: 24px 0 60px;
  }

  .page-header h1 {
    font-size: 28px;
  }

  .sell-form {
    padding: 32px 24px;
  }

  .form-section {
    margin-bottom: 36px;
    padding-bottom: 36px;
  }

  .section-title {
    font-size: 20px;
  }

  .photo-upload-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .photo-upload-slot.primary {
    grid-column: span 2;
    grid-row: span 1;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions .btn {
    width: 100%;
  }
}
