/* ============================================================
   Business Directory Theme - Complete Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #144486;
    --primary-dark: #0f2d5f;
    --primary-light: #1e5fa0;
    --secondary: #faf3e5;
    --accent: #f5a623;
    --text: #1a1a2e;
    --text-light: #6b7280;
    --white: #ffffff;
    --bg: #f8f9fb;
    --border: #e5e7eb;
    --success: #10b981;
    --error: #ef4444;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --radius: 12px;
    --max-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* ===== HEADER ===== */
.site-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
}

.logo-text i { margin-right: 8px; }

.site-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-nav a {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text);
    transition: all 0.2s;
}

.site-nav a:hover { color: var(--primary); background: var(--secondary); }

.btn-header-cta {
    background: var(--primary) !important;
    color: var(--white) !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
}

.btn-header-cta:hover { background: var(--primary-dark) !important; }

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary);
    cursor: pointer;
}

/* ===== HERO ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 80px 24px 100px;
    text-align: center;
}

.hero-content { max-width: 700px; margin: 0 auto; }

.hero-section h1 {
    font-size: 44px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero-section p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 24px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 24px;
}

.hero-stats span { font-size: 15px; opacity: 0.85; }
.hero-stats strong { font-size: 22px; display: block; }

/* ===== FILTER ===== */
.filter-section {
    max-width: var(--max-width);
    margin: 0px auto 0;
    padding: 32px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 10;
}

.filter-container { max-width: 100%; }

.filter-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.filter-field { display: flex; flex-direction: column; }

.filter-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}

.filter-field label i { margin-right: 6px; }

.filter-field input,
.filter-field select {
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.filter-field input:focus,
.filter-field select:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ===== BUTTONS ===== */
.btn-primary, .btn-cta-primary {
    background: var(--primary);
    color: var(--white);
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-primary:hover, .btn-cta-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20,68,134,0.3);
}

.btn-secondary, .btn-cta-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 10px 26px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-secondary:hover, .btn-cta-secondary:hover {
    background: var(--secondary);
}

.btn-cta-secondary {
    color: var(--white);
    border-color: var(--white);
}

.btn-cta-secondary:hover {
    background: rgba(255,255,255,0.15);
}

/* ===== SECTIONS ===== */
.section-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 32px;
    text-align: center;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-header .section-title { margin-bottom: 0; text-align: left; }

.view-all-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-all-link:hover { color: var(--primary-dark); }

/* ===== CATEGORY STRIP ===== */
.category-strip-section {
    padding: 60px 24px;
    background: var(--white);
}

.category-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.cat-strip-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 12px;
    border-radius: var(--radius);
    background: var(--bg);
    transition: all 0.3s;
    text-align: center;
}

.cat-strip-item:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.cat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s;
}

.cat-strip-item:hover .cat-icon {
    background: var(--white);
    color: var(--primary);
}

.cat-strip-item span {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

/* ===== BUSINESS LISTINGS ===== */
.listings-section {
    padding: 60px 24px;
    background: var(--bg);
}

.business-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.business-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s;
}

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

.card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #e8ecf4, #d4dce8);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--primary);
    opacity: 0.4;
}

