/* PrestAI Checkout + Customer UX - Child theme scoped version */
body#checkout,
body#cart,
body#authentication,
body#registration,
body#identity {
  --cc-base: #232323;
  --cc-accent: #0b69f6;
  --cc-border: #e9ecef;
  --cc-muted: #6b7280;
  --cc-surface: #f8f9fa;
}

@media (max-width: 991.98px) {
    body#checkout .checkout-steps__mobile,
    body#checkout .container,
    body#checkout .container-md,
    body#checkout .container-sm,
    body#checkout .container-xs {
        max-width: 100%;
    }
}
body#checkout .checkout-steps__step--success:after,
body#checkout .checkout-steps__step--success:before {
    color: #fff!important;
    border: 1px solid var(--cc-accent)!important;
    background: var(--cc-accent)!important;
}
body#checkout .checkout-steps__step--current:before,
body#checkout .checkout-steps__step--success .checkout-steps__number {
    color: #fff!important;
    border: 1px solid var(--cc-accent)!important;
    background: var(--cc-accent)!important;
}
body#checkout .checkout-steps__step--current .checkout-steps__number {
    border: 1px solid var(--cc-base)!important;
    color: var(--cc-base)!important;
    background: #fff!important;
}

body#cart .breadcrumb__wrapper {
    display: none;
}
body#cart .columns-container {
    margin-top: 2rem;
}
@media (min-width: 768px) {
body#cart .columns-container {
    margin-top: 3.5rem;
} 
}

body#checkout {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body#checkout > #wrapper {
  flex: 1;
}
body#checkout > #footer {
  margin-top: auto;
}

body#checkout #checkout-modal .cc-checkout-modal-content h2.h4 {
  display: none;
}
body#checkout .cart-voucher__accordion,
body#cart .cart-voucher__accordion {
    border-block-end: 0;
    margin-block-end: 0;
    padding-block-end: 0;
}
body#checkout .form-check .form-check-label,
body#authentication .form-check .form-check-label,
body#registration .form-check .form-check-label,
body#identity .form-check .form-check-label {
    padding-top: 3px;
    line-height: 1;
}

body#checkout .checkout__summary-accordion-header .accordion-button.js-cc-summary-toggle {
  display: flex;
  align-items: center;
}
body#checkout .cc-summary-toggle__price {
  margin-left: auto;
  margin-right: 0.75rem;
  white-space: nowrap;
}
body#checkout .checkout__summary-accordion-header .accordion-button.js-cc-summary-toggle::after {
  margin-left: 0;
}

body#checkout .form-control:focus,
body#checkout .form-select:focus,
body#authentication .form-control:focus,
body#registration .form-control:focus,
body#identity .form-control:focus,
body#cart .form-control:focus {
  border-color: var(--cc-accent);
  box-shadow: 0 0 0 0.15rem rgba(35, 35, 35, 0.12);
}

body#checkout .btn-primary,
body#cart .btn-primary,
body#authentication .btn-primary,
body#registration .btn-primary,
body#identity .btn-primary {
  color: #fff;
  background: var(--cc-accent);
  border-color: var(--cc-accent);
}

body#checkout .btn-primary:hover,
body#cart .btn-primary:hover,
body#authentication .btn-primary:hover,
body#registration .btn-primary:hover,
body#identity .btn-primary:hover {
  background: #111111;
  border-color: #111111;
}

body#checkout .btn-outline-primary,
body#checkout .btn-basic {
  color: var(--cc-base);
  border-color: var(--cc-border);
  padding: 0.5rem 0.75rem;
}

body#checkout .btn-outline-primary:hover,
body#checkout .btn-basic:hover {
  color: var(--cc-accent);
  border-color: var(--cc-accent);
  background: #fff;
}

body#checkout .checkout-grid {
  align-items: stretch;
}

body#checkout .checkout-grid__content {
  padding-right: 1.25rem;
}

body#checkout .checkout-grid__aside {
  padding-left: 1.25rem;
}

body#checkout .checkout-grid__aside-wrapper {
  position: sticky;
  top: 6rem;
}

