/* BCFreeAds.ca — Main Stylesheet */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --red: #cc0000;
  --red-dark: #a00000;
  --black: #1a1a1a;
  --gray-light: #f5f5f5;
  --gray-mid: #e0e0e0;
  --gray-text: #666;
  --white: #ffffff;
}
body { font-family: 'Open Sans', sans-serif; color: var(--black); background: var(--white); }
a { color: var(--red); }

/* HEADER */
.header { background: var(--white); border-bottom: 3px solid var(--red); padding: 12px 0; }
.header-inner { max-width: 1280px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; }
.logo a { text-decoration: none; }
.logo img { height: 70px; }
.header-right { display: flex; align-items: center; gap: 15px; }
.btn-post { background: var(--red); color: white; padding: 10px 24px; border: none; border-radius: 4px; font-family: 'Oswald', sans-serif; font-size: 16px; font-weight: 700; text-transform: uppercase; cursor: pointer; letter-spacing: 1px; text-decoration: none; display: inline-block; }
.btn-post:hover { background: var(--red-dark); }
.btn-large { padding: 14px 40px; font-size: 18px; }
.header-links a { color: var(--black); text-decoration: none; font-size: 14px; font-weight: 600; }
.header-links a:hover { color: var(--red); }

/* HERO */
.hero { position: relative; overflow: hidden; text-align: center; }
.hero img.hero-bg { width: 100%; display: block; height: 400px; object-fit: cover; }
.hero-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.65); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.hero h1 { font-family: 'Oswald', sans-serif; color: var(--black); font-size: 36px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 8px; }
.hero h1 span { color: var(--red); }
.hero p { color: #444; font-size: 16px; margin-bottom: 30px; }
.search-bar { max-width: 800px; margin: 0 auto; display: flex; gap: 0; width: 100%; }
.search-bar input { flex: 1; padding: 14px 20px; font-size: 16px; border: none; border-radius: 4px 0 0 4px; font-family: 'Open Sans', sans-serif; }
.search-bar select { padding: 14px 16px; font-size: 15px; border: none; background: var(--gray-light); color: var(--black); font-family: 'Open Sans', sans-serif; border-left: 2px solid var(--gray-mid); }
.search-bar button { background: var(--red); color: white; border: none; padding: 14px 30px; font-family: 'Oswald', sans-serif; font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; cursor: pointer; border-radius: 0 4px 4px 0; }
.search-bar button:hover { background: var(--red-dark); }

/* CITY BAR */
.city-bar { background: var(--gray-light); border-bottom: 1px solid var(--gray-mid); padding: 12px 20px; text-align: center; }
.city-bar a { display: inline-block; color: var(--black); text-decoration: none; font-size: 13px; font-weight: 600; padding: 4px 12px; }
.city-bar a:hover { color: var(--red); }
.city-bar a.active { color: var(--red); border-bottom: 2px solid var(--red); }

/* PAGE CONTAINER */
.page-container { max-width: 1280px; margin: 0 auto; padding: 30px 20px; }
.page-title { font-family: 'Oswald', sans-serif; font-size: 28px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 30px; padding-bottom: 10px; border-bottom: 3px solid var(--red); }

/* CATEGORIES */
.categories { max-width: 1280px; margin: 40px auto; padding: 0 20px; }
.categories h2, .listings h2 { font-family: 'Oswald', sans-serif; font-size: 24px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 24px; padding-bottom: 10px; border-bottom: 3px solid var(--red); display: inline-block; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.cat-card { background: var(--gray-light); border-radius: 6px; padding: 20px 16px; text-align: center; cursor: pointer; transition: all 0.2s; border: 2px solid transparent; text-decoration: none; color: var(--black); }
.cat-card:hover { border-color: var(--red); transform: translateY(-2px); }
.cat-icon { font-size: 32px; margin-bottom: 8px; }
.cat-name { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
.cat-count { font-size: 12px; color: var(--gray-text); margin-top: 4px; }

/* LISTINGS GRID */
.listings { max-width: 1280px; margin: 40px auto; padding: 0 20px; }
.listings-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.listing-card { border: 1px solid var(--gray-mid); border-radius: 6px; overflow: hidden; transition: all 0.2s; cursor: pointer; text-decoration: none; color: var(--black); display: block; }
.listing-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.1); transform: translateY(-2px); }
.listing-img { width: 100%; height: 200px; background: var(--gray-light); display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 48px; overflow: hidden; }
.listing-img img { width: 100%; height: 100%; object-fit: cover; }
.listing-info { padding: 14px; }
.listing-price { font-family: 'Oswald', sans-serif; font-size: 22px; color: var(--red); font-weight: 700; }
.listing-title { font-size: 15px; font-weight: 600; margin-top: 4px; color: var(--black); }
.listing-meta { font-size: 12px; color: var(--gray-text); margin-top: 8px; display: flex; justify-content: space-between; }
.listing-badge { background: var(--red); color: white; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 3px; text-transform: uppercase; display: inline-block; margin-bottom: 4px; }
.view-all { text-align: center; margin-top: 30px; }
.view-all a { display: inline-block; background: var(--black); color: white; padding: 12px 40px; font-family: 'Oswald', sans-serif; font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; text-decoration: none; border-radius: 4px; }
.view-all a:hover { background: var(--red); }

/* LISTING DETAIL */
.listing-detail { display: grid; grid-template-columns: 1fr 1fr 320px; gap: 30px; }
.listing-gallery { grid-column: 1 / 2; }
.listing-main { grid-column: 2 / 3; }
.listing-sidebar { grid-column: 3 / 4; }
.gallery-main img { width: 100%; border-radius: 8px; }
.gallery-main.no-image { height: 300px; background: var(--gray-light); display: flex; align-items: center; justify-content: center; font-size: 64px; border-radius: 8px; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery-thumb { width: 80px; height: 60px; object-fit: cover; border-radius: 4px; cursor: pointer; border: 2px solid transparent; }
.gallery-thumb:hover { border-color: var(--red); }
.listing-detail h1 { font-family: 'Oswald', sans-serif; font-size: 26px; margin-bottom: 10px; }
.listing-detail-price { font-family: 'Oswald', sans-serif; font-size: 32px; color: var(--red); font-weight: 700; margin-bottom: 15px; }
.listing-detail-meta { display: flex; gap: 20px; font-size: 14px; color: var(--gray-text); margin-bottom: 20px; flex-wrap: wrap; }
.listing-description { margin-top: 20px; }
.listing-description h3 { font-family: 'Oswald', sans-serif; margin-bottom: 10px; }
.listing-description p { line-height: 1.7; }
.listing-specs { margin-top: 20px; }
.listing-specs h3 { font-family: 'Oswald', sans-serif; margin-bottom: 10px; }
.specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 14px; }
.seller-card { background: var(--gray-light); padding: 20px; border-radius: 8px; margin-bottom: 20px; }
.seller-card h3 { font-family: 'Oswald', sans-serif; margin-bottom: 10px; }
.seller-name { font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.seller-info { font-size: 14px; color: var(--gray-text); margin-bottom: 4px; }
.message-form { background: var(--gray-light); padding: 20px; border-radius: 8px; margin-bottom: 20px; }
.message-form h3 { font-family: 'Oswald', sans-serif; margin-bottom: 10px; }
.message-form input, .message-form textarea { width: 100%; padding: 10px; margin-bottom: 10px; border: 1px solid var(--gray-mid); border-radius: 4px; font-family: 'Open Sans', sans-serif; font-size: 14px; }
.listing-actions { display: flex; gap: 10px; }
.btn-action { flex: 1; text-align: center; padding: 10px; background: var(--gray-light); border-radius: 4px; text-decoration: none; color: var(--black); font-size: 14px; font-weight: 600; }
.btn-action:hover { background: var(--gray-mid); }
.btn-report { color: var(--red); }
.breadcrumb { font-size: 13px; color: var(--gray-text); margin-bottom: 20px; }
.breadcrumb a { color: var(--gray-text); }

/* SEARCH PAGE */
.search-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.search-header h1 { font-family: 'Oswald', sans-serif; font-size: 24px; }
.result-count { color: var(--gray-text); font-size: 14px; }
.search-layout { display: grid; grid-template-columns: 250px 1fr; gap: 30px; }
.search-filters { background: var(--gray-light); padding: 20px; border-radius: 8px; height: fit-content; position: sticky; top: 20px; }
.filter-group { margin-bottom: 15px; }
.filter-group label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; text-transform: uppercase; }
.filter-group select, .filter-group input { width: 100%; padding: 8px 10px; border: 1px solid var(--gray-mid); border-radius: 4px; font-size: 14px; }
.price-range { display: flex; align-items: center; gap: 8px; }
.price-range input { width: 45%; }
.no-results { text-align: center; padding: 60px 20px; }
.no-results h2 { font-family: 'Oswald', sans-serif; margin-bottom: 10px; }
.search-results .listings-grid { grid-template-columns: repeat(3, 1fr); }

/* PAGINATION */
.pagination { display: flex; gap: 5px; justify-content: center; margin-top: 30px; }
.pagination a { padding: 8px 14px; border: 1px solid var(--gray-mid); border-radius: 4px; text-decoration: none; color: var(--black); font-size: 14px; }
.pagination a:hover, .pagination a.active { background: var(--red); color: white; border-color: var(--red); }

/* FORMS */
.form-section { background: var(--gray-light); padding: 25px; border-radius: 8px; margin-bottom: 20px; }
.form-section h3 { font-family: 'Oswald', sans-serif; font-size: 18px; margin-bottom: 15px; text-transform: uppercase; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--gray-mid); border-radius: 4px; font-family: 'Open Sans', sans-serif; font-size: 14px; }
.form-group textarea { resize: vertical; }
.form-group input[type="checkbox"] { width: auto; margin-right: 8px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.form-hint { font-size: 13px; color: var(--gray-text); margin-bottom: 15px; }
.form-actions { text-align: center; margin-top: 20px; }

/* IMAGE UPLOAD */
.image-upload-area { border: 2px dashed var(--gray-mid); border-radius: 8px; padding: 30px; text-align: center; cursor: pointer; transition: all 0.2s; }
.image-upload-area:hover, .image-upload-area.drag-over { border-color: var(--red); background: rgba(204,0,0,0.03); }
.drop-text { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.drop-icon { font-size: 48px; }
.drop-text small { color: var(--gray-text); }
.image-preview { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.preview-thumb { position: relative; width: 100px; height: 80px; }
.preview-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.remove-img { position: absolute; top: -8px; right: -8px; background: var(--red); color: white; border: none; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; font-size: 12px; line-height: 22px; }
.btn-ai { background: #2563eb; color: white; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; font-family: 'Open Sans', sans-serif; font-size: 14px; font-weight: 600; margin-top: 10px; }
.btn-ai:hover { background: #1d4ed8; }

/* AUTH */
.auth-page { display: flex; justify-content: center; padding: 60px 20px; }
.auth-box { background: var(--gray-light); padding: 40px; border-radius: 12px; max-width: 480px; width: 100%; }
.auth-box h1 { font-family: 'Oswald', sans-serif; font-size: 28px; margin-bottom: 10px; }
.auth-box p { margin-bottom: 20px; color: var(--gray-text); font-size: 14px; }
.auth-note { background: #fef3c7; padding: 10px 14px; border-radius: 6px; font-size: 13px; color: #92400e; }
.auth-link { text-align: center; margin-top: 20px; font-size: 14px; }

/* DASHBOARD */
.dashboard-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.stat-card { background: var(--gray-light); padding: 25px; border-radius: 8px; text-align: center; }
.stat-num { font-family: 'Oswald', sans-serif; font-size: 36px; font-weight: 700; color: var(--red); }
.stat-label { font-size: 13px; color: var(--gray-text); text-transform: uppercase; margin-top: 4px; }
.message-card { background: white; padding: 15px; border-radius: 6px; margin-bottom: 10px; border-left: 3px solid var(--red); }
.ads-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ads-table th { text-align: left; padding: 10px; background: white; font-size: 12px; text-transform: uppercase; color: var(--gray-text); border-bottom: 2px solid var(--gray-mid); }
.ads-table td { padding: 10px; border-bottom: 1px solid var(--gray-mid); }
.ads-table a { color: var(--red); text-decoration: none; }
.status-badge { padding: 2px 8px; border-radius: 3px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.status-active { background: #dcfce7; color: #166534; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-sold { background: #dbeafe; color: #1e40af; }
.status-expired { background: #f3f4f6; color: #6b7280; }

/* FLASH MESSAGES */
.flash { max-width: 1280px; margin: 0 auto; padding: 12px 20px; font-size: 14px; font-weight: 600; }
.flash-success { background: #dcfce7; color: #166534; }
.flash-error { background: #fee2e2; color: #991b1b; }
.flash ul { margin-left: 20px; }

/* VALUE PROPS */
.value-props { background: var(--black); padding: 50px 20px; margin-top: 50px; }
.value-inner { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
.value-item .v-icon { font-size: 36px; margin-bottom: 12px; }
.value-item h3 { font-family: 'Oswald', sans-serif; color: var(--white); font-size: 18px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.value-item p { color: #999; font-size: 13px; line-height: 1.5; }

/* FOOTER */
.footer { background: var(--black); border-top: 3px solid var(--red); padding: 30px 20px; text-align: center; }
.footer p { color: #666; font-size: 13px; }
.footer a { color: var(--red); text-decoration: none; }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .listings-grid { grid-template-columns: repeat(3, 1fr); }
  .listing-detail { grid-template-columns: 1fr 1fr; }
  .listing-sidebar { grid-column: 1 / -1; }
  .search-results .listings-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .header-inner { flex-direction: column; gap: 10px; }
  .search-bar { flex-direction: column; }
  .search-bar input, .search-bar select, .search-bar button { border-radius: 0; }
  .search-bar input { border-radius: 4px 4px 0 0; }
  .search-bar button { border-radius: 0 0 4px 4px; }
  .value-inner { grid-template-columns: repeat(2, 1fr); }
  .listings-grid { grid-template-columns: repeat(2, 1fr); }
  .listing-detail { grid-template-columns: 1fr; }
  .listing-gallery, .listing-main, .listing-sidebar { grid-column: 1; }
  .hero h1 { font-size: 26px; }
  .hero img.hero-bg { height: 250px; }
  .search-layout { grid-template-columns: 1fr; }
  .dashboard-stats { grid-template-columns: 1fr; }
  .search-results .listings-grid { grid-template-columns: 1fr; }
}
