:root {
  --primary-color: #8b0000;
  --primary-hover: #a31515;
  --border-color: #deb887;
  --light-border: #ccb088;
  --bg-main: #fff;
  --bg-form: #fff;
  --bg-wrapper: #fff;
  --bg-preview: #fff;
  --bg-highlight: #fff2dd;
  --box-shadow: 0 0 10px rgba(173, 137, 96, 0.2);
}

/* Сохраняем основные стили body без изменения шрифта */
body {
  margin: 0;
  padding: 0;
}

#treba-wrapper {
  font-family: 'PT Serif', serif;
  width: 1200px;
  height: auto;
  margin: 40px auto;
  display: flex;
  gap: 20px;
  padding: 20px;
  background: var(--bg-wrapper);
  border: 1px solid var(--border-color);
  box-shadow: var(--box-shadow);
  border-radius: 16px;
}

@media (max-width: 1240px) {
  #treba-wrapper {
    width: 95%;
    height: auto;
  }
}

@media only screen and (max-width: 768px) {
  #treba-wrapper {
    flex-direction: column;
    margin: 20px auto;
    padding: 15px;
    height: auto;
  }
  
  .names-instructions {
    padding: 12px;
    margin: 8px 0;
    font-size: 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 248, 235, 0.98) 0%, rgba(255, 245, 220, 0.95) 100%);
    box-shadow: 
      0 3px 8px rgba(139, 0, 0, 0.15),
      0 1px 4px rgba(0, 0, 0, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.8),
      inset 0 -1px 0 rgba(139, 0, 0, 0.15);
  }
  
  .names-instructions::before {
    border-radius: 10px;
    background: linear-gradient(45deg, #deb887 0%, #b8860b 50%, #deb887 100%);
  }
  
  .instruction-item {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 6px;
    border-left: 3px solid #b8860b;
    transition: all 0.2s ease;
  }
  
  .instruction-item:last-child {
    margin-bottom: 0;
  }
  

  
  .instruction-item small {
    margin-left: 15px;
    margin-top: 3px;
    font-size: 11px;
  }
  
  .names-info {
    padding: 6px 10px;
    font-size: 12px;
    margin-top: 4px;
  }
  

}

#treba-form-container, #cart-preview-container {
  width: 50%;
  border-radius: 12px;
  padding: 20px;
}

#treba-form-container {
  height: auto;
  overflow-y: visible;
}

#cart-preview-container {
  height: auto;
  overflow-y: visible;
}

@media only screen and (max-width: 768px) {
  #treba-form-container, #cart-preview-container {
    width: 100%;
    height: auto;
    min-height: auto;
  }
}

#treba-form-container {
  background: var(--bg-form);
  border: 2px solid #b8860b;
}

#treba-form-container h2 {
  text-align: center;
  font-size: 24px;
  margin-bottom: 25px;
  color: var(--primary-color);
  border-bottom: 2px dashed #b8860b;
  padding-bottom: 12px;
  font-weight: 600;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  font-size: 15px;
  margin-bottom: 6px;
  font-weight: 500;
  color: #4a4a4a;
}

input, select, textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--light-border);
  border-radius: 8px;
  background: #fffefb;
  font-family: inherit;
  font-size: 15px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.1);
}

button {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(139, 0, 0, 0.2);
}

button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(139, 0, 0, 0.3);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(139, 0, 0, 0.2);
}

button:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#cart-preview-container {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--primary-color);
  background-color: var(--bg-preview);
  z-index: 1;
  color: #2e1802;
  background-image: url('KIE/eskiz2.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  position: relative;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(139, 0, 0, 0.1);
}

#cart-preview-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 250, 243, 0.92);
  z-index: -1;
  border-radius: 12px;
}

#treba-preview {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
  padding: 25px;
  margin-bottom: 20px;
  background: rgba(255, 253, 246, 0.95);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(139, 0, 0, 0.08);
  backdrop-filter: blur(2px);
}

#preview-cross {
  display: block;
  margin: 0 auto 15px;
  height: 45px;
  z-index: 1;
  position: relative;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

