*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #ffffff;
  --surface: #f4f1ec;
  --card: #ffffff;
  --accent: #c2410c;
  --accent2: #be123c;
  --accent3: #7e22ce;
  --text: #111827;
  --muted: #52525b;
}

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

#bg-canvas { position: fixed; inset: 0; z-index: 0; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(194,65,12,0.12);
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.2rem;
  background: linear-gradient(135deg, #c2410c, #be123c, #7e22ce);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}
.nav-links { display: flex; align-items: center; gap: 1.8rem; list-style: none; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  transition: color .2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-icon { display: none; }
.nav-messages .nav-icon { display: none; font-size: 1.15rem; line-height: 1; }
.nav-links .nav-cta {
  background: rgba(194,65,12,0.12);
  border: 1px solid rgba(194,65,12,0.45);
  color: var(--accent);
  padding: .45rem 1.1rem;
  border-radius: 40px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: .3rem .4rem;
  z-index: 60;
}

@media(max-width: 700px){
  .nav-toggle { display: block; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(194,65,12,0.12);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .nav-links.open { max-height: 360px; }

  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: .9rem;
    border-bottom: 1px solid rgba(194,65,12,0.08);
  }
  .nav-links .nav-cta {
    border-radius: 0;
    text-align: center;
    border: none;
    border-bottom: 1px solid rgba(194,65,12,0.08);
  }
}

/* ===== LAYOUT ===== */
.listing-wrap {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 7rem 2rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
}
@media(max-width: 800px){ .listing-wrap { grid-template-columns: 1fr; } }

/* ===== GALLERY ===== */
.gallery-card {
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(194,65,12,0.18);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(14px);
  box-shadow: 0 0 40px rgba(194,65,12,0.06), 0 2px 24px rgba(20,20,30,0.08);
  height: fit-content;
}
.gallery-main.emoji-photo {
  width: 100%;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  background: rgba(194,65,12,0.05);
}
.gallery-thumbs { display: flex; gap: .6rem; padding: 1rem; }
.thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(194,65,12,0.06);
  border: 1px solid rgba(194,65,12,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  cursor: pointer;
  transition: border-color .2s;
}
.thumb.active, .thumb:hover { border-color: var(--accent); }

/* ===== DETAILS CARD ===== */
.details-card {
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(194,65,12,0.18);
  border-radius: 20px;
  padding: 1.8rem 2rem;
  backdrop-filter: blur(14px);
  box-shadow: 0 0 40px rgba(194,65,12,0.06), 0 2px 24px rgba(20,20,30,0.08);
}

.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(194,65,12,0.12);
  border: 1px solid rgba(194,65,12,0.45);
  color: var(--accent);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .35rem .9rem;
  border-radius: 40px;
  margin-bottom: 1rem;
}
.premium-badge svg { width: 11px; height: 11px; }

.pet-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 900;
  color: var(--text);
  margin-bottom: .3rem;
}
.pet-price {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #c2410c, #be123c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: .2rem;
}
.pet-location { font-size: .85rem; color: var(--muted); margin-bottom: 1.4rem; }

.price-row { display: flex; align-items: center; gap: .6rem; margin-bottom: .2rem; }
.price-row .pet-price { margin-bottom: 0; }

.safety-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(190,18,60,0.45);
  background: rgba(190,18,60,0.1);
  color: var(--accent2);
  cursor: pointer;
  transition: background .2s, transform .2s;
  flex-shrink: 0;
}
.safety-btn svg { width: 15px; height: 15px; }
.safety-btn:hover { background: rgba(190,18,60,0.2); transform: translateY(-1px); }

.safety-modal { max-width: 460px; max-height: 82vh; overflow-y: auto; text-align: left; }
.safety-modal h3 { text-align: left; color: var(--accent2); font-size: 1.1rem; margin-bottom: .8rem; }
.safety-modal p { font-size: .84rem; line-height: 1.6; color: var(--text); margin-bottom: .7rem; }

.safety-alert {
  background: rgba(190,18,60,0.08);
  border: 1px solid rgba(190,18,60,0.3);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin: .3rem 0 1rem;
}
.safety-alert p { font-size: .82rem; margin-bottom: .6rem; }
.safety-alert p:last-child { margin-bottom: 0; }
.safety-alert-title { font-weight: 800; color: var(--accent2); font-size: .85rem; }

.safety-tagline {
  text-align: center;
  font-weight: 700;
  font-size: .82rem;
  color: var(--accent);
  margin-bottom: 1rem !important;
}

.safety-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  padding-top: .9rem;
  border-top: 1px solid rgba(194,65,12,0.15);
  font-size: .72rem;
  color: var(--muted);
  font-weight: 600;
}

.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem;
  margin-bottom: 1.6rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid rgba(194,65,12,0.12);
}
.spec { display: flex; flex-direction: column; gap: .2rem; }
.spec-label { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.spec-val { font-size: .92rem; color: var(--text); font-weight: 600; }

.desc-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: .5rem;
}
.desc-text {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.6rem;
}

