/* AYIO Marketplace - Mobile-first CSS */
:root {
    --navy: #0f1f3d;
    --navy-light: #1a2f55;
    --gold: #f0a500;
    --gold-dark: #d4900a;
    --white: #ffffff;
    --gray-50: #f8f9fa;
    --gray-100: #f0f1f3;
    --gray-200: #e2e4e8;
    --gray-300: #c8cbd0;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --red: #dc3545;
    --green: #28a745;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 24px rgba(0,0,0,0.12);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--gray-900); line-height: 1.6; background: var(--gray-50); }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold); }
img { max-width: 100%; height: auto; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.py-4 { padding: 2rem 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.text-center { text-align: center; }

/* Header */
.site-header { background: var(--navy); color: var(--white); padding: 0; position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; font-size: 1.5rem; font-weight: 800; }
.logo-ayio { color: var(--gold); }
.logo-mkt { color: var(--white); margin-left: 4px; font-weight: 400; }
.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.main-nav a { color: var(--gray-200); font-size: 0.95rem; transition: color 0.2s; }
.main-nav a:hover { color: var(--gold); }
.mobile-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; }
.nav-dropdown { position: relative; }
.nav-dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 250px; padding: 0.5rem 0; z-index: 50; }
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a { display: block; padding: 0.5rem 1rem; color: var(--gray-700); font-size: 0.9rem; }
.nav-dropdown-menu a:hover { background: var(--gray-100); color: var(--navy); }

/* Buttons */
.btn { display: inline-block; padding: 0.6rem 1.5rem; border-radius: var(--radius); font-weight: 600; font-size: 0.95rem; border: none; cursor: pointer; transition: all 0.2s; text-align: center; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-dark); color: var(--navy); }
.btn-outline { border: 2px solid var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-sm { padding: 0.3rem 0.8rem; font-size: 0.85rem; }
.btn-lg { padding: 0.8rem 2rem; font-size: 1.1rem; }
.btn-block { display: block; width: 100%; }

/* Flash Messages */
.flash-container { margin-top: 1rem; }
.flash { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 0.5rem; font-size: 0.95rem; transition: opacity 0.5s; }
.flash-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.flash-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.flash-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeaa7; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); color: var(--white); padding: 4rem 0; text-align: center; }
.hero h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.hero p { font-size: 1.2rem; opacity: 0.9; margin-bottom: 2rem; }
.hero-search { display: flex; gap: 0.5rem; max-width: 700px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.search-input, .search-select { padding: 0.75rem 1rem; border: none; border-radius: var(--radius); font-size: 1rem; }
.search-input { flex: 1; min-width: 200px; }
.search-select { min-width: 150px; }

/* Category Grid */
.categories-section, .latest-section { padding: 3rem 0; }
.categories-section h2, .latest-section h2, .related-section h2 { font-size: 1.8rem; margin-bottom: 1.5rem; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.category-card { background: var(--white); border-radius: var(--radius); padding: 1.5rem; text-align: center; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; border: 2px solid transparent; }
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--gold); color: var(--navy); }
.cat-icon { font-size: 2.5rem; display: block; margin-bottom: 0.5rem; }
.category-card h3 { font-size: 1rem; margin-bottom: 0.25rem; color: var(--navy); }
.cat-count { font-size: 0.85rem; color: var(--gray-500); }
.category-select .category-radio { cursor: pointer; }
.category-select input[type="radio"] { display: none; }
.category-select input[type="radio"]:checked + .cat-icon { background: var(--gold); border-radius: 50%; }
.category-select label:has(input:checked) { border-color: var(--gold); background: #fffbf0; }

/* Listing Grid */
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.listing-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; color: var(--gray-900); }
.listing-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.listing-thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--gray-100); }
.listing-thumb img { width: 100%; height: 100%; object-fit: cover; }
.no-image { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--gray-500); font-size: 0.9rem; background: var(--gray-100); }
.no-image.large { min-height: 300px; font-size: 1.2rem; }
.badge-featured { position: absolute; top: 8px; left: 8px; background: var(--gold); color: var(--navy); padding: 2px 10px; border-radius: 4px; font-size: 0.8rem; font-weight: 700; }
.listing-info { padding: 1rem; }
.listing-cat { font-size: 0.8rem; color: var(--gold-dark); font-weight: 600; text-transform: uppercase; }
.listing-info h3 { font-size: 1rem; margin: 0.25rem 0; line-height: 1.3; }
.listing-meta { font-size: 0.85rem; color: var(--gray-500); display: flex; gap: 0.75rem; margin: 0.25rem 0; }
.listing-price { font-size: 1.25rem; font-weight: 700; color: var(--navy); margin-top: 0.5rem; }

