/* ============================================================
   company.css — Company directory & detail page styles
   Matches design language of cart.css / single-product.css
   ============================================================ */

:root {
    --co-primary:       var(--site-primary,       #1a1a2e);
    --co-primary-light: var(--site-primary-light, #21216d);
    --co-primary-faint: #f0f2f8;
    --co-accent:        var(--site-accent,        #dc3545);
    --co-green:         #28a745;
    --co-light:         var(--site-light,         #f7f8fa);
    --co-border:        var(--site-border,        #e8ecf0);
    --co-text:          var(--site-primary,       #1a1a2e);
    --co-muted:         #6c757d;
    --co-radius:        14px;
}

/* ============================================================
   Directory — Header / Hero
   ============================================================ */
.co-hero {
    background: var(--co-primary);
    padding: 44px 0 36px;
}
.co-hero h1 {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
}
.co-hero p {
    color: rgba(255, 255, 255, .7);
    font-size: 14px;
    margin-bottom: 0;
}

/* ── Search Bar ── */
.co-search-wrap  { max-width: 600px; margin: 0 auto; }
.co-search-form  {
    display: flex;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .18);
}
.co-search-form input {
    flex: 1;
    border: none;
    padding: 13px 22px;
    font-size: 15px;
    outline: none;
    color: var(--co-text);
}
.co-search-form button {
    background: var(--co-accent);
    color: #fff;
    border: none;
    padding: 13px 26px;
    font-size: 16px;
    cursor: pointer;
    transition: background .2s;
}
.co-search-form button:hover { background: #c82333; }

/* ── Category Filter Pills ── */
.co-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 20px 0 10px;
}
.co-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid var(--co-border);
    background: #fff;
    color: var(--co-text);
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
}
.co-pill:hover {
    border-color: var(--co-primary);
    color: var(--co-primary);
    background: var(--co-primary-faint);
    text-decoration: none;
}
.co-pill.active {
    background: var(--co-primary);
    border-color: var(--co-primary);
    color: #fff;
    text-decoration: none;
}
.co-pill .pill-count {
    background: var(--co-light);
    color: var(--co-muted);
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
}
.co-pill.active .pill-count {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

/* ── Results Bar ── */
.co-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 8px;
}
.co-results-bar .co-count {
    font-size: 14px;
    color: var(--co-muted);
}
.co-clear-btn {
    font-size: 13px;
    color: var(--co-accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    transition: color .2s;
}
.co-clear-btn:hover { color: #c82333; text-decoration: none; }

/* ============================================================
   Directory — Company Card
   ============================================================ */
.co-card {
    background: #fff;
    border-radius: var(--co-radius);
    border: 1.5px solid var(--co-border);
    box-shadow: 0 2px 12px rgba(26, 26, 46, .06);
    transition: all .25s;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}
.co-card:hover {
    border-color: var(--co-primary);
    box-shadow: 0 8px 28px rgba(26, 26, 46, .15);
    transform: translateY(-4px);
    text-decoration: none;
}

.co-card__logo-wrap {
    background: var(--co-light);
    border-bottom: 1px solid var(--co-border);
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.co-card__logo-wrap img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}
.co-card__logo-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--co-primary-faint);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--co-primary);
}

.co-card__body {
    padding-top: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.co-card__name {
    font-size: 13px;
    font-weight: 700;
    color: var(--co-text);
    margin-bottom: 8px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.co-card__meta {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}
.co-card__city {
    font-size: 11px;
    color: var(--co-muted);
    display: flex;
    align-items: center;
    gap: 3px;
}
.co-card__city i { color: var(--co-accent); font-size: 10px; }
.co-badge-cat {
    font-size: 10px;
    font-weight: 700;
    background: var(--co-primary-faint);
    color: var(--co-primary);
    border-radius: 20px;
    padding: 2px 8px;
}

/* ── Empty State ── */
.co-empty {
    background: #fff;
    border-radius: var(--co-radius);
    box-shadow: 0 2px 20px rgba(26, 26, 46, .06);
    padding: 60px 30px;
    text-align: center;
}
.co-empty i  { font-size: 56px; color: #ddd; margin-bottom: 16px; display: block; }
.co-empty p  { color: var(--co-muted); font-size: 15px; margin: 0; }

/* ============================================================
   Detail Page — Banner
   ============================================================ */
.co-banner {
    height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.co-banner::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 130px;
    background: linear-gradient(to top, rgba(26, 26, 46, .85), transparent);
}

/* ── Header Card ── */
.co-header-card {
    background: #fff;
    border-radius: var(--co-radius);
    box-shadow: 0 4px 32px rgba(26, 26, 46, .1);
    padding: 28px;
    position: relative;
    z-index: 10;
    margin-bottom: 28px;
}
.co-header-card--pulled { margin-top: -80px; }

.co-logo-box {
    width: 96px;
    height: 96px;
    border-radius: 14px;
    border: 2px solid var(--co-border);
    background: var(--co-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.co-logo-box img  { max-width: 100%; max-height: 100%; object-fit: contain; }
.co-logo-box i    { font-size: 2.4rem; color: var(--co-muted); }

.co-company-name {
    font-size: 24px;
    font-weight: 800;
    color: var(--co-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}
.co-company-sub  { font-size: 14px; color: var(--co-muted); margin-bottom: 6px; }

.co-cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--co-primary-faint);
    color: var(--co-primary);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}

/* ── CTA Buttons ── */
.co-btn-call {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--co-green);
    color: #fff;
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all .25s;
    margin-bottom: 8px;
    box-shadow: 0 3px 10px rgba(40, 167, 69, .3);
}
.co-btn-call:hover {
    background: #218838;
    color: #fff;
    transform: translateY(-1px);
    text-decoration: none;
}
.co-btn-web {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--co-primary);
    color: #fff;
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all .25s;
    box-shadow: 0 3px 10px rgba(26, 26, 46, .2);
}
.co-btn-web:hover {
    background: var(--co-primary-light);
    color: #fff;
    transform: translateY(-1px);
    text-decoration: none;
}

/* ── Section Cards (main column) ── */
.co-section-card {
    background: #fff;
    border-radius: var(--co-radius);
    box-shadow: 0 2px 20px rgba(26, 26, 46, .07);
    margin-bottom: 24px;
    overflow: hidden;
}
.co-section-card__head {
    padding: 15px 20px;
    border-bottom: 2px solid var(--co-accent);
    display: flex;
    align-items: center;
    gap: 8px;
}
.co-section-card__head h5 {
    font-size: 15px;
    font-weight: 700;
    color: var(--co-primary);
    margin: 0;
}
.co-section-card__head > i { color: var(--co-accent); font-size: 16px; }
.co-section-card__body { padding: 20px; }

/* ── Description ── */
.co-desc-body    { font-size: 15px; color: #444; line-height: 1.9; }
.co-desc-secondary {
    font-size: 14px;
    color: var(--co-muted);
    line-height: 1.8;
    border-top: 1px solid var(--co-border);
    margin-top: 14px;
    padding-top: 14px;
}

/* ── Related Companies ── */
.co-related-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--co-light);
    border-radius: 10px;
    text-decoration: none;
    transition: all .2s;
    margin-bottom: 8px;
}
.co-related-item:hover {
    background: var(--co-primary-faint);
    text-decoration: none;
    transform: translateX(-3px);
}
.co-related-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--co-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.co-related-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.co-related-logo i   { color: var(--co-muted); font-size: 18px; }
.co-related-name     { font-size: 14px; font-weight: 700; color: var(--co-text); margin-bottom: 2px; }
.co-related-city     { font-size: 12px; color: var(--co-muted); display: flex; align-items: center; gap: 3px; }
.co-related-city i   { color: var(--co-accent); font-size: 10px; }

/* ── Sidebar Contact Card ── */
.co-sidebar-card {
    background: #fff;
    border-radius: var(--co-radius);
    box-shadow: 0 2px 20px rgba(26, 26, 46, .07);
    margin-bottom: 24px;
    overflow: hidden;
}
.co-sidebar-card__head {
    background: var(--co-primary);
    color: #fff;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
}
.co-sidebar-card__body { padding: 14px 16px; }

.co-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    background: var(--co-light);
    border-radius: 10px;
    margin-bottom: 8px;
    text-decoration: none;
    transition: background .2s;
}
.co-contact-item:hover { background: var(--co-primary-faint); text-decoration: none; }
.co-contact-item:last-child { margin-bottom: 0; }

.co-contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 15px;
    color: #fff;
}
.co-contact-label  { font-size: 11px; color: var(--co-muted); display: block; margin-bottom: 1px; }
.co-contact-value  { font-size: 14px; font-weight: 600; color: var(--co-text); display: block; }

/* ── Social Links ── */
.co-social-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 18px;
}
.co-social-btn {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--co-light);
    border: 1.5px solid var(--co-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--co-primary);
    text-decoration: none;
    transition: all .25s;
}
.co-social-btn:hover {
    background: var(--co-primary);
    color: #fff;
    border-color: var(--co-primary);
    text-decoration: none;
    transform: translateY(-2px);
}

/* ── Back Button ── */
.co-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--co-accent);
    color: #fff;
    border-radius: 30px;
    padding: 10px 26px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all .25s;
    box-shadow: 0 3px 12px rgba(220, 53, 69, .3);
}
.co-back-btn:hover {
    background: #c82333;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

/* ── Responsive ── */
@media (max-width: 991px) {
}
@media (max-width: 767px) {
    .co-header-card { padding: 18px 16px; }
    .co-header-card--pulled { margin-top: -50px; }
    .co-company-name { font-size: 20px; }
    .co-hero h1 { font-size: 20px; }
    .co-banner { height: 200px; }
    .co-logo-box { width: 74px; height: 74px; }
}