.card-cat-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-status {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.card-status.open { background: var(--success); color: var(--white); }
.card-status.closed { background: var(--error); color: var(--white); }

.card-content { padding: 16px; }

.card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.card-title a { color: var(--text); }
.card-title a:hover { color: var(--primary); }

.card-location, .card-phone {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-location i, .card-phone i {
    color: var(--primary);
    width: 14px;
}

.card-phone a { color: var(--text-light); }
.card-phone a:hover { color: var(--primary); }

.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    align-items: center;
}

.btn-view {
    flex: 1;
    text-align: center;
    padding: 8px 16px;
    background: var(--primary);
    color: var(--white);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-view:hover { background: var(--primary-dark); }

.btn-call {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--success);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-call:hover { background: #059669; }

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.no-results i { font-size: 48px; margin-bottom: 16px; display: block; }
.no-results a { color: var(--primary); font-weight: 600; }

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    transition: all 0.2s;
}

.pagination a:hover { border-color: var(--primary); color: var(--primary); }

.pagination span.current {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ===== TESTIMONIALS ===== */
.testimonials-section {
    background: var(--secondary);
    padding: 70px 24px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.testimonial-card {
    background: var(--white);
    padding: 28px;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.testimonial-card .stars {
    color: var(--accent);
    font-size: 18px;
    margin-bottom: 12px;
}

.testimonial-card p { color: var(--text-light); margin-bottom: 12px; font-size: 14px; }

.testimonial-card .author {
    font-weight: 700;
    color: var(--primary);
    font-size: 14px;
}

/* ===== CTA ===== */
.cta-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    padding: 70px 24px;
    text-align: center;
}

.cta-content { max-width: 600px; margin: 0 auto; }

.cta-section h2 {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 12px;
}

.cta-section p {
    font-size: 17px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== FOOTER ===== */
.site-footer {
    background: #0c1b33;
    color: #ffffffcc;
    padding-top: 60px;
}

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

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

.footer-col h3 {
    color: var(--white);
    font-size: 20px;
    margin-bottom: 16px;
}

.footer-col h3 i { margin-right: 8px; }

.footer-col h4 {
    color: var(--white);
    font-size: 16px;
    margin-bottom: 16px;
}

.footer-col p {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.footer-col ul { list-style: none; }

.footer-col ul li { margin-bottom: 10px; }

.footer-col ul a {
    color: #ffffffaa;
    font-size: 14px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-col ul a:hover { color: var(--accent); }

.contact-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.contact-list i { color: var(--accent); width: 16px; }

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

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

.footer-bottom p { font-size: 13px; }

.footer-links { display: flex; gap: 20px; }
.footer-links a { color: #ffffff99; font-size: 13px; }
.footer-links a:hover { color: var(--white); }

/* ===== LOGIN / REGISTER ===== */
.auth-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: var(--bg);
}

.auth-card {
    background: var(--white);
    padding: 48px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
}

.auth-card h2 {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 8px;
    text-align: center;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.auth-card .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    justify-content: center;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-light);
}

.auth-link a { color: var(--primary); font-weight: 600; }

.alert-error, .alert-success {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error { background: #fef2f2; color: var(--error); border: 1px solid #fecaca; }
.alert-success { background: #ecfdf5; color: var(--success); border: 1px solid #a7f3d0; }

/* ===== DASHBOARD ===== */
.dashboard-section { padding: 40px 24px; background: var(--bg); }

.dashboard-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.dashboard-header h1 { font-size: 28px; color: var(--primary); }

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    text-align: center;
}

.stat-card .stat-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 4px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.dashboard-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.dashboard-card h3 {
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

/* ===== MULTI-STEP FORM ===== */
.add-listing-section { padding: 40px 24px; background: var(--bg); }

.step-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.step-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-light);
    transition: all 0.3s;
}

.step-indicator.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.step-indicator.completed {
    background: var(--success);
    border-color: var(--success);
    color: var(--white);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .business-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .hero-section h1 { font-size: 30px; }
    .hero-section { padding: 60px 20px 80px; }
    .hero-stats { flex-direction: column; gap: 12px; }
    .filter-row { grid-template-columns: 1fr; }
    .filter-section { margin: -30px 16px 0; padding: 24px; }
    .business-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .testimonials-grid { grid-template-columns: 1fr; }
    .category-strip { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
    .cta-section h2 { font-size: 26px; }
    .cta-buttons { flex-direction: column; align-items: center; }
    .site-nav { display: none; position: absolute; top: 70px; left: 0; right: 0; background: var(--white); box-shadow: var(--shadow); padding: 16px; }
    .site-nav.open { display: block; }
    .site-nav ul { flex-direction: column; }
    .mobile-menu-toggle { display: block; }
    .section-header { flex-direction: column; gap: 12px; }
    .dashboard-stats { grid-template-columns: 1fr 1fr; }
    .auth-card { padding: 32px 24px; }
}

@media (max-width: 480px) {
    .business-grid { grid-template-columns: 1fr; }
    .category-strip { grid-template-columns: repeat(2, 1fr); }
    .filter-buttons { flex-direction: column; }
    .filter-buttons button { width: 100%; }
}

/* -------------------------------------------------
   MENU VISIBILITY CSS (Logged In vs Logged Out)
   ------------------------------------------------- */
.bd-hide-always {
    display: none !important;
}
.elementor-nav-menu .bd-hide-always {
    display: none !important;
}

/* ===== WOOCOMMERCE CHECKOUT & ORDER RECEIVED ===== */
.woocommerce-checkout .woocommerce,
.woocommerce-cart .woocommerce {
    max-width: 900px;
    margin: 50px auto;
    padding: 40px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 10;
}

.woocommerce-order h2, 
.woocommerce-checkout h3 {
    font-family: 'Inter', sans-serif;
    color: var(--primary);
    font-size: 24px;
    margin: 30px 0 15px;
    font-weight: 700;
}

.woocommerce-order h3 {
    font-size: 20px;
    margin: 20px 0 10px;
    color: var(--text);
}

.woocommerce-order p {
    font-size: 15px;
    color: var(--text);
    margin-bottom: 20px;
}

.woocommerce-order ul.order_details {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding: 0;
    margin: 0 0 30px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 25px;
}

.woocommerce-order ul.order_details li {
    font-size: 13px;
    color: var(--text-light);
    text-transform: uppercase;
    font-weight: 600;
}

.woocommerce-order ul.order_details li strong {
    display: block;
    font-size: 16px;
    color: var(--text);
    text-transform: none;
    margin-top: 6px;
    font-weight: 700;
}

.woocommerce-table.order_details,
.woocommerce-table.shop_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.woocommerce-table.order_details th,
.woocommerce-table.order_details td,
.woocommerce-table.shop_table th,
.woocommerce-table.shop_table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-size: 15px;
}

.woocommerce-table.order_details th,
.woocommerce-table.shop_table th {
    font-weight: 600;
    color: var(--primary);
    background: #f8fafc;
}

.woocommerce-table.order_details tfoot th {
    text-align: right;
    background: #f8fafc;
}

.woocommerce-table.order_details tfoot td {
    font-weight: 700;
    color: var(--text);
}

.woocommerce-customer-details address {
    background: #f8fafc;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-style: normal;
    line-height: 1.8;
    color: var(--text);
}

/* Fix generic WooCommerce notices */
.woocommerce-notice,
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    background: #e0edff;
    color: #144486;
    padding: 16px 24px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    margin-bottom: 30px;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.woocommerce-error {
    background: #fee2e2;
    color: #dc2626;
    border-left-color: #dc2626;
}

.woocommerce-message {
    background: #dcfce7;
    color: #16a34a;
    border-left-color: #16a34a;
}

@media (max-width: 768px) {
    .woocommerce-checkout .woocommerce,
    .woocommerce-cart .woocommerce {
        padding: 20px;
        margin: 20px 16px;
    }
    .woocommerce-order ul.order_details {
        flex-direction: column;
        gap: 15px;
    }
}
