/* General Styles */

p.title {
  font-size: 2rem;
  margin: 10px 0px 10px 0px;
  font-family: roboto, sans-serif;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f5f5f5;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main {
  flex: 1;
  margin-top: 40px;
  /* To account for fixed header */
  padding: 24px;
}

header,
footer {
  background: #1f2937;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header {
  position: fixed;
  box-sizing: border-box;
  width: 100%;
  top: 0;
  padding: 0px 24px;
}

footer {
  flex-direction: column;
  display: flex;
  padding: 32px 24px 24px;
}

.footer-nav {
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 -8px;
}

.footer-nav p,
.footer-nav a {
  margin: 8px;
}

footer h1 {
  margin: 0;
  font-size: 1.5rem;
}

.site-logo {
  display: block;
  height: 48px;
  width: auto;
}

.cart-icon {
  filter: invert();
  height: 1.5em;
  padding-right: 4px;
}

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

nav a {
  color: #fff;
  margin-left: 16px;
  text-decoration: none;
}

header nav a:first-of-type {
  display: inline-flex;
  align-items: center;
  margin-left: 0;
}

nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.language-selector {
  position: fixed;
  bottom: 0px;
  right: 30px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-color: #fff;
  border-radius: 10px 10px 0px 0px;
  padding: 20px 20px 8px 20px;
  box-shadow: 0 0 8px rgb(0 0 0 / .25);
  height: 30px;
  overflow: hidden;
}

@media (min-width: 1680px) {
  .language-selector {
    right: calc(50% - 800px);
  }
}

.language-selector:hover {
  height: 56px;
}

img.language-flag {
  width: 30px;
  height: 18px;
  object-fit: fill;
  margin-bottom: 8px;
  margin-top: 8px;
}

.language-selector:hover img.language-flag {
  margin-top: 0px;
}





section.block {
  background: #fff;
  max-width: 1000px;
  margin: 30px auto;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

button {
  padding: 10px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #1f2937;
  color: #fff;
  text-decoration: none;
}

a:has(> button) {
  text-decoration: none;
}

.items-list {
  list-style: none;
  padding: 0px;
  display: grid;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.items-list li {
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.items-list li:not(:last-child) {
  border-bottom: 1px solid #e5e7eb;
}

.items-list li :last-child {
  text-align: right;
}

input[type="number"] {
  width: 72px;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.hover-shadow {
  transition-duration: 200ms;
}

.hover-shadow:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* small (thin) pages */

.small-page {
  box-sizing: border-box;
  width: min(450px, 100%);
  margin: 40px auto;
  padding: 12px 24px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.small-page form div {
  margin-bottom: 16px;
}

.small-page label {
  display: block;
  margin-bottom: 8px;
}

.small-page input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.small-page textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font: inherit;
  resize: vertical;
}

.small-page input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
}

.small-page label span {
  color: #666;
  font-size: 0.9em;
}

.payment-shipping-page {
  max-width: 900px;
  margin: 40px auto;
}

.payment-shipping-page > h1,
.payment-shipping-page > p {
  text-align: center;
}

.payment-shipping-page > p {
  margin-bottom: 32px;
}

.payment-shipping-card {
  background: #fff;
  margin: 20px 0;
  padding: 24px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.payment-shipping-card h2 {
  margin-top: 0;
}

.shipping-rates {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.shipping-rates th,
.shipping-rates td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.shipping-rates th:last-child,
.shipping-rates td:last-child {
  text-align: right;
}

.payment-methods {
  padding-left: 20px;
}

.payment-methods li + li {
  margin-top: 12px;
}

.small-page button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
}

button.dp-button {
  border: 1px solid #1f2937;
  background: transparent;
  color: #1f2937;
}

.error {
  background: #ffe5e5;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.success {
  background: #e7f7ed;
  color: #166534;
  border: 1px solid #86efac;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 16px;
}

@media (max-width: 670px) {
  main {
    padding: 16px 12px;
  }

  header,
  footer {
    padding-left: 12px;
    padding-right: 12px;
  }
  .language-selector {
    right: 30px;
  }
}

@media (max-width: 480px) {

  main:has(.small-page),
  main.cart-page {
    padding-left: 0;
    padding-right: 0;
  }

  .small-page {
    width: 100%;
    margin: 24px 0;
    border-radius: 0;
  }

  .payment-shipping-page {
    margin: 24px auto;
  }

  .payment-shipping-card {
    padding: 18px 14px;
  }

  .shipping-rates th,
  .shipping-rates td {
    padding: 10px 6px;
  }

  main.cart-page section {
    margin: 24px 0;
    border-radius: 0;
  }

  main.cart-page section ul {
    max-width: 100%;
  }

  header {
    flex-wrap: wrap;
    gap: 20px 12px;
  }

  footer h1 {
    font-size: 1.25rem;
  }
}