@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary: #52ad9c;
  --primary-hover: #428a7d;
  --text: #222;
  --muted: #666;
  --bg: #f7f8fa;
  --white: #fff;
  --border: #e0e0e0;
  --danger: #e74c3c;
  --danger-hover: #c0392b;
}

body {
  background: var(--bg);
  font-family: 'Inter', sans-serif;
  color: var(--text);
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

/* Container */
.container {
  width: 100%;
  max-width: 1140px;
  padding: 20px;
  margin: 0 auto;
}

/* Title */
.title {
  background-color: #000;
  border-radius: 10px 10px 0 0;
  padding: 24px;
  color: var(--white);
  margin-top: 30px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.title h2 {
  margin: 0;
  font-weight: 600;
  font-size: 24px;
}

/* Layout */
.d-flex {
  display: flex;
  flex-wrap: wrap;
  background: var(--white);
  border-radius: 0 0 10px 10px;
  padding: 30px;
  gap: 30px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

/* ----------------------- FORM ----------------------- */
form {
  flex: 1 1 60%;
  min-width: 320px;
}

label {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

label span {
  margin-bottom: 6px;
  color: var(--muted);
}

input[type="text"],
input[type="tel"],
input[type="email"],
select {
  padding: 12px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  background: #fafafa;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-hover + 20);
  background: #fff;
}

/* ----------------------- ORDER SUMMARY ----------------------- */
.Yorder {
  flex: 1 1 35%;
  padding: 20px;
  background: linear-gradient(to right, #ffffff, #ebebeb);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  min-height: 300px;
}

/* Cart Table */
.Yorder table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.Yorder table tr {
  border-bottom: 1px solid var(--border);
}

.Yorder table td {
  padding: 12px;
  vertical-align: middle;
  font-size: 14px;
}

.Yorder table td img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 10px;
}

.Yorder table td span {
  display: inline-block;
  max-width: 150px;
  word-wrap: break-word;
  font-weight: 500;
  color: var(--text);
}

/* Quantity & Remove */
.qty-input {
  width: 60px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  transition: border 0.2s ease;
}

.qty-input:focus {
  border-color: var(--primary);
  outline: none;
}

.remove-btn {
  background: var(--danger);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  transition: background 0.25s ease;
}

.remove-btn:hover {
  background: var(--danger-hover);
}

/* Totals */
.Yorder h1 {
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  background: #000;
  color: #fff;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.Yorder h3 {
  font-size: 16px;
  margin: 10px 0 5px;
  font-weight: 600;
}

.Yorder p {
  font-size: 15px;
  margin-bottom: 0;
  color: var(--text);
}

.Yorder > div:last-child {
  border-top: 1px solid var(--border);
  padding-top: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Payment Section */
.Yorder input[type="radio"] {
  accent-color: var(--primary);
}

/* Final Order Button */
.finalOrder-btn {
  width: 100%;
  padding: 14px;
  margin-top: 25px;
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
  font-size: 16px;
  border: none;
  border-radius: 30px;
  transition: background 0.3s ease, transform 0.15s ease;
}

.finalOrder-btn:hover {
  background: var(--primary-hover);
  cursor: pointer;
  transform: translateY(-1px);
}

/*** Product Details in Form ***/
.productDetails {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
  padding: 12px;
  margin-top: 20px;
}

.productDetails strong {
  display: block;
  font-size: 14px;
  margin: 8px 0;
  color: var(--muted);
}

/* ----------------------- RESPONSIVE ----------------------- */
@media (max-width: 992px) {
  .container {
    max-width: 100%;
    padding: 15px;
  }

  .d-flex {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
  }

  form,
  .Yorder {
    flex: 1 1 100%;
    width: 100%;
  }

  .title {
    margin-top: 20px;
    padding: 20px;
    border-radius: 10px 10px 0 0;
  }
}

@media (max-width: 768px) {
  body {
    background: var(--bg);
  }

  .Yorder table td img {
    width: 40px;
    height: 40px;
  }

  .Yorder table td span {
    max-width: 100px;
  }

  .qty-input {
    width: 45px;
  }

  .finalOrder-btn {
    font-size: 15px;
    padding: 12px;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 10px;
  }

  .title h2 {
    font-size: 18px;
  }

  .Yorder h1 {
    font-size: 18px;
  }

  label {
    font-size: 13px;
  }

  input[type="text"],
  input[type="tel"],
  input[type="email"],
  select {
    padding: 10px;
    font-size: 13px;
  }

  .remove-btn {
    padding: 4px 8px;
    font-size: 13px;
  }

  .d-flex {
    padding: 15px;
  }

  form,
  .Yorder {
    width: 100%;
  }
  
}

/* -------------------- FREE DELIVERY BAR -------------------- */
.free-delivery-section {
  margin: 15px 0 20px;
  text-align: center;
}

#delivery-message {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #333;
}

.progress-bar-container {
  width: 100%;
  height: 20px;
  background: #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: 12px;
  transition: width 0.4s ease-in-out, background-color 0.4s ease-in-out;
}

@keyframes shimmer {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 0%; }
}