/* ============================================
   TILES E-COMMERCE - KENYAN CLAY & CLEAN LINES
   COLOR PALETTE: 80-15-5 RULE
   ============================================
   80% Dominant (Base): Clean White & Off-White
   15% Secondary: Warm Earth/Construction
   5% Accent (Primary Brand Color): Strong Brick Red
   ============================================ */

/* ============================================
   ROOT VARIABLES & BASE STYLES
   ============================================ */

:root {
    /* Primary Colors (5% - CTA & Important Actions) */
    --primary-red: #C0392B;           /* Deep brick red - Primary CTA */
    --primary-red-dark: #A93226;      /* Darker red for hover */
    --primary-red-light: #E74C3C;     /* Lighter red for accents */
    
    /* Secondary Colors (15% - Supporting Elements) */
    --secondary-taupe: #D7CCC8;       /* Light taupe - Backgrounds */
    --secondary-taupe-light: #EFEBE9; /* Very light taupe - Subtle backgrounds */
    --secondary-taupe-medium: #BCAAA4; /* Medium taupe - Borders */
    --secondary-taupe-dark: #8D6E63;  /* Darker taupe - Text on light bg */
    
    /* Neutral Colors (80% - Main Background & Text) */
    --neutral-white: #FFFFFF;         /* Pure white - Main background */
    --neutral-light: #F8F9FA;         /* Off-white - Section backgrounds */
    --neutral-gray: #6C757D;          /* Medium gray - Secondary text */
    --neutral-dark: #2C3E50;          /* Dark - Primary text */
    
    /* Font families - Industrial & Clean */
    --font-heading: 'Montserrat', 'Segoe UI', Tahoma, sans-serif;
    --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    
    /* Base font size */
    font-size: 16px;
}

/* Base Typography Setup */
body {
    font-family: var(--font-body);
    line-height: 1.6;
    font-size: 1rem;
    color: var(--neutral-dark);
    background-color: var(--neutral-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   BUTTON STYLES (CTA) - 5% Primary Color
   ============================================ */

.btn {
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 0.75rem 1.75rem;
    border-radius: 4px;
    border-width: 2px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-transform: uppercase;
}

/* Primary Button - 5% Usage (Main CTA) */
.btn-primary {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    color: var(--neutral-white);
    box-shadow: 0 2px 8px rgba(192, 57, 43, 0.25);
}

.btn-primary:hover, 
.btn-primary:focus {
    background-color: var(--primary-red-dark);
    border-color: var(--primary-red-dark);
    color: var(--neutral-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(192, 57, 43, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(192, 57, 43, 0.3);
}

/* Secondary Button - Red Outline (15% Usage) */
.btn-outline-primary,
.btn-secondary {
    background-color: transparent;
    border-color: var(--primary-red);
    color: var(--primary-red);
    box-shadow: none;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-secondary:hover,
.btn-secondary:focus {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    color: var(--neutral-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(192, 57, 43, 0.3);
}

/* Button Sizes */
.btn-lg {
    font-size: 1.125rem;
    padding: 0.875rem 2.25rem;
    letter-spacing: 0.75px;
    border-radius: 6px;
}

.btn-sm {
    font-size: 0.8125rem;
    padding: 0.5rem 1.25rem;
    border-radius: 3px;
}

/* ============================================
   NAVIGATION STYLES
   ============================================ */

/* Navigation brand */
.navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--neutral-dark) !important;
    text-transform: uppercase;
}

/* Navigation items */
.navbar-nav .nav-link {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
    color: var(--neutral-dark);
    padding: 0.5rem 1rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-red) !important;
}

/* Desktop Navigation - Center Menu Items */
@media (min-width: 992px) {
    .navbar-nav.mx-auto {
        flex-grow: 1;
        justify-content: center;
        max-width: 70%;
    }
}

/* Mobile Navigation */
@media (max-width: 991px) {
    .navbar-collapse {
        margin-top: 1rem;
    }
    
    .navbar-nav {
        padding: 0.5rem 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--secondary-taupe-medium);
    }
}

/* Navbar Toggle Button */
.navbar-toggler {
    padding: 0.5rem;
    font-size: 1.25rem;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: 2px solid var(--primary-red);
}

/* ============================================
   HEADING STYLES - Strong & Industrial
   ============================================ */

h1, .h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--neutral-dark);
    letter-spacing: -0.5px;
}

h2, .h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.875rem;
    color: var(--neutral-dark);
}

h3, .h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: var(--neutral-dark);
}

h4, .h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.625rem;
}

h5, .h5 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

h6, .h6 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Display headings */
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    color: var(--neutral-dark);
}

/* ============================================
   BODY TEXT & SPECIAL TEXT STYLES
   ============================================ */

p, .text-secondary {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
    color: var(--neutral-gray);
}

.lead {
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--neutral-gray);
}

/* ============================================
   CARD STYLES - Using Secondary Colors (15%)
   ============================================ */

.card {
    border: 1px solid var(--secondary-taupe-medium);
    transition: all 0.3s ease;
    background-color: var(--neutral-white);
}

.card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--neutral-dark);
}

.card-text {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--neutral-gray);
}

/* Product Card specific */
.product-card {
    border: 1px solid var(--secondary-taupe-light);
    transition: all 0.3s ease;
}

.product-card:hover {
    border-color: var(--primary-red);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.product-card .price {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-red);
}

/* ============================================
   BACKGROUND CLASSES
   ============================================ */

.bg-secondary-warm {
    background-color: var(--secondary-taupe-light) !important;
}

