/*
  Design tweaks on top of style.css (built with Tailwind, the build setup isn't
  on the server). Loaded after style.css, so these rules win where they overlap.
*/

:root {
  --orange: #f97c47;
  --orange-hover: #ee6a33;
  --ink: #1f1a17;
  --cream: #f4f1ec;
}

/* typography: the kit only has 400/700, and the old fallback wasn't a valid font stack */
html,
body {
  font-family: "chaparral-pro", Georgia, "Times New Roman", serif;
  font-weight: 400;
  color: var(--ink);
}

h4 {
  margin-bottom: 0.5rem;
}

.intro-text p {
  font-size: 1.75rem;
  line-height: 1.35;
}

@media (max-width: 64em) {
  .intro-text p {
    font-size: 1.35rem;
  }
}

/* a bit more room between sections */
#intro,
#assortiment,
#verhaal,
#productie,
#waar,
#bestellen,
#nieuws {
  padding-bottom: 5rem;
}

#assortiment .container,
#verhaal .container {
  margin-top: 4rem;
  margin-bottom: 1rem;
}

.section-image {
  max-height: 75vh;
  object-fit: cover;
}

/* product photos: one square image on the light background */
.product-image {
  width: 100%;
  background: var(--cream);
}

.product-image img {
  display: block;
  width: 100%;
  height: auto;
}

.type-image {
  display: inline-block;
  width: 48px;
  height: 48px;
  margin-right: 0.5rem;
  vertical-align: middle;
  background: var(--cream);
}

/* productie: the steps as a grid instead of a slider */
.production-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 64em) {
  .production-steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.production-step {
  height: auto;
  margin: 0;
}

.production-step img {
  display: block;
  width: 100%;
  height: auto;
}

.production-step figcaption {
  position: static;
  font-size: 0.85rem;
  line-height: 1.3;
  padding: 0.4rem 0 0.6rem;
  color: var(--ink);
}

/* nieuws: cards that link to the full item */
.news-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.news-card {
  display: flex;
  flex-direction: column;
  background: white;
  color: var(--ink);
  text-decoration: none;
  transition: box-shadow 0.2s;
}

.news-card:hover {
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(31, 26, 23, 0.12);
}

.news-card img {
  display: block;
  width: 100%;
  height: auto;
}

.news-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.news-card h3 {
  font-size: 1.15rem;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.news-card p {
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.news-card-more {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 2px solid var(--orange);
}

/* footer: give "Onze gegevens" more room next to the photo */
@media (min-width: 64em) {
  #contact .contact > div:first-child {
    width: 38%;
  }

  #contact .contact > div:last-child {
    width: 62%;
  }
}

/* dark text on the orange (the markup no longer uses text-white there):
   white on #f97c47 is too low in contrast to read well */
@media (min-width: 52em) {
  #responsive-menu a:hover {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 0.3em;
  }
}

/* menu: Bestellen as a button, always one tap away */
@media (min-width: 52em) {
  #responsive-menu li.bestellen a {
    background: white;
    border-radius: 2px;
    margin: 0 0.5rem;
  }

  #responsive-menu li.bestellen a:hover {
    background: var(--cream);
    text-decoration: none;
  }
}

.nav-order {
  display: none;
}

@media (max-width: 52em) {
  /* a solid bar, so the menu icon doesn't disappear on dark photos */
  nav {
    height: 3.5rem;
  }

  #responsive-menu {
    top: 0.85rem;
  }

  /* style.css sets a { color: black !important }, so the open menu needs !important too */
  #responsive-menu.open a {
    color: white !important;
  }

  #responsive-menu.open {
    background: rgba(31, 26, 23, 0.97);
  }

  #responsive-menu.open ~ .nav-order {
    display: none;
  }

  .nav-order {
    display: block;
    position: fixed;
    top: 0.6rem;
    left: 1rem;
    padding: 0.45rem 1rem 0.3rem;
    background: white;
    color: var(--ink);
    border-radius: 2px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
  }
}

