/*
Theme Name: Derjam Kenya
Theme URI: https://derjamkenya.co.ke
Author: Derjam Business Solutions
Author URI: https://derjamkenya.co.ke
Description: A professional building materials supplier theme for Derjam Kenya. Features hero slider, product grid, testimonials carousel, about section, and contact section. Fully customizable via WordPress Customizer.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: derjam
Tags: business, e-commerce, responsive-layout, custom-colors, custom-logo, featured-images, footer-widgets, full-width-template, sticky-post, theme-options

/*--------------------------------------------------------------
# CSS Variables & Root
--------------------------------------------------------------*/
:root {
  --primary: #2C3E50;
  --primary-foreground: #F8F9FA;
  --accent: #E67E22;
  --accent-foreground: #FFFFFF;
  --background: #FAFBFC;
  --foreground: #0F172A;
  --border: #E2E8F0;
  --muted-foreground: #64748B;
}

/*--------------------------------------------------------------
# Reset & Base
--------------------------------------------------------------*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

img {
  max-width: 100%;
  height: auto;
}

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

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/*--------------------------------------------------------------
# Container
--------------------------------------------------------------*/
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container { padding: 0 1.5rem; }
}
@media (min-width: 1024px) {
  .container { padding: 0 2rem; }
}

/*--------------------------------------------------------------
# Buttons
--------------------------------------------------------------*/
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--accent);
  color: var(--accent-foreground);
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn:hover {
  background-color: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
  color: #fff;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid white;
  color: white;
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

/*--------------------------------------------------------------
# Header & Navigation
--------------------------------------------------------------*/
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: white;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-box {
  width: 40px;
  height: 40px;
  background-color: var(--primary);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.125rem;
  font-family: 'Poppins', sans-serif;
  flex-shrink: 0;
}

.logo-text .site-name {
  font-size: 1.25rem;
  color: var(--primary);
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

.logo-text .site-tagline {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin: 0;
  font-weight: 400;
}

.site-nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .site-nav { display: flex; }
}

.site-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-nav a:hover {
  color: var(--primary);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.25rem;
  background: none;
  border: none;
}

@media (min-width: 768px) {
  .mobile-menu-toggle { display: none; }
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--foreground);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0;
  background: white;
  border-top: 1px solid var(--border);
  padding: 1rem 0;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--foreground);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s;
}

.mobile-nav a:hover {
  background-color: #f8f9fa;
  color: var(--primary);
}

.mobile-nav a:last-child {
  border-bottom: none;
}

@media (min-width: 768px) {
  .logo-text { display: flex; flex-direction: column; }
}

@media (max-width: 768px) {
  .logo-text { display: none; }
}

/*--------------------------------------------------------------
# Hero Section
--------------------------------------------------------------*/
.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--primary);
  color: white;
  height: 500px;
  display: flex;
  align-items: center;
}

@media (min-width: 768px) {
  .hero { height: 600px; }
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

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

.hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
}

.hero-content-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-text {
  max-width: 42rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-text h2 {
  font-size: 2rem;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .hero-text h2 { font-size: 3rem; }
}

.hero-text p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1rem;
}

@media (min-width: 640px) {
  .hero-buttons { flex-direction: row; }
}

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 0.75rem;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-nav:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

.hero-nav.prev { left: 1rem; }
.hero-nav.next { right: 1rem; }

.hero-indicators {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 0.5rem;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active {
  background-color: var(--accent);
  width: 32px;
  border-radius: 6px;
}

/*--------------------------------------------------------------
# Section Shared Styles
--------------------------------------------------------------*/
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 1.875rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .section-header h2 { font-size: 2.25rem; }
}

.section-header p {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 42rem;
  margin: 0 auto;
}

/*--------------------------------------------------------------
# Products Section
--------------------------------------------------------------*/
.products-section {
  padding: 5rem 0;
  background-color: white;
}

@media (min-width: 768px) {
  .products-section { padding: 8rem 0; }
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}

.product-card {
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  background-color: white;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--accent);
  transform: translateY(-4px);
}

.product-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  background-color: #f3f4f6;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-info h3 {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.product-info p {
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  font-size: 0.875rem;
  flex-grow: 1;
}

.product-link {
  display: flex;
  align-items: center;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  gap: 0.5rem;
}

.product-card:hover .product-link {
  gap: 0.75rem;
}

/*--------------------------------------------------------------
# Testimonials Section
--------------------------------------------------------------*/
.testimonials-section {
  padding: 5rem 0;
  background-color: #f8f9fa;
}

@media (min-width: 768px) {
  .testimonials-section { padding: 8rem 0; }
}