.bg-light {
    background-color: var(--neutral-light) !important;
}

.bg-primary {
    background-color: var(--primary-red) !important;
}

/* ============================================
   HERO SECTION - TILES FOCUS
   ============================================ */

.hero-section {
    padding: 4rem 0 3rem;
    background: linear-gradient(135deg, var(--neutral-white) 0%, var(--secondary-taupe-light) 100%);
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--neutral-dark);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--neutral-gray);
    margin-bottom: 2rem;
}

/* ============================================
   SEARCH BAR - PROMINENT
   ============================================ */

.search-bar {
    max-width: 700px;
    margin: 2rem auto;
}

.search-bar .form-control {
    border: 2px solid var(--secondary-taupe-medium);
    padding: 1rem 1.5rem;
    font-size: 1.0625rem;
    border-radius: 50px;
}

.search-bar .form-control:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 0.2rem rgba(192, 57, 43, 0.15);
}

/* ============================================
   CATEGORY GRID - SHOP BY SPACE
   ============================================ */

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.category-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.category-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(44, 62, 80, 0.9), transparent);
    padding: 1.5rem;
    color: white;
}

.category-card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

/* ============================================
   TRUST SIGNALS - LOCAL KENYA
   ============================================ */

.trust-signals {
    background-color: var(--secondary-taupe-light);
    padding: 2rem;
    border-radius: 8px;
    margin: 3rem 0;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.trust-badge i {
    font-size: 2rem;
    color: var(--primary-red);
}

/* ============================================
   PRODUCT GRID
   ============================================ */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 4px;
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-red);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* ============================================
   FILTER SIDEBAR
   ============================================ */

.filter-group {
    margin-bottom: 2rem;
}

.filter-group-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    color: var(--neutral-dark);
}

.filter-option {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

.filter-option input[type="checkbox"] {
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-red);
}

/* ============================================
   BREADCRUMB
   ============================================ */

.breadcrumb {
    background-color: transparent;
    padding: 1rem 0;
    font-size: 0.875rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--neutral-gray);
}

.breadcrumb-item.active {
    color: var(--primary-red);
}

/* ============================================
   FORMS
   ============================================ */

.form-label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
    color: var(--neutral-dark);
}

.form-control,
.form-select {
    border: 2px solid var(--secondary-taupe-medium);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 0.2rem rgba(192, 57, 43, 0.15);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-primary {
    color: var(--primary-red) !important;
}

.text-muted {
    color: var(--neutral-gray) !important;
}

.badge {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 0.35rem 0.65rem;
}

.badge-primary {
    background-color: var(--primary-red);
}

.badge-sale {
    background-color: var(--primary-red-light);
}

/* ============================================
   LINKS
   ============================================ */

a {
    color: var(--primary-red);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-red-dark);
    text-decoration: underline;
}

/* ============================================
   FOOTER STYLES
   ============================================ */

footer {
    background-color: var(--secondary-taupe-light);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

footer h5 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--neutral-dark);
}

footer a {
    color: var(--neutral-gray);
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-red);
}

.footer-bottom {
    border-top: 1px solid var(--secondary-taupe-medium);
    padding-top: 1.5rem;
    margin-top: 2rem;
    text-align: center;
    color: var(--neutral-gray);
}

/* ============================================
   TILE CALCULATOR SECTION
   ============================================ */

.calculator-section {
    background-color: var(--neutral-light);
    padding: 3rem 0;
}

.calculator-card {
    background-color: var(--neutral-white);
    border: 2px solid var(--secondary-taupe-medium);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.calculator-result {
    background-color: var(--secondary-taupe-light);
    border-left: 4px solid var(--primary-red);
    padding: 1.5rem;
    margin-top: 1.5rem;
    border-radius: 4px;
}

.calculator-result-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-red);
}

/* ============================================
   RESPONSIVE TYPOGRAPHY
   ============================================ */

@media (max-width: 768px) {
    :root {
        font-size: 15px;
    }
    
    h1, .h1 { font-size: 2rem; }
    h2, .h2 { font-size: 1.75rem; }
    h3, .h3 { font-size: 1.375rem; }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    :root {
        font-size: 14px;
    }
    
    h1, .h1 { font-size: 1.75rem; }
    h2, .h2 { font-size: 1.5rem; }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   SPECIAL TILES FEATURES
   ============================================ */

/* Technical Specs Table */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.specs-table th,
.specs-table td {
    padding: 0.75rem;
    border: 1px solid var(--secondary-taupe-medium);
    text-align: left;
}

.specs-table th {
    background-color: var(--secondary-taupe-light);
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--neutral-dark);
}

/* Stock Status Indicators */
.stock-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.stock-status.in-stock {
    background-color: #d4edda;
    color: #155724;
}

.stock-status.out-of-stock {
    background-color: #f8d7da;
    color: #721c24;
}

.stock-status.low-stock {
    background-color: #fff3cd;
    color: #856404;
}

/* ============================================
   MEGA MENU - TILES NAVIGATION
   ============================================ */

.mega-menu {
    position: absolute;
    left: 0;
    right: 0;
    background-color: var(--neutral-white);
    border-top: 2px solid var(--primary-red);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 2rem;
    display: none;
}

.mega-menu.show {
    display: block;
}

.mega-menu-column {
    padding: 0 1rem;
}

.mega-menu-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--neutral-dark);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.mega-menu-link {
    display: block;
    padding: 0.5rem 0;
    color: var(--neutral-gray);
    transition: color 0.3s ease;
}

.mega-menu-link:hover {
    color: var(--primary-red);
    padding-left: 0.5rem;
}
