/* ====================================================================
   BUILD KENYA - PURE CSS STYLESHEET
   Light-colored, modern construction depot aesthetic
   Light gray (#F8F9FA), safety red (#E31B23), dark charcoal (#111827)
   ==================================================================== */

:root {
    --primary-red: #E31B23;
    --primary-red-hover: #B9141B;
    --brand-green: #0C6B37;
    --brand-green-hover: #0A582D;
    --dark-charcoal: #111827;
    --bg-light: #F8F9FA;
    --surface-white: #FFFFFF;
    --border-color: #E2E8F0;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.5;
    font-size: 14px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.015em;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Utilities */
.site-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px;
}

.red-text {
    color: var(--primary-red) !important;
}

.font-bold {
    font-weight: 700;
}

.font-mono {
    font-family: monospace;
}

.font-huge {
    font-size: 1.5rem;
    font-family: var(--font-heading);
}

.badge-red {
    display: inline-block;
    background: var(--primary-red);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Top Announcement Bar */
.top-announcement-bar {
    background: var(--dark-charcoal);
    color: #CBD5E1;
    font-size: 11px;
    padding: 6px 0;
}

.top-bar-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-red);
    border-radius: 50%;
    display: inline-block;
}

.badge-pill {
    background: #1E293B;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
}

.top-phone strong {
    color: #fff;
}

.admin-link {
    color: #94A3B8;
    background: #1E293B;
    padding: 2px 8px;
    border-radius: 4px;
}

.admin-link:hover {
    color: #fff;
}

/* Main Header */
.main-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 20px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 42px;
    width: auto;
}

.brand-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 22px;
    letter-spacing: -0.02em;
    color: var(--dark-charcoal);
    line-height: 1;
}

.brand-sub {
    display: block;
    font-size: 9px;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.header-search {
    flex: 1;
    max-width: 480px;
    display: flex;
    position: relative;
}

.header-search input {
    width: 100%;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    background: #F1F5F9;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
}

.header-search input:focus {
    background: #fff;
    border-color: var(--primary-red);
}

.btn-search {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    background: var(--primary-red);
    color: #fff;
    border: none;
    padding: 0 14px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11px;
    cursor: pointer;
}

.nav-menu {
    display: flex;
    gap: 20px;
    font-size: 13px;
    font-weight: 700;
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--primary-red);
}

.btn-cart {
    background: var(--primary-red);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-badge {
    background: #fff;
    color: var(--primary-red);
    font-size: 11px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 10px;
}

/* Hero Section: Left Sidebar + Slider */
.hero-wrapper {
    margin-top: 15px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 16px;
    min-height: 440px;
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .hero-category-sidebar {
        display: none;
    }
}

.hero-category-sidebar {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.category-sidebar-header {
    background: var(--dark-charcoal);
    color: #fff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.category-sidebar-header h3 {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    color: #ffffff !important;
    margin: 0;
    letter-spacing: 0.5px;
}

.cat-count {
    color: var(--primary-red);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
    margin-left: 8px;
}

.category-menu-list {
    list-style: none;
    flex: 1;
}

.category-menu-list li a {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid #F1F5F9;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    transition: all 0.15s;
}

.category-menu-list li a:hover {
    background: #F8FAFC;
    color: var(--primary-red);
    padding-left: 20px;
}

.sidebar-till-box {
    background: #FEF2F2;
    padding: 12px 16px;
    border-top: 1px solid #FEE2E2;
    font-size: 11px;
}

.till-badge {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary-red);
    font-family: monospace;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #1E293B;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    padding: 40px;
}

.hero-slide.active {
    opacity: 1;
    position: relative;
}

.slide-content {
    max-width: 540px;
    color: #fff;
}

.promo-tag {
    background: var(--primary-red);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 12px;
}

.slide-title {
    font-family: var(--font-heading);
    font-size: 36px;
    line-height: 1.15;
    margin-bottom: 12px;
    color: #ffffff !important;
}

.slide-desc {
    font-size: 13px;
    color: #E2E8F0;
    margin-bottom: 20px;
    line-height: 1.6;
}

.slide-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--primary-red);
    color: #fff;
    font-weight: 800;
    font-size: 12px;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

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

.btn-secondary {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    font-weight: 700;
    font-size: 12px;
    padding: 10px 18px;
    border-radius: 8px;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}

.prev-btn { left: 16px; }
.next-btn { right: 16px; }

/* Features Strip */
.features-strip {
    margin-top: 20px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
}

.feat-icon {
    font-size: 24px;
}

.feature-item strong {
    color: var(--dark-charcoal);
    display: block;
}

.feature-item p {
    color: var(--text-muted);
    font-size: 11px;
}

/* Sections */
.section-block {
    margin-top: 35px;
}

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

.section-sub {
    font-size: 10px;
    font-weight: 800;
    color: var(--primary-red);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 24px;
    color: var(--dark-charcoal);
}

.view-all-link {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-red);
}

/* Category Cards Grid */
.category-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.category-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.cat-img-box {
    position: relative;
    height: 150px;
    background: #E2E8F0;
}

.cat-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cat-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent, rgba(15,23,42,0.85));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 12px;
    color: #fff;
}

.cat-badge {
    font-size: 9px;
    text-transform: uppercase;
    font-weight: 800;
    color: #94A3B8;
}

.cat-img-overlay h3 {
    font-size: 14px;
    font-weight: 700;
}

.cat-desc {
    padding: 12px;
    font-size: 11px;
    color: var(--text-muted);
}

/* Product Cards Grid */
.product-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.product-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
}

