/* Reset and General Styles */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
li,
nav {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: "Open Sans", sans-serif;
  color: #787a7c;
}

h1,
nav {
  font-family: "Oswald", sans-serif;
}

body {
  background-color: #ffffff;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* Page container */
.page-container {
  background-color: #ffffff;
  width: 90%;
  max-width: 1200px;
  margin: 2rem auto;
  border: 1px solid #42464a;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
header {
  background-color: #161947;
  padding: 1rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.header-bar {
  background-color: #161947;
  color: white;
  padding: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.header-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
}

.logo-container {
  flex: 1;
}

.flex-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Navigation */
nav {
  flex: 2;
  display: flex;
  justify-content: flex-end;
}

nav ul {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

nav ul li {
  margin: 0 1rem;
}

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

nav ul li a:hover {
  text-decoration: underline;
}

/* Visually hidden class for accessibility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Content */
.content-container {
  padding: 1rem;
  flex: 1;
}

.main-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.main-content > .swiper-container {
  flex: 1;
}

/* Footer */
footer {
  background-color: #e1e1e0;
  color: #787a7c;
  padding: 1rem;
  text-align: center;
  margin-top: 1rem;
}

/* Swiper */
.swiper-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.swiper-slide {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.swiper-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.swiper-pagination {
  position: absolute;
  text-align: center;
  transition: 0.3s opacity;
  transform: translate3d(0, 0, 0);
  z-index: 10;
  bottom: 10px;
  left: 0;
  width: 100%;
}

.swiper-pagination-bullet {
  width: 0.5rem;
  height: 0.5rem;
  display: inline-block;
  border-radius: 50%;
  background: #000;
  opacity: 0.2;
  transition: 0.3s opacity, 0.3s background;
}

.swiper-pagination-bullet-active {
  opacity: 1;
  background: #007aff;
}

.swiper-button-next,
.swiper-button-prev {
  color: #fff;
  width: auto;
  height: auto;
  padding: 0.5rem;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
}

.swiper-button-next {
  right: 1rem;
}

.swiper-button-prev {
  left: 1rem;
}

/* Navigation Items */
.nav-item {
  background-color: #161947;
  margin-bottom: 1rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  color: white;
  text-decoration: none;
  width: 150px;
}

.nav-item a {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.nav-item .icon {
  background-color: #84231d;
  padding: 0.5rem;
  margin-right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.25rem;
}

/* Secondary Navigation */
.secondary-nav {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 300px;
  margin: 0 auto;
}

.secondary-nav .heading-container {
  width: 100%;
  text-align: center;
  margin-bottom: 1rem;
}

.secondary-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.secondary-nav .nav-item {
  margin-bottom: 10px;
  width: 100%;
  margin-right: -1rem;
}

.secondary-nav .nav-item a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: white;
}

.secondary-nav .icon {
  margin-right: 0.5rem;
}

/* Heading Container */
.heading-container {
  background-color: #84231d;
  color: white;
  padding: 1rem;
  position: relative;
  margin-bottom: 1rem;
  width: 100%;
  text-align: center;
}

.heading-container h4 {
  margin: 0;
  color: white;
}

.heading-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-right: 2rem solid transparent;
  border-top: 2rem solid #ffffff;
}

/* Footer Container */
.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

.quick-links {
  text-align: left;
  padding: 1rem;
  flex: auto;
}

.quick-links ul {
  list-style: none;
  padding: 0;
}

.quick-links ul li {
  margin-bottom: 0.5rem;
}

.quick-links ul li a {
  color: #787a7c;
  text-decoration: none;
}

.quick-links ul li a:hover {
  text-decoration: underline;
}

.footer-contacts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  align-self: flex-end;
}

.contacts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contacts-list li {
  margin-bottom: 10px;
}

.footer-contacts ul {
  list-style: none;
  padding: 0;
}

.footer-contacts ul li {
  margin-bottom: 0.5rem;
}

.footer-contacts ul li a {
  color: #787a7c;
}

.footer-contacts ul li a:hover {
  text-decoration: underline;
}

/* Page Container Sub */
.page-container-sub {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Page Content */
.page {
  flex: 1 1 65%;
  padding-right: 1rem;
  box-sizing: border-box;
  color: #787a7c;
}

/* Page Images */
.page-images {
  flex: 1 1 30%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.page-images img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #42464a;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 0.25rem;
}

/* Dashed List */
.dashed-list li {
  list-style-type: circle;
  position: relative;
  text-indent: 1em;
}

.page h1 {
  color: #84231d;
  position: relative;
  padding-bottom: 0.5rem;
}

.page h1::after {
  content: "";
  display: block;
  width: 75%;
  height: 2px;
  background-color: #69141f;
  position: absolute;
  bottom: -5px;
  left: 0;
  margin-bottom: 0.5rem;
}

.page-subtext {
  text-align: left;
  margin-bottom: 1rem;
  color: #666666;
}

.page hr {
  width: 80%;
  border: 0;
  border-top: 1px solid #cccccc;
  margin-bottom: 2rem;
}

.page-paragraph {
  padding-top: 10px;
}

/* Featured Menu */
.featured-menu {
  flex: 1 1 30%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-sizing: border-box;
}

.featured-product-container,
.specials-product-container {
  margin-top: 1rem;
  text-align: center;
  width: 100%;
}

.featured-product,
.specials-product {
  margin-top: 1rem;
  width: 100%;
  height: auto;
}

.nav-item {
  display: block;
  width: 100%;
}

.featured-product-title {
  display: block;
  width: 100%;
}

.featured-product-image {
  max-width: 100%;
  height: auto;
  border: 1px solid #42464a;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 0.25rem;
}

/* Form Group */
.form-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: #787a7c;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.5rem;
  border: 1px solid #42464a;
  border-radius: 0.25rem;
  background-color: #e1e1e0;
  color: #787a7c;
  font-family: "Open Sans", sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #69141f;
}

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

.brand-grid-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  padding: 1rem;
  background-color: #e1e1e0;
  border: 1px solid #42464a;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 0.25rem;
}

.brand-logo {
  width: auto;
  height: 50px;
}

.category-header {
  background-color: #84231d;
  color: white;
  padding: 1rem;
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

button[type="submit"] {
  padding: 0.75rem 1.5rem;
  background-color: #69141f;
  color: #fff;
  border: none;
  border-radius: 0.25rem;
  font-family: "Oswald", sans-serif;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
  background-color: #84231d;
}

/* Locations Container */
.locations-container {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background-color: #ffffff;
  border: 1px solid #42464a;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
  flex-wrap: wrap;
}

/* Location */
.location {
  flex: 1 1 calc(33.333% - 1rem);
  background-color: #e1e1e0;
  padding: 1rem;
  border: 1px solid #42464a;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 300px;
  margin: 0.5rem;
}

.location img {
  width: 100%;
  height: auto;
  margin-bottom: 1rem;
}

.location-info {
  color: white;
  margin-bottom: 1rem;
}

/* Map Placeholder */
.map-placeholder {
  background-color: #42464a;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #787a7c;
  font-size: 1rem;
  border: 1px solid #69141f;
}

/* Product Grid */
.product-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  flex: 2;
}

.product-grid .product {
  flex: 1 1 calc(33.333% - 1rem); /* Three columns */
  box-sizing: border-box;
}

.product-grid .product .card {
  width: 100%;
}

.card {
  background-color: #e1e1e0;
  border: 1px solid #42464a;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 0.25rem;
  overflow: hidden;
  width: 3rem;
  max-width: fit-content;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card-img-top {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.card-body {
  padding: 1rem;
  text-align: center;
}

.card-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: #787a7c;
  margin-bottom: 0.5rem;
}

.card-text {
  color: #787a7c;
}

form {
  color: #787a7c;
}

.featured-text {
  color: white;
}

/* Grid Layout for Machines */
.machine-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Individual Machine Item */
.machine-grid-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  border: 1px solid #007bff;
  padding: 1rem;
  box-sizing: border-box;
  background-color: #f9f9f9;
}

/* Machine Name */
.machine-grid-item h2 {
  color: #333333;
  font-weight: bold;
  margin-bottom: 10px;
}

/* Machine Image */
.machine-image {
  width: 100%;
  height: 12rem;
  object-fit: cover;
  border: 4px solid #161947;
}

/* Media Queries */
@media (max-width: 768px) {
  .page-container {
    width: 95%;
  }

  .header-container,
  .footer-container {
    flex-direction: column;
    align-items: center;
  }

  nav ul {
    flex-direction: column;
    align-items: center;
  }

  .locations-container {
    flex-direction: column;
    align-items: center;
  }

  .location {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .main-content {
    flex-direction: column;
  }

  .secondary-nav {
    width: 100%;
    max-width: 100%;
  }

  .main-content > .swiper-container {
    width: 100%;
  }

  .page-container-sub {
    flex-direction: column;
  }

  .page {
    flex: 1 1 100%;
    padding-right: 0;
  }

  .featured-menu {
    flex: 1 1 100%;
  }

  .machine-grid {
    grid-template-columns: 1fr;
  }
}
