/* ============================================
   MyCountyMarketplace — Design System CSS
   ============================================ */

:root {
    --blue:         #1a3a6b;
    --blue-deep:    #0f2040;
    --blue-light:   #eef3fb;
    --blue-mid:     #5a6a8a;
    --blue-border:  #dde3f0;
    --amber:        #e8a020;
    --amber-dark:   #7a4a00;
    --amber-light:  #fdf3e1;
    --white:        #ffffff;
    --gray-50:      #f9fafb;
    --gray-100:     #f3f4f6;
    --gray-200:     #e5e7eb;
    --gray-300:     #d1d5db;
    --gray-500:     #6b7280;
    --gray-700:     #374151;
    --gray-900:     #111827;
    --radius:       8px;
    --radius-lg:    12px;
    --shadow:       0 1px 3px rgba(0,0,0,0.1);
    --shadow-md:    0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg:    0 10px 25px rgba(0,0,0,0.1);
    --container:    1200px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    color: var(--gray-900);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* Typography */
h1, h2, h3, h4, h5, h6 { font-family: 'Sora', sans-serif; font-weight: 700; line-height: 1.2; color: var(--blue-deep); }
h1 { font-size: 2.5rem; font-weight: 800; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
.text-amber { color: var(--amber); }
.text-blue { color: var(--blue); }
.text-muted { color: var(--blue-mid); }
.text-center { text-align: center; }
.font-sora { font-family: 'Sora', sans-serif; }

/* Container */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    background: var(--blue-deep);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.nav-logo {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0;
}
.nav-logo:hover { text-decoration: none; }
.nav-logo .county { color: var(--amber); }
.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}
.nav-links a {
    color: rgba(255,255,255,0.85);
    font-family: 'Sora', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); text-decoration: none; }
.nav-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: var(--radius);
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}
.nav-btn-outline {
    border: 1.5px solid rgba(255,255,255,0.3);
    color: var(--white);
    background: transparent;
}
.nav-btn-outline:hover { border-color: var(--white); text-decoration: none; }
.nav-btn-amber {
    background: var(--amber);
    color: var(--blue-deep);
}
.nav-btn-amber:hover { background: #d4900a; text-decoration: none; }

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    margin: 5px 0;
    transition: 0.3s;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue) 100%);
    padding: 80px 20px;
    text-align: center;
    color: var(--white);
}
.hero h1 {
    color: var(--white);
    font-size: 2.75rem;
    margin-bottom: 16px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.hero p {
    color: rgba(255,255,255,0.8);
    font-size: 1.15rem;
    margin-bottom: 32px;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}
.hero-stat { text-align: center; }
.hero-stat-number {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 2rem;
    color: var(--amber);
}
.hero-stat-label {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    margin-top: 4px;
}

/* State select in hero */
.hero-search {
    display: flex;
    justify-content: center;
    gap: 12px;
    max-width: 480px;
    margin: 0 auto;
}
.hero-search select {
    flex: 1;
    padding: 14px 18px;
    border-radius: var(--radius);
    border: 2px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: var(--white);
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    appearance: none;
    cursor: pointer;
}
.hero-search select option { color: var(--gray-900); background: var(--white); }
.hero-search button {
    padding: 14px 28px;
    background: var(--amber);
    color: var(--blue-deep);
    border: none;
    border-radius: var(--radius);
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
.hero-search button:hover { background: #d4900a; }

/* ============================================
   SECTIONS
   ============================================ */
.section { padding: 64px 20px; }
.section-alt { background: var(--gray-50); }
.section-title {
    text-align: center;
    margin-bottom: 40px;
}
.section-title h2 { margin-bottom: 8px; }
.section-title p { color: var(--blue-mid); font-size: 1.05rem; }

/* ============================================
   GRID LAYOUTS
   ============================================ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--white);
    border: 1px solid var(--blue-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.2s;
}
.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--blue);
    transform: translateY(-2px);
}
.card a { display: block; }
.card a:hover { text-decoration: none; }
.card-icon {
    width: 48px;
    height: 48px;
    background: var(--blue-light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 1.25rem;
    color: var(--blue);
}
.card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.card .card-meta {
    font-size: 0.85rem;
    color: var(--blue-mid);
    font-family: 'Sora', sans-serif;
    font-weight: 500;
}

/* State card */
.state-card {
    background: var(--white);
    border: 1px solid var(--blue-border);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}
.state-card:hover {
    border-color: var(--blue);
    box-shadow: var(--shadow);
    text-decoration: none;
}
.state-card-name {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    color: var(--blue-deep);
}
.state-card-count {
    font-family: 'Sora', sans-serif;
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--blue-mid);
    background: var(--blue-light);
    padding: 4px 10px;
    border-radius: 20px;
}

/* County card */
.county-card {
    background: var(--white);
    border: 1px solid var(--blue-border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.2s;
}
.county-card:hover {
    border-color: var(--blue);
    box-shadow: var(--shadow);
    text-decoration: none;
}
.county-card h4 {
    font-size: 0.95rem;
    margin-bottom: 8px;
}
.county-card .county-stats {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--blue-mid);
    font-family: 'Sora', sans-serif;
    font-weight: 500;
}

/* Category card on county page */
.cat-card {
    background: var(--white);
    border: 1px solid var(--blue-border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    transition: all 0.2s;
}
.cat-card:hover {
    border-color: var(--amber);
    box-shadow: var(--shadow);
    text-decoration: none;
}
.cat-card-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}
.cat-card-name {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--blue-deep);
}
.cat-card-count {
    font-size: 0.75rem;
    color: var(--blue-mid);
    margin-top: 2px;
}

/* Listing card */
.listing-card {
    background: var(--white);
    border: 1px solid var(--blue-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s;
}
.listing-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.listing-card-img {
    height: 180px;
    background: var(--blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-mid);
    font-size: 0.9rem;
}
.listing-card-body { padding: 16px; }
.listing-card-body h4 { font-size: 0.95rem; margin-bottom: 4px; }
.listing-card-price {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    color: var(--blue);
    font-size: 1.1rem;
}
.listing-card-cat {
    display: inline-block;
    background: var(--blue-light);
    color: var(--blue);
    font-family: 'Sora', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    margin-top: 8px;
}

/* Business card */
.biz-card {
    background: var(--white);
    border: 1px solid var(--blue-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all 0.2s;
}
.biz-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.biz-card h4 { margin-bottom: 4px; }
.biz-card .biz-cat {
    font-size: 0.8rem;
    color: var(--blue-mid);
}
.biz-card .biz-meta {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 8px;
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-family: 'Sora', sans-serif;
    font-weight: 500;
    color: var(--blue-mid);
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--blue); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--gray-300); }

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--blue-light);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--blue-border);
}
.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}
.empty-state p {
    color: var(--blue-mid);
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}
.empty-state-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-deep); }
.btn-amber { background: var(--amber); color: var(--blue-deep); }
.btn-amber:hover { background: #d4900a; }
.btn-outline { border: 2px solid var(--blue); color: var(--blue); background: transparent; }
.btn-outline:hover { background: var(--blue); color: var(--white); }

/* ============================================
   COUNTY HERO
   ============================================ */
.county-hero {
    background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue) 100%);
    padding: 48px 20px;
    color: var(--white);
}
.county-hero .breadcrumb { color: rgba(255,255,255,0.6); margin-bottom: 16px; }
.county-hero .breadcrumb a { color: rgba(255,255,255,0.8); }
.county-hero .breadcrumb-sep { color: rgba(255,255,255,0.4); }
.county-hero h1 { color: var(--white); font-size: 2.25rem; margin-bottom: 8px; }
.county-hero p { color: rgba(255,255,255,0.75); font-size: 1.05rem; }
.county-hero-stats {
    display: flex;
    gap: 24px;
    margin-top: 20px;
}
.county-hero-stats span {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--amber);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--blue-deep);
    color: rgba(255,255,255,0.7);
    padding: 48px 20px 24px;
}
.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}
.footer-brand .nav-logo { margin-bottom: 12px; }
.footer-brand p { font-size: 0.9rem; line-height: 1.6; max-width: 280px; }
.footer h4 {
    color: var(--white);
    font-size: 0.9rem;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.footer ul li { margin-bottom: 10px; }
.footer ul a { color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.footer ul a:hover { color: var(--white); text-decoration: none; }
.footer-bottom {
    max-width: var(--container);
    margin: 40px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.85rem;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 32px;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius);
    font-family: 'Sora', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    border: 1px solid var(--blue-border);
    color: var(--blue);
    transition: all 0.2s;
}
.pagination a:hover { background: var(--blue-light); text-decoration: none; }
.pagination .active {
    background: var(--blue);
    color: var(--white);
    border-color: var(--blue);
}
.pagination .disabled { color: var(--gray-300); pointer-events: none; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
    .grid-5, .grid-6 { grid-template-columns: repeat(3, 1fr); }
    .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.35rem; }

    .nav-links { display: none; }
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--blue-deep);
        padding: 20px;
        gap: 16px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    .nav-toggle { display: block; }

    .hero { padding: 48px 20px; }
    .hero h1 { font-size: 1.75rem; }
    .hero-stats { gap: 24px; }
    .hero-stat-number { font-size: 1.5rem; }
    .hero-search { flex-direction: column; }

    .section { padding: 40px 20px; }
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-5, .grid-6 { grid-template-columns: repeat(2, 1fr); }

    .county-hero { padding: 32px 20px; }
    .county-hero h1 { font-size: 1.5rem; }

    .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 480px) {
    .grid-3 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: 1fr; }
    .grid-5, .grid-6 { grid-template-columns: repeat(2, 1fr); }
    .hero-stats { flex-direction: column; gap: 16px; }
}

/* ============================================
   AUTH — Page Shell
   ============================================ */
.auth-hero {
    background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue) 100%);
    padding: 56px 20px 48px;
    text-align: center;
}
.auth-hero h1 {
    color: var(--white);
    font-size: 2.25rem;
    margin-bottom: 10px;
}
.auth-hero p {
    color: rgba(255,255,255,0.75);
    font-size: 1.05rem;
    max-width: 480px;
    margin: 0 auto;
}

.auth-section {
    padding: 48px 20px 72px;
    background: var(--gray-50);
    min-height: calc(100vh - 64px - 200px);
}

/* ============================================
   AUTH — Card (single form wrapper)
   ============================================ */
