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

@media (min-width: 768px) {
  #header {
    border-bottom: 0;
  }
}

.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;
}

.ld-footer__unsubscribe {
  color: rgba(250, 246, 236, .72);
  font-family: var(--ld-f-body);
  font-size: 12px;
}

.ld-footer__unsubscribe summary {
  width: fit-content;
  min-height: 32px;
  padding: 7px 0;
  cursor: pointer;
  color: var(--ld-paper);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ld-footer__unsubscribe-panel {
  margin-top: 6px;
}

.ld-footer__unsubscribe-panel > p {
  margin: 0 0 8px;
  color: rgba(250, 246, 236, .72);
  font-size: 12px;
  line-height: 1.45;
}

.ld-footer__newsletter .ld-footer__unsubscribe-panel form {
  flex-wrap: wrap;
}

.ld-footer__newsletter .ld-footer__unsubscribe-panel input[type="email"] {
  flex: 1 1 150px;
  min-width: 0;
}

.ld-footer__newsletter .ld-footer__unsubscribe-panel input[type="submit"] {
  border: 1px solid rgba(250, 246, 236, .38);
  background: transparent;
}

.ld-footer__newsletter .ld-footer__unsubscribe-panel input[type="submit"]:hover {
  border-color: var(--ld-gold);
  background: rgba(250, 246, 236, .1);
}

.ld-footer__unsubscribe-panel .block_newsletter_alert {
  flex: 0 0 100%;
  order: 3;
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.4;
}

/* Gift-card listing: one configurable product, never presented as a €10 item. */
.ld-product-card--gift .ld-product-card__price-prefix {
  color: var(--ld-ink-mute);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

@media (min-width: 768px) and (max-width: 991.98px) {
  body#category #content-wrapper {
    width: 100%;
  }
}

body#category.category-id-103 .ld-cat-products-grid {
  grid-template-columns: minmax(240px, 320px);
  justify-content: center;
}

body#category.category-id-103 .ld-cat-seo {
  max-width: 960px;
  margin: 0 auto 64px;
  padding: 36px 40px;
  border: 1px solid var(--ld-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--ld-shadow-card);
}

body#category.category-id-103 .ld-cat-seo__inner,
body#category.category-id-103 .ld-cat-seo__body {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

body#category.category-id-103 .ld-cat-seo__body {
  column-count: 1;
  color: var(--ld-ink-mute);
  font-size: 15px;
  line-height: 1.75;
}

body#category.category-id-103 .ld-cat-seo__body h2 {
  margin: 30px 0 12px;
  color: var(--ld-ink);
  font-family: var(--ld-f-serif);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
}

body#category.category-id-103 .ld-cat-seo__body ul,
body#category.category-id-103 .ld-cat-seo__body ol {
  margin: 0 0 18px;
  padding-left: 1.35em;
}

body#category.category-id-103 .ld-cat-seo__body li {
  margin-bottom: 8px;
}

@media (max-width: 767px) {
  body#category.category-id-103 .ld-cat-products-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body#category.category-id-103 .ld-cat-seo {
    margin: 0 14px 40px;
    padding: 24px 20px;
  }

  body#category.category-id-103 .ld-cat-seo__body {
    font-size: 14px;
  }

  body#category.category-id-103 .ld-cat-seo__body h2 {
    margin-top: 24px;
    font-size: 21px;
  }
}

/* Keep the five-column desktop footer readable on tablets. */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .ld-footer__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) repeat(3, minmax(0, 1fr));
    gap: 32px 24px;
    padding: 48px 32px 28px;
  }

  .ld-footer__brand {
    max-width: none;
  }

  .ld-footer__newsletter {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 640px;
    min-width: 0;
  }
}

/* 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;
}

#wishlistModal button.close {
  top: 8px;
  right: 8px;
}

#search_filters .facet .ld-facet__label--stockonly .ld-facet__checkbox {
  top: auto;
}

#search_filters .facet .ld-facet__label--stockonly .ld-facet__link {
  width: auto;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

#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) {
  /* The thumbnail rail must not contribute to the gallery height. */
  body#product .ld-gallery {
    display: block;
    position: relative;
    padding-left: 94px;
  }

  body#product .ld-gallery__thumbs {
    position: absolute;
    inset: 0 auto 0 0;
    width: 80px;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-snap-type: y proximity;
  }

  body#product .ld-gallery__thumb-btn {
    scroll-snap-align: start;
  }

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

@media (min-width: 1200px) {
  /* The menu already owns the separator above category content. */
  body#category .ld-cat-header {
    border-top: 0;
  }

  body#product .ld-gallery {
    padding-left: 110px;
  }

  body#product .ld-gallery__thumbs {
    width: 92px;
  }
}

/* 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;
  }

}

@media (max-width: 479px) {
  .ld-footer__newsletter .ld-footer__unsubscribe-panel form {
    flex-direction: column;
  }

  .ld-footer__newsletter .ld-footer__unsubscribe-panel input[type="email"],
  .ld-footer__newsletter .ld-footer__unsubscribe-panel input[type="submit"] {
    flex: 0 0 auto;
    width: 100%;
    box-sizing: border-box;
  }
}
