/* ================================
   RESET & BASE STYLES
================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

/* ================================
   HEADER & NAVIGATION
================================ */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #333;
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header .logo {
  height: 50px;
}

/* Menu wrapper inside nav */
.menu-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  gap: 20px;
}

/* Desktop nav list */
nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

nav ul li a:hover {
  color: #a0522d;
}

/* Dropdown (desktop) */
.dropdown {
  position: relative;
}

.dropdown > a {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dropdown .caret {
  font-size: 0.6em;
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #333;
  list-style: none;
  padding: 10px 0;
  z-index: 1000;
}

.dropdown:hover .submenu {
  display: block;
}

.submenu li {
  width: 220px;
}

.submenu li a {
  display: block;
  padding: 10px;
  color: #fff;
  text-decoration: none;
}

.submenu li a:hover {
  background: #444;
}

/* ================================
   MOBILE HEADER / NAV
================================ */
.menu-toggle {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

/* Mobile tweaks */
@media (max-width: 768px) {
  .site-header {
    display: grid;
    grid-template-columns: auto 1fr auto; /* left | center | right */
    align-items: center;
    gap: 10px;
  }

  .menu-toggle {
    display: block;
    justify-self: start;
  }

  .logo-wrap {
    justify-self: center;
    display: flex;
    align-items: center;
  }

  .quote-btn {
    justify-self: end;
    padding: 8px 16px;
    margin: 0;
  }

  nav ul {
    flex-direction: column;
    gap: 10px;
  }

  .desktop-nav {
    display: none !important;
  }
}

/* ================================
   MOBILE SLIDE-OUT PANEL
================================ */
.mobile-panel {
  display: none;              /* hidden by default */
  position: fixed;
  top: 0;
  left: -260px;               /* off-screen */
  width: 260px;
  height: 100%;
  background: #333;
  padding: 20px;
  box-shadow: 3px 0 10px rgba(0, 0, 0, 0.4);
  transition: left 0.3s ease;
  z-index: 3000;
}

.mobile-panel.open {
  display: block;
  left: 0;
}

.mobile-panel .close-panel {
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  float: right;
  cursor: pointer;
}

/* Mobile Nav List */
.mobile-menu {
  list-style: none;
  margin-top: 40px;
  padding: 0;
}

.mobile-menu li a {
  color: #fff;
  text-decoration: none;
  display: block;
  padding: 12px 0;
  font-size: 1.1rem;
}

.mobile-menu li a:hover {
  color: #a0522d;
}

/* Dropdown inside mobile panel */
.mobile-dropdown .mobile-drop-btn {
  background: none;
  border: none;
  color: #fff;
  width: 100%;
  text-align: left;
  padding: 12px 0;
  font-size: 1.1rem;
  cursor: pointer;
}

.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.mobile-submenu.show {
  max-height: 500px;
}

.mobile-submenu li a {
  padding-left: 20px;
}

/* Dark overlay for mobile panel */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 2500;
}

.mobile-overlay.show {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* Hide mobile panel/overlay on desktop */
@media (min-width: 769px) {
  .mobile-panel,
  .mobile-overlay {
    display: none !important;
  }
}

/* ================================
   BUTTONS (QUOTE + GENERIC)
================================ */
.quote-btn,
.btn {
  background: #a0522d;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s ease;
}

.quote-btn:hover,
.btn:hover {
  background: #7a3e21;
}

.btn {
  margin-left: 20px;
}

.center-btn {
  text-align: center;
  margin-top: 30px;
}

.center-btn .btn {
  margin-left: 0;
}

/* ================================
   HERO SLIDESHOW
================================ */
.hero {
  position: relative;
  height: 60vh;        /* desktop hero height */
  overflow: hidden;
  z-index: 1;
}

.slideshow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slide.active {
  opacity: 1;
}

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

/* Hero text overlay (not currently used, but kept) */
.hero-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  z-index: 2;
  padding: 0 20px;
}

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

.hero-text p {
  font-size: 1.5rem;
}

/* Mobile hero height and text scale */
@media (max-width: 768px) {
  .hero {
    height: 40vh;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text p {
    font-size: 1.1rem;
  }
}

/* ================================
   INTRO SECTION
================================ */
.intro {
  padding: 40px 20px;
  text-align: center;
  max-width: 900px;
  margin: auto;
}

.intro h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

/* ================================
   CATEGORY GRID (HOME) — Always 3-Wide
================================ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* always 3 */
  gap: 20px;
  padding: 40px 20px;
  max-width: 1200px;
  margin: auto;
}

.category-card {
  display: block;
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: transform 0.3s ease;
}

.category-card img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.category-card h3 {
  margin-top: 10px;
  font-size: 1.2rem;
}

.category-card:hover {
  transform: translateY(-5px);
}

.category-card:hover h3 {
  color: #a0522d;
}

/* Smaller screens — tighten gap slightly */
@media (max-width: 480px) {
  .category-grid {
    gap: 12px;
  }

  .category-card h3 {
    font-size: 1.1rem;
  }
}

/* ================================
   SUBPAGE LAYOUT & QUOTE FORM
================================ */
.subpage {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.subpage h1 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 2rem;
}

.subpage .intro-text {
  text-align: center;
  margin-bottom: 40px;
  font-size: 1.1rem;
  color: #444;
}

/* Quote form */
.quote-form {
  display: flex;
  flex-direction: column;
  max-width: 600px;
  margin: 0 auto;
  gap: 15px;
}

.quote-form label {
  font-weight: bold;
  text-align: left;
}

.quote-form input,
.quote-form textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}

