/* =====================================================================
   🎨 BRAND ARCHITECTURAL COLOR MATRICES & RESET TOKENS
   ===================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: #fdfcfb; /* Alabaster Cream */
  color: #2c2520;           /* Earth Charcoal */
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

/* Global Typography Components */
h1, h2, h3, h4 {
  color: #2c2520;
  font-weight: 600;
}

.btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.75rem 1.5rem;
  background-color: #8c6239; /* Woodlam Bronze */
  color: #ffffff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

.btn:hover {
  background-color: #6d4c2b;
}

/* =====================================================================
   🍔 SHARED SYSTEM STICKY HEADER & INTEGRATED LOGO LAYOUT
   ===================================================================== */
.global-header {
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(44, 37, 32, 0.04);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  flex-direction: column; /* Mobile first: stacked alignment */
  align-items: center;
  gap: 0.85rem;
  padding: 1.25rem 0;
}

.brand-identity {
  text-decoration: none;
  color: inherit;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-emblem {
  font-size: 2.25rem;
  line-height: 1;
}

.logo-text-block {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #422323; /* Mahogany Accent */
  line-height: 1.1;
}

.logo-slogan {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #8c6239;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.nav-item {
  text-decoration: none;
  color: #6d5f56;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  padding: 4px 6px;
  transition: color 0.2s;
}

.nav-item:hover {
  color: #8c6239;
}

/* =====================================================================
   🏡 VIEW 1: FLUID HOME LANDING STRATIFIED PACKAGES
   ===================================================================== */
.hero-banner {
  background-color: #f5f0eb;
  border-bottom: 1px solid #eadecf;
  padding: 3rem 1.25rem;
  margin-bottom: 2rem;
}

.hero-banner h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.hero-banner p {
  font-size: 1rem;
  color: #6d5f56;
  max-width: 700px;
  margin: 0 auto;
}

.category-showcase-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.category-card {
  background-color: #ffffff;
  border: 1px solid #eadecf;
  border-radius: 6px;
  padding: 2rem 1.5rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.01);
  transition: border-color 0.2s, transform 0.2s;
}

.category-card:hover {
  border-color: #8c6239;
  transform: translateY(-2px);
}

/* =====================================================================
   📊 VIEW 2: RESPONSE DASHBOARD CONTROLS & FILTER FILTRATION MATRIX
   ===================================================================== */
.controls-panel {
  background-color: #ffffff;
  border: 1px solid #eadecf;
  border-radius: 6px;
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.search-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.search-wrapper label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #6d5f56;
}

.custom-select {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #c8b9a6;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #2c2520;
  background-color: #ffffff;
  outline: none;
}

.custom-select:focus {
  border-color: #8c6239;
}

/* Product Catalogue Showcase Grid */
.product-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.product-card {
  background-color: #ffffff;
  border: 1px solid #eadecf;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 6px rgba(44, 37, 32, 0.02);
}

.img-box {
  position: relative;
  padding-top: 66%; /* Defends aspect boxes layout shift */
  background-color: #faf9f7;
}

.img-box img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.prod-name {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.prod-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: #8c6239;
  margin-bottom: 0.75rem;
}

.mat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}

.tag {
  background-color: #f5f0eb;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  color: #6d5f56;
  text-transform: uppercase;
}

/* =====================================================================
   📐 VIEW 3: TECHNICAL PRODUCT DETAILS & ESTIMATOR COMPONENT WIDGETS
   ===================================================================== */
.product-detail-layout {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin-top: 1.5rem;
  margin-bottom: 3rem;
}

.detail-gallery-column, .detail-info-column {
  width: 100%;
}

.swatch-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  outline: 1px solid #c8b9a6;
  cursor: pointer;
  transition: transform 0.15s ease-in-out;
}

.swatch.active {
  transform: scale(1.15);
  outline: 2px solid #8c6239 !important;
}

/* Live Pricing Dynamic Estimator Form Shell */
.calc-box {
  background-color: #faf8f5;
  border: 1px dashed #c8b9a6;
  border-radius: 6px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.calc-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #8c6239;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.calc-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.calc-field {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #c8b9a6;
  border-radius: 4px;
  font-size: 0.95rem;
  outline: none;
}

.calc-field:focus {
  border-color: #8c6239;
}

.calc-result-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: #2c2520;
  background-color: #eadecf;
  padding: 0.75rem;
  border-radius: 4px;
  margin-top: 1rem;
}

.details-list {
  padding-left: 1.25rem;
  font-size: 0.95rem;
  color: #554a42;
  margin-bottom: 1.5rem;
}

.details-list li {
  margin-bottom: 0.5rem;
}

/* Shared Sticky Base Systems Footer */
.global-footer {
  background-color: #2c2520;
  color: #ae9f95;
  padding: 2rem 0;
  font-size: 0.85rem;
}

