body {
  font-family: Helvetica, sans-serif;
  background: #003b49;
}

html {
  scroll-behavior: smooth;
}

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

.container {
  width: 100vw;
  min-height: 10vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 20px;
}

nav {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 20px;
  height: 80px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-radius: 10px;
  background: #004252;
  box-shadow: rgba(0, 0, 0, 0.25) 0px 15px 20px -5px;
}

.nav--list {
  width: 100%;
  list-style: none;
  display: flex;
  justify-content: center; 
  align-items: center;
  gap: 12px;
}

.item {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  user-select: none;
  cursor: pointer;
  padding: 0;
  height: 44px;
  border: 2px solid #f2c75c;
  overflow: hidden;
  border-radius: 6px;
}

.item a {

  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0 18px;
  font-size: 16px;
  text-transform: uppercase;
  color: #f2c75c;
  z-index: 10;
  text-decoration: none;
  transition: color 200ms ease;
}

.item:hover a {
  color: #003b49;
}

.item:before {
  content: "";
  position: absolute;
  width: 0%;
  height: 100%;
  transform: skew(30deg);
  background: #f2c75c;
  transition: width 400ms ease;
}

.item:hover:before {
  width: 120%;
}

.item:nth-child(2):before {
  transform: skew(-20deg);
}

.item:nth-child(3):before {
  transform: skew(0deg);
}

.item:nth-child(4):before {
  width: 180px;
  height: 0%;
  bottom: 0px;
  transition: height 400ms ease;
}

.item:nth-child(4):hover:before {
  height: 100%;
}

/* ---------------- News page styles ---------------- */

.infobox {
  /* make the infobox take most of the viewport */
  width: 90vw;
  max-width: 1200px;
  margin: 20px auto;
  padding: 24px;
  border: 2px solid #004252;
  border-radius: 10px;
  background: #f2c75c;
  box-shadow: rgba(0, 0, 0, 0.25) 0px 15px 20px -5px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* News grid inside the infobox */
.news-grid {
  /* stack cards vertically, one per row */
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  width: 100%;
}

.news-card {
  background: #fff;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 12px;
  box-shadow: rgba(0, 0, 0, 0.06) 0px 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: visible;
}

/* make sure card content sits above the extension */
.news-card>* {
  position: relative;
  z-index: 2;
}

.news-card h3 {
  font-size: 16px;
  margin: 0;
  color: #003b49;
}

.news-card p {
  font-size: 14px;
  margin: 0;
  color: #333;
}

/* small meta row */
.news-meta {
  font-size: 12px;
  color: #666;
}

@media (max-width: 480px) {
  .news-card h3 {
    font-size: 14px;
  }

  .news-card p {
    font-size: 13px;
  }

  /* on small screens disable the right extension and let cards fill width */
  .news-card::after {
    display: none;
  }

  .news-card {
    padding-right: 12px;
  }
}

/* ---------------- Bakery homepage styles ---------------- */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 48px 20px;
  background: #f2c75c;
  border-radius: 10px;
  margin: 20px auto;
  width: 90vw;
  max-width: 1200px;
}

.hero-inner {
  max-width: 600px;
}

.hero h1 {
  font-size: 40px;
  margin: 0 0 12px 0;
}

.hero p {
  color: #003b49;
  font-size: 18px;
  margin: 0 0 18px 0;
}

.hero-image img {
  width: 320px;
  border-radius: 8px;
  display: block;
}

.btn-primary {
  display: inline-block;
  background: #f2c75c;
  color: #003b49;
  padding: 12px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  /* outline for visual separation */
  border: 2px solid rgba(0,0,0,0.06);
  box-shadow: 0 0 0 3px rgba(242,199,92,0.12);
}

.btn-primary:focus,
.btn-primary:focus-visible {
  outline: 3px solid rgba(0,59,73,0.25);
  outline-offset: 3px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}
.features {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 10px auto;
  width: 90vw;
  max-width: 1200px;
}

.feature {
  background: #f2c75c;
  padding: 12px 18px;
  border-radius: 8px;
  box-shadow: rgba(0, 0, 0, 0.04) 0 2px 6px;
}

.products {
  width: 90vw;
  max-width: 1200px;
  margin: 20px auto;
}

.products h2 {
  color: #003b49;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  align-items: start;
}

/* center the Recently Visited button which is placed in a paragraph above the grid */
.products > p { text-align: center; margin: 8px 0 12px 0; }

.btn-group {
  display: inline-flex;
  gap: 12px;
  justify-content: center;
}

.product-card {
  background: #f2c75c;
  padding: 12px;
  border-radius: 8px;
  flex: 1;
  text-align: center;
  box-shadow: rgba(0, 0, 0, 0.04) 0 4px 10px;
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
}

.product-card h3 {
  margin: 8px 0 6px 0;
}

footer {
  margin: 30px 0 60px 0;
}

.footer-inner {
  text-align: center;
  color: #fff;
}

@media (max-width: 800px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
  }

  .hero-image img {
    width: 100%;
    max-width: 420px;
  }

  .product-grid {
    flex-direction: column;
  }
}

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

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

@media (max-width: 380px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* form inside infobox */
.infobox form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.infobox label { font-weight: 600; color: #003b49; }
.infobox input[type="text"],
.infobox textarea {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.08);
  font-size: 14px;
}

.infobox input[type="submit"] { width: auto; align-self: flex-start; }

/* contacts table styling */
.contacts-table th,
.contacts-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.contacts-table th { color: #003b49; }

/* users table styling */
.table-wrap {
  width: 90vw;
  max-width: 1200px;
  margin: 20px auto;
  padding: 12px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: rgba(0, 0, 0, 0.06) 0px 6px 18px;
  overflow-x: auto;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.users-table th,
.users-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  text-align: left;
  vertical-align: middle;
}

.users-table thead th {
  background: #f2c75c;
  color: #003b49;
  font-weight: 700;
  position: sticky;
  top: 0;
}

.users-table tbody tr:hover {
  background: rgba(242,199,92,0.08);
}

/* simple alert styles used by users.php when an error occurs */
.alert { padding: 10px 12px; border-radius: 6px; margin-bottom: 12px; }
.alert-error { background: #ffecec; color: #8b0000; border: 1px solid #f5c2c2; }

@media (max-width: 600px) {
  .users-table th, .users-table td { padding: 8px; font-size: 13px; }
  .table-wrap { width: 96vw; padding: 8px; }
}