@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #1e3a8a; /* Deep corporate blue */
    --secondary: #0ea5e9;
    --success: #16a34a;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-page: #f1f5f9;
    --white: #ffffff;
    --border: #e2e8f0;
}

body { margin: 0; font-family: 'Inter', sans-serif; background: var(--bg-page); color: var(--text-main); }
a { text-decoration: none; }

/* B2B Header */
.header { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.header-top { padding: 15px 0; border-bottom: 1px solid var(--bg-page); }
.container { width: 95%; max-width: 1400px; margin: auto; }
.navbar { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.logo { font-size: 24px; font-weight: 700; color: var(--primary); letter-spacing: -0.5px; }

/* Search Bar (IndiaMart Style) */
.search-container { flex-grow: 1; max-width: 600px; display: flex; }
.search-input { width: 100%; padding: 12px 15px; border: 2px solid var(--primary); border-radius: 4px 0 0 4px; font-size: 14px; outline: none; }
.search-btn { background: var(--primary); color: var(--white); border: none; padding: 0 25px; border-radius: 0 4px 4px 0; cursor: pointer; font-weight: 600; transition: 0.2s; }
.search-btn:hover { background: #172554; }

/* Directory Layout (Sidebar + Grid) */
.directory-wrapper { display: grid; grid-template-columns: 260px 1fr; gap: 30px; padding: 30px 0; }

/* Left Sidebar Filters */
.sidebar { background: var(--white); border: 1px solid var(--border); border-radius: 6px; padding: 20px; height: fit-content; }
.filter-title { font-size: 14px; font-weight: 700; text-transform: uppercase; color: var(--text-main); margin-bottom: 15px; border-bottom: 2px solid var(--bg-page); padding-bottom: 8px; }
.filter-list { list-style: none; padding: 0; margin: 0 0 25px 0; }
.filter-item { padding: 8px 0; font-size: 14px; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; gap: 10px; transition: 0.2s; }
.filter-item:hover, .filter-item.active { color: var(--primary); font-weight: 600; }
.filter-item i { width: 16px; color: #cbd5e1; }
.filter-item.active i { color: var(--primary); }

/* B2B Service Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.b2b-card { background: var(--white); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; transition: 0.2s; display: flex; flex-direction: column; }
.b2b-card:hover { border-color: #cbd5e1; box-shadow: 0 10px 20px rgba(0,0,0,0.06); transform: translateY(-3px); }

/* Image Handling (Fixed Crop) */
.card-img-box { width: 100%; height: 180px; position: relative; background: #f8fafc; border-bottom: 1px solid var(--bg-page); }
.card-img { width: 100%; height: 100%; object-fit: contain; padding: 10px; box-sizing: border-box; } /* 'contain' displays full logo properly */
.verified-badge { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,0.9); color: var(--success); font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 4px; border: 1px solid #bbf7d0; display: flex; align-items: center; gap: 4px; box-shadow: 0 2px 4px rgba(0,0,0,0.05);}

/* Card Info */
.card-info { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.card-title { font-size: 16px; font-weight: 600; color: var(--primary); margin: 0 0 8px; line-height: 1.4; }
.card-price { font-size: 20px; font-weight: 700; color: var(--text-main); margin-bottom: 12px; }
.card-price span { font-size: 12px; font-weight: 500; color: var(--text-muted); }

/* Compact Tags */
.tags-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 15px; }
.tag { font-size: 11px; background: var(--bg-page); color: var(--text-muted); padding: 4px 8px; border-radius: 4px; border: 1px solid var(--border); }

.card-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 20px; flex-grow: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Actions */
.btn-group { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-enquire { background: var(--success); color: var(--white); text-align: center; padding: 10px; border-radius: 4px; font-size: 13px; font-weight: 600; border: none; cursor: pointer; transition: 0.2s; }
.btn-enquire:hover { background: #15803d; }
.btn-view { background: var(--white); color: var(--primary); text-align: center; padding: 10px; border-radius: 4px; font-size: 13px; font-weight: 600; border: 1px solid var(--primary); cursor: pointer; transition: 0.2s; }
.btn-view:hover { background: var(--bg-page); }

@media (max-width: 992px) {
    .directory-wrapper { grid-template-columns: 1fr; }
    .sidebar { display: none; /* Can be turned into a modal/dropdown on mobile */ }
    .search-container { max-width: 100%; }
}