/* Warenkorb-Seite Styles */
body {
  font-family: 'Montserrat', Arial, sans-serif;
  background: #f7f6f3;
  margin: 0;
  color: #222;
}

.warenkorb-main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
  min-height: calc(100vh - 200px);
}

.warenkorb-container {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(164,117,81,0.08);
  overflow: hidden;
}

.warenkorb-header {
  background: linear-gradient(135deg, #a47551 0%, #8b6446 100%);
  color: #fff;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.warenkorb-header h1 {
  margin: 0;
  font-size: 2rem;
}

.zurueck-link {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 0.5rem;
  transition: background 0.2s;
}

.zurueck-link:hover {
  background: rgba(255,255,255,0.1);
}

.warenkorb-content {
  padding: 2rem;
}

.warenkorb-liste {
  margin-bottom: 2rem;
}

.warenkorb-item {
  display: grid;
  grid-template-columns: 80px 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 1.5rem;
  border: 1px solid #eee;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  background: #fafafa;
  transition: box-shadow 0.2s;
}

.warenkorb-item:hover {
  box-shadow: 0 2px 8px rgba(164,117,81,0.1);
}

.warenkorb-item-bild {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 0.5rem;
  background: #fff;
  border: 1px solid #eee;
}

.warenkorb-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.warenkorb-item-name {
  font-weight: bold;
  font-size: 1.1rem;
  color: #a47551;
}

.warenkorb-item-beschreibung {
  color: #666;
  font-size: 0.9rem;
}

.warenkorb-item-einzelpreis {
  color: #2e7d32;
  font-size: 0.9rem;
}

.warenkorb-item-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  padding: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid #eee;
}

.quantity-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #c7a17a;
  background: #fff;
  color: #a47551;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: bold;
  transition: all 0.2s;
}

.quantity-btn:hover {
  background: #c7a17a;
  color: #fff;
}

.quantity-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.quantity-input {
  width: 60px;
  text-align: center;
  border: 1px solid #c7a17a;
  border-radius: 0.3rem;
  padding: 0.5rem 0.3rem;
  font-size: 1rem;
  background: #fff;
}

.warenkorb-item-preis {
  text-align: right;
}

.warenkorb-item-gesamt {
  font-weight: bold;
  font-size: 1.1rem;
  color: #2e7d32;
}

.warenkorb-item-remove {
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background 0.2s;
  margin-top: 0.5rem;
}

.warenkorb-item-remove:hover {
  background: #c0392b;
}

/* --- Katalog-ähnlicher Abstand und Überschrift --- */
.shop-produkte {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}
.shop-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0 2rem 1.2rem 2rem;
}
.shop-header-inner h1 {
  font-size: 1.5rem;
  margin: 0;
  color: black;
  font-weight: 700;
}

/* Modernes Bestellformular */
#bestellformular-modal .modal-content {
  max-width: 650px;
  max-height: 85vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 1rem;
  padding: 0;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
}

.close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(164, 117, 81, 0.1);
  border: none;
  color: #a47551;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 300;
  z-index: 2;
  transition: all 0.2s ease;
}

.close:hover {
  background: rgba(164, 117, 81, 0.2);
  transform: scale(1.1);
}

.bestellformular-content {
  padding: 2rem;
}

.form-section {
  margin-bottom: 1.5rem;
}

.form-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f0f0f0;
}

.form-section-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #a47551 0%, #8b6446 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.9rem;
}

.form-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.form-row {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-row.two-columns {
  grid-template-columns: 1fr 1fr;
}

.form-group {
  position: relative;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e5e5;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-family: 'Montserrat', Arial, sans-serif;
  transition: all 0.3s ease;
  background: #fafafa;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #a47551;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(164, 117, 81, 0.1);
  transform: translateY(-1px);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
  font-family: 'Montserrat', Arial, sans-serif;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #999;
  font-style: italic;
}

.datenschutz-section {
  background: #e3f2fd;
  border: 2px solid #bbdefb;
  border-radius: 0.75rem;
  padding: 1rem;
  margin: 1rem 0;
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  line-height: 1.4;
  font-size: 0.9rem;
}

.checkbox-container input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkmark {
  position: relative;
  width: 20px;
  height: 20px;
  background: white;
  border: 2px solid #c5c5c5;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all 0.3s ease;
}

.checkbox-container:hover .checkmark {
  border-color: #a47551;
}

.checkbox-container input:checked ~ .checkmark {
  background: #a47551;
  border-color: #a47551;
}

.checkmark::after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark::after {
  display: block;
}

.checkbox-text {
  flex: 1;
  color: #333;
}

.checkbox-text a {
  color: #a47551;
  text-decoration: none;
  font-weight: 600;
}

.checkbox-text a:hover {
  text-decoration: underline;
}

.bestellformular-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
  margin-top: 1rem;
}

.btn-primary,
.btn-secondary {
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: 'Montserrat', Arial, sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  min-width: 120px;
}

