/* FINAL PRODUCTS PAGE
   Static SEO product/category routes generated from Products folder.
*/

body .products-page {
  background: #a0a0a0 !important;
  padding: 34px 0 54px !important;
  color: #222 !important;
}

body .products-shell {
  width: min(100% - 40px, 1280px) !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: 250px minmax(0, 1fr) !important;
  gap: 28px !important;
  align-items: start !important;
}

body .products-sidebar {
  background: #e0e0e0 !important;
  border-radius: 10px !important;
  padding: 18px !important;
  box-shadow: 0 3px 12px rgba(0,0,0,0.12) !important;
  position: sticky !important;
  top: 70px !important;
}

body .products-sidebar h2 {
  margin: 0 0 14px !important;
  font-size: 20px !important;
  color: #222 !important;
}

body .products-sidebar nav {
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
}

body .products-sidebar-link {
  display: block !important;
  color: #222 !important;
  text-decoration: none !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  padding: 8px 10px !important;
  border-radius: 6px !important;
  background: rgba(255,255,255,0.45) !important;
}

body .products-sidebar-link:hover,
body .products-sidebar-link.active {
  background: #333 !important;
  color: #fff !important;
}

body .products-main {
  min-width: 0 !important;
}

body .products-breadcrumb {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: center !important;
  margin-bottom: 18px !important;
  color: #333 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

body .products-breadcrumb a {
  color: #143f85 !important;
  text-decoration: none !important;
}

body .products-breadcrumb a:hover {
  text-decoration: underline !important;
}

body .product-category-header {
  display: grid !important;
  grid-template-columns: 320px minmax(0, 1fr) !important;
  gap: 28px !important;
  align-items: center !important;
  background: #e0e0e0 !important;
  border-radius: 10px !important;
  padding: 22px !important;
  box-shadow: 0 3px 12px rgba(0,0,0,0.12) !important;
  margin-bottom: 24px !important;
}

body .product-category-header img {
  width: 100% !important;
  max-height: 240px !important;
  object-fit: contain !important;
  background: #f2f2f2 !important;
  border-radius: 8px !important;
}

body .product-category-header h1 {
  margin: 0 0 12px !important;
  font-size: 32px !important;
  color: #222 !important;
}

body .product-category-description p {
  margin: 6px 0 !important;
  font-size: 15.5px !important;
  line-height: 1.45 !important;
}

body .products-card-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important;
  gap: 20px !important;
}

body .product-list-card {
  background: #e0e0e0 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  box-shadow: 0 3px 12px rgba(0,0,0,0.12) !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease !important;
}

body .product-list-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18) !important;
}

body .product-list-card a {
  display: block !important;
  color: inherit !important;
  text-decoration: none !important;
}

body .product-list-image {
  height: 190px !important;
  background: #f2f2f2 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body .product-list-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  padding: 10px !important;
}

body .product-list-content {
  padding: 15px !important;
}

body .product-list-content h2 {
  font-size: 18px !important;
  margin: 0 0 9px !important;
  color: #222 !important;
  line-height: 1.2 !important;
}

body .product-list-content p {
  margin: 0 0 10px !important;
  font-size: 13.5px !important;
  line-height: 1.35 !important;
  color: #444 !important;
}

body .product-list-code {
  font-weight: 900 !important;
  color: #1f4f9f !important;
}

body .product-list-content span {
  display: inline-block !important;
  margin-top: 8px !important;
  color: #2f5db8 !important;
  font-weight: 900 !important;
  font-size: 13.5px !important;
}

body .product-detail {
  display: grid !important;
  grid-template-columns: minmax(0, 520px) minmax(0, 1fr) !important;
  gap: 34px !important;
  background: #e0e0e0 !important;
  border-radius: 10px !important;
  padding: 26px !important;
  box-shadow: 0 3px 12px rgba(0,0,0,0.12) !important;
}

body .product-main-image {
  background: #f2f2f2 !important;
  border-radius: 10px !important;
  padding: 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 420px !important;
}

body .product-main-image img {
  max-width: 100% !important;
  max-height: 420px !important;
  object-fit: contain !important;
}

body .product-thumbnails {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 9px !important;
  margin-top: 14px !important;
}

body .product-thumbnail-button {
  width: 72px !important;
  height: 72px !important;
  border: 2px solid transparent !important;
  border-radius: 7px !important;
  background: #f5f5f5 !important;
  padding: 4px !important;
  cursor: pointer !important;
}