body#checkout .checkout__summary-accordion-item {
  border: 0;
  background: transparent;
}

body#checkout .checkout__summary-accordion-header .accordion-button {
  padding: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--cc-base);
  background: transparent;
  box-shadow: none;
}

body#checkout .checkout__summary-accordion-header .accordion-button:not(.collapsed) {
  color: var(--cc-accent);
  background: transparent;
}

body#checkout #js-checkout-summary {
  background: var(--cc-surface);
  padding-bottom: 0.5rem;
}

body#checkout .cart-summary__products.js-cart-summary-products hr:first-of-type {
  color:var(--cc-surface);
  margin-top: 0.5rem;
}
@media (max-width: 991.98px) {
body#checkout .cart-summary__products.js-cart-summary-products hr:first-of-type {
  display: none;
}
}

body#checkout .cart-summary__products-number {
  font-weight: 400;
}

body#checkout .cart-summary__products-accordion .accordion-button {
  padding-left: 0;
  padding-right: 0;
  background: transparent;
  box-shadow: none;
}

body#checkout .cart-summary__products-accordion .accordion-button:not(.collapsed) {
  background: transparent;
}

body#checkout .cart-summary__line,
body#checkout .cart-voucher__list .cart-summary__line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

body#checkout .cart-summary__label,
body#checkout .cart-summary__value {
  font-size: 0.95rem;
}

body#checkout .cart-summary__line--bold .cart-summary__label,
body#checkout .cart-summary__line--bold .cart-summary__value,
body#checkout .cart-summary__total .cart-summary__label,
body#checkout .cart-summary__total .cart-summary__value {
  font-size: 1rem;
  font-weight: 700;
}

body#checkout .cart-voucher__accordion-button {
  background: var(--cc-surface);
}

body#checkout .cart-voucher__form {
  gap: 0.75rem;
}

body#checkout .cart-voucher__offers {
  margin-bottom: 0;
}
body#checkout .cart-summary__products-list {
  margin-bottom: 1rem;
}

body#checkout .cart-summary-product__image a {
  position: relative;
  display: inline-block;
}

body#checkout .cart-summary-product__img {
  border-radius: 10px;
  background: #fff;
}

body#checkout .cart-summary-product__qty-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--cc-accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

body#checkout .cart-summary-product__price .value {
  text-decoration: line-through;
  color: var(--cc-muted);
}

body#checkout .cart-summary-product__content {
  gap: 0.75rem;
}

body#checkout .cart-summary-product__link {
  font-weight: 600;
  text-decoration: none;
  color: var(--cc-base);
}

body#checkout .cart-summary-product__attribute,
body#checkout .cart-summary-product__unit-price,
body#checkout .cart-summary-product__price {
  font-size: 0.875rem;
}

body#checkout #checkout-personal-information-step .step__title {
  display: none;
}
@media (max-width: 991.98px) {
body#checkout .step__title {
  display: none;
}
}

body#checkout .step__title hr {
  margin-top: 0.5rem;
  opacity: 1;
  border-color: #fff;
}

body#checkout .page-title-section {
  margin-bottom: 0;
  font-size: 1.6rem;
  font-weight: 600;
}

body#checkout .step__content {
  padding-top: 0;
}

body#checkout .checkout-steps {
  padding-block-start: 1.2rem;
  padding-block-end: 1.1rem;
  margin-bottom: 0;
  background: #fff;
  border-color: var(--cc-border);
}
@media (max-width: 767.98px) {
body#checkout .checkout-steps {
  padding-block: 0;
}
body#checkout .checkout-steps__title {
    font-size: 1rem;
}
body#checkout .checkout-steps__subtitle {
    font-size: 0.75rem;
}
}
body#checkout .checkout-steps__number {
    border: 1px solid var(--bs-dark-bg-subtle);
    color: var(--bs-dark-bg-subtle);
    background: #fff;
    margin-block-end: .1rem;
}

body#checkout .checkout-steps__step {
  opacity: 1;
}