.btn-primary {
  background: linear-gradient(135deg, #a47551 0%, #8b6446 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(164, 117, 81, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(164, 117, 81, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #f8f9fa;
  color: #666;
  border: 1px solid #dee2e6;
}

.btn-secondary:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  color: #495057;
}

.btn-primary:disabled {
  background: #cccccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Loading State */
.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.form-message {
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.form-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (min-width: 1024px) {
  #bestellformular-modal .modal-content {
    max-width: 750px;
  }
}

@media (max-width: 768px) {
  #bestellformular-modal .modal-content {
    max-width: 95%;
    margin: 1.5rem auto;
    max-height: calc(100vh - 3rem);
  }
  
  .bestellformular-content {
    padding: 1.25rem;
  }
  
  .form-row.two-columns {
    grid-template-columns: 1fr;
  }
  
  .bestellformular-actions {
    justify-content: center;
  }
  
  .btn-primary {
    min-width: 200px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .close {
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 480px) {
  .bestellformular-content {
    padding: 1rem;
  }
  
  .form-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .form-section-icon {
    width: 28px;
    height: 28px;
  }
  
  .checkbox-container {
    align-items: center;
  }
}

/* --- Tabelle --- */
.warenkorb-tabelle {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  background: none;
}
.warenkorb-tabelle th, .warenkorb-tabelle td {
  background: #fff;
  padding: 0.35rem 0.18rem;
  text-align: center;
  font-size: 0.93rem;
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid #eee;
}
.warenkorb-tabelle th {
  color: #a47551;
  font-weight: bold;
  background: #f7f6f3;
  border-bottom: 2px solid #e0d3c0;
  font-size: 0.99rem;
  letter-spacing: 0.01em;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

/* --- Anzahl-Steuerung --- */
.warenkorb-tabelle td .quantity-btn {
  background: #a47551;
  color: #fff;
  border: none;
  border-radius: 0.5em;
  padding: 0.18em 0.7em;
  font-size: 1.1em;
  font-weight: bold;
  margin: 0 0.1em;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.1s;
  box-shadow: 0 1px 4px rgba(164,117,81,0.08);
}
.warenkorb-tabelle td .quantity-btn:disabled {
  background: #e0d3c0;
  color: #fff;
  cursor: not-allowed;
  opacity: 0.7;
}
.warenkorb-tabelle td .quantity-btn:hover:not(:disabled) {
  background: #c7a17a;
  color: #fff;
  transform: scale(1.08);
}
.warenkorb-tabelle td input[type='number'] {
  width: 38px;
  padding: 0.18em 0.1em;
  border-radius: 0.5em;
  border: 1px solid #c7a17a;
  font-size: 1em;
  text-align: center;
  background: #f9f7f3;
  margin: 0 0.1em;
  transition: border 0.18s;
}
.warenkorb-tabelle td input[type='number']:focus {
  border: 1.5px solid #a47551;
  outline: none;
}

/* Summen-Box */
.warenkorb-summary {
  margin: 2rem 0 1.5rem 0;
  max-width: 350px;
  margin-left: auto;
  margin-right: 0;
  background: #fff;
  border-radius: 1.2rem;
  box-shadow: 0 2px 8px rgba(164,117,81,0.08);
  padding: 1.5rem 2rem;
}
.warenkorb-summary .summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  margin-bottom: 0.7rem;
}
.warenkorb-summary .summary-row.total {
  font-size: 1.2rem;
  font-weight: bold;
  color: #a47551;
}

/* Aktionen */
.warenkorb-actions {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.warenkorb-actions .btn-primary,
.warenkorb-actions .btn-secondary,
.warenkorb-actions .btn-outline {
  min-width: 160px;
  font-size: 1.05rem;
  padding: 0.8rem 1.5rem;
  border-radius: 1rem;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(164,117,81,0.08);
}

/* Spezielle Farbe für den "Zur Bestellung"-Button */
#zur-bestellung.btn-primary {
  background: #2e7d32;
  color: #fff;
  border: none;
  font-size: 1.08rem;
  font-weight: bold;
  box-shadow: 0 4px 16px rgba(46,125,50,0.13);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
#zur-bestellung.btn-primary:hover, #zur-bestellung.btn-primary:focus {
  background: #1b5e20;
  color: #fff;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 32px rgba(46,125,50,0.18);
  outline: none;
}

/* Leerer Warenkorb */
.warenkorb-leer {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  margin-bottom: 2rem;
}
.leer-content {
  background: #fff;
  border-radius: 1.2rem;
  box-shadow: 0 2px 8px rgba(164,117,81,0.08);
  padding: 2.5rem 2rem;
  text-align: center;
}
.leer-content h2 {
  color: #a47551;
  margin-bottom: 1rem;
}
.leer-content .btn-primary {
  margin-top: 1.2rem;
}

/* Modal für Bestellformular */
.modal {
  display: none; /* Standard: versteckt */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background-color: rgba(0,0,0,0.35);
  justify-content: center;
  align-items: center;
}
.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 2rem 2.5rem 2rem 2.5rem;
  border-radius: 1.2rem;
  max-width: 400px;
  box-shadow: 0 4px 24px rgba(164,117,81,0.18);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.modal-content h2 {
  margin-top: 0;
  color: #a47551;
  font-size: 1.3rem;
  text-align: center;
}
.modal-content label {
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: #8b6446;
}
.modal-content input {
  width: 100%;
  padding: 0.6rem 0.7rem;
  margin-bottom: 0.7rem;
  border: 1px solid #c7a17a;
  border-radius: 0.6rem;
  font-size: 1rem;
  background: #f9f7f3;
  box-sizing: border-box;
}

/* Bestellhinweis Box */
.bestellhinweis {
  display: flex;
  gap: 1rem;
  background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
  border: 1px solid #a5d6a7;
  border-radius: 0.8rem;
  padding: 1.2rem;
  margin: 1.5rem 0;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

.hinweis-icon {
  font-size: 1.5rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.hinweis-text {
  flex: 1;
  color: #2e7d32;
  line-height: 1.5;
}

.hinweis-text strong {
  color: #1b5e20;
  font-size: 1.05rem;
}

.hinweis-text ul {
  margin: 0.8rem 0 0 0;
  padding-left: 1.2rem;
}

.hinweis-text li {
  margin-bottom: 0.3rem;
  color: #388e3c;
}

/* Schönerer Button für das Bestellformular */
.modal-content .btn-primary {
  background: #a47551;
  color: #fff;
  font-size: 1.15rem;
  font-weight: bold;
  padding: 1rem 0;
  border: none;
  border-radius: 1.2rem;
  box-shadow: 0 4px 16px rgba(164,117,81,0.13);
  letter-spacing: 0.03em;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  margin-top: 1.2rem;
  width: 100%;
  cursor: pointer;
}
.modal-content .btn-primary:hover, .modal-content .btn-primary:focus {
  background: #8b6446;
  color: #fff;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 32px rgba(164,117,81,0.18);
  outline: none;
}
.close {
  position: absolute;
  top: 1.1rem;
  right: 1.3rem;
  font-size: 1.5rem;
  color: #a47551;
  cursor: pointer;
  font-weight: bold;
  transition: color 0.2s;
}
.close:hover {
  color: #e74c3c;
}

/* Responsive */
@media (max-width: 800px) {
  .shop-produkte {
    padding: 0 0.5rem;
  }
  .shop-header-inner {
    padding: 0 0.5rem 1rem 0.5rem;
  }
  .warenkorb-tabelle th, .warenkorb-tabelle td {
    padding: 0.7rem 0.3rem;
    font-size: 0.97rem;
  }
  .warenkorb-summary {
    padding: 1rem 0.7rem;
    max-width: 100%;
  }
  .warenkorb-actions {
    flex-direction: column;
    gap: 0.7rem;
    align-items: stretch;
  }
}
@media (max-width: 600px) {
  /* Tabelleninhalte kompakter */
  .warenkorb-tabelle th, .warenkorb-tabelle td {
    font-size: 0.92rem;
    padding: 0.38rem 0.12rem;
    min-width: 60px;
  }
  .warenkorb-tabelle th {
    font-size: 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
  .warenkorb-tabelle td .quantity-btn,
  .warenkorb-tabelle td .warenkorb-item-remove {
    width: 28px;
    height: 28px;
    font-size: 1rem;
  }
  .warenkorb-tabelle td input[type='number'] {
    width: 32px;
    font-size: 0.98rem;
    padding: 0.2em 0.05em;
  }
  /* Zurück-Link ausblenden */
  .zurueck-link {
    display: none !important;
  }
}

/* Animation für das Entfernen von Items */
.warenkorb-item.removing {
  animation: slideOut 0.3s ease-out forwards;
}

@keyframes slideOut {
  to {
    opacity: 0;
    transform: translateX(-100%);
  }
}

/* Flexbox-Layout für Sticky Footer */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main.shop-main {
  flex: 1;
}

/* Datenschutz-Checkbox Styles */
.datenschutz-einwilligung {
  margin: 20px 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  gap: 10px;
  position: relative;
}

.checkbox-container input[type="checkbox"] {
  opacity: 0;
  position: absolute;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  height: 18px;
  width: 18px;
  background-color: #fff;
  border: 2px solid #a47551;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.2s ease;
}

.checkbox-container:hover .checkmark {
  background-color: #f8f8f8;
}

.checkbox-container input:checked ~ .checkmark {
  background-color: #a47551;
  border-color: #a47551;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container:hover {
  color: #a47551;
}

/* Erforderlich-Markierung */
.datenschutz-einwilligung::after {
  content: " * Pflichtfeld";
  font-size: 0.8rem;
  color: #666;
  display: block;
  margin-top: 5px;
}