body .product-thumbnail-button.active {
  border-color: #2f5db8 !important;
}

body .product-thumbnail-button img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

body .product-detail-info h1 {
  margin: 0 0 14px !important;
  font-size: 32px !important;
  color: #222 !important;
}

body .product-detail-info h2 {
  margin: 20px 0 10px !important;
  font-size: 22px !important;
}

body .product-detail-info p {
  font-size: 15.5px !important;
  line-height: 1.45 !important;
  margin: 7px 0 !important;
}

body .product-code {
  display: inline-block !important;
  background: #333 !important;
  color: #fff !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  font-weight: 800 !important;
}

body .product-info-images {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap: 12px !important;
  margin-top: 18px !important;
}

body .product-info-images img {
  width: 100% !important;
  border-radius: 8px !important;
  background: #fff !important;
}

body .products-back-link {
  display: inline-block !important;
  margin-top: 22px !important;
  color: #2f5db8 !important;
  font-weight: 900 !important;
  text-decoration: none !important;
}

body .products-back-link:hover {
  text-decoration: underline !important;
}

body .products-empty {
  background: #e0e0e0 !important;
  padding: 22px !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
}

@media (max-width: 980px) {
  body .products-shell {
    grid-template-columns: 1fr !important;
  }

  body .products-sidebar {
    position: static !important;
  }

  body .products-sidebar nav {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
  }

  body .product-category-header,
  body .product-detail {
    grid-template-columns: 1fr !important;
  }

  body .product-category-header img {
    max-height: 300px !important;
  }
}

@media (max-width: 560px) {
  body .products-page {
    padding: 24px 0 38px !important;
  }

  body .products-shell {
    width: min(100% - 24px, 1280px) !important;
  }

  body .products-card-grid {
    grid-template-columns: 1fr !important;
  }

  body .product-detail {
    padding: 16px !important;
  }

  body .product-main-image {
    min-height: 280px !important;
  }
}

/* ==========================================================
   FINAL PRODUCT PAGE POLISH
   Category order comes from manifest; this handles visual details.
   ========================================================== */

/* Make product information.jpeg / information images larger */
body .product-info-images {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  gap: 18px !important;
  margin-top: 24px !important;
}

body .product-info-images img {
  width: 100% !important;
  max-height: 520px !important;
  object-fit: contain !important;
  background: #ffffff !important;
  padding: 10px !important;
  border-radius: 10px !important;
  box-shadow: 0 3px 12px rgba(0,0,0,0.14) !important;
}

/* Magnifier button on product photos */
body .product-main-image {
  position: relative !important;
}

body .product-zoom-button {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  z-index: 5 !important;

  width: 44px !important;
  height: 44px !important;

  display: grid !important;
  place-items: center !important;

  border: 0 !important;
  border-radius: 999px !important;

  background: rgba(0,0,0,0.62) !important;
  color: #ffffff !important;

  font-size: 20px !important;
  cursor: pointer !important;

  box-shadow: 0 4px 12px rgba(0,0,0,0.25) !important;
}

body .product-zoom-button:hover {
  background: rgba(0,0,0,0.82) !important;
  transform: scale(1.04) !important;
}

/* Better back button */
body .products-back-link {
  display: inline-block !important;
  margin-top: 24px !important;
  padding: 10px 16px !important;

  color: #ffffff !important;
  background: #333333 !important;

  border-radius: 6px !important;
  font-weight: 900 !important;
  text-decoration: none !important;
}

body .products-back-link:hover {
  background: #1f1f1f !important;
  text-decoration: none !important;
}

/* Image viewer for magnifier */
body .image-viewer {
  display: none !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 11000 !important;

  background: rgba(0,0,0,0.88) !important;

  align-items: center !important;
  justify-content: center !important;

  padding: 32px !important;
}

body .image-viewer.active {
  display: flex !important;
}

body .image-viewer img {
  max-width: 92vw !important;
  max-height: 86vh !important;
  object-fit: contain !important;
  background: #ffffff !important;
  border-radius: 8px !important;
}

body .image-viewer-close {
  position: absolute !important;
  top: 18px !important;
  right: 28px !important;

  color: #ffffff !important;
  background: transparent !important;
  border: 0 !important;

  font-size: 44px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
}

/* Slightly tighter sidebar category text so each row stays clean */
body .products-sidebar-link {
  font-size: 13.5px !important;
  line-height: 1.2 !important;
}
