/* mehsul/css/mehsul.css
 * Məhsul Modulu — yalnız mövcud saytda qarşılığı olmayan, modula xas stillər.
 * Mövcud sinif adları (job-card, job-badges, dash-layout, form-group, admin-card,
 * data-table, status-pill, alert və s.) olduğu kimi təkrar istifadə olunur ki,
 * sayt UI/UX üslubu qorunsun (bax: TT bənd 24).
 */

.mehsul-card { display: flex; flex-direction: column; }

.mehsul-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-surface-soft, #f4f4f6);
  margin-bottom: 14px;
}

.mehsul-card-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .25s ease;
}

.mehsul-card:hover .mehsul-card-img img { transform: scale(1.05); }

.mehsul-card-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; opacity: .35;
}

.mehsul-card-new-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--color-ink, #241417);
  color: #fffbe8;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .03em;
  padding: 5px 10px;
  border-radius: var(--radius-full, 999px);
}

.mehsul-price-tag {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: #fff;
  color: var(--color-primary-dark, #d81f3d);
  font-family: var(--font-display, inherit);
  font-weight: 800;
  font-size: 15px;
  padding: 6px 13px;
  border-radius: var(--radius-full, 999px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}

.mehsul-card-body { display: flex; flex-direction: column; flex: 1; }

.mehsul-card-body h3 {
  margin: 0 0 12px;
  font-size: 16.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mehsul-condition-badge.mehsul-condition-new { background: var(--color-success-bg, #ecfdf3); color: var(--color-success, #16a34a); }
.mehsul-condition-badge.mehsul-condition-used { background: var(--color-surface-alt, #fdf2f4); color: var(--color-ink-soft, #5c464a); }

.mehsul-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px dashed var(--color-border, #f1e4e6);
  padding-top: 12px;
}

.mehsul-card-seller {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mehsul-seller-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-primary-tint, #fff1f3);
}

.mehsul-seller-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display, inherit);
  font-weight: 700;
  font-size: 11px;
  color: var(--color-primary-dark, #d81f3d);
}

.mehsul-seller-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-ink-soft, #5c464a);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mehsul-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.status-suspended { background: #edeef2; color: #4b4f5a; }

.mehsul-detail-img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--color-surface-soft, #f4f4f6);
  display: block;
  cursor: zoom-in;
}

.mehsul-detail-img-placeholder {
  width: 100%;
  height: 320px;
  border-radius: 12px;
  background: var(--color-surface-soft, #f4f4f6);
  display: flex; align-items: center; justify-content: center;
  font-size: 64px; opacity: .3;
}

.mehsul-gallery-main {
  position: relative;
}

.mehsul-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(20, 10, 12, .55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}

.mehsul-gallery-arrow:hover { background: rgba(20, 10, 12, .78); transform: translateY(-50%) scale(1.06); }
.mehsul-gallery-arrow-prev { left: 12px; }
.mehsul-gallery-arrow-next { right: 12px; }

.mehsul-gallery-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(20, 10, 12, .6);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.mehsul-gallery-zoom-hint {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(20, 10, 12, .55);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity .15s ease;
  pointer-events: none;
}

.mehsul-gallery-main:hover .mehsul-gallery-zoom-hint { opacity: 1; }

.mehsul-gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.mehsul-thumb-btn {
  width: 72px;
  height: 72px;
  padding: 0;
  border-radius: 10px;
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  background: none;
  flex-shrink: 0;
  transition: border-color .15s ease, transform .15s ease;
}

.mehsul-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mehsul-thumb-btn:hover { transform: translateY(-2px); }
.mehsul-thumb-btn.active { border-color: var(--color-primary, #f43f5e); }

/* Lightbox — mehsul-detay.php-də şəklin üzərinə vuranda açılan tam-ekran böyütmə */
.mehsul-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(10, 6, 7, .88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.mehsul-lightbox-overlay[hidden] { display: none; }

.mehsul-lightbox-inner {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  max-height: 90vh;
}

.mehsul-lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
  display: block;
}

.mehsul-lightbox-counter {
  margin-top: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  opacity: .85;
}

.mehsul-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  z-index: 2;
  transition: background .15s ease, transform .15s ease;
}

.mehsul-lightbox-close:hover { background: rgba(255, 255, 255, .22); transform: scale(1.06); }

.mehsul-lightbox-arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s ease, transform .15s ease;
  z-index: 2;
}

.mehsul-lightbox-arrow:hover { background: rgba(255, 255, 255, .22); transform: scale(1.06); }

@media (max-width: 640px) {
  .mehsul-lightbox-overlay { padding: 14px; gap: 10px; }
  .mehsul-lightbox-arrow { width: 40px; height: 40px; }
  .mehsul-gallery-arrow { width: 34px; height: 34px; }
}

.mehsul-contact-box {
  border: 1px solid var(--color-border, #e5e5ea);
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
}

.mehsul-contact-box div + div { margin-top: 6px; }

.mehsul-reject-reason {
  margin-top: 6px;
  font-size: 12.5px;
  color: #b3261e;
}

.mehsul-image-preview {
  margin-top: 10px;
  display: none;
  flex-wrap: wrap;
  gap: 8px;
}

.mehsul-image-preview img { border-radius: 10px; display: block; }

/* Şəkil yükləmə qutusu — user/cv.php-dəki iş nümunəsi şəkilləri ilə eyni dizayn dilində
   (kəsik xətli sərhəd, klikləmə ilə fayl seçimi, hover-də rəng dəyişimi) */
.mehsul-upload-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 28px 20px;
  border: 1.5px dashed var(--color-border-strong, #f2c9cf);
  border-radius: var(--radius-md, 14px);
  background: var(--color-surface-alt, #fdf2f4);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.mehsul-upload-box:hover,
.mehsul-upload-box.has-files {
  border-color: var(--color-primary-light, #fecdd6);
  background: var(--color-primary-tint, #fff1f3);
}

.mehsul-upload-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--color-primary-dark, #d81f3d);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(36,20,23,.06));
  margin-bottom: 4px;
}

.mehsul-upload-text {
  font-weight: 700;
  font-size: 14px;
  color: var(--color-ink, #241417);
}

.mehsul-upload-hint {
  font-size: 12px;
  color: var(--color-ink-faint, #9a8286);
  max-width: 320px;
  line-height: 1.5;
}

.mehsul-upload-box input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.mehsul-admin-detail dl { display: grid; grid-template-columns: 160px 1fr; gap: 8px 14px; margin: 0; }
.mehsul-admin-detail dt { color: var(--color-ink-faint, #8a8a95); font-size: 13px; }
.mehsul-admin-detail dd { margin: 0; font-size: 14px; }

/* Admin > Məhsul cədvəli — jobs-table-dən ayrı, çünki 7 sütunu var (jobs-table 6 üçün nəzərdə tutulub
   və table-layout:fixed ilə faiz genişlikləri sərtdir; təkrar istifadə 7-ci sütunu sıxışdırırdı). */
.mehsul-table { table-layout: fixed; min-width: 880px; }
.mehsul-table th { white-space: normal; overflow-wrap: break-word; line-height: 1.3; }
.mehsul-table th:nth-child(1), .mehsul-table td:nth-child(1) { width: 8%; }
.mehsul-table th:nth-child(2), .mehsul-table td.admin-title-cell { width: 22%; }
.mehsul-table th:nth-child(3) { width: 14%; }
.mehsul-table th:nth-child(4) { width: 10%; }
.mehsul-table th:nth-child(5) { width: 11%; }
.mehsul-table th:nth-child(6) { width: 10%; }
.mehsul-table th:nth-child(7) { width: 25%; }
.mehsul-table .row-actions { row-gap: 8px; }

@media (max-width: 640px) {
  .mehsul-admin-detail dl { grid-template-columns: 1fr; }
}
