/* ── BIIG Design System ─────────────────────────────── */
:root {
  --biig-primary:      #2563eb;
  --biig-primary-dark: #1d4ed8;
  --biig-accent:       #f59e0b;
  --biig-bg:           #f8fafc;
  --biig-surface:      #ffffff;
  --biig-border:       #e2e8f0;
  --biig-text:         #0f172a;
  --biig-muted:        #64748b;
  --biig-muted-light:  #94a3b8;
  --biig-hover-bg:     #f1f5f9;
  --biig-shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --biig-shadow:       0 4px 16px rgba(0,0,0,.08);
  --biig-shadow-lg:    0 8px 32px rgba(0,0,0,.10);
  --biig-radius:       12px;
  --biig-radius-sm:    8px;
  --biig-radius-xs:    6px;
}

/* ── Reset & Base ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--biig-bg);
  color: var(--biig-text);
  font-size: 0.925rem;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--biig-primary); }
a:hover { color: var(--biig-primary-dark); }

/* ── Navbar ─────────────────────────────────────────── */
.biig-navbar {
  background: var(--biig-surface) !important;
  border-bottom: 1px solid var(--biig-border);
  padding-top: .55rem;
  padding-bottom: .55rem;
}
.biig-navbar .navbar-brand {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--biig-primary) !important;
}
.biig-navbar .nav-link {
  color: var(--biig-text) !important;
  font-weight: 500;
}
.biig-navbar .nav-link:hover { color: var(--biig-primary) !important; }

