
/* =========================
   RESET + BASE
========================= */
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

body{
  font-family:"Inter",sans-serif;

  background:
    radial-gradient(circle at top left,#dbeafe 0%,transparent 30%),
    radial-gradient(circle at top right,#ede9fe 0%,transparent 25%),
    #f5f7fb;

  color:#0f172a;

  line-height:1.5;

  min-height:100vh;
}

/* =========================
   LAYOUT
========================= */
.container{
  width:100%;
  max-width:1400px;
  margin:auto;
  padding:28px;
}

.page-header{
  display:flex;
  justify-content:space-between;
  align-items:center;

  margin-bottom:28px;
}

.page-header h1{
  font-size:34px;
  font-weight:800;
  letter-spacing:-1px;

  color:#0f172a;
}

/* =========================
   FILTERS
========================= */
.filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  align-items: center;
  gap: 10px;

  padding: 16px;
  margin-bottom: 32px;

  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  border: 1px solid rgba(226, 232, 240, 0.7);
  border-radius: 20px;

  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.07);
}

.filters input,
.filters select {
  width: 100%;
  min-width: 0;          /* prevents grid blowout */
  height: 46px;

  padding: 0 14px;

  border-radius: 12px;
  border: 1.5px solid #e2e8f0;

  background: #fff;

  font-size: 14px;
  font-weight: 500;
  color: #0f172a;

  transition: border-color .2s ease, box-shadow .2s ease;
}

.filters input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.filters input:hover,
.filters select:hover {
  border-color: #cbd5e1;
}

.filters input:focus,
.filters select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.11);
}

.filters button,
.msg-btn,
.profile-contact-btn {
  height: 46px;
  padding: 0 22px;

  border: none;
  border-radius: 12px;

  background: linear-gradient(135deg, #2563eb, #4f46e5);

  color: #fff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;

  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.24);
  transition: transform .2s ease, box-shadow .2s ease;
}

.filters button:hover,
.msg-btn:hover,
.profile-contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.32);
}

/* ── Tablet: 2-row layout ─────────────────────────── */
@media (max-width: 900px) {
  .filters {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
  }

  /* search spans full width on its own row */
  #search {
    grid-column: 1 / -1;
  }

  /* button spans full width on last row */
  .filters button {
    grid-column: 1 / -1;
  }
}

/* ── Mobile: single-column stack ─────────────────── */
@media (max-width: 540px) {
  .filters {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px;
    border-radius: 16px;
  }

  #search,
  .filters button {
    grid-column: unset;
  }

  .filters input,
  .filters select {
    height: 48px;        /* slightly taller for touch */
  }

  .filters button {
    height: 50px;
    border-radius: 14px;
  }
}

/* =========================
   GRID
========================= */
.grid{
  display:grid;

  grid-template-columns:
    repeat(auto-fill,minmax(260px,1fr));

  gap:24px;
}

/* =========================
   CARD
========================= */
.card{
  position:relative;

  background:rgba(255,255,255,0.82);

  backdrop-filter:blur(18px);

  border-radius:28px;

  overflow:hidden;

  border:1px solid rgba(255,255,255,0.8);

  box-shadow:
    0 10px 35px rgba(15,23,42,0.06);

  transition:
    transform .28s ease,
    box-shadow .28s ease,
    border-color .28s ease;

  cursor:pointer;
}
.card:hover{
  transform:
    translateY(-8px)
    scale(1.01);

  border-color:#dbeafe;

  box-shadow:
    0 24px 60px rgba(15,23,42,0.14);
}

/* =========================
   IMAGE
========================= */
.card-image{
  width:100%;
  height:190px;

  object-fit:cover;

  transition:transform .4s ease;
}

.card:hover .card-image{
  transform:scale(1.05);
}

/* =========================
   CARD BODY
========================= */
.card-body{
  padding:18px;
}

.card-title{
  font-size:16px;

  font-weight:700;

  letter-spacing:-0.3px;

  color:#0f172a;

  margin-bottom:8px;
}

.card-description{
  font-size:13px;
  color:#6b7280;

  margin-bottom:10px;

  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;

  overflow:hidden;
}

/* =========================
   PRICE
========================= */
.price{
  font-size:22px;

  font-weight:800;

  letter-spacing:-0.5px;

  color:#2563eb;

  margin-bottom:14px;
}

/* =========================
   META
========================= */
.meta{
  display:flex;
  flex-wrap:wrap;
  gap:6px;

  margin-bottom:10px;
}

.badge{
  padding:6px 10px;

  border-radius:999px;

  background:#eff6ff;

  color:#2563eb;

  border:1px solid #dbeafe;

  font-size:11px;

  font-weight:700;
}

/* =========================
   LOCATION
========================= */
.location{
  font-size:13px;
  color:#4b5563;

  margin-bottom:12px;
}

/* =========================
   FOOTER
========================= */
.footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}