body#checkout .checkout-steps__btn {
  font-size: 0.85rem;
  line-height: 1;
  padding: 0;
  color: var(--cc-muted);
  text-decoration: none;
}

body#checkout .checkout-steps__step.is-active .checkout-steps__btn,
body#checkout .checkout-steps__btn[aria-selected='true'] {
  color: var(--cc-base);
}

body#checkout .cc-personal-tabs {
  margin-bottom: 1.25rem;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 0;
}

body#checkout .form-label[for="field-id_gender"],
body#authentication .form-label[for="field-id_gender"],
body#registration .form-label[for="field-id_gender"],
body#identity .form-label[for="field-id_gender"],
body#checkout .form-check:has([name="id_gender"]),
body#authentication .form-check:has([name="id_gender"]),
body#registration .form-check:has([name="id_gender"]),
body#identity .form-check:has([name="id_gender"]),
body#checkout .form-check:has(#field-newsletter),
body#authentication .form-check:has(#field-newsletter),
body#registration .form-check:has(#field-newsletter) {
    display: none;
}

body#checkout #checkout-personal-information-step em {
    display: none;
}

body#checkout .progress-container,
body#authentication .progress-container,
body#registration .progress-container,
body#identity .progress-container,
body#checkout .password-requirements__score,
body#authentication .password-requirements__score,
body#registration .password-requirements__score,
body#identity .password-requirements__score {
    display: none;
}

body#checkout .cc-personal-tabs .nav-link {
  padding: 0 0 0.35rem;
  border: 0;
  color: var(--cc-muted);
  font-size: 1rem;
}

body#checkout .cc-personal-tabs .nav-link.active {
  color: var(--cc-base);
  font-size: 1.6rem;
  font-weight: 600;
  background: transparent;
}

body#checkout .cc-personal-tabs__signin {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

body#checkout .cc-personal-tabs__hint {
  margin-bottom: -5px;
  font-size: 0.72rem;
  color: var(--cc-muted);
}
body#checkout .cc-personal-tabs__signin:has(.nav-link.active) .cc-personal-tabs__hint {
    font-size: 0;
}

body#checkout .form-fields .mb-3:has([name='newsletter']),
body#registration .form-fields .mb-3:has([name='newsletter']),
body#checkout .form-fields .mb-3:has([for='field-alias']),
body#checkout .form-fields .mb-3:has([for='field-vat_number']),
body#authentication .form-fields .mb-3:has([name='newsletter']),
body#identity .form-fields .mb-3:has([for='field-vat_number']) {
  display: none;
}

body#checkout .form-text,
body#authentication .form-text,
body#registration .form-text,
body#identity .form-text {
  display: none;
}

body#checkout .required::after,
body#authentication .required::after,
body#registration .required::after,
body#identity .required::after {
  content: ' *';
  color: #dc3545;
}
body#checkout .form-check-label.required:before,
body#authentication .form-check-label.required:before,
body#registration .form-check-label.required:before,
body#identity .form-check-label.required:before {
    display: none;
}

body#checkout .cc-phone-note,
body#authentication .cc-phone-note,
body#registration .cc-phone-note,
body#identity .cc-phone-note {
  margin-left: 0;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--cc-muted);
}

body#checkout .cc-input-wrapper,
body#authentication .cc-input-wrapper,
body#registration .cc-input-wrapper,
body#identity .cc-input-wrapper {
  position: relative;
}

body#checkout .cc-valid-check,
body#authentication .cc-valid-check,
body#registration .cc-valid-check,
body#identity .cc-valid-check {
  position: absolute;
  top: 50%;
  right: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 3;
}

body#checkout .cc-valid-check.is-visible,
body#authentication .cc-valid-check.is-visible,
body#registration .cc-valid-check.is-visible,
body#identity .cc-valid-check.is-visible {
  opacity: 1;
}