/* Search */
.biig-search {
  border-radius: 8px 0 0 8px !important;
  border: 1.5px solid var(--biig-border);
  border-right: none;
  background: var(--biig-bg);
  font-size: .9rem;
  height: 40px;
}
.biig-search:focus {
  border-color: var(--biig-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.biig-search + .btn {
  border-radius: 0 8px 8px 0 !important;
  height: 40px;
  padding: 0 14px;
}

/* ── Category Strip ─────────────────────────────────── */
.biig-cat-strip {
  background: var(--biig-surface);
  border-bottom: 1px solid var(--biig-border);
  overflow-x: auto;
  scrollbar-width: none;
}
.biig-cat-strip::-webkit-scrollbar { display: none; }
.biig-cat-strip-inner {
  display: flex;
  gap: 2px;
  padding: 7px 16px;
  min-width: max-content;
}
.biig-cat-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 99px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--biig-muted);
  text-decoration: none;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.biig-cat-item:hover {
  background: var(--biig-hover-bg);
  color: var(--biig-text);
}
.biig-cat-item.active {
  background: #eff6ff;
  color: var(--biig-primary);
  font-weight: 600;
}
.biig-cat-item svg {
  width: 17px; height: 17px;
  flex-shrink: 0;
}

/* ── Category Cards (home grid) ────────────────────── */
.biig-cat-card > div { cursor: pointer; }
.biig-cat-card:hover > div {
  border-color: var(--biig-primary) !important;
  box-shadow: var(--biig-shadow-sm);
}

/* ── Publication Cards ──────────────────────────────── */
.biig-card {
  background: var(--biig-surface);
  border: 1px solid var(--biig-border);
  border-radius: var(--biig-radius);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.biig-card:hover {
  box-shadow: var(--biig-shadow);
  transform: translateY(-2px);
  color: inherit;
  text-decoration: none;
}
.biig-card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--biig-bg);
}
.biig-card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.biig-card:hover .biig-card-img-wrap img { transform: scale(1.04); }
.biig-card-body { padding: .7rem .8rem .8rem; }
.biig-card-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--biig-text);
  line-height: 1.2;
}
.biig-card-title {
  font-size: .8rem;
  color: var(--biig-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.biig-card-location {
  font-size: .73rem;
  color: var(--biig-muted-light);
  margin-top: 3px;
}

/* Favorite button */
.biig-favorite-btn {
  position: absolute;
  top: 7px; right: 7px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(4px);
  border: none;
  border-radius: 50%;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: var(--biig-shadow-sm);
  transition: transform .15s;
  z-index: 2;
  color: var(--biig-muted);
}
.biig-favorite-btn:hover { transform: scale(1.15); color: #ef4444; }
.biig-favorite-btn.active { color: #ef4444; }

/* ── Dropzone ───────────────────────────────────────── */
.biig-dropzone {
  border: 2px dashed var(--biig-border);
  background: var(--biig-bg);
  border-radius: var(--biig-radius-sm);
  transition: border-color .2s, background .2s;
}
.biig-dropzone:hover, .biig-dropzone.drag-over {
  border-color: var(--biig-primary);
  background: #eff6ff;
}

/* ── Section headings ───────────────────────────────── */
.biig-section-title {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--biig-muted);
  margin-bottom: 1rem;
}

/* ── Badges ─────────────────────────────────────────── */
.biig-badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .72rem; font-weight: 600; }
.biig-badge-active   { background: #dcfce7; color: #15803d; }
.biig-badge-paused   { background: #fef9c3; color: #854d0e; }
.biig-badge-sold     { background: #f3f4f6; color: #6b7280; }
.biig-badge-featured { background: #fef3c7; color: #92400e; }

/* ── Detail page ────────────────────────────────────── */
.biig-gallery-main {
  aspect-ratio: 1;
  width: 100%;
  object-fit: contain;
  border-radius: var(--biig-radius);
  background: var(--biig-bg);
  border: 1px solid var(--biig-border);
}
.biig-gallery-thumb {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--biig-radius-xs);
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .15s;
  width: 100%;
}
.biig-gallery-thumb.active, .biig-gallery-thumb:hover { border-color: var(--biig-primary); }

.biig-price-block {
  background: var(--biig-bg);
  border-radius: var(--biig-radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid var(--biig-border);
}
.biig-price-block .price-main { font-size: 1.9rem; font-weight: 800; color: var(--biig-text); line-height: 1; }
.biig-price-block .price-currency { font-size: .82rem; color: var(--biig-muted); margin-bottom: 4px; }

/* ── Filters ────────────────────────────────────────── */
.biig-filters {
  background: var(--biig-surface);
  border: 1px solid var(--biig-border);
  border-radius: var(--biig-radius);
  padding: 1.1rem;
}
.biig-filter-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--biig-muted);
  margin-bottom: .4rem;
}

/* ── Messaging ──────────────────────────────────────── */
.biig-message-bubble {
  max-width: 68%;
  padding: .45rem .85rem;
  border-radius: 18px;
  font-size: .875rem;
  line-height: 1.45;
}
.biig-message-bubble.sent { background: var(--biig-primary); color: #fff; border-bottom-right-radius: 4px; }
.biig-message-bubble.received { background: var(--biig-hover-bg); color: var(--biig-text); border-bottom-left-radius: 4px; }

/* ── Admin ──────────────────────────────────────────── */
.biig-admin-sidebar {
  background: var(--biig-surface);
  border-right: 1px solid var(--biig-border);
  min-height: calc(100vh - 57px);
  width: 210px;
  flex-shrink: 0;
}
.biig-admin-sidebar .nav-link {
  color: var(--biig-text);
  border-radius: var(--biig-radius-xs);
  padding: .42rem .7rem;
  font-size: .865rem;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.biig-admin-sidebar .nav-link:hover, .biig-admin-sidebar .nav-link.active {
  background: #eff6ff;
  color: var(--biig-primary);
}
.biig-admin-sidebar .nav-link i { width: 18px; }

/* ── Bootstrap overrides ────────────────────────────── */
.card { border-color: var(--biig-border); border-radius: var(--biig-radius); background: var(--biig-surface); }
.btn-primary { background: var(--biig-primary); border-color: var(--biig-primary); font-weight: 500; }
.btn-primary:hover { background: var(--biig-primary-dark); border-color: var(--biig-primary-dark); }
.btn-outline-primary { color: var(--biig-primary); border-color: var(--biig-primary); }
.btn-outline-primary:hover { background: var(--biig-primary); border-color: var(--biig-primary); }
.table th { font-size: .73rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--biig-muted); border-bottom-width: 1px; }
.form-control, .form-select { border-color: var(--biig-border); border-radius: var(--biig-radius-xs); font-size: .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--biig-primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.dropdown-menu { border-color: var(--biig-border); border-radius: var(--biig-radius-sm); box-shadow: var(--biig-shadow); font-size: .875rem; }
.navbar-toggler { border-color: var(--biig-border); }
.navbar-toggler-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(15,23,42,0.7)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); }
.modal-content { border-radius: var(--biig-radius); border-color: var(--biig-border); }

/* ── Footer ─────────────────────────────────────────── */
.biig-footer { background: var(--biig-surface); border-top: 1px solid var(--biig-border); color: var(--biig-muted); font-size: .82rem; padding: 1.25rem 0; margin-top: auto; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 576px) {
  .biig-card-body { padding: .55rem .65rem .65rem; }
  .biig-card-price { font-size: .9rem; }
}