.menu-btn{
  width:38px;
  height:38px;

  border:none;

  border-radius:50%;

  background:rgba(255,255,255,0.75);

  backdrop-filter:blur(14px);

  box-shadow:
    0 4px 12px rgba(0,0,0,0.08);

  transition:all .2s ease;
}

.msg-btn:hover {
  background: linear-gradient(
    135deg,
    var(--primary),
    var(--accent)
  );

  color: white;

  transform: translateY(-2px) scale(1.03);

  box-shadow:
    0 12px 28px rgba(37, 99, 235, 0.25);

  border-color: rgba(37, 99, 235, 0.25);
}

.owner{
  font-size:12px;
  color:#9ca3af;
}

/* =========================
   CARD MENU
========================= */
.card-menu{
  position:absolute;
  top:10px;
  right:10px;
  z-index:10;
}

.menu-btn{
  width:34px;
  height:34px;

  border:none;
  border-radius:50%;

  background:rgba(255,255,255,0.92);

  backdrop-filter:blur(10px);

  font-size:16px;

  cursor:pointer;

  transition:0.2s ease;
}

.menu-btn:hover{
  background:#fff;
  transform:scale(1.05);
}

.menu-dropdown{
  position:absolute;

  top:46px;
  right:0;

  width:170px;

  background:rgba(255,255,255,0.92);

  backdrop-filter:blur(20px);

  border-radius:18px;

  overflow:hidden;

  border:1px solid rgba(255,255,255,0.9);

  box-shadow:
    0 20px 50px rgba(15,23,42,0.18);
}

.menu-dropdown button{
  width:100%;

  padding:12px 14px;

  border:none;
  background:#fff;

  text-align:left;

  font-size:13px;
  color:#111827;

  cursor:pointer;

  transition:0.2s ease;
}

.menu-dropdown button:hover{
  background:#f7f9fc;
}

.hidden{
  display:none;
}

/* =========================
   EMPTY STATE
========================= */
.empty-state{
  background:#fff;

  border-radius:20px;

  padding:50px 20px;

  text-align:center;

  border:1px solid #e8edf5;
}

.empty-state h2{
  font-size:24px;
  margin-bottom:10px;
}

.empty-state p{
  color:#6b7280;
  margin-bottom:20px;
}

.empty-state a{
  display:inline-block;

  padding:12px 18px;

  border-radius:12px;

  background:#111827;
  color:white;

  text-decoration:none;
  font-weight:600;

  transition:0.2s ease;
}

.empty-state a:hover{
  background:#000;
}

/* =========================
   FLOATING BUTTON
========================= */
/* ======================================================
   FLOATING CREATE LISTING BUTTON
====================================================== */

.create-listing-btn{

  position:fixed;

  right:24px;
  bottom:24px;

  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  height:60px;

  padding:0 24px;

  border-radius:20px;

  text-decoration:none;

  font-size:15px;
  font-weight:800;
  letter-spacing:.2px;

  color:white;

  background:
    linear-gradient(
      135deg,
      #2563eb,
      #4f46e5
    );

  box-shadow:
    0 20px 45px rgba(37,99,235,0.30);

  backdrop-filter:blur(14px);

  z-index:9999;

  overflow:hidden;

  transition:
    transform .22s ease,
    box-shadow .22s ease,
    opacity .22s ease;
}

/* glow */

.create-listing-btn::before{

  content:"";

  position:absolute;

  inset:0;

  background:
    linear-gradient(
      120deg,
      rgba(255,255,255,0.22),
      transparent 42%
    );

  pointer-events:none;
}

/* hover */

.create-listing-btn:hover{

  transform:
    translateY(-3px)
    scale(1.02);

  box-shadow:
    0 28px 60px rgba(37,99,235,0.38);
}

/* active */

.create-listing-btn:active{

  transform:scale(.98);
}

/* mobile */

@media(max-width:768px){

  .create-listing-btn{

    left:16px;
    right:16px;
    bottom:16px;

    width:auto;

    border-radius:18px;

    height:56px;

    font-size:14px;
  }

}

/* =========================
   MOBILE
========================= */
@media(max-width:768px){

  .container{
    padding:16px;
  }

  .page-header{
    flex-direction:column;
    align-items:flex-start;
    gap:12px;
  }

  .grid{
    grid-template-columns:
      repeat(auto-fill,minmax(170px,1fr));

    gap:14px;
  }

  .card-image{
    height:130px;
  }

  .card-body{
    padding:12px;
  }

  .card-title{
    font-size:14px;
  }

  .price{
    font-size:17px;
  }

  .msg-btn{
    padding:8px 10px;
    font-size:12px;
  }


}

/* ======================================================
   RATING STARS
====================================================== */

.rating-row {

  display: flex;
  align-items: center;

  gap: 8px;

  margin-top: 8px;
  margin-bottom: 12px;
  min-height: 24px;
}

.stars {

  display: flex;
  align-items: center;

  gap: 2px;
}

