/* 

SPACING SYSTEM (px)
2 / 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 80 / 96 / 128

FONT SIZE SYSTEM (px)
10 / 12 / 14 / 16 / 18 / 20 / 24 / 30 / 36 / 44 / 52 / 62 / 74 / 86 / 98

MAIN COLOR: #0066ee
*/

/* ========================================================================== */
/* GENERAL                                                                    */
/* ========================================================================== */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  max-width: 140rem;
  margin: 0 auto;
}

body {
  color: #000000;
  background-color: #0060ee;
  font-family: "Tahoma", "Arial", "Times New Roman";
  font-size: 1.2rem;
  line-height: normal;
  margin: 0 auto;
}

.wrapper {
  display: flex;
  justify-content: center;
}

.row {
  display: flex;
  justify-content: space-between;
  min-height: 100rem; /* leave space for search and balloon */
}

.content {
  width: 78%;
  max-width: 100rem;
  background-color: #fff;
}

footer {
  color: #fff;
  background-image: url("/images/templates/footer/bg.jpg");
  background-repeat: repeat-x;
  font-family: "Verdana", "Geneva", "Tahoma", sans-serif;
  text-align: center;
  height: 4.4rem;
  padding-left: 22rem;
  position: relative;
}

.footer-image {
  position: absolute;
  bottom: 0;
  left: 0;
}

.footer-copyright {
  font-size: 1.4rem;
  padding-top: 0.4rem;
}

.footer-designer {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.2rem;
  color: inherit;
  text-decoration: none;
}

.footer-designer:hover {
  color: red;
}

.footer-maintainer {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.2rem;
  color: inherit;
  text-decoration: none;
}

.footer-maintainer:hover {
  color: magenta;
}

.hidden {
  display: none;
}

select {
  background-color: #ffffff;
  color: #006699;
  font-weight: normal;
  font-size: 1.2rem;

  max-width: 100%;
  height: auto;
  padding: 0.2rem;
  border: solid 0.1rem #a4a6a9;
  text-decoration: none;
}

/* ========================================================================== */
/* MAIN HEADER                                                                */
/* ========================================================================== */

.main-header {
  width: 100%;
}

.main-header-banner {
  max-width: 100%;
  height: auto;
  display: block;
}

.main-header-nav {
  background-image: url("/images/templates/banner/bg.jpg");

  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding-left: 3rem;
  gap: 3rem;
  flex-wrap: wrap;
}

.main-header-nav a {
  color: #ffffff;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: bold;
}

.main-header-nav a:hover {
  color: #b0fdb7;
}

.main-header-nav img {
  display: block;
}

.main-header-footer {
  width: 100%;
  display: block;
  height: 14px;
}

/* ========================================================================== */
/* SIDEBAR                                                                    */
/* ========================================================================== */

.sidebar {
  background-image: url("/images/templates/sidebar/bg.jpg");
  background-repeat: repeat;
  font-size: 1.4rem;
  width: 22%;
  min-width: 22rem;

  display: flex;
  flex-direction: column;
}

.sidebar-banner {
  /* prevent the image resizing to fit its container */
  object-fit: contain;
  align-self: flex-start;
}

.sidebar-channel-title {
  color: #0e4e6d;
  font-weight: bold;
  text-decoration: none;

  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 0.3rem;

  list-style: none;
}

.sidebar-channel {
  padding-left: 2.6rem;
}

.sidebar-channel > img {
  background-image: url("/images/templates/sidebar/hr.jpg");
  background-size: cover;
}

.sidebar-channel a {
  color: #085c8e;
  text-decoration: none;
  /* padding-left: 1.5rem; */
}

.sidebar-channel a:hover {
  color: #ff0000;
}

.sidebar-category {
  /* height: 2rem; */
  display: flex;
  align-items: center;
  column-gap: 0.8rem;
  row-gap: 0.2rem;
  flex-wrap: wrap;
}

.sidebar-category-link {
  flex: 0 1 17rem;
}

.sidebar-category-link::before {
  content: url("/images/templates/sidebar/bullet_point.jpg");
  margin-right: 0.4rem;
}

/* ================================= SEARCH ================================= */

.search-wrapper {
  padding: 1rem;
  text-align: center;
}

.search-title {
  color: #0e4e6d;
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 0.4rem;
}

.search-form {
  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 0.4rem;
}

.search-form > * {
  background-color: #ffffff;
  border: 1px solid #a4a6a9;
  font-family: "Tahoma";
  font-size: 1.2rem;
  font-weight: normal;
  color: #006699;
}

.search-bar {
  width: 90%;
}

.search-filter {
  width: 70%;
}

.search-btn {
  padding: 0.2rem;
  cursor: pointer;
}

.search-btn:hover {
  background-color: #b0fdb7;
}

/* ========================================================================== */
/* CONTENT                                                                    */
/* ========================================================================== */