.auth-card {
    background: var(--white);
    border: 1px solid var(--blue-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 480px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
}
.auth-card-header {
    text-align: center;
    margin-bottom: 32px;
}
.auth-card-header h2 {
    font-size: 1.5rem;
    margin-bottom: 6px;
}
.auth-card-header p {
    color: var(--blue-mid);
    font-size: 0.9rem;
}
.auth-card-icon {
    width: 56px;
    height: 56px;
    background: var(--blue-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--blue);
}
.auth-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}
.auth-divider::before {
    content: '';
    display: block;
    height: 1px;
    background: var(--blue-border);
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
}
.auth-divider span {
    background: var(--white);
    padding: 0 12px;
    position: relative;
    font-size: 0.85rem;
    color: var(--blue-mid);
}
.auth-footer-text {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--blue-mid);
}
.auth-footer-text a {
    color: var(--blue);
    font-weight: 600;
}

/* ============================================
   AUTH — Type selector cards (register page)
   ============================================ */
.type-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
}
.type-card {
    background: var(--white);
    border: 2px solid var(--blue-border);
    border-radius: var(--radius-lg);
    padding: 36px 28px 32px;
    text-align: center;
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.type-card:hover {
    border-color: var(--blue);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    text-decoration: none;
}
.type-card-icon {
    width: 72px;
    height: 72px;
    background: var(--blue-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--blue);
    transition: background 0.25s;
}
.type-card:hover .type-card-icon {
    background: var(--blue);
    color: var(--white);
}
.type-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--blue-deep);
}
.type-card p {
    font-size: 0.9rem;
    color: var(--blue-mid);
    line-height: 1.55;
    margin-bottom: 24px;
    flex: 1;
}
.type-card .btn {
    width: 100%;
    justify-content: center;
}

/* ============================================
   AUTH — Form elements
   ============================================ */
.form-group {
    margin-bottom: 20px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-label {
    display: block;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--blue-deep);
    margin-bottom: 6px;
}
.form-label .optional {
    font-weight: 400;
    color: var(--blue-mid);
    font-size: 0.8rem;
    margin-left: 4px;
}
.form-input {
    display: block;
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--blue-border);
    border-radius: var(--radius);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    color: var(--gray-900);
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
}
.form-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(26, 58, 107, 0.12);
}
.form-input.is-invalid {
    border-color: #dc2626;
    background: #fff5f5;
}
.form-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}
.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a6a8a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}
textarea.form-input {
    resize: vertical;
    min-height: 100px;
}
.form-error {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #dc2626;
    font-family: 'DM Sans', sans-serif;
}
.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--blue-mid);
}

/* Checkbox group */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    accent-color: var(--blue);
    cursor: pointer;
}
.form-check-label {
    font-size: 0.9rem;
    color: var(--gray-700);
    line-height: 1.5;
}
.form-check-label a {
    color: var(--blue);
    font-weight: 600;
}

/* Full-width submit */
.form-submit {
    margin-top: 8px;
}
.btn-block {
    display: flex;
    width: 100%;
    justify-content: center;
}
.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

/* Password toggle wrapper */
.input-with-action {
    position: relative;
}
.input-action-link {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: var(--blue);
    font-weight: 600;
    font-family: 'Sora', sans-serif;
    cursor: pointer;
}

/* ============================================
   AUTH — Nav dropdown (used in app layout)
   ============================================ */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    background: none;
    border: none;
    color: rgba(255,255,255,0.85);
    font-family: 'Sora', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
}
.nav-dropdown-toggle:hover { color: var(--white); }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    background: var(--white);
    border: 1px solid var(--blue-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 200;
    overflow: hidden;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a,
.nav-dropdown-link {
    display: block;
    padding: 10px 16px;
    font-size: 0.875rem;
    color: var(--gray-700);
    font-family: 'DM Sans', sans-serif;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}
.nav-dropdown-menu a:hover,
.nav-dropdown-link:hover {
    background: var(--blue-light);
    text-decoration: none;
    color: var(--blue);
}

/* ============================================
   AUTH — Flash messages
   ============================================ */
.flash-success {
    background: #d1fae5;
    border-bottom: 1px solid #6ee7b7;
    padding: 12px 0;
    font-size: 0.9rem;
    color: #065f46;
}
.flash-error {
    background: #fee2e2;
    border-bottom: 1px solid #fca5a5;
    padding: 12px 0;
    font-size: 0.9rem;
    color: #991b1b;
}

/* ============================================
   AUTH — Responsive
   ============================================ */
@media (max-width: 900px) {
    .type-cards-grid { grid-template-columns: 1fr; max-width: 480px; }
}
@media (max-width: 600px) {
    .auth-card { padding: 28px 20px; }
    .auth-hero h1 { font-size: 1.6rem; }
    .form-row { grid-template-columns: 1fr; }
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
}
.badge-blue { background: var(--blue-light); color: var(--blue); }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-amber { background: var(--amber-light); color: var(--amber-dark); }
.badge-gray { background: var(--gray-100); color: var(--gray-500); }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-outline { background: transparent; border: 1px solid var(--blue-border); color: var(--blue-mid); }
.badge-active { background: #d1fae5; color: #065f46; }
.badge-pending { background: var(--amber-light); color: var(--amber-dark); }
.badge-inactive { background: var(--gray-100); color: var(--gray-500); }
.badge-draft { background: var(--blue-light); color: var(--blue); }
.badge-free { background: #d1fae5; color: #065f46; }
.badge-paid { background: var(--amber-light); color: var(--amber-dark); }

/* ============================================
   LISTING DETAIL PAGE
   ============================================ */
.listing-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    align-items: start;
}
.listing-detail-main { min-width: 0; }
.listing-detail-title {
    font-size: 1.75rem;
    margin-bottom: 12px;
}
.listing-detail-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.listing-detail-desc {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--gray-700);
    margin-bottom: 20px;
}
.listing-detail-meta {
    font-size: 0.85rem;
    color: var(--blue-mid);
    padding-top: 16px;
    border-top: 1px solid var(--blue-border);
}
.listing-photo-area {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
    background: var(--blue-light);
}
.listing-photo-area img {
    width: 100%;
    height: auto;
}
.listing-photo-placeholder {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-mid);
    font-size: 1rem;
}

/* Sidebar cards */
.listing-detail-sidebar { position: sticky; top: 80px; }
.listing-price-card {
    background: var(--white);
    border: 2px solid var(--blue);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    margin-bottom: 16px;
}
.listing-price-amount {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 2rem;
    color: var(--blue);
}
.listing-price-type {
    font-size: 0.85rem;
    color: var(--blue-mid);
    margin-top: 4px;
}
.listing-contact-card,
.listing-safety-card {
    background: var(--white);
    border: 1px solid var(--blue-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
}
.listing-contact-card h4,
.listing-safety-card h4 {
    font-size: 0.95rem;
    margin-bottom: 12px;
}
.listing-contact-card p {
    font-size: 0.9rem;
    margin-bottom: 8px;
}
.listing-safety-card {
    background: #fffbeb;
    border-color: #fde68a;
}
.listing-safety-card p {
    font-size: 0.85rem;
    color: var(--amber-dark);
    line-height: 1.5;
}

/* ============================================
   DATA TABLES (dashboard)
   ============================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--blue-mid);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--blue-border);
    background: var(--gray-50);
}
.data-table td {
    padding: 14px 16px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--blue-border);
    vertical-align: middle;
}
.data-table tr:hover td { background: var(--blue-light); }
.data-table-actions {
    display: flex;
    gap: 8px;
}
.data-table-actions a {
    font-size: 0.8rem;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
}
.data-table-actions .delete-link {
    color: #dc2626;
}

/* ============================================
   DASHBOARD SECTIONS
   ============================================ */
.dash-header {
    background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue) 100%);
    padding: 36px 20px;
    color: var(--white);
}
.dash-header h1 { color: var(--white); font-size: 1.75rem; }
.dash-header p { color: rgba(255,255,255,0.7); }

.dash-section { padding: 32px 20px; }
.dash-section-alt { background: var(--gray-50); }

.dash-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.stat-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--white);
    border: 1px solid var(--blue-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
}
.stat-card-number {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 2rem;
    color: var(--blue);
}
.stat-card-label {
    font-size: 0.85rem;
    color: var(--blue-mid);
    margin-top: 4px;
}

/* Business profile card in dashboard */
.biz-profile-card {
    background: var(--white);
    border: 1px solid var(--blue-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}
.biz-profile-info h3 { margin-bottom: 4px; }
.biz-profile-badges { display: flex; gap: 8px; margin-top: 8px; }

/* Affiliate status banner */
.status-banner {
    padding: 16px 20px;
    border-radius: var(--radius);
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 24px;
}
.status-banner-pending {
    background: var(--amber-light);
    color: var(--amber-dark);
    border: 1px solid #f6d88a;
}
.status-banner-active {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

/* Referral code display */
.referral-code-card {
    background: var(--blue-light);
    border: 2px solid var(--blue-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
}
.referral-code {
    font-family: 'Sora', monospace;
    font-weight: 800;
    font-size: 2rem;
    color: var(--blue);
    letter-spacing: 3px;
    margin: 8px 0;
}
.referral-code-card .btn { margin-top: 12px; }

/* Commission table */
.commission-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}
.commission-table th, .commission-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--blue-border);
}
.commission-table th {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    background: var(--gray-50);
}

/* ============================================
   BUSINESS PAGE
   ============================================ */
/* Admin bar on business page */
.biz-admin-bar {
    background: #0f2040;
    color: rgba(255,255,255,0.8);
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
}
.biz-admin-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    gap: 12px;
    flex-wrap: wrap;
}
.biz-admin-bar-label { white-space: nowrap; }
.biz-admin-bar-label strong { color: #fff; }
.biz-admin-bar-links { display: flex; gap: 16px; }
.biz-admin-bar-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}
.biz-admin-bar-links a:hover { background: rgba(255,255,255,0.12); color: #fff; }

.biz-hero {
    background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue) 100%);
    padding: 48px 20px;
    color: var(--white);
}
.biz-hero h1 { color: var(--white); font-size: 2rem; margin-bottom: 8px; }
.biz-hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.biz-hero-rating {
    color: var(--amber);
    font-family: 'Sora', sans-serif;
    font-weight: 600;
}
.biz-hero-location {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.biz-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    align-items: start;
}
.biz-detail-main { min-width: 0; }
.biz-detail-sidebar { position: sticky; top: 80px; }

