/* ================================
   BlueShrimps Market — Full CSS Rework
   Mobile-first, clean header, better desktop scale
   ================================ */

:root{
  /* Color system */
  --bg:#070b14;
  --bg2:#040714;
  --panel: rgba(15,23,42,.72);
  --panel2: rgba(15,23,42,.56);
  --panel3: rgba(2,6,23,.38);

  --border: rgba(56,189,248,.26);
  --border2: rgba(148,163,184,.20);
  --border3: rgba(148,163,184,.12);

  --text:#e5e7eb;
  --muted:#9ca3af;
  --muted2: rgba(203,213,245,.82);

  --brand:#38bdf8;
  --brand2:#60a5fa;
  --good:#22c55e;
  --bad:#ef4444;

  /* Shape + shadow */
  --radius:18px;
  --radius2:14px;
  --radius3:999px;

  --shadow: 0 18px 60px rgba(0,0,0,.55);
  --shadow2: 0 14px 45px rgba(0,0,0,.35);

  /* Spacing */
  --gutter: 14px;
  --pad: 14px;

  /* Typography */
  --fs-0: .92rem;
  --fs-1: 1rem;
  --fs-2: 1.08rem;
  --fs-3: 1.28rem;
  --fs-4: 1.65rem;
  --fs-5: 2.1rem;

  --lh: 1.55;

  /* Container sizing */
  --container: 1120px;      /* default */
  --container-lg: 1320px;   /* large screens */
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background:
    radial-gradient(1100px 650px at 30% -10%, rgba(56,189,248,.14), transparent 55%),
    radial-gradient(900px 500px at 80% 0%, rgba(59,130,246,.12), transparent 60%),
    linear-gradient(180deg, rgba(2,6,23,.6), rgba(2,6,23,.25) 40%, rgba(2,6,23,0)),
    var(--bg);
  color:var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Better default text rendering */
a{ color:var(--brand); text-decoration:none; }
a:hover{ text-decoration:underline; }
img{ max-width:100%; height:auto; display:block; }
button,input,select,textarea{ font: inherit; }
::selection{ background: rgba(56,189,248,.25); }

/* ================================
   Container + layout helpers
   ================================ */

.container{
  width: min(var(--container), calc(100% - 22px));
  margin: 0 auto;
}

@media (min-width: 1200px){
  .container{ width: min(var(--container-lg), calc(100% - 34px)); }
}

.grid{ display:grid; gap: var(--gutter); }
.grid.cols2{ grid-template-columns: 1fr; }

@media (min-width: 980px){
  .grid.cols2{ grid-template-columns: 1.15fr .85fr; }
}

.stack{ display:grid; gap: var(--gutter); }
.row{ display:flex; gap: 10px; align-items:center; flex-wrap:wrap; }

hr.sep{
  border:none;
  border-top:1px solid var(--border3);
  margin: 14px 0;
}

/* ================================
   Header / Nav (FIXED MOBILE)
   HTML assumption:
   .nav > .container > .nav-inner
   inside .nav-inner: .brand, .nav-links, .nav-actions
   ================================ */

.nav{
  position: sticky;
  top:0;
  z-index:1000;
  backdrop-filter: blur(12px);
  background: rgba(2,6,23,.68);
  border-bottom: 1px solid rgba(148,163,184,.12);
}

.nav-inner{
  /* Use grid so mobile doesn’t wrap ugly */
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand actions"
    "links links";
  gap: 10px;
  padding: 10px 0;
}

.brand{
  grid-area: brand;
  display:flex;
  align-items:center;
  gap:10px;
  font-weight: 900;
  letter-spacing:.2px;
  color: var(--text);
  min-width: 0;
  white-space: nowrap;
}

.brand .dot{
  width:12px; height:12px; border-radius:999px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 0 0 3px rgba(56,189,248,.10);
}

/* ===== NAV LINKS: no scroll, wrap into tidy rows on mobile ===== */

.nav-links{
  grid-area: links;
  display:flex;
  flex-wrap: wrap;            /* wrap into multiple rows */
  gap: 8px;
  align-items:center;
  justify-content: center;    /* looks cleaner */
  overflow: visible;          /* disable scrolling */
  padding: 2px 0 0;
}

.nav-links a{
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.18);
  background: rgba(15,23,42,.30);
  color: rgba(203,213,245,.92);
  font-weight: 800;
  text-decoration:none;
}

/* keep active state */
.nav-links a.active{
  border-color: rgba(56,189,248,.40);
  background: rgba(56,189,248,.12);
  color: var(--text);
}

/* Force a max of ~3 rows by shrinking pills slightly on small screens */
@media (max-width: 520px){
  .nav-links a{
    padding: 7px 10px;
    font-size: .92rem;
  }
}

/* Desktop stays one line like before */
@media (min-width: 980px){
  .nav-links{
    justify-content: center;
  }
}


