/* =================================================
   PROFILE – BASE
================================================= */

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.profile-header-left {
  display: flex;
  gap: 20px;
  align-items: center;
}

.profile-avatar img,
.user-avatar.placeholder {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
}

.profile-meta {
  margin-top: 4px;
}

.rating-link {
  text-decoration: none;
  font-weight: 600;
  color: var(--dark);
}

.rating-count {
  font-size: .85rem;
  color: var(--muted);
}

/* =================================================
   PROFILE ACTIONS
================================================= */

.profile-header-actions {
  margin-left: auto;
}

.profile-actions-grid {
  display: grid;
  gap: 8px;
}

.profile-actions-grid a,
.profile-actions-grid button {
  width: 100%;
}

/* =================================================
   PROFILE INFO
================================================= */

.profile-info p {
  margin: 6px 0;
  font-size: .95rem;
}

/* =================================================
   OFFERS GRID (reuse listing style)
================================================= */

.offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.offer-card {
  display: block;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}

.offer-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.offer-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: #eee;
}

.offer-card h3 {
  margin: 12px 12px 4px;
  font-size: 1rem;
}

.offer-card .meta {
  margin: 0 12px;
  font-size: .85rem;
  color: var(--muted);
}

.offer-card .location {
  margin: 0 12px 12px;
  font-size: .8rem;
  color: var(--muted);
}

/* =================================================
   REVIEWS
================================================= */

.review-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.review-item .stars {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.review-author {
  text-decoration: none;
  font-weight: 600;
  color: var(--dark);
}

/* =================================================
   PUBLIC PROFILE
================================================= */

.public-profile {
  max-width: 900px;
  margin: 0 auto;
}

.public-profile .header {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.public-profile .avatar img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
}

.contact-box {
  background: #f5f7fa;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  max-width: 420px;
  margin-bottom: 20px;
}

/* =================================================
   MODAL
================================================= */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal.hidden {
  display: none;
}

.modal-box {
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius-lg);
  max-width: 420px;
  width: 100%;
}

.modal-box label {
  font-size: .85rem;
  margin-top: 10px;
  display: block;
}

.modal-box input {
  width: 100%;
  margin-top: 4px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

/* =================================================
   MOBILE
================================================= */

@media (max-width: 640px) {
  .profile-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-header-left {
    align-items: flex-start;
  }

  .profile-actions-grid {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .offer-card img {
    height: 140px;
  }
}

/* =========================
   RECENZE – STRÁNKA
   ========================= */

.review-form-box {
  max-width: 720px;
  margin: 0 0 2rem 0;
}

.review-form-box h2 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.review-form-box form {
  display: grid;
  gap: 1rem;
}

.review-form-box label {
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: block;
}

.review-form-box select,
.review-form-box textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  border: 1px solid #d0d0d0;
  font-size: 0.95rem;
  background: #fff;
}

.review-form-box textarea {
  resize: vertical;
  min-height: 90px;
}

.review-form-box button {
  align-self: flex-start;
  padding: 0.6rem 1.2rem;
}

/* =========================
   SEZNAM RECENZÍ
   ========================= */

.reviews-list {
  display: grid;
  gap: 1rem;
  max-width: 720px;
}

.review-item {
  padding: 1rem 1.2rem;
}

.review-stars {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.review-text {
  margin: 0.4rem 0 0.6rem 0;
  line-height: 1.5;
}

.review-footer {
  font-size: 0.85rem;
  color: #666;
}

.review-author {
  color: #444;
  text-decoration: none;
  font-weight: 600;
}

.review-author:hover {
  text-decoration: underline;
}


.box.muted {
  background: #f7f7f7;
  border: 1px dashed #d0d0d0;
  color: #555;
}

/* ================= RECENZE ================= */

.review-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.review-stars {
  font-size: 1.1rem;
}

.review-date {
  font-size: 0.85rem;
  color: #777;
}

.review-text {
  font-size: 0.95rem;
  line-height: 1.5;
}

.review-footer {
  font-size: 0.85rem;
  color: #666;
}

/* ================= ODPOVĚĎ MAJITELE ================= */

.owner-reply {
  margin-top: 12px;
  padding: 12px 14px;
  background: #f5f7fb;
  border-left: 4px solid #4f7cff;
  border-radius: 6px;
}

.owner-reply-header {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
}

.owner-reply p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.reply-date {
  font-size: 0.8rem;
  color: #888;
}

/* ================= FORMULÁŘ ODPOVĚDI ================= */

.owner-reply-form {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.owner-reply-form textarea {
  resize: vertical;
  min-height: 70px;
}


/* ================= ODPOVĚĎ MAJITELE ================= */

.owner-reply {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
}

/* EXISTUJÍCÍ ODPOVĚĎ */
.owner-reply--existing {
  background: #f7f8fb;
  border-left: 4px solid #f0b429;
}

.owner-reply-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.owner-badge {
  font-weight: 600;
  color: #444;
}

.reply-date {
  font-size: 12px;
  color: #999;
}

.owner-reply-text {
  margin: 0;
  color: #333;
  line-height: 1.4;
}

/* FORMULÁŘ */
.owner-reply--form {
  background: #f9fafc;
  border-left: 4px solid #4f6bed;
}

.owner-reply-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #444;
}

.owner-reply-inputs {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.owner-reply textarea {
  flex: 1;
  resize: none;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 14px;
}

.owner-reply textarea:focus {
  outline: none;
  border-color: #4f6bed;
  background: #fff;
}

/* ================= PAGINATION ================= */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 30px 0 10px;
  flex-wrap: wrap;
}

.page-link {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-soft);

  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;

  transition: background .15s ease, color .15s ease;
}

.page-link:hover {
  background: var(--accent);
  color: #fff;
}

.page-link.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  pointer-events: none;
}


/* ================= RECENZE ================= */

.reviews-page {
  max-width: 900px;
  margin: 0 auto;
}

.reviews-header {
  margin-bottom: 20px;
}

.review-item {
  margin-bottom: 16px;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.review-stars {
  font-size: 1.1rem;
}

.review-text {
  margin: 8px 0;
  line-height: 1.5;
}

.review-footer {
  font-size: 0.9rem;
  color: #666;
}

.review-author {
  font-weight: 600;
}

/* ================= ODPOVĚĎ MAJITELE ================= */

.owner-reply {
  margin-top: 12px;
  padding: 10px;
  border-left: 3px solid #ccc;
  background: #f9f9f9;
}

.owner-reply--existing {
  border-color: #4caf50;
}

.owner-reply-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.owner-badge {
  font-weight: 600;
}

.owner-reply-inputs {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.owner-reply-inputs textarea {
  flex: 1;
}

/* ================= PAGINATION ================= */

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
}

.page-link {
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  background: #eee;
  color: #333;
  font-weight: 500;
}

.page-link:hover {
  background: #ddd;
}

.page-link.active {
  background: #333;
  color: #fff;
}


.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal.hidden {
  display: none;
}

.modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 720px;
}

.modal-box--wide {
  max-width: 820px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
}


.profile-photo-edit {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
}

.profile-photo-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-photo-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.file-label {
  display: inline-block;
  cursor: pointer;
  color: var(--primary);
}