/* ===== SELLER PROFILE ===== */
.seller-card {
  display: flex;
  align-items: center;
  gap: .9rem;
  background: rgba(194,65,12,0.05);
  border: 1px solid rgba(194,65,12,0.15);
  border-radius: 14px;
  padding: .8rem 1rem;
  margin-bottom: 1.6rem;
}
.seller-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(194,65,12,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.seller-name { font-weight: 700; font-size: .9rem; color: var(--text); }
.seller-meta { font-size: .72rem; color: var(--muted); }

/* ===== ACTION BUTTONS ===== */
.action-row { display: flex; gap: .8rem; margin-bottom: .8rem; }
.action-row.secondary { margin-bottom: 0; }

.btn-primary {
  flex: 1;
  padding: .8rem 1rem;
  border-radius: 40px;
  border: none;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  background: linear-gradient(135deg, #c2410c, #be123c);
  color: #111827;
  transition: transform .2s;
}
.btn-primary:hover { transform: translateY(-2px); }

.btn-secondary {
  flex: 1;
  padding: .65rem 1rem;
  border-radius: 40px;
  border: 1px solid rgba(122,122,140,0.3);
  background: transparent;
  color: var(--muted);
  font-size: .8rem;
  cursor: pointer;
  transition: .2s;
}
.btn-secondary.saved { color: var(--accent2); border-color: rgba(190,18,60,0.5); }
.btn-secondary.report:hover { color: var(--accent2); border-color: rgba(190,18,60,0.5); }

/* ===== FOOTER ===== */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 1rem 2.5rem;
  color: var(--muted);
  font-size: .78rem;
  border-top: 1px solid rgba(194,65,12,0.1);
}

/* ===== REPORT MODAL ===== */
.pbm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17,24,39,0.55);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.pbm-overlay.open { opacity: 1; pointer-events: all; }
.pbm {
  background: var(--card);
  border: 1px solid rgba(194,65,12,0.2);
  border-radius: 24px;
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 0 80px rgba(194,65,12,0.1);
  transform: translateY(24px);
  transition: transform .3s ease;
}
.pbm-overlay.open .pbm { transform: translateY(0); }
.pbm h3 {
  font-family: 'Playfair Display', serif;
  color: var(--accent);
  font-size: 1.3rem;
  margin-bottom: .5rem;
  text-align: center;
}
.report-sub { font-size: .78rem; color: var(--muted); text-align: center; margin-bottom: 1rem; }
.report-select {
  width: 100%;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(194,65,12,0.25);
  border-radius: 12px;
  padding: .7rem 1rem;
  color: var(--text);
  font-size: .85rem;
  margin-bottom: 1rem;
  outline: none;
}
.pbm .pbm-btn-row { display: flex; gap: .7rem; }
.pbm button {
  flex: 1;
  padding: .7rem 1rem;
  border-radius: 60px;
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
}
.pbm-unlock { background: linear-gradient(135deg, #c2410c, #be123c); color: #111827; }
.pbm-cancel { background: rgba(194,65,12,0.08); border: 1.5px solid rgba(194,65,12,0.3); color: var(--accent); }

 /* designer credit */
    .sahil-kaswan {
      display: block;
      text-decoration: none;
      font-size: 0.72rem;
      color: #b8860b;
      letter-spacing: 0.05em;
      line-height: 1.8;
      transition: color 0.2s;
    }
    .sahil-kaswan:hover { color: var(--muted); }
/* ==========================================================================
   RESPONSIVE — TABLET & MOBILE
   ========================================================================== */

/* ---- Tablet / iPad (≤1024px) ---- */
@media (max-width: 1024px) {
  .listing-wrap { max-width: 100%; padding: 6.5rem 1.5rem 3.5rem; gap: 1.6rem; }
  .gallery-main.emoji-photo { height: 280px; font-size: 6.5rem; }
}

/* ---- iPad portrait / stacked layout (≤800px, matches existing breakpoint) ---- */
@media (max-width: 800px) {
  .listing-wrap { padding: 6rem 1.2rem 3rem; gap: 1.4rem; }
  .gallery-main.emoji-photo { height: 260px; font-size: 6rem; }
  .details-card { padding: 1.5rem 1.4rem; }
}

/* ---- Mobile phones (≤600px) ---- */
@media (max-width: 600px) {
  .navbar { padding: .75rem 1rem; }
  .nav-links { gap: .8rem; }
  .nav-links a { font-size: .78rem; }
  .nav-links .nav-cta { padding: .38rem .85rem; font-size: .76rem; }

  .listing-wrap { padding: 5.5rem 1rem 2.5rem; gap: 1.1rem; }

  .gallery-main.emoji-photo { height: 220px; font-size: 5rem; }
  .gallery-thumbs { padding: .8rem; gap: .5rem; flex-wrap: wrap; }
  .thumb { width: 48px; height: 48px; font-size: 1.4rem; }

  .details-card { padding: 1.3rem 1.1rem; }
  .pet-title { font-size: 1.4rem; }
  .pet-price { font-size: 1.2rem; }
  .pet-location { margin-bottom: 1.1rem; font-size: .8rem; }

  /* single-column specs so labels/values never crowd on narrow screens */
  .spec-grid { grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: 1.2rem; padding-bottom: 1.2rem; }
  .spec-val { font-size: .85rem; }

  .desc-text { font-size: .84rem; margin-bottom: 1.2rem; }

  .seller-card { padding: .7rem .85rem; margin-bottom: 1.2rem; }
  .seller-avatar { width: 38px; height: 38px; font-size: 1.1rem; }

  /* stack action buttons full-width for easy tapping */
  .action-row { flex-direction: column; gap: .6rem; }
  .action-row.secondary { flex-direction: row; }
  .btn-primary, .btn-secondary { font-size: .82rem; padding: .75rem 1rem; }

  .pbm { padding: 1.6rem; border-radius: 20px; }
  .pbm h3 { font-size: 1.1rem; }

  .safety-btn { width: 26px; height: 26px; }
  .safety-btn svg { width: 13px; height: 13px; }
  .safety-modal h3 { font-size: 1rem; }
  .safety-modal p, .safety-alert p { font-size: .8rem; }
}

/* ---- Very small phones (≤380px) ---- */
@media (max-width: 380px) {
  .spec-grid { grid-template-columns: 1fr; }
  .action-row.secondary { flex-direction: column; }
  .gallery-main.emoji-photo { height: 190px; font-size: 4.2rem; }
}