#preview-content {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
}

#preview-type {
  font-size: 24px;
  margin-bottom: 12px;
  color: var(--primary-color);
  font-weight: 600;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

#preview-prayer {
  font-style: italic;
  margin-bottom: 20px;
  padding: 0 15px;
  color: #4a4a4a;
  font-size: 15px;
  line-height: 1.4;
}

.preview-names {
  text-align: left;
  width: 85%;
  margin: 20px auto;
  padding-left: 25px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  padding: 15px 20px;
  border: 1px solid rgba(139, 0, 0, 0.1);
}

.preview-names li {
  margin-bottom: 6px;
  color: #2e1802;
  font-weight: 500;
}

#cart-items {
  flex-grow: 1;
  padding: 10px 0;
}

.cart-item {
  background: rgba(255, 255, 255, 0.9);
  padding: 18px;
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid rgba(139, 0, 0, 0.15);
  position: relative;
  box-shadow: 0 2px 6px rgba(139, 0, 0, 0.08);
  backdrop-filter: blur(1px);
}

.cart-item-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--primary-color);
  font-size: 16px;
}

.cart-item-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--primary-color);
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  width: 24px;
  height: 24px;
  line-height: 22px;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  border: 1px solid var(--primary-color);
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cart-item-remove:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

.cart-item-details {
  margin-bottom: 12px;
  color: #4a4a4a;
  font-size: 14px;
}

.cart-item-price {
  text-align: right;
  font-weight: 600;
  color: var(--primary-color);
  font-size: 16px;
}

#cart-summary {
  margin-top: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.95);
  border-top: 2px dashed var(--border-color);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(139, 0, 0, 0.08);
}

#cart-total {
  font-size: 20px;
  font-weight: 600;
  text-align: right;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.names-instructions {
  background: linear-gradient(135deg, rgba(255, 248, 235, 0.95) 0%, rgba(255, 245, 220, 0.9) 100%);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 15px;
  margin: 10px 0;
  font-size: 13px;
  line-height: 1.4;
  position: relative;
  background-clip: padding-box;
  box-shadow: 
    0 4px 12px rgba(139, 0, 0, 0.12),
    0 2px 6px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(139, 0, 0, 0.1);
}

.names-instructions::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, #deb887 0%, #b8860b 50%, #deb887 100%);
  border-radius: 12px;
  z-index: -1;
  margin: -2px;
}

.instruction-item {
  margin-bottom: 5px;
  color: #555;
  display: block;
}

.instruction-item:last-child {
  margin-bottom: 0;
}

.instruction-item small {
  color: #888;
  font-style: italic;
  display: block;
  margin-left: 20px;
  margin-top: 2px;
}

.names-info {
  background: rgba(255, 250, 243, 0.9);
  border: 1px solid #deb887;
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 5px;
  font-size: 14px;
  color: #666;
  font-style: italic;
  line-height: 1.3;
}

.error {
  color: var(--primary-color);
  font-size: 14px;
  margin-top: 5px;
}

#success-message {
  display: none;
  text-align: center;
  padding: 20px;
  background-color: #dff0d8;
  border: 1px solid #d6e9c6;
  color: #3c763d;
  margin-top: 20px;
  border-radius: 6px;
}

#cart-empty-message {
  text-align: center;
  padding: 50px 20px;
  font-style: italic;
  color: #888;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  margin: 20px 0;
  border: 1px dashed rgba(139, 0, 0, 0.2);
  font-size: 15px;
  line-height: 1.5;
}



#add-to-cart-btn {
  margin-bottom: 15px;
}

.btn-secondary {
  background: #6c757d;
  margin-top: 10px;
}

.btn-secondary:hover {
  background: #5a6268;
}

/* Стили для заголовка "Ваш заказ" */
#cart-preview-container h3 {
  text-align: center;
  margin: 25px 0 15px;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 20px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.9);
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid rgba(139, 0, 0, 0.1);
  box-shadow: 0 2px 4px rgba(139, 0, 0, 0.05);
} 