/* ---------- Alap beállítások ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background-color: #f5f5f4;
  color: #1a1a1a;
}

/* ---------- Fejléc ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  font-size: 21px;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
}

.logo-cap-letter {
  color: #c19a6b;
}

.search-bar {
  display: flex;
  flex: 1;
  max-width: 480px;
  gap: 8px;
}

.search-bar input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
}

.search-bar button {
  padding: 10px 18px;
  background-color: #1a1a1a;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.notif-btn {
  padding: 10px 18px;
  background-color: #e8f0fe;
  color: #1a4b8c;
  border: 1px solid #b6d0f5;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.premium-btn {
  padding: 10px 18px;
  background-color: #fac775;
  color: #412402;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.account-btn {
  position: relative;
  padding: 10px 18px;
  background-color: #f1efe8;
  border: 1px solid #ccc;
  border-radius: 8px;
  cursor: pointer;
}

.add-listing-btn {
  padding: 10px 18px;
  background-color: #1a1a1a;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.unread-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 11px;
  height: 11px;
  background-color: #e24b4a;
  border: 2px solid white;
  border-radius: 50%;
}

/* ---------- Szűrők ---------- */
.filters-bar {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  flex-wrap: wrap;
}

.filters-bar select {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  background-color: white;
}

/* ---------- Hirdetés-rács ---------- */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  padding: 24px;
}

.listing-card {
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}

.listing-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.listing-image-wrap {
  position: relative;
}

.listing-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background-color: #eee;
  display: block;
}

.listing-card .no-image {
  width: 100%;
  height: 160px;
  background-color: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 13px;
}

.listing-card-body {
  padding: 12px;
}

.listing-card-body h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.listing-card-body .price {
  font-size: 15px;
  font-weight: 700;
  color: #c19a6b;
}

.listing-card-body .district {
  font-size: 13px;
  color: #777;
  margin-top: 2px;
}

.listing-card-body .deposit-line {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

/* A gomb a KÉP CSOMAGOLÓJÁHOZ képest van pozicionálva (nem a
   kártya aljához), ezért a kép magassága bármikor változhat
   (pl. mobilon kisebb), a szív-ikon helye mindig helyes marad. */
.save-button {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 22px;
  cursor: pointer;
  color: #444;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  transition: transform 0.1s ease;
}

.save-button:active {
  transform: scale(1.15);
}

.save-button.saved {
  color: #e24b4a;
}

/* ---------- Modal (bejelentkezés / regisztráció) ---------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

#detail-modal {
  z-index: 200;
}

#new-listing-modal {
  z-index: 210;
}

#message-modal {
  z-index: 220;
}

#calendar-modal {
  z-index: 250;
}

#checkout-modal {
  z-index: 260;
}

#confirm-modal {
  z-index: 300;
}

.modal-overlay.hidden {
  display: none;
}

.modal-box {
  background-color: white;
  border-radius: 12px;
  padding: 28px;
  width: 340px;
  position: relative;
}

.modal-box h2 {
  margin-bottom: 16px;
  font-size: 18px;
}

.modal-box input {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
}

.modal-box input.input-error {
  border-color: #e24b4a;
}

.primary-btn {
  width: 100%;
  padding: 11px;
  background-color: #1a1a1a;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  margin-top: 4px;
}

.primary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #777;
}

.logout-btn-inline {
  display: block;
  margin-top: 20px;
  background: none;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  color: #777;
  cursor: pointer;
}

.logout-btn-inline:hover {
  background-color: #f5f5f4;
  color: #e24b4a;
  border-color: #e24b4a;
}

.error-text {
  color: #e24b4a;
  font-size: 13px;
  margin-bottom: 8px;
  min-height: 16px;
}

.switch-text {
  font-size: 13px;
  margin-top: 12px;
  text-align: center;
  color: #555;
}

.switch-text a {
  color: #185fa5;
  text-decoration: none;
}

.hidden {
  display: none;
}

/* ---------- Részletes nézet modal ---------- */
.detail-box {
  width: 480px;
  max-height: 85vh;
  overflow-y: auto;
}

.detail-image-main {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 8px;
  background-color: #eee;
  margin-bottom: 10px;
}

.detail-thumbnails {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.detail-thumbnails img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
}

.detail-thumbnails img.active-thumb {
  border-color: #c19a6b;
}

.detail-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 4px;
}