/* buttons: one style everywhere, orange on light backgrounds, white on orange */
.btn {
  display: inline-block;
  background: var(--orange);
  color: var(--ink);
  border: 0;
  border-radius: 2px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  padding: 0.8rem 1.6rem 0.65rem;
  transition: background 0.2s;
}

.btn:not(:disabled):hover {
  background: var(--orange-hover);
  color: var(--ink);
  text-decoration: none;
}

.btn.bg-white,
.bg-red .btn {
  background: white;
  color: var(--ink);
}

.btn.bg-white:not(:disabled):hover,
.bg-red .btn:not(:disabled):hover {
  background: var(--cream);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* order form: photo, name and − / + per line, in a wider column than the text */
@media (min-width: 64em) {
  #bestellen .container {
    max-width: 62rem;
  }
}

#bestellen .type {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

#bestellen .type label {
  grid-column: 2;
  margin: 0;
}

#bestellen .type .type-image {
  width: 56px;
  height: 56px;
  margin: 0;
  border-radius: 50%;
}

.stepper {
  grid-column: 3;
  display: inline-flex;
  align-items: center;
  background: white;
  border-radius: 999px;
  padding: 0.15rem;
}

.stepper-button {
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.stepper-button:not(:disabled):hover {
  background: var(--cream);
}

#bestellen .stepper input {
  width: 2.5rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
  color: var(--ink);
  -moz-appearance: textfield;
}

#bestellen .stepper input::-webkit-outer-spin-button,
#bestellen .stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stepper:has(:disabled) {
  opacity: 0.45;
}

/* the total stays at the bottom of the screen while scrolling through the products */
#full-total-amount {
  position: sticky;
  bottom: 0;
  z-index: 5;
  box-shadow: 0 -4px 16px rgba(31, 26, 23, 0.12);
}

#full-total-amount .btn {
  background: var(--orange);
}

#full-total-amount .btn:not(:disabled):hover {
  background: var(--orange-hover);
}

.payment-info {
  border-left: 3px solid var(--ink);
  padding-left: 1rem;
}

/* phones: the − / + goes under the name, so the name keeps the full width */
@media (max-width: 64em) {
  #bestellen .container {
    max-width: calc(100% - 2rem);
  }

  #bestellen .product {
    padding: 1rem 0.75rem;
  }

  #bestellen .type {
    grid-template-columns: 44px 1fr;
    gap: 0.25rem 0.6rem;
    align-items: start;
  }

  #bestellen .type .type-image {
    grid-row: 1 / span 2;
    width: 44px;
    height: 44px;
  }

  #bestellen .type label {
    font-size: 0.85rem;
    line-height: 1.35;
  }

  .stepper {
    grid-column: 2;
    justify-self: start;
  }

  #full-total-amount {
    padding: 0.5rem 0.75rem;
  }

  #full-total-amount h3 {
    font-size: 1rem;
    margin: 0;
  }

  #full-total-amount .btn {
    margin-left: 0.75rem;
    padding: 0.6rem 0.9rem 0.45rem;
    font-size: 0.7rem;
  }
}

/* form fields: visible labels, errors under the field instead of on top of it */
#bestellen .required label,
#contact .required label {
  display: block;
  font-size: 0.8rem;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.required label:after {
  color: var(--ink);
}

.validation .validation-error {
  position: static;
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.3rem 0.6rem 0.2rem;
  background: var(--ink);
  color: white;
  font-size: 0.8rem;
  line-height: 1.3;
}

.validation textarea,
.validation input,
.validation select {
  border: 2px solid var(--ink);
  background: white !important;
}

.validation .radio {
  border: 0;
  background: none !important;
}

.uniform-errors {
  background: white;
  color: var(--ink);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--ink);
}

/* sub-pages (news item, product): start below the fixed menu */
#page {
  padding-top: 3.5rem;
}

#page .btn {
  align-self: flex-start;
}

#page img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 64em) {
  #page h2 {
    font-size: 1.6rem;
    line-height: 1.25;
  }
}