.prod-img-box {
    position: relative;
    height: 160px;
    background: #F1F5F9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.prod-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-pill {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
}

.bulk-pill {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary-red);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
}

.prod-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.prod-name {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
    height: 36px;
    overflow: hidden;
}

.prod-name a:hover {
    color: var(--primary-red);
}

.prod-price {
    font-size: 16px;
    color: var(--dark-charcoal);
    margin-bottom: 8px;
}

.prod-price strong {
    font-family: monospace;
    font-size: 18px;
}

.prod-price span {
    font-size: 11px;
    color: var(--text-muted);
}

.bulk-tier-box {
    background: #F8FAFC;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 8px;
    margin-bottom: 10px;
}

.bulk-tier-box small {
    display: block;
    font-weight: 700;
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.tier-chips {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.tier-chip {
    background: #fff;
    border: 1px solid #CBD5E1;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 4px;
}

.prod-actions {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.qty-group {
    display: flex;
    gap: 6px;
}

.input-qty {
    width: 60px;
    padding: 6px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 12px;
    text-align: center;
    font-weight: bold;
}

.btn-add-cart {
    flex: 1;
    background: var(--primary-red);
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11px;
    cursor: pointer;
}

.btn-add-cart:hover {
    background: var(--primary-red-hover);
}

.btn-wa-order {
    background: var(--brand-green);
    color: #fff;
    text-align: center;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.btn-wa-order:hover {
    background: var(--brand-green-hover);
}

/* Material Estimator */
.estimator-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
}

.estimator-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.estimator-title {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--dark-charcoal);
}

.estimator-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.calc-tabs {
    display: flex;
    background: #F1F5F9;
    padding: 4px;
    border-radius: 8px;
    gap: 4px;
}

.calc-tab {
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
}

.calc-tab.active {
    background: #fff;
    color: var(--dark-charcoal);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.estimator-body {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 24px;
}

@media (max-width: 800px) {
    .estimator-body {
        grid-template-columns: 1fr;
    }
}

.estimator-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-row label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 4px;
}

.input-row input, .input-row select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    background: #F8FAFC;
    font-weight: 700;
}

.estimator-results {
    background: #F8FAFC;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 14px 0;
}

.res-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
}

.res-title {
    display: block;
    font-size: 9px;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--text-muted);
}

.res-val {
    display: block;
    font-size: 24px;
    font-weight: 800;
    font-family: monospace;
    color: var(--dark-charcoal);
}

.res-unit {
    font-size: 11px;
    color: var(--text-muted);
}

/* Brands Grid */
.brand-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.brand-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.brand-logo-text {
    font-family: var(--font-heading);
    font-size: 18px;
    margin-bottom: 6px;
}

.brand-card h4 {
    font-size: 12px;
    font-weight: 700;
}

.brand-card p {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Footer */
.main-footer {
    background: var(--dark-charcoal);
    color: #CBD5E1;
    margin-top: 50px;
    padding-top: 35px;
    border-top: 4px solid var(--primary-red);
}

.footer-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding-bottom: 30px;
    border-bottom: 1px solid #1E293B;
}

.feature-box h4 {
    color: #fff;
    font-size: 13px;
    margin-bottom: 4px;
}

.feature-box p {
    font-size: 11px;
    color: #94A3B8;
}

.footer-body-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 24px;
    padding: 35px 0;
}

@media (max-width: 850px) {
    .footer-body-grid {
        grid-template-columns: 1fr;
    }
}

.brand-title-footer {
    font-family: var(--font-heading);
    font-size: 24px;
    color: #fff;
    display: block;
    margin-bottom: 10px;
}

.till-callout-footer {
    margin-top: 15px;
    background: #0F172A;
    border: 1px solid #1E293B;
    padding: 12px;
    border-radius: 8px;
    max-width: 320px;
    font-size: 11px;
}

.till-number-huge {
    font-family: monospace;
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-red);
}

.footer-col h3 {
    color: #fff;
    font-size: 13px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.footer-col ul {
    list-style: none;
    font-size: 12px;
}

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

.footer-col ul li a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #1E293B;
    padding: 18px 0;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #64748B;
    flex-wrap: wrap;
    gap: 10px;
}

/* Floating WhatsApp */
.whatsapp-widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}

.btn-whatsapp-floating {
    background: var(--brand-green);
    color: #fff;
    padding: 12px 20px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.wa-dot {
    width: 8px;
    height: 8px;
    background: #34D399;
    border-radius: 50%;
}

/* Admin Dashboard CSS */
.admin-body {
    background: #F1F5F9;
}

.admin-header {
    background: var(--dark-charcoal);
    color: #fff;
    padding: 14px 0;
}

.admin-nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-tag {
    background: var(--primary-red);
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

.admin-nav-links {
    display: flex;
    gap: 16px;
    font-size: 12px;
    font-weight: 700;
}

.admin-nav-links a:hover, .admin-nav-links a.active {
    color: var(--primary-red);
}

.live-store-btn {
    background: #334155;
    padding: 4px 10px;
    border-radius: 6px;
    color: #fff !important;
}

.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.kpi-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
}

.kpi-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
}

.kpi-val {
    font-size: 24px;
    font-weight: 800;
    font-family: monospace;
    margin: 4px 0;
}

.admin-panel {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-top: 10px;
}

.admin-table th {
    text-align: left;
    padding: 8px 12px;
    background: #F8FAFC;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    color: var(--text-muted);
}

.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #F1F5F9;
}

.badge-status {
    background: #EFF6FF;
    color: #1D4ED8;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 10px;
}