.detail-price {
  font-size: 17px;
  font-weight: 700;
  color: #c19a6b;
  margin-bottom: 12px;
}

.detail-row {
  font-size: 14px;
  color: #444;
  margin-bottom: 6px;
}

.detail-row strong {
  color: #1a1a1a;
}

.detail-description {
  font-size: 14px;
  color: #444;
  margin: 12px 0;
  line-height: 1.5;
}

.view-calendar-btn {
  margin-top: 8px;
}

.message-owner-btn {
  margin-top: 8px;
}

/* ---------- Üzenetek fül ---------- */
.thread-title {
  font-size: 15px;
  font-weight: 600;
  margin: 10px 0 12px;
}

.thread-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding: 8px 4px;
  margin-bottom: 12px;
}

.thread-message {
  display: flex;
}

.thread-message.mine {
  justify-content: flex-end;
}

.thread-message.theirs {
  justify-content: flex-start;
}

.thread-message-bubble {
  max-width: 75%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
}

.thread-message.mine .thread-message-bubble {
  background-color: #1a1a1a;
  color: white;
  border-bottom-right-radius: 4px;
}

.thread-message.theirs .thread-message-bubble {
  background-color: #f0efe9;
  color: #1a1a1a;
  border-bottom-left-radius: 4px;
}

.thread-reply-row {
  display: flex;
  gap: 8px;
}

.thread-reply-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
}

.thread-reply-row .primary-btn {
  width: auto;
  padding: 10px 18px;
}

/* ---------- Fiókom panel ---------- */
.account-box {
  width: 640px;
  max-height: 90vh;
  overflow-y: auto;
}

.new-listing-box {
  width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}

.new-listing-box h2 {
  font-size: 18px;
  margin-bottom: 16px;
}

.account-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
  flex-wrap: wrap;
}

.account-tab {
  position: relative;
  padding: 8px 12px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 13px;
  color: #666;
}

.tab-unread-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background-color: #e24b4a;
  border-radius: 50%;
}

.account-tab.active {
  color: #1a1a1a;
  border-bottom-color: #c19a6b;
  font-weight: 600;
}

