/*
 * KPC Technical
 * Global site stylesheet
 */


/* =========================================================
   Base page
   ========================================================= */

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;

  display: flex;
  flex-direction: column;

  font-family: Tahoma, Arial, sans-serif;
  color: #ffffff;

  background-color: #142243;
}


/*
 * Home page background
 */

body.home-page {
  background-image: url("images/dental_chair.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
}


/* =========================================================
   Main page layout
   ========================================================= */

.page {
  flex: 1;

  box-sizing: border-box;

  padding: 70px 30px 70px 30px;

  display: flex;
  align-items: flex-start;

  gap: 70px;
}


/* =========================================================
   Left panel
   ========================================================= */

.panel {
  width: 330px;
  flex: 0 0 330px;
}


/* Site title */

.site-title {
  margin: 0;

  color: #b3abe2;

  font-family: "EastMarket", Georgia, serif;
  font-size: 60px;
  font-weight: normal;
  line-height: 1;

  white-space: nowrap;

  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.site-title a {
  color: inherit;
  text-decoration: none;
}


/* Tagline */

.tagline {
  display: inline-block;

  margin: 8px 0 36px 30px;

  color: #ffffff;

  font-size: 22px;
  line-height: 1.3;

  white-space: nowrap;

  text-shadow:
    1px 1px 2px rgba(0, 0, 0, 0.9),
   -1px -1px 2px rgba(0, 0, 0, 0.6);
}


/* =========================================================
   Main navigation
   ========================================================= */

.menu {
  margin: 0 0 0 30px;
  padding: 12px 0;

  width: 285px;

  list-style: none;

  background: rgba(66, 54, 99, 0.94);

  border-radius: 12px;

  overflow: hidden;
}

.menu li {
  border: 0;
}

.menu a {
  display: block;

  padding: 7px 14px;

  color: #9f88f1;

  text-decoration: none;

  font-size: 20px;
  line-height: 1.15;
}

.menu a:hover,
.menu a.current {
  background: #6f6596;
  color: #ffffff;
}


/*
 * Facebook menu item
 * Currently unused, but retained for future restoration.
 */

.facebook-link {
  display: flex !important;
  align-items: center;
  gap: 9px;
}

.facebook-link img {
  width: 22px;
  height: 22px;

  object-fit: contain;
}


/* =========================================================
   Interior page content panel
   ========================================================= */

.content-panel {
  width: 620px;
  max-width: calc(100vw - 500px);

  box-sizing: border-box;

  padding: 26px 28px 30px 28px;

  color: #263445;

  background: #dfe7ee;

  border-radius: 12px;

  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

.content-panel h2 {
  margin: 0 0 18px 0;
  padding-bottom: 10px;

  color: #423663;

  font-size: 24px;
  font-weight: normal;

  border-bottom: 1px solid #43afcb;
}

.content-panel p {
  font-size: 18px;
  line-height: 1.5;
}

.content-panel p:first-of-type {
  margin-top: 0;
}

.content-panel p:last-child {
  margin-bottom: 0;
}


/* =========================================================
   Products page
   ========================================================= */

.intro {
  margin: 0 0 40px 0;

  font-size: 18px;
  line-height: 1.5;
}

.manufacturer-list {
  column-count: 2;
  column-gap: 40px;

  font-size: 18px;
}

.manufacturer-list div {
  margin-bottom: 14px;

  break-inside: avoid;
}

.manufacturer-list a {
  color: #423663;

  text-decoration: none;
  font-weight: 600;
}

.manufacturer-list a:hover {
  text-decoration: underline;
}

.manufacturer-list span {
  color: #596271;
}


/* =========================================================
   Contact page
   ========================================================= */

/* Contact form */

.contact-form {
  margin: 0;
}

.form-row {
  margin-bottom: 18px;
}

.form-row label {
  display: block;

  margin-bottom: 6px;

  color: #423663;

  font-size: 16px;
  font-weight: 600;
}

.required {
  color: #a32020;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;

  box-sizing: border-box;

  padding: 10px 11px;

  font-family: Tahoma, Arial, sans-serif;
  font-size: 16px;

  color: #263445;
  background: #ffffff;

  border: 1px solid #9caaba;
  border-radius: 6px;

  outline: none;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: #6f6596;

  box-shadow: 0 0 0 2px rgba(111, 101, 150, 0.18);
}

.form-row textarea {
  min-height: 120px;

  resize: vertical;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.required-note {
  font-size: 14px;
  color: #596271;
}


/* Send button */

.send-button {
  display: inline-block;

  padding: 10px 20px;

  font-family: Tahoma, Arial, sans-serif;

  font-size: 17px;
  font-weight: 600;

  color: #ffffff;
  background: #6f6596;

  border: 0;
  border-radius: 7px;

  cursor: pointer;
}

.send-button:hover {
  background: #5c527f;
}


/* Contact form result */

.form-result {
  margin: 0 0 22px 0;
  padding: 18px 20px;

  border: 2px solid;
  border-radius: 8px;
}

.form-result h3 {
  margin: 0 0 8px 0;

  font-size: 21px;
}

.form-result p {
  margin: 0;

  font-size: 16px;
  line-height: 1.45;
}

.success-message {
  color: #1f4d2b;
  background: #e5f4e9;
  border-color: #5f9d6d;
}

.error-message {
  color: #7a2525;
  background: #f8e5e5;
  border-color: #b85c5c;
}


/* Submitted message preview */

.message-preview {
  margin: 0 0 22px 0;

  color: #263445;
  background: #ffffff;

  border: 1px solid #aeb8c3;
  border-radius: 7px;

  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);

  overflow: hidden;
}

.message-preview-header {
  padding: 16px 18px;

  background: #f3f5f7;

  border-bottom: 1px solid #d4dbe2;

  font-size: 15px;
  line-height: 1.6;
}

.message-preview-body {
  padding: 18px;

  white-space: pre-wrap;
  overflow-wrap: anywhere;

  font-size: 16px;
  line-height: 1.5;
}

.result-actions {
  margin-top: 30px;
}

.result-actions .send-button {
  text-decoration: none;
}


/* =========================================================
   Catalog listing page
   ========================================================= */

.catalog-list {
  margin-top: 30px;
}

.catalog-empty {
  padding: 40px 20px;

  text-align: center;

  font-size: 1.1rem;
  color: #5a6772;
}

.catalog-item {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;

  padding: 20px;

  border: 1px solid #d6dce2;
  border-radius: 10px;

  background: #ffffff;
}

.catalog-photo-placeholder {
  min-height: 190px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #eef2f5;

  border-radius: 8px;

  color: #6b7680;
}

.catalog-item-image {
  width: 100%;

  aspect-ratio: 4 / 3;

  object-fit: contain;

  background: #eef2f5;

  border-radius: 8px;

  display: block;
}

.catalog-item-content p {
  margin: 0 0 12px;
}

.catalog-item-content h3 {
  margin: 0 0 18px;
}

.catalog-price {
  font-size: 1.25rem;
  font-weight: 700;
}

.catalog-item-link {
  display: inline-block;

  margin-top: 6px;
  padding: 8px 14px;

  color: #4c086f;

  border-radius: 6px;

  text-decoration: none;
  font-weight: 600;
}

.catalog-item-link:hover {
  text-decoration: underline;
}


/* =========================================================
   Catalog item detail page
   ========================================================= */

.catalog-back {
  margin-top: 0;
  margin-bottom: 18px;
}

.catalog-detail {
  display: grid;

  grid-template-columns: minmax(280px, 1.2fr) 1fr;

  gap: 28px;

  margin-top: 24px;
}

.catalog-detail-image {
  width: 100%;

  aspect-ratio: 4 / 3;

  object-fit: contain;

  background: #eef2f5;

  border-radius: 8px;

  display: block;

  cursor: pointer;
}

.catalog-detail-photo-placeholder {
  width: 100%;

  aspect-ratio: 4 / 3;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #eef2f5;

  border-radius: 8px;

  color: #6b7680;
}

.catalog-detail-summary p {
  margin: 0 0 14px;
}

.catalog-detail-price {
  font-size: 1.4rem;
  font-weight: 700;
}

.catalog-description {
  margin-top: 32px;
}

.catalog-description h3 {
  margin-bottom: 10px;
}

.catalog-contact {
  margin-top: 30px;
}

.catalog-contact a {
  display: inline-block;

  padding: 10px 16px;

  color: #4c086f;

  border-radius: 6px;

  text-decoration: none;
  font-weight: 600;
}

.catalog-contact a:hover {
  text-decoration: underline;
}

.catalog-contact .send-button {
  color: #ffffff;
  background: #6f6596;
  text-decoration: none;
}

.catalog-contact .send-button:hover {
  color: #ffffff;
  background: #5c527f;
  text-decoration: none;
}


/* =========================================================
   Catalog thumbnail gallery
   ========================================================= */

.gallery-trigger {
  cursor: pointer;
}

.catalog-gallery {
  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 8px;

  margin-top: 10px;
}

.catalog-gallery img {
  width: 100%;

  aspect-ratio: 1 / 1;

  object-fit: contain;

  background: #ffffff;

  border: 1px solid #d6dce2;
  border-radius: 5px;

  display: block;
}


/* =========================================================
   Catalog image lightbox
   ========================================================= */

.catalog-lightbox {
  display: none;

  position: fixed;
  inset: 0;

  z-index: 10000;

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

  background: rgba(0, 0, 0, 0.90);
}

.catalog-lightbox.open {
  display: flex;
}

.catalog-lightbox img {
  max-width: 96vw;
  max-height: 94vh;

  width: auto;
  height: auto;

  object-fit: contain;
  display: block;
}


/* Lightbox buttons */

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;

  color: #ffffff;
  background: rgba(0, 0, 0, 0.45);

  border: 0;
  border-radius: 6px;

  cursor: pointer;

  font-family: Arial, sans-serif;
}

.lightbox-close {
  top: 18px;
  right: 24px;

  padding: 4px 12px;

  font-size: 38px;
  line-height: 1;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;

  transform: translateY(-50%);

  padding: 14px 18px;

  font-size: 34px;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.20);
}


/* Lightbox image counter */

.lightbox-counter {
  position: absolute;

  bottom: 18px;
  left: 50%;

  transform: translateX(-50%);

  padding: 5px 10px;

  color: #ffffff;
  background: rgba(0, 0, 0, 0.45);

  border-radius: 5px;

  font-size: 15px;
}


/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  flex-shrink: 0;

  padding: 18px 30px 24px;

  color: #c9c5e8;
  background: #142243;

  font-size: 14px;
  line-height: 1.6;

  text-align: center;

  position: relative;
  z-index: 1;
}