.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;

  padding:.62rem .95rem;
  border-radius: var(--radius3);

  border:1px solid rgba(56,189,248,.34);
  background: rgba(56,189,248,.12);
  color: var(--text);
  cursor:pointer;

  font-weight: 850;
  text-decoration:none;
  white-space: nowrap;
}

.btn:hover{ filter:brightness(1.07); text-decoration:none; }
.btn.primary{
  background: linear-gradient(135deg, rgba(56,189,248,.95), rgba(59,130,246,.70));
  border-color: rgba(56,189,248,.60);
}
.btn.ghost{
  background: transparent;
  border-color: rgba(148,163,184,.28);
  color: rgba(203,213,245,.92);
}

.badge{
  display:inline-flex;
  gap:.45rem;
  align-items:center;
  padding:.25rem .65rem;
  border-radius: var(--radius3);
  font-size: .82rem;
  color: rgba(203,213,245,.94);
  border:1px solid rgba(148,163,184,.22);
  background: rgba(15,23,42,.45);
  white-space: nowrap;
}

/* Desktop header: put everything on one line */
@media (min-width: 980px){
  .nav-inner{
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand links actions";
    align-items: center;
    gap: 12px;
    padding: 12px 0;
  }
  .nav-links{
    justify-content:center;
    overflow: visible;
    padding-bottom: 0;
    flex-wrap: wrap; /* safe on desktop */
  }
}

/* ================================
   Panels / hero / content blocks
   ================================ */

.panel{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--pad);
}

.panel.light{
  background: var(--panel2);
  border-color: rgba(56,189,248,.18);
  box-shadow: var(--shadow2);
}

.hero{
  padding: 18px 0 8px;
}

.h1{
  margin: 0;
  font-size: clamp(1.55rem, 2.2vw, 2.35rem);
  font-weight: 950;
  letter-spacing: .2px;
}

.sub{
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.6;
  font-size: var(--fs-1);
}

/* Make hero buttons nicer */
.hero .row .btn{ padding: .7rem 1.05rem; }

/* ================================
   Cards / listing grid
   ================================ */

.card-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: var(--gutter);
}

@media (min-width: 760px){
  .card-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (min-width: 1100px){
  .card-grid{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}

.card{
  background: rgba(15,23,42,.56);
  border: 1px solid rgba(56,189,248,.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-height: 100%;
}

.card .body{ padding: 14px; }
.card .title{
  font-weight: 950;
  font-size: 1.03rem;
  letter-spacing: .15px;
}
.card .desc{
  margin-top: 6px;
  color: var(--muted);
  font-size: .95rem;
}
.card .meta{
  margin-top: 10px;
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
  align-items:center;
}
.price{ font-weight: 950; color: var(--text); }

/* Optional: images inside cards look cleaner */
.card img{
  width: 100%;
  height: auto;
  border-bottom: 1px solid rgba(148,163,184,.14);
}

/* ================================
   Forms (clean + consistent)
   ================================ */

.form{ display:grid; gap: 10px; }

input,select,textarea{
  width:100%;
  padding: .72rem .85rem;
  border-radius: var(--radius2);
  border: 1px solid rgba(148,163,184,.22);
  background: rgba(2,6,23,.40);
  color: var(--text);
  outline: none;
  transition: border-color .15s ease, background .15s ease, transform .05s ease;
}

input:focus,select:focus,textarea:focus{
  border-color: rgba(56,189,248,.48);
  background: rgba(2,6,23,.52);
  box-shadow: 0 0 0 4px rgba(56,189,248,.10);
}

textarea{ min-height: 120px; resize: vertical; }

small.help{
  color: var(--muted);
  line-height: 1.5;
  font-size: .9rem;
}

/* Make search block buttons full width + pretty */
.form button.btn,
.form .btn{
  width: 100%;
  justify-content:center;
  padding: .8rem 1.05rem;
}

/* ================================
   Notices
   ================================ */

.notice{
  border: 1px solid rgba(34,197,94,.30);
  background: rgba(34,197,94,.10);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: rgba(203,213,245,.98);
}

.error{
  border: 1px solid rgba(239,68,68,.35);
  background: rgba(239,68,68,.10);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: rgba(203,213,245,.98);
}

/* ================================
   Banners / ads (center & responsive)
   ================================ */

.banner{
  width:100%;
  border-radius: var(--radius);
  border: 1px dashed rgba(148,163,184,.26);
  background: rgba(15,23,42,.32);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 12px;
  overflow:hidden;
}

.banner img{
  width:100%;
  max-width: 728px;
  border-radius: 12px;
}

.banner .label{
  font-weight: 950;
  color: rgba(203,213,245,.84);
  letter-spacing: .2px;
}

/* If you have multiple banner rows on desktop, add breathing room */
.banner + .banner{ margin-top: 12px; }

/* ================================
   Chat styles
   ================================ */

.chatbox{
  margin-top: 12px;
  border: 1px solid rgba(56,189,248,.20);
  background: rgba(15,23,42,.45);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow2);
}

.chatbox .top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148,163,184,.14);
}