.biz-sidebar-card {
    background: var(--white);
    border: 1px solid var(--blue-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
}
.biz-sidebar-card h4 {
    font-size: 0.95rem;
    margin-bottom: 12px;
}
.biz-sidebar-card p {
    font-size: 0.9rem;
    margin-bottom: 8px;
}
.biz-sidebar-card .hours-list {
    font-size: 0.85rem;
}
.biz-sidebar-card .hours-list li {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid var(--gray-100);
}

/* Reviews */
.review-card {
    background: var(--white);
    border: 1px solid var(--blue-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}
.review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.review-card-author {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
}
.review-card-date {
    font-size: 0.8rem;
    color: var(--blue-mid);
}
.review-card-stars { color: var(--amber); font-size: 1rem; }
.review-card-body { font-size: 0.9rem; line-height: 1.6; color: var(--gray-700); }
.review-response {
    margin-top: 12px;
    padding: 12px 16px;
    background: var(--blue-light);
    border-radius: var(--radius);
    font-size: 0.85rem;
}
.review-response strong {
    display: block;
    margin-bottom: 4px;
    font-family: 'Sora', sans-serif;
    font-size: 0.8rem;
    color: var(--blue);
}

/* Claim page */
.claim-tiers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 32px;
}
.claim-tier-card {
    background: var(--white);
    border: 2px solid var(--blue-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    position: relative;
    transition: all 0.25s;
}
.claim-tier-card:hover {
    border-color: var(--blue);
    box-shadow: var(--shadow-lg);
}
.claim-tier-card.popular {
    border-color: var(--amber);
    box-shadow: var(--shadow-lg);
}
.claim-tier-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--amber);
    color: var(--blue-deep);
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 4px 16px;
    border-radius: 20px;
}
.claim-tier-price {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 2rem;
    color: var(--blue);
    margin: 16px 0 4px;
}
.claim-tier-period {
    font-size: 0.85rem;
    color: var(--blue-mid);
    margin-bottom: 20px;
}
.claim-tier-features {
    text-align: left;
    margin-bottom: 24px;
}
.claim-tier-features li {
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--gray-700);
    padding-left: 24px;
    position: relative;
}
.claim-tier-features li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: #059669;
    font-weight: bold;
}

/* Stripe card form in claim */
.stripe-form {
    margin-top: 16px;
    padding: 20px;
    border: 1px solid var(--blue-border);
    border-radius: var(--radius);
    background: var(--gray-50);
    display: none;
}
.stripe-form.active { display: block; }
#card-element {
    padding: 12px;
    border: 1.5px solid var(--blue-border);
    border-radius: var(--radius);
    background: var(--white);
}
#card-errors {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 8px;
}

/* ============================================
   RESPONSIVE — Phase 2 additions
   ============================================ */
@media (max-width: 900px) {
    .listing-detail-grid { grid-template-columns: 1fr; }
    .listing-detail-sidebar { position: static; }
    .biz-detail-grid { grid-template-columns: 1fr; }
    .biz-detail-sidebar { position: static; }
    .claim-tiers { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
    .stat-cards { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .data-table { font-size: 0.8rem; }
    .data-table th, .data-table td { padding: 10px 8px; }
    .biz-hero h1 { font-size: 1.5rem; }
}

/* ============================================
   PHASE 1C — Photo upload zone, gallery, reviews, search
   ============================================ */

/* ----- Photo upload zone ----- */
.photo-upload-zone {
    border: 2px dashed var(--blue-border);
    background: var(--blue-light);
    border-radius: var(--radius-lg);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    margin-bottom: 16px;
}
.photo-upload-zone:hover,
.photo-upload-zone.dragging {
    border-color: var(--amber);
    background: #fff8eb;
}
.photo-upload-zone .photo-upload-icon { font-size: 2rem; margin-bottom: 6px; }
.photo-upload-zone .photo-upload-label {
    display: inline-block;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    color: var(--blue);
    cursor: pointer;
    margin-bottom: 4px;
}
.photo-upload-zone p { font-size: 0.85rem; color: var(--blue-mid); margin: 4px 0; }
.photo-upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.photo-upload-zone .photo-counter {
    margin-top: 8px;
    font-size: 0.78rem;
    color: var(--blue-mid);
    font-family: 'Sora', sans-serif;
    font-weight: 600;
}

/* ----- Photo preview grid (used by upload UI and existing photo lists) ----- */
.photo-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.photo-preview-card {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--blue-border);
    background: var(--gray-100);
}
.photo-preview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.photo-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.65);
    color: #fff;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.photo-preview-remove:hover { background: #dc2626; }

/* ----- Listing photo gallery ----- */
.listing-photo-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
}
.listing-photo-grid.grid-2 { grid-template-columns: 1fr 1fr; }
.listing-photo-grid.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.listing-photo-grid.grid-4 { grid-template-columns: 1fr 1fr; }
.listing-photo-grid-item {
    aspect-ratio: 4 / 3;
    background: var(--blue-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--blue-border);
}
.listing-photo-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.listing-photo-thumbs {
    display: flex;
    gap: 8px;
    margin: 12px 0 24px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.listing-photo-thumb {
    flex: 0 0 80px;
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    background: none;
    padding: 0;
    cursor: pointer;
}
.listing-photo-thumb.active { border-color: var(--amber); }
.listing-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ----- Star rating display ----- */
.star-rating-input {
    display: flex;
    gap: 4px;
}
.star-rating-input .star-input {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.75rem;
    color: var(--gray-300);
    padding: 0;
    line-height: 1;
}
.star-rating-input .star-input.star-input-filled { color: var(--amber); }

/* ----- Rating breakdown bars ----- */
.rating-breakdown {
    flex: 1 1 auto;
    min-width: 0;
}
.rating-breakdown-row {
    display: grid;
    grid-template-columns: 60px 1fr 40px;
    gap: 10px;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.82rem;
    color: var(--gray-700);
    font-family: 'Sora', sans-serif;
    font-weight: 500;
}
.rating-breakdown-bar {
    height: 8px;
    background: var(--gray-100);
    border-radius: 4px;
    overflow: hidden;
}
.rating-breakdown-bar-fill {
    height: 100%;
    background: var(--amber);
    border-radius: 4px;
}
.rating-breakdown-pct { text-align: right; color: var(--blue-mid); }

/* Update biz-rating-summary to be flex */
.biz-rating-summary {
    display: flex;
    gap: 28px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--blue-border);
}
.biz-rating-summary-left { text-align: center; flex: 0 0 auto; }

/* ----- Review form & cards ----- */
.biz-review-form-wrap {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--blue-border);
}
.biz-review-respond {
    margin-top: 10px;
}
.biz-review-respond summary {
    cursor: pointer;
    list-style: none;
    display: inline-block;
}
.biz-review-respond summary::-webkit-details-marker { display: none; }
.biz-review-delete {
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 0.78rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}
.biz-review-delete:hover { color: #dc2626; }

/* ----- Business hours edit table ----- */
.section-h2 {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--blue-deep);
    margin-top: 28px;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--blue-border);
}
.hours-table {
    border: 1px solid var(--blue-border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
}
.hours-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--blue-border);
    flex-wrap: wrap;
    font-size: 0.875rem;
}
.hours-row:last-child { border-bottom: none; }
.hours-day {
    flex: 0 0 90px;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    color: var(--blue-deep);
}
.hours-check {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    color: var(--gray-700);
    cursor: pointer;
}
.hours-time { flex: 0 0 110px; font-size: 0.82rem; padding: 6px 8px; }

/* ----- Business logo display ----- */
.biz-hero-logo {
    flex: 0 0 92px;
    width: 92px;
    height: 92px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #fff;
    border: 2px solid rgba(255,255,255,0.3);
    margin-right: 4px;
}
.biz-hero-logo img { width: 100%; height: 100%; object-fit: cover; }

.business-logo-current {
    margin-bottom: 12px;
}
.business-logo-current img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--blue-border);
}

/* ----- Map placeholder ----- */
.biz-map-placeholder {
    background: var(--blue-light);
    border: 1px dashed var(--blue-border);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    color: var(--blue-mid);
}
.biz-map-placeholder p { margin: 8px 0 0; font-size: 0.875rem; }

/* ----- Search page ----- */
.search-hero {
    background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue) 100%);
    padding: 32px 20px;
    color: var(--white);
}
.search-hero h1 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 6px;
}
.search-result-count {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    margin: 0;
}
.search-section { padding: 32px 20px 64px; background: var(--gray-50); }
.search-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    max-width: var(--container);
    margin: 0 auto;
    align-items: start;
}
.search-filters {
    background: var(--white);
    border: 1px solid var(--blue-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: sticky;
    top: 84px;
}
.search-filter-group { margin-bottom: 16px; }
.search-filter-group .form-label {
    display: block;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--blue-mid);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.search-clear-link {
    display: block;
    margin-top: 12px;
    text-align: center;
    font-size: 0.82rem;
    color: var(--blue-mid);
    text-decoration: underline;
}
.search-results { min-width: 0; }
.search-section-title {
    font-size: 1.1rem;
    color: var(--blue-deep);
    margin: 24px 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--blue-border);
}
.search-section-title:first-child { margin-top: 0; }
.search-empty {
    background: var(--white);
    padding: 48px 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--blue-border);
    text-align: center;
}
.search-empty h2 { color: var(--blue-deep); font-size: 1.2rem; margin-bottom: 8px; }
.search-empty p { color: var(--blue-mid); margin: 0; }

/* Business result card */
.search-biz-card {
    display: flex;
    gap: 12px;
    background: var(--white);
    border: 1px solid var(--blue-border);
    border-radius: var(--radius-lg);
    padding: 14px;
    color: inherit;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}
.search-biz-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(26,58,107,0.08); }
.search-biz-logo {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-biz-logo img { width: 100%; height: 100%; object-fit: cover; }
.search-biz-logo-placeholder {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--blue);
}
.search-biz-body { flex: 1 1 auto; min-width: 0; }
.search-biz-body h4 {
    font-size: 0.95rem;
    color: var(--blue-deep);
    margin: 0 0 4px;
}
.search-biz-cat {
    font-size: 0.78rem;
    color: var(--blue-mid);
    font-family: 'Sora', sans-serif;
    margin-bottom: 4px;
}
.search-biz-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--blue-mid);
    margin-bottom: 4px;
}
.search-biz-rating .star { font-size: 0.82rem; }
.search-biz-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
}
.search-biz-claimed {
    display: inline-block;
    margin-left: 4px;
    color: #15803d;
    font-weight: 600;
}

