/* General Styles */
.custom-offers-container {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.custom-offers-container h3 {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  margin-bottom: 15px;
}

.custom-offer {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.custom-offer input[type="radio"] {
  margin-right: 10px;
}

.custom-offer label {
  font-size: 18px;
  color: #333;
}

/* Checkout Form Styles */
#custom-checkout-form {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#custom-checkout-form h3 {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  margin-bottom: 15px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  font-size: 16px;
  color: #555;
  margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
}

.form-group textarea {
  resize: vertical;
}

button[type="submit"] {
  background: #c92331;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 18px;
  cursor: pointer;
  width: 100%;
}

button[type="submit"]:hover {
  background: #a81c28;
}

/* Price and Savings Styles */
.price-container {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.price-container .original-price {
  text-decoration: line-through;
  color: #888;
}

.price-container .discounted-price {
  color: #333;
  font-weight: bold;
}

/* Stock Progress Bar */
.stock-progress {
  background: #f0f0f0;
  border-radius: 5px;
  height: 10px;
  margin-bottom: 10px;
}

.stock-progress .progress-bar {
  background: linear-gradient(to right, #4caf50, #ffeb3b, #f44336);
  border-radius: 5px;
  height: 100%;
}

/* Custom Offers Grid and Card Styles */
.custom-offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.custom-offer-card {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
  position: relative;
}
.custom-offer-card:hover,
.custom-offer-card:focus-within {
  border-color: #c92331;
  box-shadow: 0 4px 16px rgba(201, 35, 49, 0.1);
}
.offer-radio-input {
  position: absolute;
  left: -9999px;
}
.offer-radio-image {
  flex-shrink: 0;
  margin-left: 18px;
  display: flex;
  align-items: center;
}
.offer-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #eee;
}
.offer-details {
  flex: 1;
  min-width: 0;
  text-align: right;
}
.offer-name {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #1f2937;
  word-break: break-word;
}
.offer-qty {
  margin: 4px 0 0 0;
  font-size: 14px;
  color: #6b7280;
}
.offer-pricing {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 4px;
}
.offer-price {
  font-size: 16px;
  color: #c92331;
  font-weight: bold;
}
.offer-regular-price {
  font-size: 14px;
  color: #9ca3af;
  text-decoration: line-through;
}
.custom-offer-card
  input[type="radio"]:checked
  + .offer-radio-image
  + .offer-details,
.custom-offer-card .offer-radio-input:checked ~ .offer-details {
  /* fallback for checked styling if needed */
}
.custom-offer-card.selected,
.custom-offer-card input[type="radio"]:checked ~ .offer-details {
  border-color: #c92331;
  box-shadow: 0 4px 16px rgba(201, 35, 49, 0.1);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .custom-offers-container h3,
  #custom-checkout-form h3 {
    font-size: 20px;
  }

  .custom-offer label {
    font-size: 16px;
  }

  .form-group label {
    font-size: 14px;
  }

  .form-group input,
  .form-group textarea {
    font-size: 14px;
  }

  button[type="submit"] {
    font-size: 16px;
  }
}

@media (max-width: 600px) {
  .custom-offers-grid {
    grid-template-columns: 1fr;
  }
  .custom-offer-card {
    flex-direction: row;
    align-items: center;
    text-align: right;
    padding: 10px 8px;
    margin-bottom: 12px;
  }
  .offer-radio-image {
    justify-content: flex-start;
    width: auto;
    margin-left: 10px;
  }
  .offer-details {
    text-align: right;
    margin: 0 0 0 10px;
    width: 100%;
  }
  .offer-img {
    width: 44px;
    height: 44px;
    margin: 0;
  }
  .custom-offer-card input[type="radio"] {
    width: 22px;
    height: 22px;
    margin: 0 6px 0 0;
  }
  .offer-name {
    font-size: 15px;
  }
  .offer-qty {
    font-size: 13px;
  }
  .offer-price {
    font-size: 15px;
  }
  .offer-regular-price {
    font-size: 13px;
  }
}

/* Always show pointer cursor for clickable cards */
.custom-offer-card {
  cursor: pointer;
}