.content-title {
  display: flex;
  align-items: stretch;
}

.content-title-decor {
  max-width: 100%;
  height: auto;
  align-self: stretch;
}

.content-title-text {
  background-image: url("/images/templates/bg_heading.jpg");
  background-size: 100% 100%;
  background-repeat: no-repeat;

  font-size: 1.4rem;
  color: #0e4e6d;
  font-weight: bold;
  text-decoration: none;
  width: 100%;
  padding-left: 2rem;
  align-self: stretch;

  display: flex;
  align-items: center;
}

.content-body {
  height: 100%;
  text-align: justify;
  line-height: 1.5;

  display: flex;
  flex-direction: column;
}

.content-body > section:first-of-type {
  padding: 1.5rem;
}

/* ========================================================================== */
/* HOME CONTENT                                                               */
/* ========================================================================== */

.home-content {
  background-position: center bottom;
  background-repeat: no-repeat;
  background-image: url("/images/templates/huveco.png");
}

.home-content > p {
  margin-bottom: 1.1rem;
}

.home-content ul {
  list-style-position: outside;
  line-height: 1.1;
  margin-left: 3.8rem;
  margin-bottom: 1rem;
}

.tagline {
  color: #0000ff;
  font-size: 2.4rem;
  font-weight: 500;
  margin-left: 7rem;
}

.contact-info > p {
  line-height: 1.1;
}

.email {
  margin: 0 2rem;
}

/* ========================================================================== */
/* ABOUT CONTENT                                                              */
/* ========================================================================== */

.about-content {
  font-family: "Tahoma";
}

.about-content > p {
  margin-bottom: 1rem;
}

.about-content > p:nth-of-type(3) {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.about-content > p:nth-of-type(3) > span {
  margin-left: 2rem;
  text-align: center;
}

.about-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  column-gap: 1rem;
}

.about-wrapper > * {
  flex: 1;
  text-align: center;
}

.about-director-image,
.about-workshop-image {
  max-width: 100%;
  height: auto;
}

.about-director-caption,
.about-workshop-caption {
  text-align: center;
}

.about-director-bio {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.2rem;
  line-height: 1.2;
  text-align: justify;
}

.about-values-heading {
  margin-bottom: 1.5rem;
}

.about-values {
  margin-left: 3.6rem;
}

/* ========================================================================== */
/* SERVICES                                                                   */
/* ========================================================================== */

.manu-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 1rem;
}

.manu-desc {
  grid-column: span 3;
}

.manu-product {
  text-align: center;
  align-self: center;
}

.manu-product-image {
  max-width: 100%;
  height: auto;
}

.design-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  column-gap: 2rem;
}

.designer {
  text-align: center;
}

.services-title {
  margin-bottom: 0.1rem;
}

/* ========================================================================== */
/* CONTACT                                                                    */
/* ========================================================================== */

.contact-content > p {
  font-family: "Tahoma";
  margin-bottom: 0.6rem;
}

/* ========================================================================== */
/* PRODUCT CARD                                                               */
/* ========================================================================== */

.secondary-title {
  background-color: #3a9ad4;
  color: #ffffff;
  font-family: Tahoma, Arial, Times New Roman;
  font-size: 1.2rem;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: bold;
  padding-left: 1rem;
  height: 2.4rem;
  line-height: 2.4rem;
  margin: 1rem 0;
}

.secondary-title:hover {
  color: #b0fdb7;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.6rem;
  list-style: none;
  margin: 1rem 2rem;
}

.product-card {
  font-size: 1.2rem;
  font-weight: bold;
  color: #085c8e;

  display: flex;
  flex-direction: column;
  align-items: center;

  /* responsive */
  max-width: 15rem;
  height: auto;
}