/* ----- Nav search bar ----- */
.nav-search {
    flex: 0 1 320px;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    padding: 4px 4px 4px 14px;
    margin: 0 20px;
}
.nav-search input {
    flex: 1 1 auto;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.875rem;
    outline: none;
    min-width: 0;
}
.nav-search input::placeholder { color: rgba(255,255,255,0.6); }
.nav-search button {
    flex: 0 0 auto;
    background: var(--amber);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.nav-search button:hover { background: var(--amber-dark, #d4900a); }

/* ----- Dashboard thumbnails ----- */
.dash-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: var(--gray-100);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dash-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dash-thumb-placeholder { font-size: 1.25rem; color: var(--blue-mid); }
.table-link-pay { color: var(--amber); font-weight: 600; }

/* ----- Mobile responsive ----- */
@media (max-width: 900px) {
    .search-layout { grid-template-columns: 1fr; }
    .search-filters { position: static; }
    .nav-search { display: none; }
}
@media (max-width: 768px) {
    .listing-photo-grid.grid-2,
    .listing-photo-grid.grid-3,
    .listing-photo-grid.grid-4 { grid-template-columns: 1fr; }
    .biz-rating-summary { flex-direction: column; align-items: stretch; }
    .biz-hero-logo { width: 72px; height: 72px; flex: 0 0 72px; }
    .hours-row { gap: 8px; }
    .hours-day { flex: 0 0 100%; }
}

/* ============================================
   PHASE 1D — Affiliate manager + extended business sections
   ============================================ */

/* ----- Tagline on business hero ----- */
.biz-tagline {
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    margin: 6px 0 10px;
}

/* ----- Service rows (form) ----- */
.service-row {
    display: grid;
    grid-template-columns: 1fr 1fr 110px 32px;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}
.service-remove {
    background: none;
    border: 1px solid var(--blue-border);
    color: var(--gray-500);
    width: 32px;
    height: 36px;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
}
.service-remove:hover {
    background: #fee;
    border-color: #fcc;
    color: #c33;
}

/* ----- Services list (show page) ----- */
.biz-services-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.biz-service-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--blue-border);
}
.biz-service-item:last-child { border-bottom: none; }
.biz-service-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}
.biz-service-name {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    color: var(--blue-deep);
}
.biz-service-price {
    color: var(--amber);
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    white-space: nowrap;
}
.biz-service-desc {
    margin: 4px 0 0;
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* ----- CTA card on sidebar ----- */
.biz-cta-card {
    background: var(--white);
    border: 1px solid var(--blue-border);
    border-radius: var(--radius-lg);
    padding: 16px;
}

/* ----- Social card on sidebar ----- */
.biz-social-card {
    background: var(--white);
    border: 1px solid var(--blue-border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
}
.biz-social-title {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--blue-mid);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}
.biz-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.biz-social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-light);
    color: var(--blue);
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 0.78rem;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.biz-social-link:hover {
    background: var(--blue);
    color: #fff;
}
.biz-social-facebook { background: #e7eefb; color: #1877f2; }
.biz-social-instagram { background: #fde9ec; color: #c13584; }
.biz-social-tiktok { background: #f0f0f0; color: #000; }
.biz-social-youtube { background: #fde7e7; color: #ff0000; }
.biz-social-linkedin { background: #e8f1f8; color: #0a66c2; }
.biz-social-x { background: #f0f0f0; color: #000; }

@media (max-width: 600px) {
    .service-row {
        grid-template-columns: 1fr 32px;
    }
    .service-row input:nth-child(2),
    .service-row input:nth-child(3) {
        grid-column: 1 / -1;
    }
}

/* ============================================
   PAGE BUILDER UI
   ============================================ */
.pb-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #e8a020;
    color: #1a3a6b;
    padding: 8px 20px;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 200;
    gap: 12px;
    flex-wrap: wrap;
}
.pb-topbar-left { display: flex; align-items: center; gap: 10px; }
.pb-topbar-center { flex: 1; text-align: center; }
.pb-topbar-right { display: flex; gap: 8px; }
.pb-logo { background: #1a3a6b; color: #e8a020; padding: 4px 10px; border-radius: 4px; font-weight: 800; font-size: 13px; }
.pb-label { opacity: 0.8; }

.pb-btn {
    padding: 6px 14px;
    border-radius: 5px;
    border: 1px solid rgba(26,58,107,0.2);
    background: rgba(255,255,255,0.5);
    color: #1a3a6b;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.pb-btn:hover { background: rgba(255,255,255,0.8); }
.pb-btn-outline { background: transparent; border-color: rgba(26,58,107,0.3); }
.pb-btn-ok { background: #10b981; color: #fff; border-color: #10b981; }
.pb-btn-ok:hover { background: #059669; color: #fff; }
.pb-btn-warn { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.pb-btn-primary { background: #1a3a6b; color: #fff; border-color: #1a3a6b; width: 100%; justify-content: center; padding: 8px 16px; }
.pb-btn-primary:hover { background: #0f2040; color: #fff; }
.pb-btn-danger:hover { background: #b91c1c; color: #fff; }
.pb-btn-sm { padding: 4px 10px; font-size: 11px; }

.pb-layout {
    display: flex;
    height: calc(100vh - 44px);
}
.pb-left {
    width: 260px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    overflow-y: auto;
    flex-shrink: 0;
}
.pb-center {
    flex: 1;
    background: #f4f6f9;
    overflow-y: auto;
    padding: 24px;
}
.pb-right {
    width: 320px;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    overflow-y: auto;
    flex-shrink: 0;
    padding: 16px;
}
.pb-center-hint, .pb-right-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    font-size: 0.9rem;
    text-align: center;
}
.pb-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
}
.pb-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    color: #64748b;
    border-bottom: 2px solid transparent;
}
.pb-tab.active { color: #1a3a6b; border-bottom-color: #e8a020; }
.pb-tab-content { padding: 12px 14px; }
.pb-section-title {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 0.72rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}
.pb-section-library {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.pb-lib-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fafbff;
    cursor: pointer;
    font-size: 1.25rem;
    transition: border-color 0.15s, background 0.15s;
}
.pb-lib-btn span { font-size: 0.7rem; font-family: 'Sora', sans-serif; font-weight: 600; color: #64748b; }
.pb-lib-btn:hover { border-color: #e8a020; background: #fff8eb; }

.pb-section-list { display: flex; flex-direction: column; gap: 4px; }
.pb-sec-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    background: #fff;
    font-size: 0.82rem;
    cursor: grab;
}
.pb-sec-item:hover { background: #f8fafc; }
.pb-sec-item.pb-sec-hidden { opacity: 0.4; }
.pb-sec-item.pb-sec-selected { border-color: #e8a020; background: #fff8eb; }
.pb-sec-handle { cursor: grab; color: #8899bb; font-size: 18px; padding: 0 4px; user-select: none; flex-shrink: 0; line-height: 1; }
.pb-sec-handle:active { cursor: grabbing; }
.pb-sec-type { flex: 1; font-weight: 500; }
.pb-sec-eye, .pb-sec-edit, .pb-sec-del {
    background: none; border: none; cursor: pointer; padding: 2px; font-size: 14px; color: #94a3b8;
}
.pb-sec-del:hover { color: #dc2626; }
.pb-sec-edit:hover { color: #1a3a6b; }

/* Center panel section cards */
.pb-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.pb-card:hover { border-color: #94a3b8; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.pb-card.pb-card-selected { border-color: #e8a020; box-shadow: 0 0 0 3px rgba(232,160,32,0.15); }
.pb-card.pb-card-hidden { opacity: 0.4; }
.pb-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
}
.pb-card-icon { font-size: 1.1rem; }
.pb-card-type { flex: 1; font-family: 'Sora', sans-serif; font-weight: 600; font-size: 0.85rem; color: #1a3a6b; }
.pb-card-actions { display: flex; gap: 4px; }
.pb-card-actions button {
    background: none; border: none; cursor: pointer; padding: 2px 4px; font-size: 14px; color: #94a3b8;
}
.pb-card-actions button:hover { color: #1a3a6b; }
.pb-card-preview {
    padding: 8px 14px 10px;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.4;
}
.pb-card-vis { margin-left: auto; margin-right: 8px; }
.pb-vis-badge { font-size: 0.68rem; padding: 2px 6px; border-radius: 10px; font-weight: 600; font-family: 'Sora', sans-serif; }
.pb-vis-on { background: #d1fae5; color: #065f46; }
.pb-vis-off { background: #f1f5f9; color: #94a3b8; }
.pb-card-bg-swatch { width: 20px; height: 20px; border-radius: 4px; border: 1px solid #e2e8f0; flex-shrink: 0; background-size: cover; }

/* Status dot */
.pb-status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.dot-green { background: #10b981; }
.dot-gray { background: #94a3b8; }
.pb-section-count { font-size: 0.72rem; color: rgba(26,58,107,0.5); font-weight: 400; }

/* Danger button */
.pb-btn-danger { background: #ef4444; color: #fff; border-color: #ef4444; }
.pb-btn-danger:hover { background: #dc2626; }

/* Copy button */
.pb-copy-btn { background: none; border: 1px solid #d1d5db; border-radius: 4px; padding: 1px 6px; font-size: 0.68rem; cursor: pointer; margin-left: 4px; color: #64748b; }
.pb-copy-btn:hover { background: #f1f5f9; }

/* Color row */
.pb-color-row { display: flex; gap: 8px; align-items: center; }
.pb-hex-input { width: 80px !important; font-family: monospace; font-size: 0.82rem !important; }

/* Theme preview */
.pb-theme-preview { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 12px; margin: 8px 0; }
.pb-preview-btn-primary, .pb-preview-btn-accent { padding: 4px 12px; border-radius: 4px; border: none; font-size: 0.75rem; font-weight: 600; cursor: default; margin-right: 4px; }

/* Char count */
.pb-char-count { float: right; font-size: 0.68rem; color: #94a3b8; font-weight: 400; }

/* Center panel empty state */
.pb-center-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-align: center; color: #94a3b8; padding: 40px; }
.pb-center-empty h3 { color: #64748b; margin: 12px 0 6px; }
.pb-empty-icon { font-size: 3rem; }

/* Accordion */
.pb-accordion { border: 1px solid #e2e8f0; border-radius: 6px; margin-bottom: 8px; overflow: hidden; }
.pb-accordion-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; cursor: pointer; font-family: 'Sora', sans-serif; font-weight: 600; font-size: 0.82rem; color: #1a3a6b; background: #fafbff; user-select: none; }
.pb-accordion-header:hover { background: #f1f5f9; }
.pb-accordion-arrow { transition: transform 0.2s; font-size: 0.9rem; }
.pb-accordion-open .pb-accordion-arrow { transform: rotate(90deg); }
.pb-accordion-body { display: none; padding: 10px 12px 14px; }
.pb-accordion-open .pb-accordion-body { display: block; }

/* Background tabs */
.pb-bg-tabs { display: flex; gap: 0; margin-bottom: 10px; border: 1px solid #e2e8f0; border-radius: 6px; overflow: hidden; }
.pb-bg-tab { flex: 1; padding: 6px; text-align: center; background: #f8fafc; border: none; cursor: pointer; font-size: 0.72rem; font-weight: 600; font-family: 'Sora', sans-serif; color: #64748b; }
.pb-bg-tab.active { background: #1a3a6b; color: #fff; }
.pb-bg-thumb { margin: 8px 0; }
.pb-bg-thumb img { max-width: 100%; max-height: 100px; border-radius: 6px; border: 1px solid #e2e8f0; display: block; }

/* Range slider */
.pb-range { width: 100%; accent-color: #1a3a6b; }

/* Gallery edit */
.pb-gallery-edit { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.pb-gal-thumb { position: relative; width: 70px; height: 70px; border-radius: 6px; overflow: hidden; border: 1px solid #e2e8f0; }
.pb-gal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pb-gal-del { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; background: rgba(0,0,0,0.6); color: #fff; border: none; border-radius: 50%; font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1; }

/* Button group */
.pb-btn-group { display: flex; gap: 0; border: 1px solid #e2e8f0; border-radius: 6px; overflow: hidden; }
.pb-btn-grp { flex: 1; padding: 6px 8px; text-align: center; background: #f8fafc; border: none; cursor: pointer; font-size: 0.72rem; font-weight: 600; color: #64748b; font-family: 'Sora', sans-serif; }
.pb-btn-grp.active { background: #1a3a6b; color: #fff; }

/* Drag states */
.pb-sec-item.pb-dragging { opacity: 0.35; border: 2px dashed #e8a020; background: #fff8eb; }
.pb-sec-item.pb-drag-over { border-top: 3px solid #1a3a6b; margin-top: -1px; }

/* Padding utility classes */
.mcm-pad-none { padding-top: 0 !important; padding-bottom: 0 !important; }
.mcm-pad-sm { padding-top: 24px !important; padding-bottom: 24px !important; }
.mcm-pad-md { padding-top: 48px !important; padding-bottom: 48px !important; }
.mcm-pad-lg { padding-top: 72px !important; padding-bottom: 72px !important; }
.mcm-pad-xl { padding-top: 96px !important; padding-bottom: 96px !important; }

/* Section overlay layer */
.mcm-section { position: relative; }
.mcm-section-content { position: relative; z-index: 1; }

/* Services layouts */
.mcm-services-list { list-style: none; padding: 0; margin: 0; max-width: 700px; margin: 0 auto; }
.mcm-services-list li { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-bottom: 1px solid #e2e8f0; gap: 12px; }
.mcm-services-list li:last-child { border-bottom: none; }
.mcm-service-highlight { border-color: #e8a020 !important; border-width: 2px !important; }
.mcm-service-featured-badge { display: inline-block; background: #e8a020; color: #1a3a6b; font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; font-family: 'Sora', sans-serif; margin-bottom: 8px; }

/* Gallery lightbox improvements */
.mcm-lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 999; align-items: center; justify-content: center; padding: 20px; }
.mcm-lightbox:target { display: flex; }
.mcm-lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 4px; box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.mcm-lightbox-close { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 2rem; text-decoration: none; line-height: 1; }
.mcm-lightbox-close:hover { color: #e8a020; }

/* ============================================
   ERROR PAGES (404, 500)
   ============================================ */
.error-page {
    background: var(--gray-50);
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
}
.error-page-inner {
    max-width: 800px;
    text-align: center;
}
.error-code {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 120px;
    line-height: 1;
    color: var(--blue-deep);
    opacity: 0.12;
    margin-bottom: -20px;
}
.error-heading {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    color: var(--blue-deep);
    margin-bottom: 12px;
}
.error-text {
    font-size: 1rem;
    color: var(--blue-mid);
    max-width: 540px;
    margin: 0 auto 28px;
    line-height: 1.7;
}
.error-subtext {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--blue-deep);
    margin-bottom: 20px;
}
.error-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}
.error-card {
    background: #fff;
    border: 1px solid var(--blue-border);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.error-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(26,58,107,0.08);
}
.error-card-icon {
    width: 56px;
    height: 56px;
    background: var(--blue-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    margin-bottom: 14px;
}
.error-card h3 {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--blue-deep);
    margin: 0 0 8px;
}
.error-card p {
    font-size: 0.85rem;
    color: var(--blue-mid);
    margin: 0 0 14px;
    line-height: 1.5;
    flex: 1;
}
.error-footer {
    font-size: 0.82rem;
    color: var(--gray-500);
}
@media (max-width: 768px) {
    .error-cards { grid-template-columns: 1fr; max-width: 360px; margin: 0 auto 32px; }
    .error-code { font-size: 80px; }
    .error-heading { font-size: 1.5rem; }
}

.pb-form-group { margin-bottom: 12px; }
.pb-form-group label {
    display: block;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.72rem;
    color: #64748b;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.pb-input {
    display: block;
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 0.85rem;
    font-family: 'DM Sans', sans-serif;
    color: #1f2937;
    box-sizing: border-box;
}
.pb-input:focus { outline: none; border-color: #1a3a6b; }
textarea.pb-input { resize: vertical; font-family: monospace; font-size: 0.8rem; }
.pb-input-color { width: 48px; height: 36px; padding: 2px; border: 1px solid #d1d5db; border-radius: 5px; cursor: pointer; }
.pb-check { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; cursor: pointer; color: #334155; }

/* ============================================
   PUBLIC PAGE SECTION STYLES (MCM prefixed)
   ============================================ */
.mcm-page { --mcm-theme: #1a3a6b; --mcm-accent: #e8a020; }
.mcm-section { padding: 48px 0; }
.mcm-container { max-width: var(--container, 1200px); margin: 0 auto; padding: 0 20px; }
.mcm-section-heading {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 1.75rem;
    color: var(--mcm-theme, #1a3a6b);
    text-align: center;
    margin-bottom: 32px;
}
.mcm-muted { color: #94a3b8; text-align: center; }

/* Hero */
.mcm-hero { padding: 80px 20px; text-align: center; min-height: 350px; display: flex; align-items: center; justify-content: center; }
.mcm-hero-inner { max-width: 720px; margin: 0 auto; }
.mcm-hero-logo { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255,255,255,0.3); margin-bottom: 16px; }
.mcm-hero-headline { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 2.5rem; margin: 0 0 12px; line-height: 1.2; }
.mcm-hero-sub { font-size: 1.1rem; opacity: 0.9; margin-bottom: 24px; }
.mcm-hero-btn { display: inline-block; background: var(--mcm-accent, #e8a020); color: #fff; padding: 12px 32px; border-radius: 6px; text-decoration: none; font-family: 'Sora', sans-serif; font-weight: 700; font-size: 0.95rem; border: none; cursor: pointer; }
.mcm-hero-btn:hover { filter: brightness(0.9); }

/* About */
.mcm-about-grid { display: grid; gap: 32px; }
.mcm-about-grid.has-image { grid-template-columns: 1fr 1fr; }
.mcm-about-grid.image-left { direction: rtl; }
.mcm-about-grid.image-left > * { direction: ltr; }
.mcm-about-body { line-height: 1.75; color: #334155; font-size: 1rem; }
.mcm-about-founded { margin-top: 16px; font-style: italic; color: #64748b; }
.mcm-about-image img { width: 100%; border-radius: 8px; }

/* Services */
.mcm-services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.mcm-service-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 24px; text-align: center; }
.mcm-service-card h3 { font-family: 'Sora', sans-serif; font-size: 1.1rem; color: var(--mcm-theme); margin: 0 0 8px; }
.mcm-service-card p { font-size: 0.9rem; color: #64748b; margin: 0 0 12px; }
.mcm-service-price { font-family: 'Sora', sans-serif; font-weight: 700; color: var(--mcm-accent); font-size: 1.1rem; }

/* Gallery */
.mcm-gallery-grid { display: grid; gap: 8px; }
.mcm-gallery-item { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 6px; }
.mcm-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s; }
.mcm-gallery-item:hover img { transform: scale(1.05); }
.mcm-lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 999; align-items: center; justify-content: center; padding: 20px; }
.mcm-lightbox:target { display: flex; }
.mcm-lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 8px; }
.mcm-lightbox-close { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 2rem; text-decoration: none; }

/* Testimonials */
.mcm-testimonials-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.mcm-testimonial-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 24px; }
.mcm-testimonial-stars { color: #e8a020; font-size: 1.1rem; margin-bottom: 12px; }
.mcm-testimonial-card p { font-size: 0.95rem; color: #334155; line-height: 1.6; font-style: italic; }
.mcm-testimonial-name { margin-top: 12px; font-family: 'Sora', sans-serif; font-weight: 600; color: #64748b; font-size: 0.85rem; }

/* CTA */
.mcm-cta-heading { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 2rem; margin: 0 0 8px; }
.mcm-cta-sub { font-size: 1.05rem; opacity: 0.85; margin-bottom: 24px; }

/* Contact */
.mcm-contact-grid { max-width: 600px; margin: 0 auto; }
.mcm-contact-row { padding: 8px 0; font-size: 0.95rem; color: #334155; border-bottom: 1px solid #f1f5f9; }
.mcm-contact-row:last-child { border-bottom: none; }
.mcm-contact-row a { color: var(--mcm-theme); }

/* Hours */
.mcm-hours-table { width: 100%; max-width: 400px; margin: 0 auto; border-collapse: collapse; }
.mcm-hours-table tr { border-bottom: 1px solid #f1f5f9; }
.mcm-hours-day { padding: 8px 12px; font-family: 'Sora', sans-serif; font-weight: 600; color: var(--mcm-theme); }
.mcm-hours-time { padding: 8px 12px; text-align: right; color: #334155; }
.mcm-hours-today { background: #fff8eb; }

/* Social */
.mcm-social-links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.mcm-social-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border: 1px solid #e2e8f0; border-radius: 20px; text-decoration: none; color: var(--mcm-theme); font-family: 'Sora', sans-serif; font-weight: 600; font-size: 0.85rem; transition: background 0.15s; }
.mcm-social-btn:hover { background: var(--mcm-theme); color: #fff; }

/* Team */
.mcm-team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px; }
.mcm-team-card { text-align: center; }
.mcm-team-photo { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; margin: 0 auto 12px; background: #e2e8f0; display: flex; align-items: center; justify-content: center; }
.mcm-team-photo img { width: 100%; height: 100%; object-fit: cover; }
.mcm-team-initials { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 2rem; color: #1a3a6b; }
.mcm-team-card h3 { font-family: 'Sora', sans-serif; font-size: 1rem; color: var(--mcm-theme); margin: 0 0 4px; }
.mcm-team-title { font-size: 0.82rem; color: #64748b; margin-bottom: 8px; }
.mcm-team-card p { font-size: 0.85rem; color: #334155; }

/* Store / Product grid */
.mcm-store-grid { display: grid; gap: 20px; }
.mcm-product-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.mcm-product-img { aspect-ratio: 1; background: #f1f5f9; display: flex; align-items: center; justify-content: center; color: #94a3b8; }
.mcm-product-img img { width: 100%; height: 100%; object-fit: cover; }
.mcm-product-body { padding: 14px; }
.mcm-product-body h3 { font-family: 'Sora', sans-serif; font-size: 0.95rem; color: #1a3a6b; margin: 0 0 6px; }
.mcm-product-price { font-family: 'Sora', sans-serif; font-weight: 700; color: var(--mcm-accent); margin-bottom: 10px; }
.mcm-price-compare { text-decoration: line-through; color: #94a3b8; font-weight: 400; margin-right: 6px; }
.mcm-add-to-cart { width: 100%; font-size: 0.82rem; padding: 8px; }

@media (max-width: 900px) {
    .pb-layout { flex-direction: column; height: auto; }
    .pb-left, .pb-right { width: 100%; border: none; border-bottom: 1px solid #e2e8f0; }
    .mcm-about-grid.has-image { grid-template-columns: 1fr; }
    .mcm-hero-headline { font-size: 1.75rem; }
}
@media (max-width: 600px) {
    .mcm-gallery-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .mcm-store-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ============================================
   ECOMMERCE — Store, Cart, Checkout, Orders
   ============================================ */

/* Store header */
.mcm-store-header {
    background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue) 100%);
    padding: 40px 20px;
    color: #fff;
    text-align: center;
}
.mcm-store-header h1 { color: #fff; font-size: 2rem; margin-bottom: 6px; }
.mcm-store-header p { color: rgba(255,255,255,0.8); margin: 0; }

/* Category filter pills */
.mcm-category-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
    background: #fff;
    border-bottom: 1px solid var(--blue-border);
}
.mcm-category-pill {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid var(--blue-border);
    background: #fff;
    color: var(--blue-deep);
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.mcm-category-pill:hover, .mcm-category-pill.active {
    background: var(--blue-deep);
    color: #fff;
    border-color: var(--blue-deep);
}

/* Product grid */
.mcm-product-grid {
    display: grid;
    gap: 20px;
    padding: 24px 20px;
    max-width: var(--container);
    margin: 0 auto;
}
.mcm-product-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.mcm-product-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.mcm-product-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Product card (shared in grid and builder section) */
.mcm-product-card {
    display: block;
    background: #fff;
    border: 1px solid var(--blue-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
}
.mcm-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(26,58,107,0.08);
}
.mcm-product-card-img {
    aspect-ratio: 1;
    background: var(--gray-50);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--blue-mid);
}
.mcm-product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.mcm-product-card-body { padding: 14px; }
.mcm-product-card-body h3 {
    font-family: 'Sora', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--blue-deep);
    margin: 0 0 6px;
    line-height: 1.3;
}
.mcm-product-cat { font-size: 0.72rem; color: var(--blue-mid); font-family: 'Sora', sans-serif; }
.mcm-product-price { font-family: 'Sora', sans-serif; font-weight: 700; color: var(--blue-deep); margin-top: 6px; }
.mcm-product-sale { color: var(--amber); font-weight: 800; }
.mcm-product-compare { text-decoration: line-through; color: var(--gray-500); font-weight: 400; margin-right: 6px; font-size: 0.85rem; }
.mcm-featured-badge, .mcm-sale-badge {
    position: absolute;
    top: 8px;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 0.68rem;
    padding: 3px 10px;
    border-radius: 4px;
    color: #fff;
}
.mcm-featured-badge { left: 8px; background: var(--blue-deep); }
.mcm-sale-badge { right: 8px; background: #dc2626; }
.mcm-type-badge { display: inline-block; background: var(--blue-light); color: var(--blue); font-size: 0.72rem; font-weight: 600; padding: 2px 8px; border-radius: 4px; margin-top: 6px; }

/* Product detail page */
.mcm-product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; max-width: var(--container); margin: 0 auto; padding: 32px 20px; }
.mcm-product-gallery-main { aspect-ratio: 1; background: var(--gray-50); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--blue-border); }
.mcm-product-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.mcm-product-gallery-thumbs { display: flex; gap: 8px; margin-top: 12px; }
.mcm-product-gallery-thumb { width: 64px; height: 64px; border-radius: 6px; overflow: hidden; border: 2px solid transparent; cursor: pointer; }
.mcm-product-gallery-thumb.active { border-color: var(--amber); }
.mcm-product-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mcm-product-info h1 { font-size: 1.75rem; color: var(--blue-deep); margin-bottom: 12px; }
.mcm-product-info .mcm-product-price { font-size: 1.5rem; margin-bottom: 20px; }

/* Variant options */
.mcm-variant-group { margin-bottom: 16px; }
.mcm-variant-group label { display: block; font-family: 'Sora', sans-serif; font-weight: 600; font-size: 0.82rem; color: var(--blue-deep); margin-bottom: 6px; }
.mcm-variant-options { display: flex; gap: 6px; flex-wrap: wrap; }
.mcm-variant-btn {
    padding: 8px 16px;
    border: 1.5px solid var(--blue-border);
    border-radius: 6px;
    background: #fff;
    color: var(--blue-deep);
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.mcm-variant-btn:hover { border-color: var(--blue); }
.mcm-variant-btn.selected { background: var(--blue-deep); color: #fff; border-color: var(--blue-deep); }
.mcm-variant-btn.out-of-stock { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }

/* Quantity selector */
.mcm-qty-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--blue-border);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
}
.mcm-qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gray-50);
    color: var(--blue-deep);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mcm-qty-btn:hover { background: var(--blue-light); }
.mcm-qty-input {
    width: 48px;
    height: 36px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--blue-border);
    border-right: 1px solid var(--blue-border);
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--blue-deep);
}

/* Cart */
.mcm-cart-section { background: var(--gray-50); padding: 32px 20px 64px; }
.mcm-cart-inner { max-width: 800px; margin: 0 auto; }
.mcm-cart-item { display: grid; grid-template-columns: 64px 1fr auto auto auto; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--blue-border); }
.mcm-cart-img { width: 64px; height: 64px; border-radius: 6px; overflow: hidden; background: var(--gray-100); }
.mcm-cart-img img { width: 100%; height: 100%; object-fit: cover; }
.mcm-cart-name { font-weight: 600; color: var(--blue-deep); }
.mcm-cart-variant { font-size: 0.82rem; color: var(--blue-mid); }
.mcm-cart-remove { background: none; border: none; color: var(--gray-500); cursor: pointer; font-size: 0.82rem; text-decoration: underline; }
.mcm-cart-remove:hover { color: #dc2626; }

/* Checkout */
.mcm-checkout-grid { display: grid; grid-template-columns: 1fr 380px; gap: 32px; max-width: var(--container); margin: 0 auto; padding: 32px 20px; align-items: start; }
.mcm-checkout-form { background: #fff; border: 1px solid var(--blue-border); border-radius: var(--radius-lg); padding: 28px; }
.mcm-checkout-summary { background: #fff; border: 1px solid var(--blue-border); border-radius: var(--radius-lg); padding: 24px; position: sticky; top: 84px; }
.mcm-checkout-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--gray-100); font-size: 0.9rem; }
.mcm-checkout-item img { width: 48px; height: 48px; border-radius: 4px; object-fit: cover; }
.mcm-checkout-total { display: flex; justify-content: space-between; padding: 12px 0; font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--blue-deep); border-top: 2px solid var(--blue-border); margin-top: 8px; }

/* Order confirmation */
.mcm-confirmation { max-width: 600px; margin: 0 auto; padding: 40px 20px; text-align: center; }
.mcm-confirmation-check { font-size: 3rem; color: #10b981; margin-bottom: 12px; }

/* Calendar / time slots */
.mcm-calendar { max-width: 320px; margin: 0 auto 20px; }
.mcm-calendar-header { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-family: 'Sora', sans-serif; font-weight: 700; color: var(--blue-deep); }
.mcm-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.mcm-calendar-day { padding: 8px 4px; border-radius: 4px; font-size: 0.85rem; cursor: pointer; }
.mcm-calendar-day:hover { background: var(--blue-light); }
.mcm-calendar-day.selected { background: var(--amber); color: #fff; font-weight: 700; }
.mcm-calendar-day.disabled { color: var(--gray-300); cursor: default; }
.mcm-calendar-day.disabled:hover { background: none; }
.mcm-time-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.mcm-time-slot {
    padding: 8px;
    border: 1px solid var(--blue-border);
    border-radius: 6px;
    text-align: center;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    background: #fff;
    color: var(--blue-deep);
    transition: background 0.15s;
}
.mcm-time-slot:hover { background: var(--blue-light); }
.mcm-time-slot.selected { background: var(--blue-deep); color: #fff; }
.mcm-time-slot.unavailable { opacity: 0.3; cursor: not-allowed; }

/* Orders dashboard */
.mcm-orders-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.mcm-orders-stat { background: #fff; border: 1px solid var(--blue-border); border-radius: var(--radius); padding: 18px; text-align: center; }
.mcm-orders-stat-num { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.75rem; color: var(--blue-deep); }
.mcm-orders-stat-label { font-size: 0.75rem; color: var(--blue-mid); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }
.mcm-order-status { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 0.72rem; font-weight: 700; font-family: 'Sora', sans-serif; }
.mcm-status-paid { background: #dbeafe; color: #1e40af; }
.mcm-status-processing { background: #fef3c7; color: #92400e; }
.mcm-status-shipped { background: #e0e7ff; color: #3730a3; }
.mcm-status-completed { background: #d1fae5; color: #065f46; }
.mcm-status-cancelled { background: #fee2e2; color: #991b1b; }
.mcm-status-refunded { background: #f1f5f9; color: #64748b; }
.mcm-status-pending { background: #fef3c7; color: #92400e; }

/* Store empty state */
.mcm-store-empty { text-align: center; padding: 60px 20px; color: var(--blue-mid); }

@media (max-width: 768px) {
    .mcm-product-grid.cols-3, .mcm-product-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
    .mcm-product-detail { grid-template-columns: 1fr; }
    .mcm-checkout-grid { grid-template-columns: 1fr; }
    .mcm-cart-item { grid-template-columns: 48px 1fr auto; gap: 10px; }
    .mcm-orders-stats { grid-template-columns: repeat(2, 1fr); }
    .mcm-time-slots { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
    .mcm-product-grid.cols-2, .mcm-product-grid.cols-3, .mcm-product-grid.cols-4 { grid-template-columns: 1fr; }
}

/* ============================================
   AUCTIONS
   ============================================ */

/* Listing type selector */
.listing-type-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 32px; }
.listing-type-card {
    display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 16px;
    border: 2px solid var(--blue-border); border-radius: var(--radius-lg); cursor: pointer;
    transition: border-color 0.15s, background 0.15s; text-decoration: none; color: inherit; text-align: center;
}
.listing-type-card:hover { border-color: var(--blue); background: var(--blue-light); }
.listing-type-card.selected { border-color: var(--amber); background: #fff8eb; }
.listing-type-card-icon { font-size: 2rem; }
.listing-type-card h3 { font-family: 'Sora', sans-serif; font-size: 0.95rem; font-weight: 700; color: var(--blue-deep); margin: 0; }
.listing-type-card p { font-size: 0.78rem; color: var(--blue-mid); margin: 0; }

/* Category cascade */
.category-cascade { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.category-cascade select { flex: 1; min-width: 200px; }
.category-fields { margin-top: 20px; padding: 16px; background: var(--gray-50); border: 1px solid var(--blue-border); border-radius: var(--radius); }

/* Auction card */
.auction-card {
    display: block; background: #fff; border: 1px solid var(--blue-border); border-radius: var(--radius-lg);
    overflow: hidden; text-decoration: none; color: inherit; transition: transform 0.15s, box-shadow 0.15s;
}
.auction-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(26,58,107,0.08); }
.auction-card-img { aspect-ratio: 4/3; background: var(--gray-50); overflow: hidden; }
.auction-card-img img { width: 100%; height: 100%; object-fit: cover; }
.auction-card-body { padding: 14px; }
.auction-card-body h3 { font-family: 'Sora', sans-serif; font-size: 0.9rem; font-weight: 700; color: var(--blue-deep); margin: 0 0 8px; line-height: 1.3; }

.auction-current-bid { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.25rem; color: var(--amber); }
.auction-starting { font-family: 'Sora', sans-serif; font-weight: 600; font-size: 1rem; color: var(--blue-mid); }
.auction-bid-count { font-size: 0.78rem; color: var(--blue-mid); margin-top: 4px; }

.auction-countdown { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1rem; color: var(--blue-deep); margin: 8px 0; }
.auction-countdown.urgent { color: #dc2626; }
.auction-countdown.ended { color: var(--gray-500); }
.auction-card-timer { font-size: 0.75rem; color: var(--blue-mid); font-family: 'Sora', sans-serif; font-weight: 600; margin-top: 4px; }

.auction-reserve { font-size: 0.78rem; font-weight: 600; margin-top: 4px; }
.auction-reserve.met { color: #10b981; }
.auction-reserve.not-met { color: var(--amber); }
.auction-reserve.none { color: var(--blue-mid); }

/* Bid form */
.bid-form { background: var(--blue-light); border: 1px solid var(--blue-border); border-radius: var(--radius-lg); padding: 20px; margin: 16px 0; }
.bid-form label { font-family: 'Sora', sans-serif; font-weight: 600; font-size: 0.85rem; color: var(--blue-deep); }
.bid-form input[type="number"] { width: 100%; padding: 10px 12px; border: 1.5px solid var(--blue-border); border-radius: 6px; font-size: 1rem; font-family: 'Sora', sans-serif; font-weight: 700; margin: 6px 0 12px; }
.bid-min-hint { font-size: 0.78rem; color: var(--blue-mid); margin-bottom: 12px; }

.auto-bid-section { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--blue-border); }
.auto-bid-section summary { cursor: pointer; font-size: 0.85rem; font-weight: 600; color: var(--blue); list-style: none; }
.auto-bid-section summary::-webkit-details-marker { display: none; }

/* Bid history */
.bid-history { margin-top: 24px; }
.bid-history table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.bid-history th { text-align: left; padding: 8px 12px; background: var(--gray-50); color: var(--blue-mid); font-family: 'Sora', sans-serif; font-size: 0.72rem; text-transform: uppercase; border-bottom: 1px solid var(--blue-border); }
.bid-history td { padding: 8px 12px; border-bottom: 1px solid var(--gray-100); }
.bid-history tr.winner td { background: #fff8eb; font-weight: 600; }
.bid-auto-badge { font-size: 0.68rem; background: var(--blue-light); color: var(--blue); padding: 1px 6px; border-radius: 4px; margin-left: 4px; }

/* Garage sale schedule */
.garage-sale-schedule { margin: 20px 0; }
.garage-sale-schedule table { width: 100%; border-collapse: collapse; }
.garage-sale-schedule th { text-align: left; padding: 8px 12px; background: var(--gray-50); font-size: 0.78rem; color: var(--blue-mid); border-bottom: 1px solid var(--blue-border); }
.garage-sale-schedule td { padding: 10px 12px; border-bottom: 1px solid var(--gray-100); }
.garage-sale-schedule tr.today { background: #fff8eb; }
.garage-sale-happening { display: inline-block; background: #10b981; color: #fff; font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; font-family: 'Sora', sans-serif; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.7; } }

/* Feedback score */
.feedback-score { display: inline-flex; align-items: center; gap: 4px; font-size: 0.82rem; }
.feedback-positive { color: #10b981; }
.feedback-negative { color: #dc2626; }

@media (max-width: 768px) {
    .listing-type-selector { grid-template-columns: repeat(2, 1fr); }
    .category-cascade { flex-direction: column; }
}
@media (max-width: 480px) {
    .listing-type-selector { grid-template-columns: 1fr; }
}

/* ============================================
   REAL ESTATE / PROPERTY LISTINGS
   ============================================ */

/* Property hero */
.property-hero { position: relative; height: 400px; overflow: hidden; }
.property-hero img { width: 100%; height: 100%; object-fit: cover; }
.property-price-badge {
    position: absolute; bottom: 20px; left: 20px; background: var(--amber);
    color: #1a3a6b; font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.5rem;
    padding: 10px 20px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Property stats bar */
.property-stats-bar {
    display: flex; gap: 20px; flex-wrap: wrap; padding: 16px 0; margin-bottom: 20px;
    border-bottom: 1px solid var(--blue-border); font-family: 'DM Sans', sans-serif; font-size: 0.95rem; color: var(--gray-700);
}
.property-stats-bar span { display: inline-flex; align-items: center; gap: 6px; }

/* Property details grid */
.property-details-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--blue-border); border-radius: var(--radius); overflow: hidden; margin-bottom: 24px;
}
.property-detail-row {
    display: flex; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--gray-100); font-size: 0.9rem;
}
.property-detail-row:nth-child(odd) { background: var(--gray-50); }
.property-detail-label { color: var(--blue-mid); font-weight: 500; }
.property-detail-value { color: var(--blue-deep); font-weight: 600; }

/* Feature chips */
.property-features { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.property-feature-chip {
    display: inline-block; padding: 4px 12px; border-radius: 16px; background: var(--blue-light);
    color: var(--blue); font-size: 0.82rem; font-family: 'DM Sans', sans-serif; font-weight: 500;
}

/* Property amenities grid */
.property-amenities-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-bottom: 24px;
}
.property-amenity { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--gray-700); padding: 6px 0; }
.property-amenity-check { color: #10b981; font-weight: 700; }

/* Property card (browse pages) */
.property-card {
    display: block; background: #fff; border: 1px solid var(--blue-border); border-radius: var(--radius-lg);
    overflow: hidden; text-decoration: none; color: inherit; transition: transform 0.15s, box-shadow 0.15s;
}
.property-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(26,58,107,0.08); }
.property-card-img { aspect-ratio: 16/10; overflow: hidden; background: var(--gray-100); }
.property-card-img img { width: 100%; height: 100%; object-fit: cover; }
.property-card-body { padding: 14px; }
.property-card-price {
    font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.25rem; color: var(--amber); margin-bottom: 4px;
}
.property-card-stats { font-size: 0.82rem; color: var(--blue-mid); margin-bottom: 6px; }
.property-card-title { font-family: 'Sora', sans-serif; font-size: 0.9rem; font-weight: 600; color: var(--blue-deep); margin-bottom: 4px; }
.property-card-location { font-size: 0.78rem; color: var(--gray-500); }

/* Booking widget (sticky sidebar) */
.booking-widget {
    background: #fff; border: 2px solid var(--blue-border); border-radius: var(--radius-lg);
    padding: 24px; position: sticky; top: 84px;
}
.booking-widget-price { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.5rem; color: var(--blue-deep); margin-bottom: 16px; }
.booking-widget-price span { font-size: 0.9rem; font-weight: 400; color: var(--blue-mid); }
.booking-price-breakdown { margin: 16px 0; font-size: 0.9rem; }
.booking-price-row { display: flex; justify-content: space-between; padding: 6px 0; color: var(--gray-700); }
.booking-price-total { display: flex; justify-content: space-between; padding: 10px 0; border-top: 2px solid var(--blue-border); font-family: 'Sora', sans-serif; font-weight: 700; color: var(--blue-deep); }

/* Booking status badges */
.booking-status-pending { background: #fef3c7; color: #92400e; }
.booking-status-confirmed { background: #d1fae5; color: #065f46; }
.booking-status-cancelled { background: #f1f5f9; color: #64748b; }
.booking-status-completed { background: #dbeafe; color: #1e40af; }

/* Availability calendar */
.availability-calendar { max-width: 300px; margin-bottom: 16px; }

@media (max-width: 768px) {
    .property-hero { height: 250px; }
    .property-details-grid { grid-template-columns: 1fr; }
    .property-amenities-grid { grid-template-columns: 1fr 1fr; }
    .booking-widget { position: static; }
}

/* ============================================
   SHARE BUTTONS (reusable partial)
   ============================================ */
.mcm-share {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 0;
}
.mcm-share-label {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--blue-mid);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mcm-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--blue-border);
    background: #fff;
    color: var(--blue-deep);
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 0.75rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.mcm-share-btn:hover { background: var(--blue-deep); color: #fff; border-color: var(--blue-deep); }
.mcm-share-facebook { color: #1877f2; border-color: #1877f2; }
.mcm-share-facebook:hover { background: #1877f2; color: #fff; }
.mcm-share-x { color: #000; border-color: #333; }
.mcm-share-x:hover { background: #000; color: #fff; }
.mcm-share-linkedin { color: #0a66c2; border-color: #0a66c2; }
.mcm-share-linkedin:hover { background: #0a66c2; color: #fff; }
.mcm-share-email { color: var(--blue); border-color: var(--blue); }
.mcm-share-email:hover { background: var(--blue); color: #fff; }
.mcm-share-copy { font-size: 1rem; }

/* ═══════════════════════════════════════════════════════
   MESSAGING SYSTEM
   ═══════════════════════════════════════════════════════ */

/* Nav messages icon */
.nav-messages-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 6px;
    color: var(--blue);
    margin-right: 4px;
}
.nav-messages-link:hover { color: var(--amber); }
.nav-messages-badge {
    position: absolute;
    top: -2px;
    right: -6px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}
.nav-dropdown-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    padding: 0 4px;
    margin-left: 6px;
}

/* Container */
.msg-container { max-width: 800px; margin: 0 auto; padding: 32px 16px; }

/* Header */
.msg-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.msg-title { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; color: var(--blue); margin: 0; }
.msg-header-actions { display: flex; gap: 8px; }

/* Empty state */
.msg-empty { text-align: center; padding: 48px 16px; color: #64748b; }
.msg-empty p { margin-bottom: 16px; font-size: 1rem; }

/* Message list (inbox) */
.msg-list { border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; }
.msg-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    transition: background .15s;
}
.msg-item:last-child { border-bottom: none; }
.msg-item:hover { background: #f8fafc; }
.msg-item-unread { background: #f0f7ff; }
.msg-item-unread:hover { background: #e0ecff; }

.msg-item-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.msg-item-content { flex: 1; min-width: 0; }
.msg-item-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.msg-item-name { font-weight: 600; color: var(--blue); font-size: .9rem; }
.msg-item-time { font-size: .75rem; color: #94a3b8; white-space: nowrap; }
.msg-item-subject { font-size: .8rem; font-weight: 600; color: #334155; margin-bottom: 2px; }
.msg-item-preview { font-size: .82rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-you { color: #94a3b8; font-weight: 500; }
.msg-muted-badge { font-size: .65rem; background: #e2e8f0; color: #64748b; padding: 1px 6px; border-radius: 4px; margin-left: 6px; }

.msg-unread-badge {
    background: var(--amber);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    flex-shrink: 0;
}

.msg-type-badge {
    display: inline-block;
    font-size: .65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 4px;
    text-transform: capitalize;
}
.msg-type-listing_inquiry { background: #ecfdf5; color: #059669; }
.msg-type-business_inquiry { background: #eff6ff; color: #2563eb; }
.msg-type-group { background: #fef3c7; color: #d97706; }

/* Conversation header */
.msg-conv-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.msg-back { font-size: .85rem; color: #64748b; text-decoration: none; white-space: nowrap; padding-top: 4px; }
.msg-back:hover { color: var(--blue); }
.msg-conv-info { flex: 1; min-width: 0; }
.msg-conv-title { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700; color: var(--blue); margin: 0 0 4px 0; }
.msg-conv-participants { font-size: .8rem; color: #64748b; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.msg-participant { background: #f1f5f9; padding: 2px 8px; border-radius: 4px; }
.msg-participant-you { background: #e0ecff; color: var(--blue); font-weight: 600; }
.msg-block-form { flex-shrink: 0; }

/* Context card */
.msg-context-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: .85rem;
    color: #64748b;
}
.msg-context-card a { color: var(--blue); text-decoration: underline; }

/* Messages stream */
.msg-messages {
    max-height: 500px;
    overflow-y: auto;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.msg-bubble {
    max-width: 75%;
    padding: 10px 16px;
    border-radius: 12px;
    position: relative;
}
.msg-bubble-mine {
    align-self: flex-end;
    background: var(--blue);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.msg-bubble-theirs {
    align-self: flex-start;
    background: #f1f5f9;
    color: #1e293b;
    border-bottom-left-radius: 4px;
}

.msg-bubble-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: .75rem; opacity: .8; }
.msg-bubble-mine .msg-bubble-header { color: rgba(255,255,255,.7); }
.msg-bubble-body { font-size: .9rem; line-height: 1.5; word-wrap: break-word; }
.msg-bubble-body .mention { font-weight: 600; text-decoration: underline; }
.msg-bubble-mine .msg-bubble-body .mention { color: #fcd34d; }
.msg-edited { font-size: .65rem; font-style: italic; }

.msg-reply-ref {
    font-size: .75rem;
    padding: 4px 8px;
    margin-bottom: 6px;
    border-radius: 4px;
    background: rgba(0,0,0,.08);
    color: inherit;
    opacity: .7;
}
.msg-bubble-mine .msg-reply-ref { background: rgba(255,255,255,.15); }

.msg-reply-btn {
    display: none;
    position: absolute;
    top: 4px;
    right: -60px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: .7rem;
    color: #64748b;
    cursor: pointer;
    white-space: nowrap;
}
.msg-bubble-theirs:hover .msg-reply-btn { display: block; }
.msg-reply-btn:hover { background: #e2e8f0; }

/* Reply form */
.msg-reply-form-wrap {
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
    margin-top: 8px;
}
.msg-reply-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .8rem;
    color: #64748b;
    background: #f8fafc;
    padding: 6px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
}
.msg-reply-cancel {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
    padding: 0 4px;
}
.msg-reply-form { display: flex; gap: 8px; align-items: flex-end; }
.msg-textarea {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: .9rem;
    resize: vertical;
    min-height: 44px;
}
.msg-textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(26,58,107,.1); }
.msg-error { display: block; color: #ef4444; font-size: .8rem; margin-top: 4px; }

/* Compose */
.msg-compose-form { max-width: 600px; }
.msg-compose-recipient {
    background: #f1f5f9;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: .9rem;
    color: #334155;
}
.msg-compose-actions { margin-top: 16px; }

/* Search results */
.msg-search-results {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 4px;
}
.msg-search-results:empty { display: none; }
.msg-search-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: .85rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}
.msg-search-item:last-child { border-bottom: none; }
.msg-search-item:hover { background: #f0f7ff; }

/* Blocked list */
.msg-blocked-list { display: flex; flex-direction: column; gap: 12px; }
.msg-blocked-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}
.msg-blocked-info { display: flex; align-items: center; gap: 12px; }
.msg-blocked-meta { font-size: .78rem; color: #94a3b8; margin-top: 2px; }
.msg-blocked-reason { font-size: .78rem; color: #64748b; margin-top: 2px; font-style: italic; }

/* Pagination */
.msg-pagination { margin-top: 16px; }
.msg-pagination-top { margin-top: 0; margin-bottom: 12px; }

/* ═══════════════════════════════════════════════════════
   PAYMENT BADGES
   ═══════════════════════════════════════════════════════ */
.payment-badge {
    display: inline-block;
    font-family: var(--font-body);
    font-size: .72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 50px;
    white-space: nowrap;
}
.payment-method-cash { background: #e1f5ee; color: #085041; }
.payment-method-venmo { background: #e8f4fd; color: #1a5276; }
.payment-method-zelle { background: #f0e8fd; color: #4a235a; }
.payment-method-paypal { background: #e8f0fd; color: #1a3a6b; }
.payment-method-cashapp { background: #e1f5ee; color: #085041; }
.payment-method-apple_pay { background: #f5f5f5; color: #333; }
.payment-method-google_pay { background: #f5f5f5; color: #333; }
.payment-method-check { background: #fef3c7; color: #92400e; }
.payment-method-ship_paypal { background: #e8f0fd; color: #1a3a6b; }
.payment-method-flexible { background: #f1f5f9; color: #475569; }

/* Responsive */
@media (max-width: 640px) {
    .msg-bubble { max-width: 90%; }
    .msg-reply-btn { display: block; position: static; margin-top: 4px; }
    .msg-reply-form { flex-direction: column; }
    .msg-conv-header { flex-direction: column; }
}

/* ============================================
   LEGAL PAGES (terms, privacy)
   ============================================ */
.legal-page {
    background: var(--gray-50);
    padding: 48px 0 72px;
    min-height: calc(100vh - 64px - 200px);
}
.legal-card {
    max-width: 820px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--blue-border);
    border-radius: var(--radius-lg);
    padding: 48px 56px;
    box-shadow: var(--shadow);
}
.legal-card h1 { font-size: 2rem; margin-bottom: 24px; }
.legal-card h2 { font-size: 1.35rem; margin-top: 32px; margin-bottom: 12px; }
.legal-card h3 { font-size: 1.1rem; margin-top: 24px; margin-bottom: 8px; }
.legal-card p  { color: var(--gray-700); margin-bottom: 16px; line-height: 1.7; }
.legal-card ul, .legal-card ol {
    padding-left: 24px;
    margin-bottom: 16px;
    color: var(--gray-700);
    line-height: 1.7;
}
.legal-card ul { list-style: disc; }
.legal-card ol { list-style: decimal; }
.legal-card li { margin-bottom: 6px; }
.legal-card a  { color: var(--blue); text-decoration: underline; }
.legal-card strong { color: var(--blue-deep); }
.legal-card hr { border: 0; border-top: 1px solid var(--blue-border); margin: 32px 0; }
@media (max-width: 640px) {
    .legal-card { padding: 32px 24px; }
}

/* ============================================
   APP SLOT WRAP (x-app-layout / Jetstream views)
   ============================================ */
.app-slot-wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding: 40px 20px 64px;
    background: var(--gray-50);
    min-height: calc(100vh - 64px - 200px);
}
.app-slot-header {
    margin-bottom: 24px;
    padding: 20px 24px;
    background: var(--white);
    border: 1px solid var(--blue-border);
    border-radius: var(--radius-lg);
}
.app-slot-header h2 {
    font-size: 1.5rem;
    color: var(--blue-deep);
    margin: 0;
}