.quote-form button {
  align-self: center;
}

/* Generic page intro block */
.page-intro {
  text-align: center;
  padding: 40px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.page-intro h1 {
  font-size: 2rem;
  margin-bottom: 15px;
}

.page-intro p {
  max-width: 850px;
  margin: 0 auto;
  line-height: 1.6;
  font-size: 1.05rem;
  color: #555;
}

/* Inline specs text */
.specs {
  font-size: 1rem;
  margin-top: 15px;
  color: #555;
  font-style: italic;
}

/* ==========================================================
   GALLERY GRIDS (GENERIC + MAIN GALLERY)
========================================================== */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.image-grid img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Standard gallery grid (desktop: 3 columns) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin: 40px auto;
  max-width: 1200px;
  padding: 0 20px;
}

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

.gallery-item img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.gallery-item img:hover {
  transform: scale(1.03);
}

.gallery-item p {
  margin-top: 10px;
  font-size: 0.95rem;
  color: #333;
  font-family: 'Footlight MT Light', serif;
}

/* Optional 2-per-row galleries for specific pages */
.gallery-grid.two-per-row {
  grid-template-columns: repeat(2, 1fr);
}

/* Tablet — 2 columns */
@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Phones — keep 2 columns for denser layout */
@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Smallest screens — still 2 columns, tighter gap */
@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .gallery-item p {
    font-size: 0.85rem;
  }
}

/* ================================
   PRODUCT HERO GALLERY + THUMBS
================================ */
.gallery-container {
  max-width: 950px;
  margin: 0 auto;
  position: relative;
  text-align: center;
}

.gallery {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gallery img {
  display: none;
  width: 100%;
  max-height: 650px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.gallery img.active {
  display: block;
}

.gallery .prev,
.gallery .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10;
  transition: background 0.3s ease;
}

.gallery .prev:hover,
.gallery .next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.gallery .prev {
  left: 10px;
}

.gallery .next {
  right: 10px;
}

/* Thumbnails under hero gallery */
.thumbnails {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.thumbnails img {
  width: 100px;
  height: auto;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.7;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.thumbnails img:hover {
  transform: scale(1.05);
  opacity: 1;
}

.thumbnails img.active-thumb {
  border: 2px solid #333;
  opacity: 1;
  transform: scale(1.05);
}

/* ================================
   CRAFTSMAN PROCESS BLOCK
================================ */
.craftsman-process {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
  line-height: 1.6;
  font-size: 1rem;
  text-align: left;
}

.craftsman-process h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
}

.craftsman-process p {
  margin-bottom: 1rem;
}

/* ================================
   DESCRIPTION SECTION (PRODUCT PAGES)
================================ */
.description {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
  text-align: center;
}

.description h2 {
  font-size: 1.1rem;
  margin: 8px 0;
  line-height: 1;
}

.description p {
  font-size: 1.1rem;
  color: #444;
  line-height: 1.6;
}

.quote-button-wrapper {
  margin-top: 25px;
}

/* ================================
   COLLAPSIBLE SPECIFICATIONS
================================ */
.product-specs {
  margin: 2rem 0;
  border-top: 1px solid #ddd;
  padding-top: 1rem;
}

.collapse-btn {
  background-color: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  cursor: pointer;
  display: inline-block;
  text-align: left;
  transition: background-color 0.3s;
  width: auto;
  min-width: 250px;
  max-width: 100%;
  margin: 0 auto 1rem auto;
}

.collapse-btn:hover {
  background-color: #e9e9e9;
}

.collapse-btn.active {
  background-color: #e2e2e2;
}

.collapse-content {
  overflow: hidden;
  height: 0;
  transition: height 0.4s ease;
}

/* Table Styling */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.spec-table th,
.spec-table td {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: left;
}

.spec-table th {
  background-color: #f0f0f0;
  font-weight: 600;
}

.spec-table tr:nth-child(even) {
  background-color: #fafafa;
}

.spec-table td:last-child {
  text-align: right;
}

/* ==========================================================
   RELATED PRODUCTS — 3-WIDE GRID ON ALL SCREENS
========================================================== */
.related-products {
  margin-top: 3rem;
  text-align: center;
  padding: 0 10px;
}

.related-products h2 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  color: #4a3b2a;
}

/* Always 3 columns */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  justify-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.related-item {
  background-color: #f7f4ef;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.related-products img {
  width: 100%;
  height: auto;
  display: block;
}

.related-item p {
  margin: 0.75rem;
  font-size: 1rem;
  color: #3c2d21;
}

/* Slight tightening on very small screens */
@media (max-width: 480px) {
  .related-grid {
    gap: 8px;
  }

  .related-item p {
    font-size: 0.85rem;
    padding: 0 4px 8px;
  }
}

/* ================================
   LIGHTBOX (for galleries)
================================ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 0;
  box-shadow: none;
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 50px;
  color: white;
  cursor: pointer;
  padding: 10px;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* ================================
   FOOTER
================================ */
footer {
  text-align: center;
  padding: 20px;
  background: #333;
  font-size: 0.95rem;
  color: #fff;
}

footer a {
  color: #fff;
  text-decoration: none;
}

footer a:hover {
  color: #a0522d;
}

.social-links {
  margin-top: 10px;
}

.social-links img {
  width: 24px;
  margin: 0 8px;
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease;
}

.social-links img:hover {
  filter: invert(46%) sepia(21%) saturate(957%) hue-rotate(355deg)
    brightness(92%) contrast(89%);
}