.card-image-link {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-image {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  margin-bottom: 0.5rem;
}

.card-body {
  /* width: 12rem; */
  display: grid;
  grid-template-columns: 1fr 2fr;
  row-gap: 0.6rem;
  column-gap: 1.2rem;
}

.card-title {
  grid-column: 1 / span 2;
  justify-self: center;
  text-align: center;
}

.card-itemno-label {
  color: #8c8c8c;
  grid-row: 2 / span 2;
}

.card-itemno-value {
  grid-row: 2 / span 2;
  align-self: center;
}

.card-price-label {
  color: #8c8c8c;
}

.card-price-value {
  align-self: center;
}

.card-empty {
  font-family: "Tahoma";
  grid-column: 1 / -1;
  text-align: center;
}

/* ========================================================================== */
/* PRODUCT                                                                    */
/* ========================================================================== */

.product {
  padding: 0.8rem !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}

.product-image {
  width: 35rem;
  max-width: 100%;
  height: auto;
  align-self: center;
}

.product-wrapper {
  align-self: left;
}

.product-title {
  color: #085c8e;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2rem 0;
}

.product-body {
  font-size: 1.2rem;
  line-height: normal;
}

.product-body > p {
  margin: 1.2rem 0;
}

/* ========================================================================== */
/* CENTRALIZE                                                                 */
/* ========================================================================== */

.product-same {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  padding: 0.4rem;
}

.category-content,
.search-content,
.product-same-wrapper {
  flex: 1 1 100%;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;

  padding-bottom: 4rem !important;
}

/* ========================================================================== */
/* SPINNER                                                                    */
/* ========================================================================== */

.spinner {
  flex: 1 1 100%;

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

.spinner-circle {
  width: 4.8rem;
  height: 4.8rem;
  border: 0.6rem solid #ccc;
  border-top: 0.6rem solid #666;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ========================================================================== */
/* SLIDESHOW                                                                  */
/* ========================================================================== */

.slideshow {
  width: 10%;
  height: 100vh;
  margin: 0 2rem;
  overflow: hidden;

  /* NOTE: not working if put in .slideshow-wrapper */
  position: sticky;
  top: 0;
}

.slideshow-wrapper {
  display: flex;
  flex-direction: column;
  animation: slideVertical 60s linear infinite;
}

/* .reverse { 
  animation: slideVertical 60s linear infinite reverse; } 
*/
.slideshow-wrapper img {
  background-color: #ffffff;
  width: 100%;
  min-height: calc(100vh / 5);
  margin: 1rem 0;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

@keyframes slideVertical {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(
      /* calc((-1) * (100vh / 5 * 10 + 2 * 9rem - 100vh + 5rem)) */
        calc((-1) * ((100vh / 5) * 10 + 2 * 10rem + 2.4rem))
    );

    /* total height of all unique slides plus the gaps plus an arbitrary amount of height */
  }
}

/* ========================================================================== */
/* PAGINATION                                                                 */
/* ========================================================================== */

.pagination {
  align-self: stretch;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pagination-text {
  color: #085c8e;
  font-weight: 700;
}

.pagination-total-text {
  text-align: left;
  flex: 1 0 20%;
}

.pagination-choose-text {
  text-align: right;
  flex: 1 0 20%;
}

.pagination-list {
  flex: 1 1 60%;

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

  padding: 0 1rem;
}

.pagination-link-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.pagination-link {
  width: 2rem;
  color: #8c8c8c;
  font-size: 1.6rem;
  text-decoration: none;
  padding: 0.4rem;
}

.pagination-link-selected {
  color: #800000;
  font-size: 1.8rem;
  font-weight: 900;
}

.pagination-next,
.pagination-prev {
  flex: 0;

  color: #085c8e;
  background-color: #dcf0fe; /* Blue background */
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;

  display: inline-block; /* Makes it behave like a block */
  margin: 0 0.5rem;
  padding: 0.1rem 0.2rem; /* Add padding to make it look like a button */
  border-radius: 0.25rem; /* Rounded corners */
}

.pagination-next:hover,
.pagination-prev:hover {
  background-color: #085c8e;
  color: #dcf0fe;
}

.pagination-select {
  text-align: right;
}

/* ========================================================================== */
/* RESPONSIVE                                                                 */
/* ========================================================================== */

@media (max-width: 60rem) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 50rem) {
  .slideshow {
    display: none;
  }

  .sidebar {
    font-size: 1.2rem;
  }

  .tagline {
    margin-left: 0;
    text-align: center;
  }

  .content-title-text {
    padding-left: 0.6rem;
  }

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

  .footer-copyright {
    font-size: 1.2rem;
  }
}

@media (max-width: 42rem) {
  .row {
    flex-direction: column-reverse;
  }

  .sidebar,
  .content {
    width: 100%;
    max-width: none;
    align-items: center;
  }

  .sidebar-banner-wrapper {
    align-self: stretch;
    display: flex;
  }

  .sidebar-banner,
  .sidebar-channel,
  .sidebar-banner-wrapper::before,
  .sidebar-banner-wrapper::after {
    flex: 1 1 calc(100% / 3);
  }

  .sidebar-banner-wrapper::before,
  .sidebar-banner-wrapper::after {
    content: "";
    display: block;
    width: 100%;
    height: auto;
    background-image: url("/images/templates/sidebar/top.jpg");
    background-repeat: repeat;
    background-size: 100% 100%;
  }

  .sidebar-wrapper {
    display: flex;
    justify-content: space-between;
  }

  .sidebar-channel {
    padding: 0 0.4rem;
  }

  .main-header-nav {
    padding-left: 1rem;
    gap: 1rem;
    font-size: 1rem;
  }

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

  .content-body ul {
    margin-left: 1.5rem;
  }

  .tagline {
    margin-left: 0;
    text-align: center;
  }

  footer {
    padding-left: 0;
  }

  .footer-image {
    display: none;
  }
}

@media (max-width: 25rem) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
