/* ============================================
   CI-MP — SHARED STYLES
   ============================================ */

:root {
  --steel-blue: #2B6B96;
  --steel-blue-dark: #1A4F73;
  --steel-blue-deep: #0F3451;
  --amber: #E8922F;
  --amber-hot: #F5A623;
  --amber-dark: #C47A1E;
  --slate: #1C2630;
  --slate-mid: #2A3845;
  --charcoal: #0D1317;
  --concrete: #E8E4DE;
  --concrete-light: #F4F1EC;
  --concrete-dark: #D4CFC8;
  --rust: #B85C38;
  --safety-yellow: #FFD23F;
  --white: #FEFEFE;
  --text-primary: #1A1A1A;
  --text-secondary: #5A6068;
  --text-light: #8A9098;
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'Source Sans 3', sans-serif;
  --section-pad: 80px;
  --container-max: 1280px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.15);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.2);
  --radius: 6px;
  --radius-lg: 12px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--concrete-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }

a { text-decoration: none; }

/* TOP BAR */
.top-bar {
  background: var(--charcoal);
  padding: 8px 0;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  border-bottom: 2px solid var(--amber);
}

.top-bar .container { display: flex; justify-content: space-between; align-items: center; }

.top-bar a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.2s;
  margin-left: 20px;
  font-family: var(--font-body);
  font-weight: 500;
}

.top-bar a:hover { color: var(--amber); }
.top-bar .signup-link { color: var(--amber); font-weight: 600; }

/* HEADER */
header {
  background: var(--white);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  padding: 16px 0;
  gap: 32px;
}

.logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }

.logo-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 16px 8px 20px;
  background: var(--steel-blue);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: 2px;
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%, 0 12px);
}

.logo-tagline {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--steel-blue);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-left: 12px;
  line-height: 1.3;
}

.search-bar {
  flex: 1;
  max-width: 520px;
  display: flex;
  background: var(--concrete-light);
  border: 2px solid var(--concrete-dark);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}

.search-bar:focus-within { border-color: var(--steel-blue); }

.search-bar input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
}

.search-bar input::placeholder { color: var(--text-light); }

.search-bar button {
  padding: 12px 20px;
  background: var(--amber);
  border: none;
  color: var(--white);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.search-bar button:hover { background: var(--amber-dark); }

.nav-links { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.nav-links a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--steel-blue-dark);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: all 0.2s;
}

.nav-links a:hover { background: var(--steel-blue); color: var(--white); }
.nav-links a.active { background: var(--steel-blue); color: var(--white); }

.nav-links .btn-sell {
  background: var(--amber);
  color: var(--white);
  padding: 10px 20px;
}

.nav-links .btn-sell:hover { background: var(--amber-dark); }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s;
  border: none;
}

.btn-primary {
  background: var(--amber);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(232,146,47,0.4);
}

.btn-primary:hover {
  background: var(--amber-hot);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(232,146,47,0.5);
}

.btn-outline {
  background: transparent;
  color: var(--steel-blue);
  border: 2px solid var(--steel-blue);
}

.btn-outline:hover {
  background: var(--steel-blue);
  color: var(--white);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 14px;
}

/* SECTION HEADER */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--steel-blue-dark);
  letter-spacing: 0.5px;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--amber);
  margin-top: 8px;
  border-radius: 2px;
}

.section-header a {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--amber);
  text-decoration: none;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-header a:hover { color: var(--amber-dark); }

/* PAGE HEADER */
.page-header {
  background: var(--slate);
  padding: 48px 0;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(15,52,81,0.95) 0%, rgba(43,107,150,0.8) 50%, rgba(232,146,47,0.3) 100%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-header .container { position: relative; z-index: 2; }

.page-header h1 {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 800;
  color: var(--white);
  text-transform: uppercase;
}

.page-header p {
  font-size: 18px;
  color: rgba(255,255,255,0.7);
  margin-top: 8px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.breadcrumb a { color: rgba(255,255,255,0.5); }
.breadcrumb a:hover { color: var(--amber); }
.breadcrumb span { color: rgba(255,255,255,0.3); }
.breadcrumb .current { color: rgba(255,255,255,0.8); }

/* LISTING CARDS */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.listing-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--concrete-dark);
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.listing-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.listing-img {
  height: 220px;
  position: relative;
  overflow: hidden;
  background: var(--slate-mid);
}

.listing-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.listing-card:hover .listing-img img {
  transform: scale(1.05);
}

.listing-img .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.badge-new { background: var(--amber); color: var(--white); }
.badge-verified { background: #2ECC71; color: var(--white); }
.badge-featured { background: var(--steel-blue); color: var(--white); }

.storefront-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--amber-hot);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.listing-body { padding: 20px; }

.listing-category {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--steel-blue);
  margin-bottom: 6px;
}

.listing-body h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.2;
}

.listing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.listing-meta span { display: flex; align-items: center; gap: 4px; }

.listing-price {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--amber-dark);
}

.listing-price small {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
}

.listing-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--concrete-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-light);
}

.listing-footer .location { display: flex; align-items: center; gap: 4px; }

/* FILTER BAR */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 18px;
  background: var(--white);
  border: 1px solid var(--concrete-dark);
  border-radius: 100px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--steel-blue);
  color: var(--white);
  border-color: var(--steel-blue);
}

/* CATEGORY CARDS */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.category-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--concrete-dark);
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: var(--steel-blue);
  transform: scaleY(0);
  transition: transform 0.3s;
}

.category-card:hover {
  border-color: var(--steel-blue);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.category-card:hover::before { transform: scaleY(1); }

.category-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--steel-blue), var(--steel-blue-dark));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 22px;
  margin-bottom: 16px;
}

.category-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--steel-blue-dark);
  margin-bottom: 10px;
}

.category-card .sub-list { list-style: none; margin-bottom: 12px; }

.category-card .sub-list li {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 3px 0;
  border-bottom: 1px solid var(--concrete-light);
}

.category-card .sub-list li:last-child { border: none; }

.category-count {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* FOOTER */
footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.5);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p { font-size: 14px; line-height: 1.7; max-width: 320px; }

footer h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--white);
  margin-bottom: 20px;
}

footer ul { list-style: none; }
footer ul li { margin-bottom: 10px; }

footer ul a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

footer ul a:hover { color: var(--amber); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.footer-bottom .social a {
  color: rgba(255,255,255,0.4);
  margin-left: 16px;
  font-size: 18px;
  transition: color 0.2s;
}

.footer-bottom .social a:hover { color: var(--amber); }

/* CTA BANNER */
.cta-banner {
  padding: 60px 0;
  background: linear-gradient(135deg, var(--steel-blue-deep), var(--steel-blue));
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  bottom: -30%; left: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(232,146,47,0.15), transparent);
  border-radius: 50%;
}

.cta-banner h2 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
  color: var(--white);
  text-transform: uppercase;
  margin-bottom: 12px;
  position: relative;
}

.cta-banner p { font-size: 18px; color: rgba(255,255,255,0.7); margin-bottom: 28px; position: relative; }
.cta-banner .btn { position: relative; }

/* ANIMATIONS */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate { animation: fadeInUp 0.5s ease both; }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; gap: 12px; }
  .search-bar { order: 3; max-width: 100%; flex: 0 0 100%; }
  .nav-links { gap: 4px; }
  .nav-links a { font-size: 13px; padding: 6px 10px; }
  .listings-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .page-header h1 { font-size: 32px; }
}