/* Browse Page */
.browse-page { padding-top: 2rem; padding-bottom: 2rem; }
.browse-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.result-count { color: var(--gray-500); }
.browse-layout { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; }
.filters { background: var(--white); padding: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); height: fit-content; position: sticky; top: 80px; }
.filters h3 { margin-bottom: 1rem; }
.filter-group { margin-bottom: 1rem; }
.filter-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.25rem; color: var(--gray-700); }
.filter-group input, .filter-group select { width: 100%; padding: 0.5rem; border: 1px solid var(--gray-200); border-radius: var(--radius); font-size: 0.9rem; }
.price-range { display: flex; gap: 0.5rem; align-items: center; }
.price-range input { width: 45%; }
.empty-state { text-align: center; padding: 3rem; color: var(--gray-500); }

/* Pagination */
.pagination { display: flex; gap: 0.5rem; justify-content: center; margin-top: 2rem; }
.page-link { display: inline-block; padding: 0.5rem 1rem; border: 1px solid var(--gray-200); border-radius: var(--radius); }
.page-link.active { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* Listing Detail */
.listing-detail { padding: 2rem 0; }
.breadcrumb { font-size: 0.85rem; color: var(--gray-500); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--gray-500); }
.listing-layout { display: grid; grid-template-columns: 1fr 350px; gap: 2rem; }
.gallery-main { border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem; }
.gallery-main img { width: 100%; max-height: 500px; object-fit: contain; background: var(--gray-100); }
.gallery-thumbs { display: flex; gap: 0.5rem; overflow-x: auto; }
.gallery-thumbs img { width: 80px; height: 60px; object-fit: cover; border-radius: 4px; cursor: pointer; opacity: 0.6; transition: opacity 0.2s; border: 2px solid transparent; }
.gallery-thumbs img.active, .gallery-thumbs img:hover { opacity: 1; border-color: var(--gold); }
.listing-detail h1 { font-size: 1.8rem; margin: 1rem 0 0.5rem; }
.listing-price-large { font-size: 2rem; font-weight: 800; color: var(--navy); margin-bottom: 1rem; }
.price-note { font-size: 1rem; font-weight: 400; color: var(--gray-500); margin-left: 0.5rem; }
.badge-sold-large { display: inline-block; background: var(--red); color: var(--white); padding: 0.5rem 1.5rem; border-radius: var(--radius); font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; }
.specs-table { margin: 1.5rem 0; }
.specs-table h2 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.specs-table table { width: 100%; border-collapse: collapse; }
.specs-table th, .specs-table td { padding: 0.6rem 1rem; border-bottom: 1px solid var(--gray-200); text-align: left; font-size: 0.95rem; }
.specs-table th { width: 160px; color: var(--gray-500); font-weight: 500; }
.description, .work-details { margin: 1.5rem 0; }
.description h2, .work-details h2 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.desc-text { line-height: 1.7; color: var(--gray-700); }
.disclaimer { background: #fff8e1; border: 1px solid #ffe082; padding: 1rem; border-radius: var(--radius); margin: 1.5rem 0; font-size: 0.9rem; color: #795548; }

/* Sidebar */
.listing-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.seller-box, .enquiry-box { background: var(--white); padding: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.seller-box h3, .enquiry-box h3 { margin-bottom: 0.75rem; font-size: 1.1rem; }
.seller-name { font-size: 1.1rem; font-weight: 600; }
.seller-type { font-size: 0.9rem; color: var(--gray-500); }
.view-count { font-size: 0.85rem; color: var(--gray-500); margin-top: 0.5rem; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.3rem; color: var(--gray-700); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 0.6rem 0.8rem; border: 1px solid var(--gray-200); border-radius: var(--radius); font-size: 0.95rem; font-family: inherit; }
.form-group textarea { resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(240,165,0,0.15); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.checkbox-group label { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; cursor: pointer; }
.checkbox-group input[type="checkbox"] { width: auto; }

/* Auth Box */
.auth-box { max-width: 500px; margin: 0 auto; background: var(--white); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.auth-box h1 { margin-bottom: 1.5rem; }
.auth-link { text-align: center; margin-top: 1rem; font-size: 0.9rem; }

/* Dashboard */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--white); padding: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--navy); }
.stat-label { font-size: 0.9rem; color: var(--gray-500); }
.dash-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.dash-link-card { background: var(--white); padding: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); transition: box-shadow 0.2s; }
.dash-link-card:hover { box-shadow: var(--shadow-lg); }
.dash-link-card h3 { color: var(--navy); margin-bottom: 0.25rem; }
.dash-link-card p { font-size: 0.9rem; color: var(--gray-500); }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }

/* My Listings */
.my-listing-row { display: flex; gap: 1rem; align-items: center; background: var(--white); padding: 1rem; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 0.75rem; }
.my-listing-thumb { width: 100px; height: 75px; border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.my-listing-thumb img { width: 100%; height: 100%; object-fit: cover; }
.my-listing-info { flex: 1; }
.my-listing-info h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.my-listing-info span { font-size: 0.85rem; color: var(--gray-500); margin-right: 1rem; }
.my-listing-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: 600; }
.badge-active { background: #d4edda; color: #155724; }
.badge-pending { background: #fff3cd; color: #856404; }
.badge-sold { background: var(--gray-200); color: var(--gray-700); }
.badge-rejected { background: #f8d7da; color: #721c24; }

/* Enquiries */
.enquiry-card { background: var(--white); padding: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1rem; }
.enquiry-card.unread { border-left: 4px solid var(--gold); }
.enquiry-header { font-size: 0.9rem; margin-bottom: 0.5rem; }
.enquiry-date { float: right; color: var(--gray-500); }
.enquiry-listing { font-size: 0.85rem; color: var(--gray-500); margin-bottom: 0.5rem; }
.enquiry-msg { background: var(--gray-50); padding: 0.75rem; border-radius: var(--radius); margin-bottom: 0.75rem; }
.enquiry-reply { background: #e8f5e9; padding: 0.75rem; border-radius: var(--radius); margin-bottom: 0.75rem; }
.reply-form textarea { width: 100%; margin-bottom: 0.5rem; padding: 0.5rem; border: 1px solid var(--gray-200); border-radius: var(--radius); }

/* Steps */
.steps-indicator { display: flex; gap: 0.5rem; margin-bottom: 2rem; }
.step-dot { flex: 1; padding: 0.75rem; text-align: center; background: var(--gray-100); border-radius: var(--radius); font-size: 0.85rem; color: var(--gray-500); }
.step-dot.active { background: var(--navy); color: var(--white); }

/* Settings */
.settings-section { background: var(--white); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.5rem; max-width: 600px; }
.danger-zone { border: 2px solid var(--red); }
.danger-zone h2 { color: var(--red); }

/* Legal Pages */
.legal-page h1 { margin-bottom: 1rem; }
.legal-page h2 { margin-top: 1.5rem; margin-bottom: 0.5rem; font-size: 1.2rem; }
.legal-page ul { margin-left: 1.5rem; margin-bottom: 1rem; }
.legal-page p { margin-bottom: 0.75rem; }

/* Footer */
.site-footer { background: var(--navy); color: var(--gray-300); padding: 3rem 0 2rem; margin-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }
.site-footer h4 { color: var(--gold); margin-bottom: 0.75rem; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.3rem; }
.site-footer a { color: var(--gray-300); }
.site-footer a:hover { color: var(--gold); }
.footer-legal { font-size: 0.85rem; line-height: 1.5; }

/* Related */
.related-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--gray-200); }

/* Save form */
.save-form { margin-bottom: 0; }

/* Responsive */
@media (max-width: 768px) {
    .mobile-toggle { display: block; }
    .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--navy); flex-direction: column; padding: 1rem; gap: 0.75rem; }
    .main-nav.open { display: flex; }
    .nav-dropdown-menu { position: static; box-shadow: none; background: var(--navy-light); }
    .hero h1 { font-size: 1.8rem; }
    .hero-search { flex-direction: column; }
    .browse-layout { grid-template-columns: 1fr; }
    .filters { position: static; }
    .listing-layout { grid-template-columns: 1fr; }
    .listing-sidebar { order: -1; }
    .my-listing-row { flex-direction: column; align-items: flex-start; }
    .my-listing-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .category-grid { grid-template-columns: 1fr; }
    .listing-grid { grid-template-columns: 1fr; }
}
/* Messaging System */
.msg-list { display: flex; flex-direction: column; gap: 0.5rem; }
.msg-card { display: flex; align-items: center; gap: 1rem; background: var(--white); padding: 1rem; border-radius: var(--radius); box-shadow: var(--shadow); transition: box-shadow 0.2s; color: var(--gray-900); position: relative; }
.msg-card:hover { box-shadow: var(--shadow-lg); }
.msg-card.msg-unread { border-left: 4px solid var(--gold); background: #fffdf5; }
.msg-card-thumb { width: 60px; height: 45px; border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.msg-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.msg-card-body { flex: 1; min-width: 0; }
.msg-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.msg-card-time { font-size: 0.8rem; color: var(--gray-500); white-space: nowrap; }
.msg-card-listing { font-size: 0.85rem; color: var(--gold-dark); }
.msg-card-preview { font-size: 0.85rem; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-badge { background: var(--gold); color: var(--navy); font-size: 0.75rem; font-weight: 700; padding: 2px 8px; border-radius: 12px; flex-shrink: 0; }
.msg-back { margin-bottom: 1rem; }
.msg-back a { color: var(--gray-500); font-size: 0.9rem; }
.msg-listing-card { display: flex; align-items: center; gap: 1rem; background: var(--white); padding: 1rem; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.5rem; flex-wrap: wrap; }
.msg-listing-link { display: flex; align-items: center; gap: 1rem; flex: 1; color: var(--gray-900); min-width: 0; }
.msg-listing-thumb { width: 80px; height: 60px; border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.msg-listing-thumb img { width: 100%; height: 100%; object-fit: cover; }
.msg-listing-info h3 { font-size: 1rem; margin: 0 0 0.25rem; }
.msg-actions { display: flex; gap: 0.5rem; }
.msg-thread { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; max-width: 700px; }
.msg-bubble { max-width: 80%; padding: 0.75rem 1rem; border-radius: 12px; }
.msg-mine { align-self: flex-end; background: #0a1628; color: #fff; border-bottom-right-radius: 4px; }
.msg-theirs { align-self: flex-start; background: var(--gray-100); color: var(--gray-900); border-bottom-left-radius: 4px; }
.msg-sender { font-size: 0.75rem; font-weight: 600; margin-bottom: 0.25rem; opacity: 0.7; }
.msg-body { line-height: 1.5; font-size: 0.95rem; }
.msg-time { font-size: 0.7rem; margin-top: 0.25rem; opacity: 0.6; }
.msg-mine .msg-time { text-align: right; }
.msg-reply-box { max-width: 700px; }
.msg-reply-box textarea { width: 100%; padding: 0.75rem; border: 1px solid var(--gray-200); border-radius: var(--radius); font-family: inherit; font-size: 0.95rem; resize: vertical; margin-bottom: 0.5rem; }
.msg-reply-box textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(240,165,0,0.15); }
.msg-privacy-note { font-size: 0.8rem; color: var(--gray-500); margin: 0 0 0.5rem; }
.btn-danger { color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.msg-seller-box { margin-top: 0.5rem; }
.msg-seller-box .msg-note { font-size: 0.8rem; color: var(--gray-500); margin-top: 0.5rem; }
@media (max-width: 768px) {
    .msg-bubble { max-width: 90%; }
    .msg-thread { max-width: 100%; }
    .msg-reply-box { max-width: 100%; }
    .msg-listing-card { flex-direction: column; align-items: flex-start; }
}

/* AYIO Top Bar */
.ayio-topbar { background: #080e1a; padding: 0; font-size: 0.8rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 32px; }
.topbar-brand { color: var(--gold); font-weight: 800; font-size: 0.9rem; }
.topbar-links { display: flex; gap: 1.25rem; }
.topbar-links a { color: var(--gray-300); font-size: 0.8rem; }
.topbar-links a:hover { color: var(--gold); }
.topbar-links .topbar-active { color: var(--gold); font-weight: 600; }

/* Role picker on register */
.role-picker { margin-bottom: 1.5rem; }
.role-options { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.role-option { cursor: pointer; }
.role-option input[type="radio"] { display: none; }
.role-card { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 1.25rem 1rem; border: 2px solid var(--gray-200); border-radius: var(--radius); text-align: center; transition: all 0.2s; }
.role-option input:checked + .role-card { border-color: var(--gold); background: #fffdf5; box-shadow: 0 0 0 3px rgba(240,165,0,0.15); }
.role-card:hover { border-color: var(--gold-dark); }
.role-icon { font-size: 2rem; line-height: 1; }
.role-card strong { font-size: 1.1rem; color: var(--navy); }
.role-desc { font-size: 0.8rem; color: var(--gray-500); }

/* Login prompt box on listing page */
.login-prompt-box { border: 2px solid var(--gold); background: #fffdf5; }

/* Cross-promo box */
.cross-promo-box { background: #e8f0fe; border: 1px solid #b3cde0; padding: 1rem; border-radius: var(--radius); margin: 1.5rem 0; font-size: 0.95rem; }
.cross-promo-box a { color: var(--navy); font-weight: 600; text-decoration: underline; }

/* Card actions on browse/index listing cards */
.listing-card-wrap { display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; }
.listing-card-wrap:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.listing-card-wrap .listing-card { color: var(--gray-900); }
.listing-card-wrap .listing-card:hover { transform: none; box-shadow: none; }
.card-actions { display: flex; gap: 0.5rem; padding: 0 1rem 1rem; }
.card-msg-btn { font-size: 0.82rem !important; }

/* Ecosystem section on homepage */
.ecosystem-section { padding: 3rem 0; background: var(--gray-100); }
.ecosystem-section h2 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.eco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.eco-card { display: block; background: var(--white); padding: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); border: 2px solid transparent; transition: all 0.2s; color: var(--gray-900); }
.eco-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--gray-900); }
.eco-card strong { display: block; font-size: 1.1rem; color: var(--navy); margin-bottom: 0.25rem; }
.eco-card span { font-size: 0.9rem; color: var(--gray-500); }
.eco-card-active { border-color: var(--gold); background: #fffdf5; }
.eco-card-soon { opacity: 0.6; cursor: default; }
.eco-card-soon:hover { border-color: transparent; transform: none; box-shadow: var(--shadow); }

/* Pricing page */
.launch-banner { display: flex; align-items: center; gap: 1.25rem; background: linear-gradient(135deg, #fffbe6 0%, #fff8e1 100%); border: 2px solid var(--gold); border-radius: var(--radius); padding: 1.5rem 2rem; margin-bottom: 2.5rem; }
.launch-icon { font-size: 2.5rem; flex-shrink: 0; }
.launch-banner strong { font-size: 1.3rem; color: var(--navy); display: block; margin-bottom: 0.25rem; }
.launch-banner p { color: var(--gray-700); font-size: 0.95rem; margin: 0; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5rem; margin-bottom: 3rem; }
.pricing-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; display: flex; flex-direction: column; border: 2px solid transparent; position: relative; }
.pricing-card-popular { border-color: var(--gold); }
.pricing-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--gold); color: var(--navy); padding: 4px 16px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.pricing-header { margin-bottom: 1rem; }
.pricing-header h3 { font-size: 1.4rem; color: var(--navy); margin-bottom: 0.25rem; }
.pricing-for { font-size: 0.9rem; color: var(--gray-500); }
.pricing-amount { margin-bottom: 1.5rem; }
.pricing-dollar { font-size: 2.5rem; font-weight: 800; color: var(--navy); }
.pricing-free-now { color: var(--green); }
.pricing-period { font-size: 0.9rem; color: var(--gray-500); margin-left: 0.25rem; }
.pricing-features { list-style: none; margin-bottom: 1.5rem; flex: 1; }
.pricing-features li { padding: 0.4rem 0; padding-left: 1.5rem; position: relative; font-size: 0.95rem; color: var(--gray-700); }
.pricing-features li::before { content: "\2713"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.pricing-note { font-size: 0.8rem; color: var(--gray-500); text-align: center; margin-top: 0.75rem; }
.pricing-faq { max-width: 700px; margin: 0 auto; }
.pricing-faq h2 { font-size: 1.5rem; margin-bottom: 1.5rem; }
.faq-item { margin-bottom: 1.5rem; }
.faq-item h4 { font-size: 1.05rem; color: var(--navy); margin-bottom: 0.5rem; }
.faq-item p { color: var(--gray-700); line-height: 1.6; }

@media (max-width: 768px) {
    .role-options { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; }
    .launch-banner { flex-direction: column; text-align: center; }
    .ayio-topbar { display: none; }
}

/* Condition badges on browse cards */
.badge-condition {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: capitalize;
    margin-top: 4px;
}
.badge-condition-new { background: #d4edda; color: #155724; }
.badge-condition-excellent { background: #cce5ff; color: #004085; }
.badge-condition-good { background: #e2e3e5; color: #383d41; }
.badge-condition-fair { background: #fff3cd; color: #856404; }
.badge-condition-poor { background: #f8d7da; color: #721c24; }

/* Features pill badges on listing detail */
.features-section { margin-top: 1.5rem; }
.features-section h2 { margin-bottom: 0.75rem; }
.features-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill-badge {
    display: inline-block;
    background: var(--gray-100, #f1f3f5);
    color: var(--gray-700, #495057);
    border: 1px solid var(--gray-300, #dee2e6);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 500;
}


/* =====================================================================
   PRICING PAGE IMPROVEMENTS
   ===================================================================== */

/* Force 4-column grid on desktop, 2 on tablet, 1 on mobile */
.pricing-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1.25rem !important;
    margin-bottom: 2.5rem;
    align-items: stretch;
}

.pricing-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    border: 2px solid #e5e7eb;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}
.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.pricing-card-popular {
    border-color: #f0a500 !important;
    box-shadow: 0 4px 20px rgba(240,165,0,0.15);
    transform: scale(1.03);
    z-index: 1;
}
.pricing-card-popular:hover {
    transform: scale(1.03) translateY(-4px);
}

.pricing-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f0a500, #d4940a);
    color: #0f1f3d;
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(240,165,0,0.3);
    letter-spacing: 0.3px;
}

.pricing-header { margin-bottom: 0.75rem; }
.pricing-header h3 { font-size: 1.3rem; color: #0f1f3d; margin-bottom: 0.15rem; font-weight: 800; }
.pricing-for { font-size: 0.85rem; color: #6b7280; }

.pricing-amount { margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid #f1f5f9; }
.pricing-dollar { font-size: 2.2rem; font-weight: 800; color: #0f1f3d; line-height: 1; }
.pricing-free-now { color: #16a34a !important; }
.pricing-period { font-size: 0.82rem; color: #9ca3af; display: block; margin-top: 4px; }

.pricing-features { list-style: none; margin: 0 0 1.5rem; padding: 0; flex: 1; }
.pricing-features li {
    padding: 6px 0 6px 26px;
    position: relative;
    font-size: 0.88rem;
    color: #374151;
    line-height: 1.5;
}
.pricing-features li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #16a34a;
    font-weight: 700;
    font-size: 0.85rem;
}

.pricing-note {
    text-align: center;
    font-size: 0.78rem;
    color: #9ca3af;
    margin-top: 10px;
}

/* Launch banner */
.launch-banner {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 2px solid #fbbf24;
    border-radius: 14px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 2px 12px rgba(251,191,36,0.15);
}
.launch-banner .launch-icon { font-size: 2.5rem; flex-shrink: 0; }
.launch-banner strong { font-size: 1.1rem; color: #92400e; display: block; margin-bottom: 4px; }
.launch-banner p { margin: 0; font-size: 0.9rem; color: #78350f; line-height: 1.5; }

/* FAQ section */
.faq-section { max-width: 720px; margin: 0 auto; }
.faq-section h2 { font-size: 1.5rem; color: #0f1f3d; margin-bottom: 1.5rem; text-align: center; }
.faq-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
    transition: box-shadow 0.15s;
}
.faq-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.faq-item h4 { color: #0f1f3d; font-size: 0.95rem; margin-bottom: 0.5rem; font-weight: 700; }
.faq-item p { color: #4b5563; font-size: 0.9rem; line-height: 1.6; margin: 0; }

@media (max-width: 1024px) {
    .pricing-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .pricing-card-popular { transform: scale(1); }
}
@media (max-width: 640px) {
    .pricing-grid { grid-template-columns: 1fr !important; gap: 1rem !important; }
    .pricing-card { padding: 1.5rem 1.25rem; }
    .launch-banner { flex-direction: column; text-align: center; padding: 1.25rem; }
}

/* =====================================================================
   REGISTER PAGE IMPROVEMENTS
   ===================================================================== */

.auth-section {
    padding: 2.5rem 0;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 2.5rem;
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
}

.auth-card h1 {
    font-size: 1.75rem;
    color: #0f1f3d;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

/* Role picker */
.role-picker {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}
.role-card {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}
.role-card:hover { border-color: #f0a500; background: #fffdf5; }
.role-card.active, .role-card.selected {
    border-color: #f0a500;
    background: linear-gradient(135deg, #fffdf5, #fef3c7);
    box-shadow: 0 2px 8px rgba(240,165,0,0.15);
}
.role-card .role-icon { font-size: 2rem; margin-bottom: 0.5rem; display: block; }
.role-card strong { color: #0f1f3d; font-size: 1rem; display: block; margin-bottom: 0.25rem; }
.role-card .role-desc { font-size: 0.8rem; color: #6b7280; line-height: 1.4; }

/* Form fields */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.form-row-3 {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 0.75rem;
}

.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #374151;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #f0a500;
    box-shadow: 0 0 0 3px rgba(240,165,0,0.12);
}

/* Checkboxes */
.consent-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
    font-size: 0.88rem;
    color: #4b5563;
    cursor: pointer;
}
.consent-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #f0a500;
}

/* Auth buttons */
.btn-auth {
    display: block;
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, #f0a500, #d4940a);
    color: #0f1f3d;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    margin-top: 0.5rem;
}
.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(240,165,0,0.3);
}

.auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: #6b7280;
}
.auth-footer a {
    color: #f0a500;
    font-weight: 600;
    text-decoration: none;
}
.auth-footer a:hover { text-decoration: underline; }

/* Login-specific */
.login-card {
    max-width: 420px;
}
.forgot-link {
    text-align: right;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}
.forgot-link a {
    font-size: 0.85rem;
    color: #f0a500;
    text-decoration: none;
}
.forgot-link a:hover { text-decoration: underline; }

@media (max-width: 640px) {
    .auth-card { padding: 1.75rem 1.25rem; margin: 0 12px; }
    .form-row { grid-template-columns: 1fr; }
    .form-row-3 { grid-template-columns: 1fr !important; }
    .role-picker { gap: 0.5rem; }
    .role-card { padding: 1rem; }
}


/* =====================================================================
   BROWSE PAGE MOBILE IMPROVEMENTS
   ===================================================================== */
@media (max-width: 768px) {
    aside.filters {
        position: static !important;
        max-height: 0 !important;
        overflow: hidden !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        border: none !important;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }
    aside.filters.filters-open {
        max-height: 2000px !important;
        padding: 1.5rem !important;
        margin-bottom: 1rem !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
    }
    .mobile-filter-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        padding: 12px;
        background: #0f1f3d;
        color: #fff;
        border: none;
        border-radius: 10px;
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
        margin-bottom: 1rem;
    }
    .mobile-filter-toggle:hover { background: #1e3d6e; }
    
    .listing-grid {
        grid-template-columns: 1fr !important;
    }
    .listing-card-wrap {
        margin-bottom: 0.75rem;
    }
}
@media (min-width: 769px) {
    .mobile-filter-toggle { display: none !important; }
}
