/* ============================================
   Checkout Page Styles
   ============================================ */

/* === Top Bar === */
.top-bar {
  background-color: #10059f;
  padding: 8px 20px;
}

.top-bar__content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.top-bar__icon {
  height: 20px;
  width: auto;
}

.top-bar__text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

/* Header adjustment for top bar */
.header--with-topbar {
  top: 38px;
}

.header--with-topbar.header--scrolled {
  top: 0;
}

/* === Page Layout === */
.checkout-page {
  padding-top: 138px;
  padding-bottom: 80px;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* === Hide Default WooCommerce Checkout Elements === */
.checkout-page .woocommerce-form-login-toggle,
.checkout-page .woocommerce-form-coupon-toggle,
.checkout-page .checkout_coupon.woocommerce-form-coupon,
.checkout-page #order_review_heading,
.checkout-page .woocommerce-checkout-review-order-table,
.checkout-page .woocommerce-billing-fields,
.checkout-page .woocommerce-additional-fields,
.checkout-page .kera-woo-field,
.checkout-page .woocommerce-checkout > .col2-set {
  display: none !important;
}


/* === Breadcrumb === */
.checkout-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}

.checkout-breadcrumb__item {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #b5b5b5;
  text-transform: uppercase;
}

.checkout-breadcrumb__item--active {
  color: #1e1e1e;
  font-weight: 600;
}

.checkout-breadcrumb__separator {
  font-size: 14px;
  color: #1e1e1e;
}

/* === Page Title === */
.checkout-title {
  font-family: 'League Spartan', sans-serif;
  font-size: 55px;
  font-weight: 600;
  color: #1e1e1e;
  margin: 0 0 40px 0;
}

/* === Progress Steps === */
.checkout-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
}

.checkout-steps__item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkout-steps__number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #d9d9d9;
  color: #fff;
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkout-steps__item--active .checkout-steps__number,
.checkout-steps__item--completed .checkout-steps__number {
  background: #10059f;
}

.checkout-steps__label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #1e1e1e;
}

.checkout-steps__item--active .checkout-steps__label {
  font-weight: 600;
}

.checkout-steps__line {
  width: 80px;
  height: 1px;
  background: #d9d9d9;
  margin: 0 20px;
}

.checkout-steps__line--active {
  background: #10059f;
}

/* === Login Prompt === */
.checkout-login {
  text-align: center;
  margin-bottom: 50px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  color: #1e1e1e;
}

.checkout-login span {
  margin: 0 5px;
}

.checkout-login a {
  color: #10059f;
  text-decoration: underline;
  font-weight: 500;
}

.checkout-login a:hover {
  text-decoration: none;
}

/* === Checkout Content === */
.checkout-content {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 50px;
  align-items: flex-start;
}

/* === Checkout Form === */
.checkout-form {
  background: #fff;
}

.checkout-form__title {
  font-family: 'League Spartan', sans-serif;
  font-size: 35px;
  font-weight: 500;
  color: #000;
  margin: 0 0 30px 0;
}

.checkout-form__title--mt {
  margin-top: 50px;
}

.checkout-form__fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.checkout-form__group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkout-form__label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #1e1e1e;
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkout-form__optional {
  font-weight: 400;
  color: #b5b5b5;
  font-size: 16px;
}

.checkout-form__input,
.checkout-form__textarea {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #1e1e1e;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  padding: 15px 20px;
  outline: none;
  transition: border-color 0.3s ease;
}

.checkout-form__input:focus,
.checkout-form__textarea:focus {
  border-color: #10059f;
}

.checkout-form__textarea {
  resize: vertical;
  min-height: 100px;
}

.checkout-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* === Ship to Different Address Toggle === */
.checkout-shipping-toggle {
  margin: 30px 0;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 12px;
}

.checkout-form__checkbox {
  display: flex;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.checkout-form__checkbox input[type="checkbox"] {
  display: none;
}

.checkout-form__checkmark {
  display: inline-block;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  border: 2px solid #bababa;
  border-radius: 6px;
  flex-shrink: 0;
  position: relative;
  transition: all 0.3s ease;
  vertical-align: middle;
  box-sizing: border-box;
  background-color: #fff;
}

.checkout-form__checkbox input:checked + .checkout-form__checkmark {
  background: #10059f;
  border-color: #10059f;
}

.checkout-form__checkbox input:checked + .checkout-form__checkmark::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkout-form__checkbox-text {
  font-size: 16px;
  font-weight: 500;
  color: #1e1e1e;
}

/* === Shipping Fields (Different Address) === */
.checkout-shipping-fields {
  margin-bottom: 30px;
  padding: 25px;
  background: #fafafa;
  border-radius: 15px;
  border: 1px solid #e5e5e5;
}

.checkout-shipping-fields .checkout-form__title {
  margin-bottom: 25px;
}

.checkout-shipping-fields .checkout-form__fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* === Shipping Methods === */
.checkout-shipping-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}