.chatbox .msgs{
  max-height: 340px;
  overflow:auto;
  padding: 10px 12px;
  display:grid;
  gap: 8px;
}

.msg{
  padding: 8px 10px;
  border-radius: var(--radius2);
  border: 1px solid rgba(148,163,184,.16);
  background: rgba(2,6,23,.30);
}

.msg.me{
  border-color: rgba(56,189,248,.32);
  background: rgba(56,189,248,.08);
}

.msg .meta{
  font-size: .82rem;
  color: rgba(203,213,245,.72);
  margin-bottom: 4px;
}

.chatbox .send{
  display:flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(148,163,184,.14);
}

.chatbox .send input{
  border-radius: var(--radius3);
}

.chatbox .send button{
  white-space: nowrap;
}

/* ================================
   Footer
   ================================ */

.footer{
  margin-top: 24px;
  padding: 18px 0 30px;
  color: rgba(203,213,245,.80);
  border-top: 1px solid rgba(148,163,184,.12);
}

.footer .row{
  display:flex;
  gap: 14px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
}

.online{
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
  align-items:center;
}

.online a{
  padding: .22rem .58rem;
  border-radius: var(--radius3);
  border: 1px solid rgba(148,163,184,.20);
  background: rgba(15,23,42,.45);
  color: rgba(203,213,245,.92);
  text-decoration:none;
}
.online a:hover{
  border-color: rgba(56,189,248,.28);
  background: rgba(56,189,248,.08);
}

/* ================================
   Tables (forums/admin pages)
   ================================ */

table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: var(--radius);
}

th,td{
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148,163,184,.12);
  text-align:left;
  vertical-align: top;
}

th{
  font-size: .9rem;
  color: rgba(203,213,245,.88);
  background: rgba(15,23,42,.45);
}

tr:hover td{
  background: rgba(148,163,184,.06);
}

/* Responsive tables on small screens */
@media (max-width: 720px){
  table, thead, tbody, th, td, tr{ display:block; }
  thead{ display:none; }
  tr{
    border: 1px solid rgba(148,163,184,.14);
    border-radius: var(--radius);
    overflow:hidden;
    margin-bottom: 12px;
    background: rgba(15,23,42,.38);
  }
  td{
    border: none;
    border-bottom: 1px solid rgba(148,163,184,.10);
  }
  td:last-child{ border-bottom:none; }
}

/* ================================
   Accessibility / motion
   ================================ */

@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior:auto !important; transition:none !important; animation:none !important; }
}
/* ================================
   Desktop Professional Pack (Overrides)
   Paste at END of CSS
   ================================ */

/* 1) Make the site feel "contained" on desktop */
:root{
  --container: 1180px;      /* tighter than 1320 */
  --container-lg: 1180px;   /* keep consistent */
  --gutter: 12px;
  --pad: 12px;

  /* slightly stronger separation */
  --panel: rgba(15,23,42,.78);
  --panel2: rgba(15,23,42,.62);
  --border: rgba(56,189,248,.22);
  --border2: rgba(148,163,184,.18);
  --shadow2: 0 12px 34px rgba(0,0,0,.35);
}

/* Make the content "well" look intentional */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events:none;
  background:
    radial-gradient(900px 480px at 22% 12%, rgba(56,189,248,.10), transparent 60%),
    radial-gradient(900px 520px at 78% 6%, rgba(59,130,246,.08), transparent 62%);
  opacity:.9;
}

/* Give all main blocks a clear sectioned vibe */
.panel, .card, .chatbox, table, .banner{
  box-shadow: var(--shadow2);
}

/* Add subtle inner edge so panels look more "pro" */
.panel{
  position: relative;
}
.panel::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius: inherit;
  pointer-events:none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05),
              inset 0 0 0 1px rgba(255,255,255,.02);
}

/* 2) Tighten desktop typography so it doesn’t feel huge */
.h1{
  font-size: clamp(1.35rem, 1.45vw, 1.85rem) !important;
  line-height: 1.18;
  max-width: 26ch; /* keeps headline tidy */
}
.sub{
  font-size: .98rem;
  max-width: 60ch;
}

/* 3) Reduce hero height and make it a proper "boxed section" */
.hero{
  padding: 14px 0 10px !important;
}

/* Desktop hero layout: more balanced and compact */
@media (min-width: 980px){
  .grid.cols2{
    grid-template-columns: 1.05fr .95fr !important;
    align-items: start;
    gap: 12px;
  }

  /* Make the hero panels not feel massive */
  .hero .panel{
    padding: 16px !important;
  }
}