.tab-content textarea {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.tab-content select {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  background-color: white;
}

.file-label {
  display: block;
  font-size: 13px;
  color: #555;
  margin-bottom: 8px;
}

.image-upload-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.image-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.image-preview-item {
  position: relative;
  width: 64px;
  height: 64px;
}

.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.image-preview-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #1a1a1a;
  color: white;
  border: none;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Saját hirdetés-sor a "Hirdetéseim" fülön */
.my-listing-row {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #eee;
}

.my-listing-row img,
.my-listing-row .no-image-small {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  background-color: #eee;
  flex-shrink: 0;
}

.my-listing-info {
  flex: 1;
  min-width: 0;
}

.my-listing-info .title-row {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.conversation-unread-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  background-color: #e24b4a;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
}

.my-listing-info .stats-row {
  font-size: 13px;
  color: #777;
}

.my-listing-info .stats-row.inactive {
  color: #e24b4a;
}

.small-btn {
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: white;
  cursor: pointer;
  white-space: nowrap;
}

.small-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Amikor a small-btn ÉS a primary-btn osztály együtt szerepel
   (pl. a "Mentés" gombnál), a primary-btn sötét háttere és
   fehér szövege érvényesüljön, ne a small-btn fehér háttere -
   különben a fehér szöveg fehér háttéren eltűnne. */
.small-btn.primary-btn {
  background-color: #1a1a1a;
  color: white;
  border: none;
}

.profile-picture-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.profile-picture {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #eee;
}

.profile-picture.no-profile-picture {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 12px;
}

.profile-row {
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.profile-row strong {
  display: inline-block;
  width: 140px;
  color: #555;
}

.cancel-notice {
  color: #e08a3c;
  font-size: 13px;
}

/* ÚJ: az adott előfizetési szinthez tartozó előny-lista a Profilom fülön */
.tier-benefits-box {
  margin: 12px 0 20px;
  padding: 14px 16px;
  background-color: #f8f6f0;
  border: 1px solid #ece7da;
  border-radius: 10px;
}

.tier-benefits-box h4 {
  font-size: 13px;
  color: #555;
  margin-bottom: 8px;
}

.tier-benefits-list {
  list-style: none;
}

.tier-benefits-list li {
  font-size: 13px;
  color: #444;
  padding: 3px 0 3px 20px;
  position: relative;
}

.tier-benefits-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #2a9d5c;
  font-weight: 700;
}

/* ---------- Prémium modal ---------- */
.premium-box {
  width: 820px;
  padding: 32px 28px;
}

.premium-plans-row {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

.premium-plans-row .premium-plan {
  flex: 1;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.premium-plans-row .premium-features {
  flex: 1;
}

.premium-header {
  text-align: center;
  margin-bottom: 24px;
}

.premium-header-icon {
  font-size: 36px;
  margin-bottom: 4px;
}

.premium-header h1 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.premium-subtitle {
  font-size: 16px;
  font-weight: 500;
  color: #444;
}

.premium-plan {
  position: relative;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.premium-plan:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.premium-plus-plan {
  border: 2px solid #f5b94d;
  background: linear-gradient(150deg, #fff9ee 0%, #fff3d9 100%);
  box-shadow: 0 4px 16px rgba(245, 185, 77, 0.25);
}

.premium-badge {
  position: absolute;
  top: -12px;
  right: 16px;
  background: linear-gradient(90deg, #f5b94d, #e8933a);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 6px rgba(232, 147, 58, 0.4);
}

.premium-plan-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.plan-icon {
  font-size: 18px;
}

.premium-plan-title h2 {
  font-size: 17px;
  font-weight: 700;
}

.premium-features {
  list-style: none;
  margin-bottom: 16px;
}

.premium-features li {
  font-size: 14px;
  color: #444;
  padding: 4px 0;
  padding-left: 22px;
  position: relative;
}

.premium-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #2a9d5c;
  font-weight: 700;
  background-color: #e6f4ea;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  top: 4px;
}

.premium-price {
  font-size: 26px;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 14px;
}

.premium-price .currency {
  font-size: 16px;
  font-weight: 600;
  margin-left: 2px;
}

.premium-price .period {
  font-size: 13px;
  font-weight: 400;
  color: #777;
  margin-left: 4px;
}

.premium-plus-btn {
  background: linear-gradient(90deg, #f5b94d, #e8933a);
}

.plan-status-note {
  text-align: center;
  font-size: 14px;
  color: #777;
  padding: 10px 0;
}

.subscribed-note {
  color: #2a9d5c;
  font-weight: 700;
}

.cancel-subscription-btn {
  width: 100%;
  padding: 8px;
  color: #e24b4a;
  border-color: #e24b4a;
}

.cancel-subscription-btn:hover {
  background-color: #fdecec;
}

.confirm-box {
  width: 320px;
  text-align: center;
  padding: 24px;
}

.confirm-box p {
  font-size: 15px;
  color: #333;
  margin-bottom: 20px;
  line-height: 1.4;
}

.confirm-modal-buttons {
  display: flex;
  gap: 10px;
}

.confirm-modal-buttons button {
  flex: 1;
}

.danger-btn {
  background-color: #e24b4a;
  color: white;
  border: none;
}

.danger-btn:hover {
  background-color: #c73d3c;
}

.my-listing-row.clickable {
  cursor: pointer;
}

.my-listing-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.edit-form-row {
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.edit-form-row input,
.edit-form-row textarea,
.edit-form-row select {
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background-color: white;
}

.edit-form-buttons {
  display: flex;
  gap: 8px;
}

/* ---------- ÚJ: kuponkód + feltétel-elfogadás modal ---------- */
.checkout-box {
  width: 400px;
  max-height: 88vh;
  overflow-y: auto;
}

.coupon-row {
  display: flex;
  gap: 8px;
}

.coupon-row input {
  flex: 1;
  margin-bottom: 0;
}

.coupon-row button {
  width: auto;
  padding: 10px 14px;
}

.coupon-message {
  font-size: 13px;
  margin: 8px 0 0;
  min-height: 18px;
}

.coupon-message.success {
  color: #2a9d5c;
  font-weight: 600;
}

.coupon-message.error {
  color: #e24b4a;
  font-weight: 600;
}

.terms-details {
  margin-top: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px 12px;
  background-color: #fafafa;
}

.terms-details summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.terms-text {
  margin-top: 10px;
}

.terms-text p {
  font-size: 12.5px;
  color: #555;
  line-height: 1.5;
  margin-bottom: 8px;
}

.terms-text p:last-child {
  margin-bottom: 0;
}

.terms-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 14px;
  cursor: pointer;
}

.terms-checkbox-row input {
  width: auto;
  margin: 0;
}

/* ---------- ÚJ: Admin fül ---------- */
.admin-section {
  margin-bottom: 24px;
}

.admin-section h3 {
  font-size: 15px;
  margin-bottom: 10px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.admin-stat-tile {
  background-color: #f8f6f0;
  border: 1px solid #ece7da;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}

.admin-stat-tile .stat-value {
  font-size: 22px;
  font-weight: 800;
  color: #1a1a1a;
}

.admin-stat-tile .stat-label {
  font-size: 11.5px;
  color: #777;
  margin-top: 2px;
}

.admin-coupon-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.admin-coupon-form input,
.admin-coupon-form select {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 13px;
}

.admin-coupon-form .full-width {
  grid-column: 1 / -1;
}

.admin-coupon-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-coupon-table th,
.admin-coupon-table td {
  text-align: left;
  padding: 6px 4px;
  border-bottom: 1px solid #eee;
}

.admin-coupon-table th {
  color: #777;
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
}

/* ===========================================================
   MOBIL-BARÁT MEGJELENÍTÉS
   Kisebb (kb. 640px alatti) képernyőkön ezek a szabályok
   írják felül a fentieket, hogy a weboldal telefonon is jól
   használható legyen.
   =========================================================== */
@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 16px;
  }

  .logo {
    text-align: center;
  }

  .search-bar {
    max-width: none;
  }

  .header-actions {
    justify-content: center;
  }

  .filters-bar {
    padding: 12px 16px;
  }

  .filters-bar select {
    flex: 1;
  }

  .listings-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .listing-card img,
  .listing-card .no-image {
    height: 120px;
  }

  /* Minden felugró ablak (modal) majdnem a teljes képernyőt
     töltse ki, ne egy fix, asztali méretű dobozt. */
  .modal-box,
  .account-box,
  .detail-box,
  .premium-box,
  .checkout-box,
  .calendar-box {
    width: 92vw;
    max-width: 92vw;
    max-height: 88vh;
    padding: 20px 16px;
  }

  .account-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .account-tab {
    flex-shrink: 0;
  }

  /* A Prémium dobozok mobilon egymás alá kerüljenek,
     ne egymás mellé - túl szűk lenne vízszintesen. */
  .premium-plans-row {
    flex-direction: column;
  }

  .my-listing-row {
    flex-wrap: wrap;
  }

  .my-listing-actions {
    width: 100%;
    justify-content: flex-end;
  }

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

/* Nagyon keskeny (kb. 380px alatti) telefonokon a hirdetés-rács
   1 oszlopossá válik, hogy a kártyák ne legyenek túl aprók. */
@media (max-width: 400px) {
  .listings-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Naptár modal ---------- */
.calendar-box {
  width: 360px;
}

.calendar-box h2 {
  font-size: 17px;
  margin-bottom: 4px;
}

.calendar-hint {
  font-size: 15px;
  font-weight: 500;
  color: #444;
  margin-bottom: 16px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

#calendar-month-label {
  font-size: 15px;
  font-weight: 600;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 14px;
}

.calendar-day-label {
  text-align: center;
  font-size: 11px;
  color: #999;
  padding-bottom: 4px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 13px;
  background-color: #f5f5f4;
  color: #1a1a1a;
}

.calendar-day.empty {
  background: none;
}

.calendar-day.past {
  color: #ccc;
}

.calendar-day.blocked {
  background-color: #e24b4a;
  color: white;
  font-weight: 600;
}

.calendar-day.editable {
  cursor: pointer;
}

.calendar-day.editable:hover {
  outline: 2px solid #1a1a1a;
}

.calendar-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #555;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 10px;
}

.legend-dot:first-child {
  margin-left: 0;
}

.legend-blocked {
  background-color: #e24b4a;
}

.legend-free {
  background-color: #f5f5f4;
  border: 1px solid #ccc;
}

/* ============================================================
   BEMUTATKOZÓ KÉP - statikus banner a fejléc alatt
   ============================================================ */
.hero-image-banner {
  width: 100%;
  overflow: hidden;
  border-bottom: 1px solid #e0e0e0;
  background-color: #eef1f4;
}

.hero-image-banner-img {
  width: 100%;
  height: auto;
  display: block;
}


/* ===========================================================
   BÉRBE ADÓ PROFIL + ÉRTÉKELÉSEK
   =========================================================== */
#reviews-modal { z-index: 240; }

.owner-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #eee;
  font-size: 13px;
  color: #444;
  min-width: 0;
}
.owner-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #e6e6e6;
}
.owner-avatar.owner-avatar-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #666;
}
.owner-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.owner-rating {
  margin-left: auto;
  white-space: nowrap;
  font-size: 12px;
  color: #666;
}
.owner-rating .star-on { color: #f5a623; }

.detail-owner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 6px;
  padding: 10px 12px;
  background: #f7f7f7;
  border-radius: 10px;
}
.detail-owner .owner-avatar { width: 40px; height: 40px; font-size: 16px; }
.detail-owner-info { min-width: 0; }
.detail-owner-label { font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: .04em; }
.detail-owner-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }

.reviews-btn { margin-top: 8px; }

.reviews-box {
  width: 440px;
  max-width: 94vw;
  max-height: 88vh;
  overflow-y: auto;
}
.stars { color: #ccc; letter-spacing: 1px; white-space: nowrap; }
.stars .star-on { color: #f5a623; }
.reviews-summary {
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 12px 0 16px;
}
.reviews-avg { font-size: 38px; font-weight: 700; line-height: 1; }
.reviews-avg-count { font-size: 12px; color: #777; margin-top: 4px; }
.reviews-bars { flex: 1; min-width: 0; }
.reviews-bar-row { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #666; }
.reviews-bar-row .bar { flex: 1; height: 6px; background: #eee; border-radius: 3px; overflow: hidden; }
.reviews-bar-row .bar > span { display: block; height: 100%; background: #f5a623; }
.reviews-header { display: flex; align-items: center; gap: 10px; }
.reviews-header .owner-avatar { width: 44px; height: 44px; font-size: 18px; }
.reviews-header h2 { margin: 0; }
.reviews-empty { color: #777; font-size: 14px; padding: 8px 0 14px; }

.review-item { padding: 12px 0; border-top: 1px solid #eee; }
.review-item-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.review-item-head .owner-avatar { width: 24px; height: 24px; font-size: 11px; }
.review-date { margin-left: auto; font-size: 11px; color: #999; }
.review-comment { margin-top: 6px; font-size: 14px; white-space: pre-wrap; word-break: break-word; }

.review-form { margin-top: 16px; padding-top: 14px; border-top: 2px solid #eee; }
.review-form h3 { font-size: 15px; margin-bottom: 8px; }
.star-picker { display: flex; gap: 4px; margin-bottom: 10px; }
.star-picker button {
  background: none;
  border: none;
  font-size: 30px;
  line-height: 1;
  color: #ccc;
  cursor: pointer;
  padding: 0 2px;
}
.star-picker button.on { color: #f5a623; }
.review-form textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  resize: vertical;
  margin-bottom: 8px;
}
.review-note { font-size: 13px; color: #777; margin-top: 14px; }
.review-form .review-counter { font-size: 11px; color: #999; text-align: right; margin-bottom: 6px; }

.admin-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.admin-toggle-state { font-weight: 600; }
.admin-toggle-state.on { color: #1b7f3b; }
.admin-toggle-state.off { color: #b33; }

.reviews-btn-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.reviews-btn-row .small-btn { margin-top: 0; }
.detail-owner .owner-rating { cursor: pointer; text-decoration: underline; margin-left: auto; }

/* --- csillagok: fél csillag + értékelés írása ablak --- */
#write-review-modal { z-index: 245; }
.write-review-box { width: 420px; max-width: 94vw; max-height: 90vh; overflow-y: auto; }
.stars .star-half {
  background: linear-gradient(90deg, #f5a623 50%, #ccc 50%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.owner-rating { display: inline-flex; align-items: center; gap: 4px; }
.owner-rating .stars { font-size: 14px; letter-spacing: 0; }
.owner-rating-num { font-size: 12px; color: #666; }
.review-label { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.required-mark { color: #e24b4a; }
.optional-mark { font-weight: 400; color: #888; }
.star-picker.star-picker-error { animation: star-shake .35s; outline: 2px solid #e24b4a; outline-offset: 4px; border-radius: 8px; }
@keyframes star-shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)} }
.write-review-box .review-form { border-top: none; margin-top: 0; padding-top: 0; }
.reviews-btn-row { margin-bottom: 12px; }
.reviews-btn-row .small-btn, .reviews-btn-row .small-btn.primary-btn { width: auto; flex: 0 0 auto; padding: 8px 14px; }

/* --- foglalások a naptárban --- */
.calendar-box { max-height: 92vh; overflow-y: auto; }
.booking-section { margin-top: 16px; padding-top: 14px; border-top: 2px solid #eee; text-align: left; }
.booking-section h3 { font-size: 15px; margin-bottom: 8px; }
.booking-search-results { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.booking-result {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  border: 1px solid #e3e3e3; border-radius: 8px; background: #fff; cursor: pointer; font-size: 14px; text-align: left;
}
.booking-result:hover { background: #f5f5f5; }
.booking-result .owner-avatar { width: 26px; height: 26px; font-size: 12px; }
.booking-selected {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 8px;
  background: #eef7ee; border-radius: 8px; font-size: 14px;
}
.booking-selected button { margin-left: auto; background: none; border: none; cursor: pointer; font-size: 18px; color: #777; }
.booking-dates { display: flex; gap: 8px; margin-bottom: 8px; }
.booking-dates label { flex: 1; font-size: 12px; color: #666; }
.booking-dates input { width: 100%; margin: 2px 0 0; }
.booking-list-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid #eee; font-size: 13px;
}
.booking-list-item .booking-info { flex: 1; min-width: 0; }
.booking-list-item .booking-state { font-size: 11px; color: #888; }
.booking-selected.hidden, .booking-section.hidden { display: none; }
.booking-dates label { min-width: 0; }
.booking-dates input { box-sizing: border-box; min-width: 0; padding: 8px 6px; font-size: 13px; }
.booking-section input[type="text"] { box-sizing: border-box; }

/* --- nem bérelhető napok --- */
.calendar-day.unavailable {
  background: repeating-linear-gradient(45deg, #d9d9d9, #d9d9d9 4px, #ececec 4px, #ececec 8px);
  color: #777;
}
.legend-unavailable { background: #bdbdbd; }
.booking-kind-toggle { display: flex; gap: 6px; margin-bottom: 10px; }
.booking-kind-btn {
  flex: 1; padding: 8px 6px; border: 1px solid #ccc; border-radius: 8px;
  background: #fff; cursor: pointer; font-size: 13px;
}
.booking-kind-btn.active { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
#booking-unavailable-note.hidden, #booking-renter-part.hidden { display: none; }