.testimonials-carousel {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.testimonial-card {
  background-color: white;
  border-radius: 0.5rem;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.stars {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  color: #fbbf24;
}

.testimonial-text {
  font-size: 1.125rem;
  color: var(--foreground);
  margin-bottom: 1.5rem;
  line-height: 1.8;
  font-style: italic;
}

.testimonial-author {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.testimonial-company {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/*--------------------------------------------------------------
# About Section
--------------------------------------------------------------*/
.about-section {
  padding: 5rem 0;
  background-color: white;
}

@media (min-width: 768px) {
  .about-section { padding: 8rem 0; }
}

.about-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 768px) {
  .about-content { grid-template-columns: 1fr 1fr; }
}

.about-text h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.about-text p {
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 640px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--accent);
  font-family: 'Poppins', sans-serif;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 0.5rem;
}

.about-image {
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.about-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

/*--------------------------------------------------------------
# Contact Section
--------------------------------------------------------------*/
.contact-section {
  padding: 5rem 0;
  background-color: var(--primary);
  color: white;
}

@media (min-width: 768px) {
  .contact-section { padding: 8rem 0; }
}

.contact-section .section-header h2 {
  color: white;
}

.contact-section .section-header p {
  color: rgba(255, 255, 255, 0.8);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  text-align: center;
}

@media (min-width: 768px) {
  .contact-content {
    grid-template-columns: repeat(3, 1fr);
    text-align: left;
  }
}

.contact-item {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.75rem;
  padding: 2rem 1.5rem;
  transition: background 0.3s;
}

.contact-item:hover {
  background: rgba(255,255,255,0.1);
}

.contact-item h3 {
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.contact-item p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

.contact-item a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: #fbbf24;
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.site-footer {
  background-color: rgba(44, 62, 80, 0.97);
  color: white;
  padding: 3rem 0 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

/*--------------------------------------------------------------
# WhatsApp Floating Button
--------------------------------------------------------------*/
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  z-index: 40;
  text-decoration: none;
}

.whatsapp-float:hover {
  background-color: #20BA5A;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transform: scale(1.1);
  color: white;
}

/*--------------------------------------------------------------
# WordPress Core Compatibility
--------------------------------------------------------------*/
.wp-block-image { margin: 0; }
.aligncenter { text-align: center; }
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}


/*--------------------------------------------------------------
# Top Header
--------------------------------------------------------------*/
.top-header {
  background-color: #2C3E50;
  color: white;
  padding: 0.75rem 0;
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-header-left,
.top-header-right {
  display: flex;
  gap: 1.5rem;
}

.top-header-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s ease;
}

.top-header-link:hover {
  color: #E67E22;
}

.top-header-link .icon {
  font-size: 1rem;
}

@media (max-width: 768px) {
  .top-header .container {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .top-header-left,
  .top-header-right {
    width: 100%;
    justify-content: center;
  }
}

/*--------------------------------------------------------------
# Latest Products Section
--------------------------------------------------------------*/
.latest-products-section {
  padding: 4rem 0;
  background-color: #F8F9FA;
}

.latest-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.latest-product-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.latest-product-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
}

.latest-product-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: #E2E8F0;
}

.latest-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.latest-product-card:hover .latest-product-image img {
  transform: scale(1.05);
}

.latest-product-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.latest-product-info h3 {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.latest-product-info h3 a {
  color: #2C3E50;
  text-decoration: none;
  transition: color 0.3s ease;
}

.latest-product-info h3 a:hover {
  color: #E67E22;
}

.latest-product-price {
  margin: 0.75rem 0;
  font-weight: 600;
  color: #E67E22;
  font-size: 1.25rem;
}

.latest-product-info .btn {
  margin-top: auto;
  align-self: flex-start;
}

@media (max-width: 768px) {
  .latest-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }
  
  .latest-product-image {
    height: 150px;
  }
  
  .latest-product-info {
    padding: 1rem;
  }
}

/*--------------------------------------------------------------
# Policy Pages
--------------------------------------------------------------*/
.policy-container {
  padding: 4rem 0;
  min-height: 60vh;
}

.policy-content {
  max-width: 800px;
  margin: 0 auto;
}

.policy-content h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: #2C3E50;
}

.policy-content h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #2C3E50;
  border-bottom: 2px solid #E67E22;
  padding-bottom: 0.5rem;
}

.policy-content h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #2C3E50;
}

.policy-content p {
  margin-bottom: 1rem;
  line-height: 1.8;
  color: #0F172A;
}

.policy-content ul,
.policy-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.policy-content li {
  margin-bottom: 0.75rem;
  line-height: 1.8;
  color: #0F172A;
}

.policy-content strong {
  color: #2C3E50;
}

@media (max-width: 768px) {
  .policy-container {
    padding: 2rem 0;
  }
  
  .policy-content h1 {
    font-size: 1.75rem;
  }
  
  .policy-content h2 {
    font-size: 1.25rem;
  }
}
