main {padding-bottom: 4em;}

/* Custom Checkout Styles */
.custom-checkout-container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 20px;
}

/* Breadcrumb Navigation */
.checkout-breadcrumb {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  font-size: 14px;
  color: #666;
}

.breadcrumb-item {
  color: #666;
}

.breadcrumb-item.current {
  color: #333;
  font-weight: 500;
}

.breadcrumb-separator {
  margin: 0 10px;
  color: #ccc;
}

/* Main Layout */
.checkout-content {
  display: grid;
  grid-template-columns: 1fr 550px;
  gap: 0px 60px;
  align-items: start;
}

/* Left Column - Shipping Address */
.checkout-left {
  background: #fff;
  padding: 1.5em 2em 2.5em;
  border-radius: 15px 15px 0 0;
}

.checkout-section-title {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin-bottom: 30px;
}

/* Form Styling */
.checkout-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-row-group:has(.form-row-third) {
  grid-template-columns: 1fr 1fr 1fr;
}

.form-row {
  display: flex;
  flex-direction: column;
}

.woocommerce form .form-row {
  padding: 0;
  margin: 0;
}

p#billing_first_name_field, p#billing_last_name_field {width: 100% !important;}

.form-row label {
  font-size: 15px;
  line-height: 1 !important;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}

.form-row input,
.form-row textarea,
.form-row select {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s ease;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.form-row textarea {
    min-height: 100px;
    resize: vertical;
}

/* Phone Field Special Styling */
.phone-field-wrapper {
    display: flex;
    gap: 0;
}

.country-code-select {
    width: 80px;
    border-right: none;
    border-radius: 8px 0 0 8px;
    background: #f8f9fa;
    font-size: 12px;
    padding: 12px 8px;
}

.phone-input input {
    border-left: none;
    border-radius: 0 8px 8px 0;
    flex: 1;
}

/* Right Column - Order Summary */
.checkout-right {
    position: sticky;
    top: 20px;
}

.order-summary {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 24px;
}

.order-summary-title {
    font-size: 40px !important;
    color: #333;
    margin-bottom: 24px;
}

/* Cart Items */
.cart-items {
    margin-bottom: 24px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item:last-child {
    border-bottom: none;
}

.item-image {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-quantity {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #333;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
}

.item-details {
    flex: 1;
}

.item-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0 0 4px 0;
}

.item-meta {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.item-price {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

/* Discount Code Section */
.discount-code-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #f0f0f0;
}

.discount-input-wrapper {
  display: flex;
  gap: 0;
}

.discount-code-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-right: none;
  border-radius: 8px 0 0 8px;
  font-size: 14px;
  background: #f8f9fa;
}

.apply-discount-btn {
  padding: 12px 20px;
  color: white !important;
  background: black;
  border: 1px solid #ddd;
  border-left: none;
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-family: 'Red Hat Display';
}

.apply-discount-btn:hover {background: #f0f0f0;}

/* Order Totals */
.order-totals {
  margin-bottom: 24px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
}

.total-row.total-final {
    border-top: 1px solid #f0f0f0;
    padding-top: 16px;
    margin-top: 16px;
    font-size: 18px;
    font-weight: 600;
}

.total-label {
    color: #666;
}

.total-final .total-label {
    color: #333;
}

.total-value {
    font-weight: 500;
    color: #333;
}

/* Continue Payment Button */
.continue-payment-btn {
    width: 100%;
    padding: 16px 24px;
    background: #000;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.continue-payment-btn:hover {
    background: #333;
}

/* WooCommerce Form Overrides */
.woocommerce-checkout .form-row {
    margin: 0;
    padding: 0;
}

.woocommerce form .form-row .input-text, .woocommerce form .form-row select {padding: .5em 1em !important;}

.woocommerce-checkout .form-row input.input-text,
.woocommerce-checkout .form-row textarea, .woocommerce-input-wrapper {
  width: 100%;
  box-sizing: border-box;
  height: 45px;
  border-radius: 10px;
  font-weight: 600;
  font-family: 'Red Hat Display', sans-serif;
}

p#billing_country_field .woocommerce-input-wrapper{
  display: flex;
  padding: .5rem 1em;
  align-items: center;
  border: 1px solid black !important;
}

.woocommerce-checkout .validate-required label::after {
    content: "*";
    color: #e74c3c;
    margin-left: 4px;
}

#add_payment_method #payment ul.payment_methods, .woocommerce-cart #payment ul.payment_methods, .woocommerce-checkout #payment ul.payment_methods {
  padding: 1.5em 2em !important;}

#add_payment_method #payment div.form-row, .woocommerce-cart #payment div.form-row, .woocommerce-checkout #payment div.form-row {
  padding: 0 2em 3em !important;}

button#place_order {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  background: #000;
  color: #fff;
  text-decoration: none;
  padding: 1rem;
  border-radius: 9999px;
  font-size: 18px;
  transition: background-color 0.2s;
  font-family: 'Red Hat Display', sans-serif;
  font-weight: 700 !important;
}

.checkout-payment-methods {
  border-radius: 0 0 15px 15px;
  overflow: hidden;
}

/* Hide default WooCommerce styling */
.woocommerce-checkout .col2-set {
    display: none;
}

.woocommerce-checkout #order_review_heading {
    display: none;
}

.woocommerce-checkout #order_review {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .checkout-content {
      grid-template-columns: 1fr;
      gap: 30px;
  }
  
  .form-row-group {
      grid-template-columns: 1fr;
      gap: 15px;
  }
  
  .form-row-group:has(.form-row-third) {
      grid-template-columns: 1fr;
  }
  
  .checkout-right {
      position: static;
      order: -1;
  }
  
  .phone-field-wrapper {
      flex-direction: column;
      gap: 10px;
  }
  
  .country-code-select {
      width: 100%;
      border-radius: 8px;
      border-right: 1px solid #ddd;
  }
  
  .phone-input input {
      border-left: 1px solid #ddd;
      border-radius: 8px;
  }
}