:root {
  color-scheme: light;
  --primary: #118a7e;
  --primary-dark: #1f6f78;
  --secondary: #93e4c1;
  --secondary-dark: #3baea0;
  --grey: #777;
  --bg: #faf6f1;
  --border: #e2d8cc;
  --text: #2b2320;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

.container {
   scroll-behavior: smooth;
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}
header{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 25px 0 50px;
  
}

header.public-page-header {
  align-items: stretch;
  gap: 14px;
  padding: 8px 0 32px;
}

.public-page-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.public-page-header h1 {
  font-size: 1.2rem;
  text-align: left;
}

.public-page-header .navigation-link {
  position: static;
  flex: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
}
h1 {
  font-size: 1.5rem;
  text-align: center;
  margin: 0;
}



#about-link{
   display: block;
  width: fit-content;
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0 auto;
}

.navigation-link {
  position: absolute;
  top: 0;
  right: 0;
   padding: 8px ;
  background-color: var(--secondary);
  display: block;
  width: fit-content;
  color: var(--primary-dark);
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: none;
 
}

.navigation-link:hover {
  text-decoration: underline;
}

.next-date {
  margin:  0;
  text-align: center;
  font-size: 1.3rem;
  color: var(--primary);
}

.next-date-delivery {
  display: block;
  font-size: 0.8rem;
  color: var(--secondary-dark);
  margin-top: 4px;
}

.field {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-weight: 600;
  font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="time"],
input[type="password"],
input[type="number"],
textarea,
select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: white;
}

#user-name.required-field-empty,
#user-surname.required-field-empty,
#customer-email.required-field-empty,
#production-date.required-field-empty {
  border-color: #c62828;
  color: #a12626;
  background-color: #fff5f5;
}

.products-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}

.loading {
  text-align: center;
  color: #777;
}

.product-card {
  display: block;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.product-card-selected {
  border-color: var(--primary-dark);
  box-shadow: inset 0 0 0 1px var(--primary-dark);
}

.product-summary-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 12px;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.product-card-unavailable {
  opacity: 0.55;
  filter: grayscale(1);
}

.product-card-unavailable .product-summary-toggle {
  cursor: default;
}

.product-unavailable-text {
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: right;
}

.product-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.product-photo {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: #eee;
  flex-shrink: 0;
}

.product-info {
  flex: 1;
  min-width: 0;
}

.product-unit-price {
  font-weight: 400;
  color: var(--grey);
  font-size: 0.8rem;
}

.product-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.product-name {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.product-description {
  margin: 4px 0 0;
  color: #665b56;
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: pre-line;
}

.variants-block {
  margin-top: 0;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fffdfb;
  width: 100%;
}

.variant-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px 100px;
  align-items: center;
  gap: 8px;
  padding: 8px 6px;
}

.variant-row-selected {
  background: #edf8f1;
  box-shadow: inset 3px 0 var(--primary-dark);
}

.variant-row + .variant-row {
  border-top: 1px solid var(--border);
}

.variant-label {
  font-size: 0.9rem;
  color: #555;
}

.variant-price {
  font-size: 0.85rem;
  color: #888;
  width: 80px;
  text-align: center;
}

.quantity-control {
  display: inline-flex;
  align-items: center;
  width: 100px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.quantity-button {
  width: 32px;
  height: 32px;
  border: 0;
  background: var(--secondary);
  color: var(--primary-dark);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.quantity-button:hover {
  background: var(--secondary-dark);
  color: white;
}

.quantity-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.quantity-button:disabled:hover {
  background: var(--secondary);
  color: var(--primary-dark);
}

.quantity-value {
  min-width: 32px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.total-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.total-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-summary {
  margin: 0;
  padding-left: 18px;
  color: #665b56;
  font-size: 0.85rem;
  font-weight: 400;
}

.order-summary-block {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.order-summary-block h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.order-summary-date + .order-summary-date {
  border-top: 1px solid var(--border);
  margin-top: 12px;
  padding-top: 12px;
}

.order-summary-heading,
.order-summary li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.summary-remove-date,
.summary-remove-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  color: var(--primary-dark);
  background: transparent;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 2px 0;
}

.summary-remove-date:hover,
.summary-remove-item:hover {
  text-decoration: underline;
}

.submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.submit-btn:hover {
  background: var(--primary-dark);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.error-message {
  background: #fdeaea;
  color: #a33;
  border: 1px solid #f3b9b9;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.confirmation {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.confirmation a {
  display: inline-block;
  margin: 12px 0;
  color: #25D366;
  font-weight: 600;
  text-decoration: none;
}

.contact-link {
  color: var(--primary-dark);
  font-weight: 600;
}

.field-hint {
  margin: 0;
  color: #665b56;
  font-size: 0.7rem;
  font-style: italic;
}