.star {

  position: relative;

  font-size: 18px;

  line-height: 1;

  user-select: none;
  
  transition: color 0.2s ease;
}

/* EMPTY STAR */

.star.empty {

  color: #d1d5db;
}

/* FULL GOLD STAR */

.star.filled {

  color: #fbbc04;
}

/* HALF STAR */

.star.half {

  color: #d1d5db;
}

.star.half::before {

  content: "★";

  position: absolute;

  top: 0;
  left: 0;

  width: 50%;

  overflow: hidden;

  color: #fbbc04;
}

.rating-text {

  font-size: 14px;

  color: #444;

  font-weight: 500;
}

/* ======================================================
   INTERACTIVE RATING STARS
====================================================== */

.rating-star {

  font-size: 18px;

  transition:
    color 0.15s ease,
    transform 0.15s ease;

  user-select: none;
}

.rating-star.filled {

  color: #fbbc04;
}

.rating-star.empty {

  color: #d1d5db;
}

.rating-star.clickable {

  cursor: pointer;
}

.rating-star.clickable:hover {

  transform: scale(1.15);
}

.interactive-stars {

  display: flex;

  align-items: center;

  gap: 2px;
}

.report-modal-overlay{
  position:fixed;
  inset:0;

  background:
    rgba(15,23,42,0.55);

  backdrop-filter:blur(8px);

  display:flex;
  align-items:center;
  justify-content:center;

  z-index:9999;

  animation:fadeIn .2s ease;
}

.report-modal{
  width:420px;

  padding:28px;

  border-radius:28px;

  background:
    rgba(255,255,255,0.92);

  backdrop-filter:blur(24px);

  border:1px solid rgba(255,255,255,0.8);

  box-shadow:
    0 30px 80px rgba(0,0,0,0.18);

  display:flex;
  flex-direction:column;

  gap:16px;

  animation:modalUp .25s ease;
}

.report-modal {
  background: white;
  padding: 20px;
  border-radius: 10px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.report-modal textarea,
.report-modal select{
  width:100%;

  border:none;

  border-radius:16px;

  background:#f8fafc;

  padding:14px;

  font-size:14px;

  transition:.2s ease;
}

.report-modal textarea:focus,
.report-modal select:focus{
  outline:none;

  background:white;

  box-shadow:
    0 0 0 4px rgba(37,99,235,0.10);
}
.report-modal textarea {
  min-height: 80px;
  resize: vertical;
}

.report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.report-error {
  background: #ffe5e5;
  color: #b00020;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
}

.hidden {
  display: none;
}

@keyframes modalUp{
  from{
    opacity:0;
    transform:translateY(10px) scale(.96);
  }
  to{
    opacity:1;
    transform:translateY(0) scale(1);
  }
}

@keyframes fadeIn{
  from{opacity:0;}
  to{opacity:1;}
}



/* =========================================================
   REPORT MODAL ACTIONS
========================================================= */

.report-actions{

  display:flex;
  justify-content:flex-end;
  align-items:center;

  gap:12px;

  margin-top:8px;
}

/* =========================================================
   BASE BUTTON
========================================================= */

.report-actions button{

  position:relative;

  height:46px;

  padding:0 18px;

  border:none;

  border-radius:16px;

  font-size:14px;
  font-weight:700;

  cursor:pointer;

  transition:
    transform .22s ease,
    box-shadow .22s ease,
    background .22s ease,
    opacity .22s ease;

  display:flex;
  align-items:center;
  justify-content:center;

  overflow:hidden;
}

/* =========================================================
   CANCEL BUTTON
========================================================= */

#cancelReportBtn{

  background:
    rgba(248,250,252,0.95);

  color:#475569;

  border:
    1px solid rgba(226,232,240,0.9);

  backdrop-filter:blur(10px);

  box-shadow:
    0 4px 12px rgba(15,23,42,0.04);
}

#cancelReportBtn:hover{

  background:white;

  transform:translateY(-1px);

  border-color:
    rgba(148,163,184,0.35);

  box-shadow:
    0 10px 24px rgba(15,23,42,0.08);
}

/* =========================================================
   SUBMIT BUTTON
========================================================= */

#submitReportBtn{

  background:
    linear-gradient(
      135deg,
      #2563eb,
      #4f46e5
    );

  color:white;

  box-shadow:
    0 12px 28px rgba(37,99,235,0.28);
}

#submitReportBtn:hover{

  transform:
    translateY(-2px)
    scale(1.01);

  box-shadow:
    0 18px 40px rgba(37,99,235,0.38);
}

/* =========================================================
   BUTTON ACTIVE
========================================================= */

.report-actions button:active{

  transform:scale(.98);
}

/* =========================================================
   DISABLED STATE
========================================================= */

#submitReportBtn:disabled{

  opacity:.7;

  cursor:not-allowed;

  transform:none;

  box-shadow:
    0 8px 20px rgba(37,99,235,0.18);
}