.site-footer a,
.site-footer a:visited {
  color: #c9c5e8;
  text-decoration: none;
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-business {
  font-weight: 600;
}

.footer-separator {
  margin: 0 8px;
}


/* =========================================================
   Desktop home page
   ========================================================= */

@media (min-width: 951px) {

  body.home-page {
    background-image: none;
  }

  body.home-page .page {
    background-image: url("images/dental_chair.jpg");
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: auto min(790px, calc(100% - 55px));
  }

}


@media (min-width: 951px) and (min-height: 1200px) {

  body.home-page .page {
    background-position: center center;
  }

}


/* =========================================================
   Tablet / medium layout
   ========================================================= */

@media (max-width: 950px) {

  .page {
    flex-direction: column;

    padding: 40px 22px;

    gap: 35px;
  }

  .panel {
    width: min(100%, 400px);

    flex-basis: auto;
  }

  .content-panel {
    width: 100%;
    max-width: 760px;
  }

}


/* =========================================================
   Small screen layout
   ========================================================= */

@media (max-width: 700px) {

  body.home-page {
    background-attachment: scroll;
    background-position: center 120px;
  }

  .site-title {
    font-size: 48px;
  }

  .tagline {
    margin-left: 0;

    font-size: 19px;
  }

  .menu {
    width: 100%;
    max-width: 285px;

    margin-left: 0;
  }

  .content-panel {
    padding: 22px 20px 26px 20px;
  }

  .manufacturer-list {
    column-count: 1;
  }

  .footer-contact a {
    display: block;
  }

  .footer-separator {
    display: none;
  }

  .form-actions {
    flex-wrap: wrap;
  }


  /* Catalog listing */

  .catalog-item {
    grid-template-columns: 1fr;
  }


  /* Catalog detail */

  .catalog-detail {
    grid-template-columns: 1fr;
  }


  /* Lightbox */

  .catalog-lightbox img {
    max-width: calc(100vw - 50px);
    max-height: calc(100vh - 100px);
  }

  .lightbox-prev {
    left: 5px;
  }

  .lightbox-next {
    right: 5px;
  }

}

/* =========================================================
   Catalog enhancements
   ========================================================= */

.catalog-item + .catalog-item {
  margin-top: 22px;
}

.catalog-image-link,
.catalog-title-link {
  color: inherit;
  text-decoration: none;
}

.catalog-title-link:hover {
  text-decoration: underline;
}

.catalog-item-media {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.catalog-item-media-links {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 0;
}

.catalog-item-media-links p {
  margin: 0 0 2px;
}

.catalog-item-media-links .catalog-item-link {
  margin-top: 0;
  padding: 3px 0;
}

.catalog-preliminary-banner {
  margin: 0 0 16px 0;
  padding: 10px 12px;
  color: #5f4b0d;
  background: #fff3cd;
  border: 1px solid #d6bd66;
  border-radius: 7px;
  font-size: 15px;
  line-height: 1.4;
}

.catalog-preliminary-detail {
  margin-top: -2px;
  margin-bottom: 20px;
}

.catalog-price del,
.catalog-detail-price del {
  margin-right: 8px;
  color: #6b7680;
  font-weight: normal;
}

.catalog-placeholder-image {
  object-fit: contain;
}

.catalog-thumb-button {
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.catalog-thumb-button:focus-visible {
  outline: 2px solid #6f6596;
  outline-offset: 2px;
}

.catalog-additional-details {
  margin-top: 30px;
}

.catalog-additional-details h3 {
  margin-bottom: 12px;
}

.catalog-detail-list {
  display: grid;
  grid-template-columns: minmax(130px, 180px) 1fr;
  gap: 8px 18px;
  margin: 0;
}

.catalog-detail-list dt {
  font-weight: 700;
}

.catalog-detail-list dd {
  margin: 0;
}

@media (max-width: 700px) {
  .catalog-detail-list {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .catalog-detail-list dd {
    margin-bottom: 10px;
  }
}

.catalog-status {
  margin: 0.2rem 0 0.75rem;
}

/* Prevent long unbroken catalog text from overflowing the public content panel. */
.catalog-description,
.catalog-detail-summary,
.catalog-detail-list dd,
.catalog-item-content {
  overflow-wrap: anywhere;
  word-break: break-word;
}