/* 4) Buttons slightly smaller on desktop */
.btn{
  padding: .56rem .85rem !important;
  font-weight: 800;
}
.hero .row .btn{
  padding: .62rem .9rem !important;
}

/* 5) Search box: make it look like a modern module */
.form input, .form select, .form textarea{
  background: rgba(2,6,23,.46) !important;
  border-color: rgba(148,163,184,.18) !important;
}
.form button.btn, .form .btn{
  padding: .72rem 1rem !important;
  border-radius: 14px !important; /* less “pill”, more modern module */
}

/* 6) Make sections breathe but not look oversized */
.panel{
  padding: 14px !important;
}
@media (min-width: 980px){
  .panel{
    padding: 16px !important;
  }
}

/* 7) Cards: sharper grid + more “boxed” */
.card-grid{
  gap: 12px !important;
}
.card{
  border-color: rgba(56,189,248,.16) !important;
  background: rgba(15,23,42,.60) !important;
}
.card .body{
  padding: 12px !important;
}
.card .title{
  font-size: 1.0rem !important;
}
.card .desc{
  font-size: .93rem !important;
}

/* 8) Ads/banners: stop them feeling like giant empty bars on desktop */
.banner{
  padding: 10px !important;
  background: rgba(15,23,42,.28) !important;
}
.banner .label{
  font-size: .95rem;
}
.banner img{
  max-width: 728px;
}

/* 9) Footer: align nicely, less empty space */
.footer{
  margin-top: 18px !important;
  padding: 16px 0 22px !important;
}

/* 10) Optional: make the whole page feel like it has “sections” stacked */
.panel + .panel,
.panel + .card-grid,
.card-grid + .panel,
.banner + .panel,
.panel + .banner{
  margin-top: 12px;
}

/* ================================
   Listings: thumbnail + gallery sizing (patch)
   Keeps original desktop layout.
   ================================ */

/* Card thumbnails (index/profile listings) */
.card img.listing-thumb{
  width:100%;
  height: 180px;
  object-fit: cover;
  display:block;
}

@media (min-width: 1100px){
  .card img.listing-thumb{ height: 190px; }
}

/* Listing detail gallery */
.listing-gallery{ display:grid; gap:10px; }
.listing-gallery .main{
  width:100%;
  height: 360px;
  object-fit: cover;
  border-radius: var(--radius);
  border:1px solid rgba(148,163,184,.18);
}

@media (max-width: 620px){
  .listing-gallery .main{ height: 260px; }
}

.listing-gallery .thumbs{ display:flex; gap:10px; flex-wrap:wrap; }
.listing-gallery .thumbs img{
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 14px;
  border:1px solid rgba(148,163,184,.18);
  cursor:pointer;
}
.listing-gallery .thumbs img.active{
  outline: 2px solid rgba(56,189,248,.55);
  outline-offset: 2px;
}
/* ---------- Mobile nav dropdown (professional, clean) ---------- */

.nav-toggle{
  display:none;
  width:44px;
  height:44px;
  border-radius:14px;
  border:1px solid rgba(148,163,184,.18);
  background:rgba(2,6,23,.35);
  color:inherit;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:10px;
  cursor:pointer;
}
.nav-toggle span{
  display:block;
  height:2px;
  width:18px;
  background:rgba(203,213,245,.9);
  border-radius:999px;
  opacity:.95;
}

.nav-mobile{
  margin-top:10px;
  border:1px solid rgba(148,163,184,.18);
  border-radius:18px;
  background:rgba(2,6,23,.55);
  backdrop-filter: blur(10px);
  padding:12px;
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
}
.nav-mobile-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  padding-bottom:10px;
  border-bottom:1px solid rgba(148,163,184,.12);
  margin-bottom:12px;
}
.nav-mobile-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:10px;
}
.nav-mobile-grid a{
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  padding:10px 10px;
  border-radius:14px;
  border:1px solid rgba(148,163,184,.14);
  background:rgba(2,6,23,.35);
  color:rgba(203,213,245,.9);
  font-weight:800;
  font-size:14px;
}
.nav-mobile-grid a.active{
  border-color: rgba(56,189,248,.35);
  box-shadow: 0 0 0 2px rgba(56,189,248,.10) inset;
}
.nav-mobile-grid a:active{
  transform: translateY(1px);
}
.nav-spacer{
  display:block;
}

/* Mobile behavior */
@media (max-width: 820px){
  .nav-inner{
    position:relative;
  }

  /* hide desktop links/actions on mobile */
  .nav-links{ display:none; }
  .nav-actions{ display:none; }

  /* show hamburger */
  .nav-toggle{
    display:flex;
    margin-left:auto;
  }
}

/* prevent accidental scroll jumps when menu open */
body.nav-open{
  overflow-x:hidden;
}
