:root {
  --pb-primary: #1a3d2e;
  --pb-secondary: #d4af6a;
  --pb-accent: #a67565;
  --pb-bg: #faf8f5;
  --pb-white: #ffffff;
  --pb-gray: #e8e0d8;
  --pb-text: #4a4a4a;
  --pb-success: #2e7d32;
  --pb-error: #d32f2f;
}

.checkout-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  background: var(--pb-bg);
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
}

.checkout-header {
  text-align: center;
  margin-bottom: 3rem;
}

.checkout-header h1 {
  color: var(--pb-primary);
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.checkout-header p {
  color: #666;
  font-size: 1.1rem;
}

.checkout-content {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 3rem;
  align-items: start;
}

.checkout-main {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.checkout-section {
  background: var(--pb-white);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--pb-gray);
}

.checkout-section h2 {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--pb-primary);
  font-size: 1.4rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--pb-gray);
  padding-bottom: 1rem;
}

.step-number {
  background: var(--pb-primary);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: bold;
}

/* Address Styles */
.addresses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.address-card {
  padding: 1.5rem;
  border: 2px solid var(--pb-gray);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.address-card:hover {
  border-color: var(--pb-secondary);
  background: #fffcf8;
}

.address-card.selected {
  border-color: var(--pb-primary);
  background: #f0f7f4;
  box-shadow: 0 4px 12px rgba(26, 61, 46, 0.1);
}

.address-type {
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 700;
  color: #999;
  margin-bottom: 0.5rem;
}

.address-name {
  font-weight: 700;
  color: var(--pb-primary);
  margin-bottom: 0.5rem;
}

.address-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #555;
  margin-bottom: 0.5rem;
}

.address-phone {
  font-size: 0.85rem;
  color: #777;
}

.default-label {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--pb-secondary);
  color: white;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: bold;
}

.add-address-btn {
  background: transparent;
  border: 2px dashed var(--pb-secondary);
  color: var(--pb-secondary);
  padding: 1rem;
  border-radius: 12px;
  width: 100%;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.add-address-btn:hover {
  background: #fff9f0;
  border-style: solid;
}

/* Form Styles */
.address-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.address-form input, 
.address-form select {
  padding: 0.8rem 1rem;
  border: 1px solid var(--pb-gray);
  border-radius: 8px;
  font-size: 0.95rem;
}

.address-form input:focus {
  outline: none;
  border-color: var(--pb-primary);
  box-shadow: 0 0 0 3px rgba(26, 61, 46, 0.05);
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.save-address-btn {
  background: var(--pb-primary);
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  flex: 1;
}

.cancel-btn {
  background: #eee;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
}

/* Sidebar Styles */
.checkout-sidebar {
  position: sticky;
  top: 2rem;
}

.coupon-box, .bill-summary {
  background: var(--pb-white);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--pb-gray);
  margin-bottom: 1.5rem;
}

.coupon-box h3, .bill-summary h3 {
  font-size: 1.1rem;
  color: var(--pb-primary);
  margin-bottom: 1.5rem;
}

.coupon-input {
  display: flex;
  gap: 0.5rem;
}

.coupon-input input {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 1px solid var(--pb-gray);
  border-radius: 8px;
  text-transform: uppercase;
}

.coupon-input button {
  background: var(--pb-primary);
  color: white;
  border: none;
  padding: 0 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.coupon-input button.remove-btn {
  background: #ffeded;
  color: var(--pb-error);
}

.coupon-success {
  color: var(--pb-success);
  font-size: 0.85rem;
  margin-top: 0.8rem;
  font-weight: 600;
}

.bill-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  color: #666;
  font-size: 0.95rem;
}

.bill-row.discount {
  color: var(--pb-success);
  font-weight: 600;
}

.bill-row .free {
  color: var(--pb-success);
  font-weight: 800;
}

.bill-divider {
  height: 1px;
  background: var(--pb-gray);
  margin: 1.5rem 0;
}

.bill-row.total {
  color: var(--pb-primary);
  font-weight: 800;
  font-size: 1.3rem;
}

.pay-now-btn {
  width: 100%;
  background: var(--pb-accent);
  color: white;
  border: none;
  padding: 1.2rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: all 0.3s;
}

.pay-now-btn:hover:not(:disabled) {
  background: var(--pb-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(26, 61, 46, 0.2);
}

.pay-now-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.status-msg {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: center;
  font-weight: 600;
}

.status-msg.success { background: #e8f5e9; color: var(--pb-success); }
.status-msg.error { background: #ffebee; color: var(--pb-error); }

/* Cart Item Styles in Review */
.checkout-cart-summary {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.item-info {
  display: flex;
  flex-direction: column;
}

.item-info strong {
  color: var(--pb-primary);
  font-size: 1rem;
}

.item-info span {
  font-size: 0.85rem;
  color: #888;
}

.item-price {
  font-weight: 700;
  color: var(--pb-primary);
}

/* Payment Card */
.payment-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  border: 2px solid var(--pb-primary);
  background: #f0f7f4;
  border-radius: 12px;
}

.payment-info strong {
  display: block;
  margin-bottom: 0.3rem;
}

.payment-info p {
  font-size: 0.85rem;
  color: #666;
}

@media (max-width: 968px) {
  .checkout-content {
    grid-template-columns: 1fr;
  }
  .checkout-sidebar {
    position: static;
  }
  .checkout-header h1 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  .checkout-section {
    padding: 1.5rem;
  }
}
