* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.container {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  max-width: 500px;
  margin: 0 auto;
  padding: 0px 15px;
  color: #333;
}

.title {
  text-align: center;
  color: #333;
  font-size: 1.75rem;
  font-weight: 500;
  margin-bottom: 10px;
  margin-top: 0px;
}

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

.form-row {
  display: flex;
  gap: 15px;
}

.form-row .form-group {
  flex: 1;
}

.form-row .col-md-8 {
  flex: 2;
}

.form-row .col-md-4 {
  flex: 1;
}

label {
  display: block;
  margin-bottom: 10px;
  color: #555;
  font-size: 1rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Specific styles for select elements to match input appearance */
select.form-control {
  height: auto;
  min-height: 38px;
  background-color: #fff;
  background-image: url("");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px 12px;
  padding-right: 30px;
  color: #333;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  -webkit-text-fill-color: #333;
}

select.form-control:focus {
  background-image: url("");
}

/* Ensure consistent line height */
select.form-control option {
  padding: 4px 8px;
}

/* RTL specific styles */
[dir="rtl"] select.form-control {
  background-position: left 8px center;
  padding-right: 12px;
  padding-left: 30px;
}

.offer-selection {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 20px 0;
}

.offer-selection img {
  max-width: 100%;
  max-height: 80px;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s;
}

.offer-selection img:hover {
  transform: scale(1.05);
}

/* Modal styles */
.image-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  animation: fadeIn 0.3s ease-in-out;
}

.image-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  animation: zoomIn 0.3s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  min-height: 200px;
}

.modal-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  display: none;
}

.modal-loader {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.modal-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes zoomIn {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.offer-selection .offer-info {
  flex: 1;
  text-align: center;
}

.offer-selection h5 {
  margin: 5px 0;
  color: #333;
  font-size: 20px;
  font-weight: 500;
}

.offer-selection span {
  color: #666;
  font-size: 14px;
  font-weight: 500;
}

.d-none {
  display: none;
}

.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.preloader::before {
  content: "";
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top-color: #3498db;
  animation: spin 1s infinite linear;
}

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

form.loading .preloader {
  display: flex;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
  text-decoration: none;
  width: 100%;
}

.btn-warning {
  background-color: #ffc107;
  color: #212529;
}

.btn-warning:hover {
  background-color: #e0a800;
}

.btn-lg {
  padding: 15px 40px;
  font-size: 18px;
}

.cart-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #333;
  width: 60px;
  min-width: 60px;
  height: 100%;
  border-radius: 6px 0 0 6px;
  position: absolute;
  left: 0;
  top: 0;
  transform: none;
}

/* RTL specific styles for cart icon */
[dir="rtl"] .cart-icon {
  border-radius: 0 6px 6px 0;
  right: 0;
  left: auto;
}

.order-form .order-submit-btn,
form.cart .order-submit-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 60px;
  min-height: 54px;
  border-radius: 6px;
  overflow: hidden;
}

#submit-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 60px;
  border-radius: 6px;
  overflow: hidden;
}

/* RTL specific styles for submit button */
[dir="rtl"] #submit-button {
  padding-left: 30px;
  padding-right: 60px;
}

#info-privacy {
  text-align: center;
  margin-bottom: 15px;
}

#info-privacy small {
  font-size: 12px;
  font-weight: 500;
}

#info-privacy a {
  color: #007bff;
  text-decoration: none;
}

#info-privacy a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

.order-form-block {
  padding: 0.5rem 0 1.5rem;
}

.order-form-block--bottom {
  padding-top: 0;
  margin-bottom: 1rem;
}

.order-summary-card {
  background: #f4f9fd;
  border: 1px solid #d4e8f7;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.order-summary-product {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0b1a48;
  line-height: 1.35;
}

.order-summary-prices {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.order-summary-sale {
  font-size: 1.75rem;
  font-weight: 700;
  color: #e74c3c;
}

.order-summary-original {
  font-size: 1rem;
  color: #888;
  text-decoration: line-through;
}

.order-summary-badge {
  display: inline-block;
  background: #0693e3;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.order-summary-includes {
  margin: 0;
  padding: 0;
  list-style: none;
}

.order-summary-includes li {
  position: relative;
  padding-left: 1.35rem;
  margin: 0 0 6px;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #444;
}

.order-summary-includes li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #27ae60;
  font-weight: 700;
}

.order-trust-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #333;
  line-height: 1.2;
}

.trust-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0693e3;
  flex-shrink: 0;
}

.order-payment-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #fffbea;
  border: 1px solid #f1e0a0;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #555;
}

.order-payment-note strong {
  color: #333;
}

.info-privacy {
  text-align: center;
  margin: 12px 0 14px;
}

.info-privacy small {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.info-privacy a {
  color: #007bff;
  text-decoration: none;
}

.info-privacy a:hover {
  text-decoration: underline;
}

.form-group.error .form-control {
  border-color: #e74c3c;
}

.form-group .error-message {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: #e74c3c;
}

.order-submit-btn.loadingggg {
  opacity: 0.85;
  pointer-events: none;
}

@media (min-width: 480px) {
  .order-trust-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}
