/**
 * Elsafwa Trading Est. - CST Collection Stylesheet
 * =================================================
 * Scoped styles for the CST brand page (/brands/cst).
 * Bright production theme with EV hero banner, customer filters,
 * bright product cards, responsive specification drawers, and CTAs.
 */

/* Scoped Container */
.cst-collection {
    width: 100%;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
}

/* Category Intro & Featured EV Banner Component (Full-Cover Image, Zero Overlays/Tints) */
.cst-ev-banner-section {
    position: relative;
    width: 100%;
    min-height: 260px;
    margin-bottom: 36px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
}

/* Full-cover image layer occupying 100% of container */
.cst-ev-banner-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
    display: block;
    /* Clean natural image: zero overlays, filters, tints, or opacity layers */
}

/* Text and CTA content layer positioned above the image layer */
.cst-ev-banner-content {
    position: relative;
    z-index: 2;
    padding: 36px 48px;
    max-width: 600px;
}

.cst-ev-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 1);
    color: #047857;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
    width: fit-content;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.cst-ev-title {
    font-family: 'Outfit', sans-serif;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 10px;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.cst-ev-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #ffffff;
    margin-bottom: 20px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.cst-ev-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #059669;
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    padding: 11px 24px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.15s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    width: fit-content;
}

.cst-ev-btn:hover {
    background: #047857;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Category Section Titles */
.cst-section-title-wrap {
    margin: 40px 0 20px 0;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.cst-section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cst-section-count {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

/* Customer Filter Panel */
.cst-filter-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

.cst-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cst-filter-tab {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cst-filter-tab:hover, .cst-filter-tab.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.cst-filter-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.cst-search-box, .cst-rim-select {
    padding: 8px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
}

.cst-search-box { min-width: 200px; }

/* Product Cards Grid */
.cst-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.cst-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cst-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.cst-card-img-wrap {
    height: 220px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.cst-card-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cst-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.cst-card-cat {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #2563eb;
    font-weight: 800;
    margin-bottom: 4px;
}

.cst-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}

.cst-card-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cst-card-meta {
    font-size: 11px;
    color: #475569;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 6px;
}

.cst-card-cta {
    margin-top: auto;
    width: 100%;
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    font-weight: 700;
    font-size: 12px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}

.cst-card-cta:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/* Specification Modal / Drawer */
.cst-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cst-modal-backdrop.open {
    display: flex;
}

.cst-drawer-card {
    background: #ffffff;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.cst-drawer-header {
    padding: 20px 28px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cst-drawer-title {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}

.cst-drawer-close {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
}

.cst-drawer-body {
    padding: 28px;
}

.cst-drawer-hero {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.cst-drawer-img-wrap {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: #f8fafc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.cst-drawer-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cst-spec-table-wrap {
    overflow-x: auto;
    margin-bottom: 24px;
}

.cst-spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.cst-spec-table th, .cst-spec-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.cst-spec-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    .cst-ev-banner-content {
        padding: 24px;
    }
    .cst-ev-title {
        font-size: 22px;
    }
    .cst-drawer-hero {
        grid-template-columns: 1fr;
    }
    .cst-filter-panel {
        flex-direction: column;
        align-items: stretch;
    }
}
