/*
 * Runtime overrides loaded after module/theme CSS.
 * Keep this file small; broad theme work belongs in custom.css.
 */

.page-title-wrapper:not([style]) {
  padding: 28px 0 !important;
  margin-bottom: 48px !important;
  background-color: var(--ld-paper) !important;
  background-image: none !important;
  border-top: 1px solid var(--ld-line-soft);
  border-bottom: 1px solid var(--ld-line);
}

.page-title-wrapper:not([style]) .breadcrumb {
  margin: 0;
}

body#order-confirmation .card-title,
body.page-order-confirmation .card-title,
body#order-confirmation .h1,
body.page-order-confirmation .h1,
body#order-confirmation .h3,
body.page-order-confirmation .h3 {
  text-transform: none !important;
}

body.page-registration #content .ld-register-login-link a,
body.page-registration #content .ld-register-pro-link a {
  color: var(--ld-ink) !important;
  font-weight: 700 !important;
}

body.page-registration #content .ld-register-login-link a:hover,
body.page-registration #content .ld-register-pro-link a:hover {
  color: var(--ld-gold-deep) !important;
}

body.page-cart #main .btn-primary,
body.page-cart #main button[type="submit"],
body.page-order #content .btn-primary,
body.page-order #content button[type="submit"],
body#checkout #content .btn-primary,
body#checkout #content button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

body.page-cart #main .cart-summary .cart-voucher,
body.page-cart #main .cart-summary .promo-code,
body.page-order #content .cart-summary .cart-voucher,
body.page-order #content .cart-summary .promo-code,
body#checkout #content .cart-summary .cart-voucher,
body#checkout #content .cart-summary .promo-code {
  background: transparent !important;
}

body#checkout section.checkout-step .carrier-extra-content:has(> .colissimo-address-fields[style*="display:none"]) {
  display: none !important;
}

body#checkout section.checkout-step .payment-options .payment-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

body#checkout section.checkout-step .payment-options .custom-radio {
  flex: 0 0 auto;
  margin: 2px 0 0;
}

body#checkout section.checkout-step .payment-options label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  line-height: 1.35;
}

body#checkout section.checkout-step .payment-options label img {
  max-height: 18px;
  width: auto;
}

#content.ld-account .orders {
  margin: 0;
}

#content.ld-account .orders .order > .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  margin: 0;
}

#content.ld-account .orders .order > .row > [class*="col-"] {
  float: none;
  width: auto;
  padding: 0;
}

#content.ld-account .orders .order .status {
  margin-top: 8px;
}

#content.ld-account .orders .order .text-xs-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

#content.ld-account .orders .order .text-xs-right a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--ld-line);
  border-radius: 50%;
  background: var(--ld-paper);
  color: var(--ld-ink);
  text-decoration: none;
}

#content.ld-account .orders .order .text-xs-right a:hover {
  border-color: var(--ld-gold);
  color: var(--ld-gold-deep);
}

#content.ld-account .orders .order .text-xs-right .material-icons {
  font-size: 20px;
  line-height: 1;
}

/* Product pages: keep the visual photo area identical across products.
   Source images stay untouched; object-fit only normalizes their placement. */
body#product .ld-gallery {
  align-items: center;
}

body#product .ld-gallery__main-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
}

body#product .ld-gallery__img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

#module-smartblog-list #content.ld-blog-list,
#module-smartblog-category #content.ld-blog-list,
#module-smartblog-categorypage #content.ld-blog-list {
  width: min(1160px, calc(100vw - 32px));
  max-width: none;
  margin-left: auto !important;
  margin-right: auto !important;
}

@media (min-width: 768px) {
  body#product .ld-gallery {
    align-items: flex-start;
  }

  body#product .ld-gallery__main-wrap {
    flex: 0 1 min(100%, 660px);
    width: min(100%, 660px);
    max-width: 660px;
  }
}

/* Cache-busted mobile consent override. The base theme custom.css is loaded by
   PrestaShop without a version string, so this keeps the compact consent UI
   reliably current after a deploy. */
@media (max-width: 767px) {
  #acb-banner.acb-gdpr {
    max-height: min(46vh, 300px);
    padding: 12px 14px;
    gap: 8px;
  }

  #acb-banner p,
  #acb-banner ul li,
  #acb-banner ol li,
  #acb-banner .acbConsentLabel {
    font-size: 12px !important;
    line-height: 1.35;
  }

  #acb-action {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #acb-banner .acb-button {
    min-height: 40px;
  }
}
