/* ── Fixed bottom CTA (base — hidden on desktop) ── */
.mobile-write-cta {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: #fff;
  border-top: 1px solid #e8e8e8;
  padding: 10px 16px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}
.mobile-write-cta a {
  display: block;
  width: 100%;
  text-align: center;
  background: #2d9e00;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  padding: 13px;
  border-radius: 10px;
  letter-spacing: .02em;
  box-sizing: border-box;
}

/* ── Sort avg — hidden on desktop ── */
.sort-avg { display: none; }

@media (max-width: 768px) {

  /* ─ Page background ─ */
  body { background: #fff; }
  .page-layout {
    grid-template-columns: 1fr !important;
    padding: 0 !important;
    gap: 0 !important;
  }
  .sidebar { display: none !important; }
  .page-main { padding: 0 0 90px !important; }

  /* ─ Breadcrumbs ─ */
  .breadcrumbs { padding: 12px 16px 6px; font-size: 12px; }

  /* ─ Title ─ */
  .page-title { font-size: 20px !important; line-height: 1.3; margin-bottom: 6px; padding: 0 16px; }
  .page-desc { font-size: 13px !important; color: #999; margin-bottom: 0; line-height: 1.5; padding: 0 16px 16px; }

  /* ─ Rating card — hidden on mobile (shown in sort-row instead) ─ */
  .rating-card { display: none !important; }

  /* ─ Sort row ─ */
  .sort-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 16px !important;
    margin-bottom: 0 !important;
    border-bottom: 1px solid rgba(0,0,0,.1);
    background: #fff;
  }
  .write-btn { display: none !important; }

  .sort-avg {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }
  .sort-avg-num { font-size: 28px; font-weight: 900; color: #111; line-height: 1; }
  .sort-avg-right { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
  .sort-avg-stars { display: flex; gap: 2px; }
  .sort-avg-stars .star { font-size: 13px; color: #e0e0e0; }
  .sort-avg-stars .star.on { color: #f5a623; }
  .sort-avg-count { font-size: 11px; color: #999; font-weight: 600; }

  /* Spacer pushes sort-controls to the right */
  .sort-avg + .sort-controls { margin-left: auto !important; }

  /* Show only active sort button, hide others */
  .sort-controls { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
  .sort-label { display: none !important; }
  .sort-btn { display: none !important; }
  .sort-select-mobile {
    display: block !important;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    background: #fff;
    outline: none;
    cursor: pointer;
  }

  /* ─ Reviews list ─ */
  .reviews-wrap {
    border-top: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
  }

  /* ─ Review card — flat, separator only ─ */
  .review-card {
    padding: 16px 16px !important;
    border: none !important;
    border-bottom: 1px solid rgba(0,0,0,.08) !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    transition: none !important;
  }
  .review-card:hover { box-shadow: none !important; border-color: rgba(0,0,0,.08) !important; }

  /* ─ Review top row ─ */
  .review-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
  .review-avatar { width: 36px !important; height: 36px !important; font-size: 14px !important; flex-shrink: 0; border-radius: 50%; }
  .review-meta { flex: 1; }
  .review-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .review-name { font-size: 14px !important; font-weight: 700; color: #111; }
  .review-date { font-size: 11px !important; color: #bbb; }
  .review-stars { margin-top: 2px; }
  .review-stars .star { font-size: 12px !important; }

  /* ─ Review text ─ */
  .review-text {
    font-size: 14px !important;
    line-height: 1.65;
    color: #333;
    margin-left: 46px;
  }

  /* ─ Replies ─ */
  .replies-block { margin: 10px 0 0 46px; }
  .reply-item { padding: 10px 12px; border-radius: 8px; margin-bottom: 6px; font-size: 13px; }
  .admin-reply { background: #f0fbea; border-left: 3px solid #2d9e00; }
  .user-reply { background: #f5f5f5; border-left: 3px solid #ddd; }
  .reply-badge-admin { font-size: 11px; font-weight: 800; color: #2d9e00; text-transform: uppercase; letter-spacing: .06em; margin-right: 6px; }
  .reply-badge-user { font-size: 12px; font-weight: 700; color: #444; margin-right: 6px; }
  .reply-date { font-size: 11px; color: #bbb; }
  .reply-text { margin-top: 4px; color: #333; line-height: 1.6; }

  /* ─ Reply toggle ─ */
  .reply-toggle-bar { margin: 8px 0 0 46px; }
  .btn-reply-toggle {
    font-size: 12px; color: #999; background: none; border: none;
    cursor: pointer; padding: 0; font-weight: 600;
  }
  .btn-reply-toggle:hover { color: #2d9e00; }

  /* ─ Reply form ─ */
  .user-reply-form { display: none; margin: 10px 0 0 46px; }
  .user-reply-form.open { display: block; }
  .user-reply-form .reply-inputs { grid-template-columns: 1fr !important; }
  .reply-inputs input,
  .reply-inputs textarea {
    width: 100%; border: 1px solid #ddd; border-radius: 8px;
    padding: 9px 12px; font-size: 14px; font-family: inherit;
    outline: none; margin-bottom: 8px; box-sizing: border-box;
  }
  .reply-inputs textarea { min-height: 70px; resize: vertical; }
  .btn-send-reply { background: #2d9e00; color: #fff; border: none; border-radius: 6px; padding: 9px 20px; font-size: 13px; font-weight: 700; cursor: pointer; margin-right: 8px; }
  .btn-cancel-reply { background: none; color: #999; border: 1px solid #ddd; border-radius: 6px; padding: 9px 16px; font-size: 13px; font-weight: 600; cursor: pointer; }

  /* ─ No reviews ─ */
  .no-reviews { padding: 40px 16px !important; font-size: 14px !important; }

  /* ─ Review form ─ */
  .review-form-wrap {
    border: none !important;
    border-radius: 0 !important;
    padding: 24px 16px !important;
    border-top: 1px solid #e8e8e8 !important;
    background: #fff !important;
  }
  .review-form-wrap h2 { font-size: 17px !important; margin-bottom: 16px !important; }
  .form-row { grid-template-columns: 1fr !important; gap: 12px !important; }
  .form-group input,
  .form-group textarea { font-size: 16px !important; border-radius: 8px; padding: 11px 14px; }
  .form-submit { width: 100% !important; padding: 14px !important; font-size: 15px !important; border-radius: 10px !important; }

  /* ─ Fixed bottom CTA ─ */
  .mobile-write-cta { display: flex !important; }

  /* ─ Load more button ─ */
  .load-more-wrap { padding: 16px; }
}