body#checkout .cc-input-wrapper > .form-control.is-valid + .cc-valid-check,
body#authentication .cc-input-wrapper > .form-control.is-valid + .cc-valid-check,
body#registration .cc-input-wrapper > .form-control.is-valid + .cc-valid-check,
body#identity .cc-input-wrapper > .form-control.is-valid + .cc-valid-check,
body#checkout .cc-input-wrapper > .form-control.valid + .cc-valid-check,
body#authentication .cc-input-wrapper > .form-control.valid + .cc-valid-check,
body#registration .cc-input-wrapper > .form-control.valid + .cc-valid-check,
body#identity .cc-input-wrapper > .form-control.valid + .cc-valid-check,
body#checkout .was-validated .cc-input-wrapper > .form-control:valid + .cc-valid-check,
body#authentication .was-validated .cc-input-wrapper > .form-control:valid + .cc-valid-check,
body#registration .was-validated .cc-input-wrapper > .form-control:valid + .cc-valid-check,
body#identity .was-validated .cc-input-wrapper > .form-control:valid + .cc-valid-check {
  display: none!important;
}

body#checkout .cc-valid-check .material-icons,
body#authentication .cc-valid-check .material-icons,
body#registration .cc-valid-check .material-icons,
body#identity .cc-valid-check .material-icons {
  font-size: 1.15rem;
  color: #22a06b;
}

body#checkout .delivery-option__item,
body#checkout .payment-option {
  margin-bottom: 0.9rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--cc-border);
  border-radius: 16px;
  background: #fff;
}

body#checkout .payment-option__form-check {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0;
}

body#checkout .payment-option__input {
  margin-top: 0;
  flex-shrink: 0;
}

body#checkout .payment-option__label {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 600;
}

body#checkout .payment-option__label img {
  max-height: 28px;
  width: auto;
}

body#checkout .payment-option__additional-information,
body#checkout .js-payment-option-form {
  margin-top: 0.9rem;
}

body#checkout #conditions-to-approve {
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
}

body#checkout #conditions-to-approve .form-check {
  margin: 0;
}

body#checkout #conditions-to-approve .form-check + .form-check {
  margin-top: 0.8rem;
}

body#checkout #conditions-to-approve .form-check-label a {
  text-decoration: underline;
}

body#checkout #conditions-to-approve .form-check-label a:hover {
  text-decoration: none;
}

body#checkout .js-alert-payment-conditions {
  border-radius: 16px;
}

body#checkout #payment-confirmation .btn {
  min-width: 220px;
}

body#cart .cart-summary .cart-summary__actions {
    margin-top: 0.5rem;
}
body#cart .cart-grid__aside-wrapper hr {
    display: none;
}

body#checkout .cc-secure-payment,
body#cart .cc-secure-payment {
  margin-top: 1rem;
  text-align: center;
}

body#checkout .cc-secure-payment__text,
body#cart .cc-secure-payment__text {
  display: block;
  width: 100%;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0;
  color: var(--cc-muted);
  font-size: 0.9rem;
}

body#checkout .cc-secure-payment__cards,
body#cart .cc-secure-payment__cards {
  margin-top: -3px;
}

body#cart .js-cart-detailed-actions .d-grid {
  gap: 0.75rem;
}

@media (min-width: 992px) {
  body#checkout .checkout__summary-accordion-header .accordion-button::after {
    display: none;
  }

  body#checkout .cart-summary__products-accordion .accordion-header {
    display: none;
  }

  body#checkout .cart-summary__products-accordion .accordion-collapse {
    display: block !important;
    visibility: visible;
    height: auto;
  }
}