.footer-content-split {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

/* =====================================================================
   🖥️ LAYOUT RESPONSIVENESS OVERRIDES & DESIGN BREAKPOINT BREAKS
   ===================================================================== */
@media (min-width: 576px) {
  .nav-container {
    flex-direction: row;
    justify-content: space-between;
    padding: 1.5rem 0;
  }
  
  .nav-links {
    gap: 1.5rem;
  }
  
  .category-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }

  .product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .btn {
    display: inline-block;
    width: auto;
  }
  
  .footer-content-split {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (min-width: 992px) {
  .hero-banner {
    padding: 4.5rem 0;
  }

  .hero-banner h1 {
    font-size: 3rem;
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .controls-panel {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .search-wrapper {
    flex-direction: row;
    align-items: center;
    width: auto;
  }

  .custom-select {
    width: 260px;
  }

  .product-detail-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: start;
  }
}

/* Sub-Category Interactive Filter Navigation Menu Styling */
.sub-nav-btn {
  padding: 0.5rem 1rem;
  background-color: #ffffff;
  border: 1px solid #eadecf;
  color: #6d5f56;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.sub-nav-btn.active, .sub-nav-btn:hover {
  background-color: #8c6239;
  border-color: #8c6239;
  color: #ffffff;
}

/* --- FIXED: Advanced Image Aspect Containment Layout --- */
.containment-box {
  background-color: #ffffff !important;
  border: 1px solid #eadecf;
  border-radius: 6px;
  overflow: hidden;
}

/* Overrides the harsh cover cropping, fitting full image bounds inside the grid space */
.containment-box img {
  object-fit: contain !important;
  background-color: #ffffff;
}

/* Thumbnail Row Layout Configuration */
.gallery-thumbs-wrapper {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.mini-gallery-thumb {
  width: 70px;
  height: 70px;
  object-fit: contain; /* Prevents thumbnails from clipping */
  background-color: #ffffff;
  border: 1px solid #eadecf;
  border-radius: 4px;
  cursor: pointer;
  padding: 2px;
  transition: all 0.15s ease-in-out;
}

.mini-gallery-thumb:hover {
  border-color: #8c6239;
}

.mini-gallery-thumb.active-thumb {
  border-color: #8c6239;
  outline: 2px solid #8c6239;
  transform: scale(1.02);
}

/* --- Custom Local Brand Logo Asset Layout Mappings --- */
.logo-image-asset {
  height: 80px;             /* Constrains graphic space alignment seamlessly */
  width: auto;              /* Enforces native structural aspect ratio preservation */
  object-fit: contain;      /* Defends image parameters from cutting or stretching */
  display: inline-block;
  vertical-align: middle;
}

/* Enhances header alignment spacing metrics for custom image row tracking */
.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* --- FIXED: Force Brand Identity Anchor Box to Fill Full Space --- */
.brand-identity {
  display: block;          /* Forces the link to behave as a solid layout block */
  text-decoration: none;   /* Clears out any unwanted underline decoration lines */
  color: inherit;          /* Inherits your premium brand typography color tokens */
  cursor: pointer;         /* Changes cursor to hand pointer across the whole logo */
  width: auto;
}

/* Enhances header alignment spacing metrics for custom image row tracking */
.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  pointer-events: none;    /* Crucial: Stops inner items from blocking the outer link click */
}

/* --- Concise Dropdown Menu Component Styles --- */
.nav-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.nav-dropdown-trigger {
  background: none;
  border: none;
  color: #6d5f56;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  padding: 4px 6px;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-dropdown-trigger:hover, .nav-dropdown-wrapper:hover .nav-dropdown-trigger {
  color: #8c6239;
}

/* Hover-activated floating menu tray for seamless zero-js interaction */
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ffffff;
  min-width: 210px;
  box-shadow: 0 4px 15px rgba(44, 37, 32, 0.08);
  border: 1px solid #eadecf;
  border-radius: 4px;
  padding: 0.5rem 0;
  z-index: 200;
}

.nav-dropdown-wrapper:hover .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  color: #554a42;
  padding: 0.6rem 1.25rem;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
  transition: background-color 0.15s, color 0.15s;
}

.nav-dropdown-menu a:hover {
  background-color: #f5f0eb;
  color: #8c6239;
}

/* Fluid responsive adjustments for mobile display viewports overrides */
@media (max-width: 575px) {
  .nav-dropdown-wrapper { position: static; width: 100%; text-align: center; }
  .nav-dropdown-menu { position: static; transform: none; width: 100%; box-shadow: none; border: none; background: #faf9f7; padding-left: 1rem;}
  .nav-dropdown-trigger { width: 100%; padding: 6px 0; }
}