.checkout-shipping__option {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px 20px;
  border: 1px solid #e3e3e3;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.checkout-shipping__option:hover {
  border-color: #10059f;
  background-color: #fafafa;
}

.checkout-shipping__option input {
  display: none;
}

.checkout-shipping__radio {
  display: inline-block;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  border: 2px solid #bababa;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.checkout-shipping__option input:checked + .checkout-shipping__radio {
  border-color: #10059f;
}

.checkout-shipping__option input:checked + .checkout-shipping__radio::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: #10059f;
  border-radius: 50%;
}

.checkout-shipping__content {
  flex: 1;
}

.checkout-shipping__name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #1e1e1e;
}

.checkout-shipping__name .woocommerce-Price-amount {
  font-weight: 600;
  color: #10059f;
}

.checkout-shipping__none {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  color: #888;
  padding: 15px;
  background: #f5f5f5;
  border-radius: 10px;
  margin: 0;
}

.checkout-form__group--notes {
  margin-top: 20px;
}

/* === Payment Methods === */
.checkout-payment {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.checkout-payment__option {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px;
  border: 1px solid #e3e3e3;
  border-radius: 15px;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.checkout-payment__option:hover {
  border-color: #10059f;
}

.checkout-payment__option input {
  display: none;
}

.checkout-payment__radio {
  display: inline-block;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  border: 2px solid #bababa;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  margin-top: 2px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.checkout-payment__option input:checked + .checkout-payment__radio {
  border-color: #10059f;
}

.checkout-payment__option input:checked + .checkout-payment__radio::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: #10059f;
  border-radius: 50%;
}

.checkout-payment__content {
  flex: 1;
}

.checkout-payment__name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #1e1e1e;
  display: block;
  margin-bottom: 8px;
}

.checkout-payment__desc {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #888;
  line-height: 1.5;
  margin: 0;
}

.payment_box,
.payment_box p,
.payment_box label,
.payment_box span,
.payment_box a {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* === Checkout Sidebar === */
.checkout-sidebar {
  position: sticky;
  top: 120px;
}

.checkout-sidebar__title {
  font-family: 'League Spartan', sans-serif;
  font-size: 35px;
  font-weight: 500;
  color: #000;
  margin: 0 0 25px 0;
}

/* === Order Summary === */
.checkout-order {
  background: #f9f9f9;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 20px;
}

.checkout-order__header {
  display: flex;
  justify-content: space-between;
  padding-bottom: 15px;
  border-bottom: 1px solid #e3e3e3;
  margin-bottom: 15px;
}

.checkout-order__header span {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #1e1e1e;
}

.checkout-order__item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
}

.checkout-order__item span {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #1e1e1e;
}

.checkout-order__item span:last-child {
  font-weight: 600;
}

.checkout-order__divider {
  height: 1px;
  background: #e3e3e3;
  margin: 15px 0;
}

.checkout-order__row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
}

.checkout-order__row span {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #1e1e1e;
}

.checkout-order__row--total span {
  font-size: 22px;
  font-weight: 700;
}

.checkout-order__row--vat span {
  font-size: 14px;
  color: #666;
}

/* === Submit Button === */
.checkout-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  background-color: #10059f;
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 20px 35px;
  font-family: 'Raleway', sans-serif;
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-bottom: 20px;
}

.checkout-submit-btn:hover {
  background-color: #0a0470;
}

.checkout-submit-btn svg {
  width: 13px;
  height: 10px;
}

/* === Terms Checkbox === */
.checkout-terms-wrapper {
  margin-bottom: 25px;
}

.checkout-terms-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.checkout-terms-checkbox .checkout-form__checkmark {
  margin-top: 2px;
}

.checkout-terms-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #1e1e1e;
  line-height: 1.5;
}

.checkout-terms-text a {
  color: #10059f;
  text-decoration: underline;
}

.checkout-terms-text a:hover {
  text-decoration: none;
}

.checkout-terms-text .required {
  color: #e74c3c;
  font-weight: 600;
}

/* Terms validation error state */
.checkout-terms-checkbox.has-error .checkout-form__checkmark {
  border-color: #e74c3c;
}

.checkout-terms-error {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  color: #e74c3c;
  margin-top: 8px;
  margin-left: 37px;
}

/* === Required Asterisk === */
.checkout-form__label .required {
  color: #e74c3c;
}

/* === WooCommerce Notices === */
.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
}

.woocommerce-error {
  background: #fdf2f2;
  border: 1px solid #e74c3c;
  color: #c0392b;
}

.woocommerce-message {
  background: #f0fdf4;
  border: 1px solid #22c55e;
  color: #15803d;
}

.woocommerce-info {
  background: #f4f2ff;
  border: 1px solid #5349e0;
  color: #10059f;
}

.woocommerce-info a {
  color: #10059f;
  font-weight: 600;
  text-decoration-color: rgba(16, 5, 159, 0.35);
}

.woocommerce-info a:hover {
  color: #5349e0;
}

.woocommerce-error li,
.woocommerce-message li {
  list-style: none;
}