@media (max-width: 991.98px) {

  body#checkout .checkout-grid__aside {
    order: -1;
    padding-top: 1rem;
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--cc-border);
    background: var(--cc-surface);
  }
  body#checkout .checkout-grid__aside:has(.js-cart.show) {
    border-bottom: 0;
  }

  body#checkout .checkout-grid__content {
    padding-right: calc(var(--bs-gutter-x) * 0.5);
  }

  body#checkout .checkout-grid__aside-wrapper {
    position: static;
  }

  body#checkout .checkout__summary-accordion-header .accordion-button {
    padding-bottom: 1rem;
    font-size: 1rem;
  }

  body#checkout .cc-personal-tabs {
    align-items: flex-start;
  }

  body#checkout .cc-personal-tabs .nav-link.active {
    font-size: 1.2rem;
  }

  body#checkout .cc-personal-tabs__hint {
    font-size: 0.68rem;
  }

  body#checkout .checkout-steps__mobile .progress-ring,
  body#checkout .checkout-steps__left {
    display: block;
  }
  body#checkout .checkout-steps__mobile .progress-ring.text-success {
    color:var(--cc-accent)!important;
  }
  body#checkout .checkout-steps__mobile svg {
    fill:var(--cc-accent)!important;
  }
  body#checkout .checkout-steps__mobile svg circle.progress-ring__circle {
    stroke:var(--cc-accent)!important;
  }
  
  body#checkout #payment-confirmation .btn,
  body#checkout .buttons-wrapper .btn {
    width: 100%;
  }
}


body#checkout #wrapper {
  padding-top: 0;
}

body#checkout #header.header--checkout-minimal {
  position: relative;
  border-bottom: 1px solid var(--cc-border);
  background: #fff;
  box-shadow: none;
}

body#checkout #header.header--checkout-minimal .cc-checkout-header__inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 991.98px) {
body#checkout #header.header--checkout-minimal .cc-checkout-header__inner {
  min-height: 72px;
}
}

body#checkout #header.header--checkout-minimal .cc-checkout-header__logo,
body#checkout #header.header--checkout-minimal .cc-checkout-header__logo a {
  display: block;
  text-align: center;
}

body#checkout #header.header--checkout-minimal .cc-checkout-header__logo img,
body#checkout #header.header--checkout-minimal .cc-checkout-header__logo .logo {
  max-height: 50px;
  width: 150px;
  margin: 0 auto;
}

body#checkout #footer.footer--checkout-minimal {
  background: transparent;
  border-top: 0;
  box-shadow: none;
}

body#checkout #footer.footer--checkout-minimal .cc-checkout-footer__inner {
  margin-top: -2rem;
  padding-top: 0rem;
  padding-bottom: 0rem;
  font-size: 0.8rem;
  color: var(--cc-muted);
}

/* ===== Checkout aside full-height / full-bleed right ===== */
body#checkout #wrapper {
  overflow-x: hidden;
}
@media (min-width: 768px) {
body#checkout .checkout-grid__content,
body#checkout .checkout-grid__aside {
    margin-block-end: 0;
}
body#checkout .checkout-grid__content {
    padding-top: 2rem;
    padding-bottom: 3.5rem;
}
body#checkout .page:not(body) {
    padding-bottom: 0;
}
}
@media (min-width: 992px) {
  body#checkout {
    --checkout-header-h: 176px;
    --checkout-aside-pad-x: clamp(24px, 3vw, 48px);
    --checkout-aside-pad-y: 32px;
  }

  body#checkout .checkout-grid {
    align-items: stretch;
  }

  body#checkout .checkout-grid__content {
    padding-right: clamp(2rem, 4vw, 4rem);
  }

  body#checkout .checkout-grid__aside {
    position: relative;
    display: flex;
    padding-left: 0;
  }

  body#checkout .checkout-grid__aside-wrapper {
    position: sticky;
    top: var(--checkout-header-h);
    height: calc(100dvh - var(--checkout-header-h));
    min-height: 100%;
    overflow: auto;
    margin-right: calc(50% - 50vw);
    padding-top: var(--checkout-aside-pad-y);
    padding-bottom: var(--checkout-aside-pad-y);
    padding-left: var(--checkout-aside-pad-x);
    padding-right: max(var(--checkout-aside-pad-x), calc(50vw - 60% + var(--checkout-aside-pad-x)));
    background: var(--cc-surface);
    border-left: 1px solid var(--cc-border);
  }

  body#checkout .checkout__summary-accordion-item,
  body#checkout .checkout__summary-accordion-wrapper,
  body#checkout #js-checkout-summary {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
  }

  body#checkout .checkout__summary-accordion-header .accordion-button {
    padding-top: 0;
  }
}