/* === Free payment message === */
.checkout-payment__free {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  color: #22c55e;
  padding: 20px;
  background: #f0fdf4;
  border-radius: 10px;
  margin: 0;
}

/* === Newsletter === */
.newsletter {
  background: linear-gradient(90deg, #5349e0 0%, #10059f 100%);
  padding: 50px 20px;
}

.newsletter__container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

.newsletter__content {
  flex: 1;
}

.newsletter__subtitle {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: #fff;
  margin: 0 0 10px 0;
}

.newsletter__title {
  font-family: 'League Spartan', sans-serif;
  font-size: 40px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.newsletter__form {
  display: flex;
  gap: 0;
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  padding: 5px;
}

.newsletter__input {
  font-family: 'Raleway', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #1e1e1e;
  border: none;
  padding: 15px 20px;
  min-width: 280px;
  outline: none;
}

.newsletter__input::placeholder {
  color: #9e9e9e;
}

.newsletter__btn {
  font-family: 'Raleway', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background-color: #10059f;
  border: none;
  border-radius: 14px;
  padding: 15px 25px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.newsletter__btn:hover {
  background-color: #0a0470;
}

form.checkout #wc-stripe-express-checkout-button-separator {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* === Responsive === */
@media (max-width: 1024px) {
  .checkout-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .checkout-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .checkout-page {
    padding-top: 122px;
  }

  .checkout-title {
    font-size: 36px;
    margin-bottom: 30px;
  }

  .checkout-steps {
    flex-wrap: wrap;
    gap: 15px;
  }

  .checkout-steps__line {
    width: 40px;
    margin: 0 10px;
  }

  .checkout-steps__label {
    display: none;
  }

  .checkout-login {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .checkout-form__title {
    font-size: 28px;
  }

  .checkout-form__row {
    grid-template-columns: 1fr;
  }

  .checkout-sidebar__title {
    font-size: 28px;
  }

  .newsletter__container {
    flex-direction: column;
    text-align: center;
  }

  .newsletter__title {
    font-size: 30px;
  }

  .newsletter__form {
    flex-direction: column;
    width: 100%;
  }

  .newsletter__input {
    min-width: auto;
    width: 100%;
  }

  .newsletter__btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .checkout-payment__option {
    padding: 15px;
  }

  .checkout-payment__name {
    font-size: 18px;
  }
}

/* === Apaczka Map Button === */
.checkout-shipping-methods .amp-map-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 16px 24px;
  background-color: #10059f;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.checkout-shipping-methods .amp-map-button:hover {
  background-color: #0a0470;
  box-shadow: 0 4px 12px rgba(16, 5, 159, 0.25);
}

.checkout-shipping-methods .amp-map-button.hidden {
  display: none !important;
}

#amp-delivery-point-desc {
  display: none;
  margin: 0;
  padding: 14px 18px;
  background: #f0f4ff;
  border: 1px solid #c5cce8;
  border-radius: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #1e1e1e;
  line-height: 1.6;
  font-style: normal;
}

/* Apaczka map modal adjustments */
.apaczka_mp_geowidget_modal {
  z-index: 999999 !important;
}

.apaczka_mp_geowidget_modal_inner {
  border-radius: 16px !important;
}

#apaczka_mp_geowidget_modal_cross {
  border-radius: 8px !important;
  background: #f0f0f0 !important;
  border: 1px solid #ddd !important;
  font-size: 16px !important;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
}

/* === Terms checkbox validation error === */
.checkout-terms-wrapper.terms-error .checkout-terms-checkbox {
  border: 2px solid #e53935;
  border-radius: 10px;
  padding: 12px 16px;
  background: #fff5f5;
  animation: terms-shake 0.4s ease;
}

.checkout-terms-wrapper.terms-error .checkout-form__checkmark {
  border-color: #e53935;
}

.checkout-terms-wrapper.terms-error .checkout-terms-text {
  color: #e53935;
}

@keyframes terms-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* === Free Shipping Notice === */
.fs-free-shipping-notice-progress-bar {
  background: linear-gradient(90deg, #5349e0 0%, #10059f 100%) !important;
  box-shadow: 0 0 0 1px rgba(16, 5, 159, 0.08), 0 6px 16px rgba(16, 5, 159, 0.18);
}

/* Stripe UPE calls jQuery .show() on all UPE payment boxes to keep iframes mounted.
   !important overrides the resulting inline style="display:block" for inactive boxes. */
.payment_box.kera-hidden {
  display: none !important;
}

/* === Stripe Express Checkout Element (Google Pay / Apple Pay) === */
#wc-stripe-express-checkout-element {
  max-width: 600px;
  margin: 0 auto 0.5em;
}

#wc-stripe-express-checkout-button-separator {
  max-width: 600px;
  margin: 0 auto 1.5em;
  color: #888;
  font-size: 0.85em;
  letter-spacing: 0.04em;
}

#payment label a{
  display: inline-block;
  margin: 0 0.3em;
}

.ppc-button-wrapper{
  width: 300px;
  max-width: 100%;
  margin: 0 auto 0.5em;
}