/* Electro Meuble 5.4.0: shared cart, checkout and commerce component polish. */
.em-cartpage, .em-checkout, .page-order-confirmation, #content-hook_order_confirmation {
  --em-commerce-ink: #103f52;
  --em-commerce-muted: #526975;
  --em-commerce-line: #e5daca;
  --em-commerce-soft: #f6f2e9;
  min-width: 0;
}
.em-icon { flex: 0 0 auto; vertical-align: middle; }

/* Reassurance uses the same visual contract as the product page. */
.em-cartpage #block-reassurance, .em-checkout #block-reassurance { margin: 16px 0 0; border: 0; background: transparent; box-shadow: none; }
.em-cartpage #block-reassurance ul, .em-checkout #block-reassurance ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.em-cartpage #block-reassurance li, .em-checkout #block-reassurance li { margin: 0; padding: 0; border: 1px solid var(--em-commerce-line); border-radius: 12px; background: var(--em-commerce-soft); list-style: none; }
.em-cartpage #block-reassurance .block-reassurance-item, .em-checkout #block-reassurance .block-reassurance-item { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 11px 13px; color: var(--em-commerce-ink); text-decoration: none; }
.em-cartpage #block-reassurance .em-policy-icon, .em-checkout #block-reassurance .em-policy-icon { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 8px; background: #fff; }
.em-cartpage #block-reassurance .em-policy-icon img, .em-checkout #block-reassurance .em-policy-icon img { width: 24px; height: 24px; object-fit: contain; }
.em-cartpage #block-reassurance .em-policy-copy, .em-checkout #block-reassurance .em-policy-copy { display: grid; gap: 1px; min-width: 0; line-height: 1.45; }
.em-cartpage #block-reassurance .em-policy-copy strong, .em-checkout #block-reassurance .em-policy-copy strong { color: var(--em-commerce-ink); font-size: 13px; font-weight: 650; }
.em-cartpage #block-reassurance .em-policy-copy small, .em-checkout #block-reassurance .em-policy-copy small { color: var(--em-commerce-muted); font-size: 12px; }

/* Cart cards and third-party hook containment. */
.em-cartpage .cart-grid-body, .em-cartpage .cart-grid-right, .em-cartpage [class*="hook"], .em-cartpage .cart-overview, .em-cartpage .cart-summary { min-width: 0; max-width: 100%; }
.em-cartpage .cart-item { overflow: hidden; border-color: var(--em-commerce-line); background: #fff; }
.em-cartpage .product-line-grid { border: 0; border-radius: 0; }
.em-cartpage .product-line-grid .label { overflow-wrap: anywhere; }
.em-cartpage .product-line-actions { min-width: 0; }
.em-cartpage .cart-summary { border: 1px solid var(--em-commerce-line); }
.em-cartpage .cart-detailed-actions { margin-top: 14px; }
.em-cartpage .cart-detailed-actions .btn { width: 100%; }
.em-cartpage .remove-from-cart { min-height: 40px; display: inline-flex; align-items: center; }
.em-cartpage [class*="hook"] img, .em-cartpage [class*="hook"] iframe { max-width: 100%; }

/* One native checkbox/radio only. Decorative Classic controls are removed. */
.em-checkout .custom-checkbox, .em-checkout .custom-radio { display: inline-grid; place-items: center; flex: 0 0 20px; width: 20px; height: 20px; margin: 0; padding: 0; border: 0; background: transparent; }
.em-checkout .custom-checkbox input[type="checkbox"], .em-checkout .custom-radio input[type="radio"] { position: static !important; inset: auto !important; display: block !important; width: 20px !important; height: 20px !important; min-height: 20px !important; margin: 0 !important; padding: 0 !important; opacity: 1 !important; visibility: visible !important; appearance: auto !important; accent-color: var(--em-accent); box-shadow: none !important; cursor: pointer; }
.em-checkout .custom-checkbox input + span, .em-checkout .custom-radio input + span { display: none !important; }
.em-contact-page .custom-checkbox, .em-contact-page .custom-radio { display: inline-grid; place-items: center; width: 20px; height: 20px; margin: 0; border: 0; background: transparent; }
.em-contact-page .custom-checkbox input[type="checkbox"], .em-contact-page .custom-radio input[type="radio"] { position: static !important; display: block !important; width: 20px !important; height: 20px !important; min-height: 20px !important; margin: 0 !important; opacity: 1 !important; appearance: auto !important; accent-color: var(--em-accent); }
.em-contact-page .custom-checkbox input + span, .em-contact-page .custom-radio input + span { display: none !important; }
.em-checkout .checkout-step { min-width: 0; overflow: visible; }
.em-checkout .checkout-step .content { min-width: 0; }
.em-checkout .checkout-step .step-title { border-radius: inherit; }
.em-checkout .checkout-step .step-title[role="button"]:focus-visible { outline: 3px solid var(--em-accent); outline-offset: -3px; }
.em-checkout .checkout-step.-current .step-title { border-radius: 11px 11px 0 0; }
.em-checkout .checkout-step .step-edit { gap: 6px; text-decoration: none; }

/* Address selection. */
.em-checkout .address-selector { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.em-checkout .address-item { min-width: 0; margin: 0; padding: 15px; border: 1px solid var(--em-commerce-line); border-radius: 12px; background: #fff; }
.em-checkout .address-item.selected { border-color: var(--em-accent); background: #f4fafb; box-shadow: 0 0 0 1px var(--em-accent); }
.em-checkout .address-item > header { margin: 0; }
.em-checkout .address-item .radio-block { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 4px 11px; margin: 0; cursor: pointer; }
.em-checkout .address-item .custom-radio { grid-row: 1 / span 2; }
.em-checkout .address-item .address-alias { margin: 0; color: var(--em-commerce-ink); font-size: 14px; line-height: 1.4; }
.em-checkout .address-item .address { grid-column: 2; color: var(--em-commerce-muted); font-size: 13px; font-weight: 400; line-height: 1.55; }
.em-checkout .address-item hr { display: none; }
.em-checkout .address-footer { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 13px; padding-top: 10px; border-top: 1px solid var(--em-commerce-line); }
.em-checkout .address-footer a, .em-checkout .add-address a { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; color: var(--em-accent-hover); font-size: 13px; font-weight: 600; }
.em-checkout .address-footer .delete-address { color: var(--em-sale); }
.em-checkout .add-address { margin: 12px 0; }
.em-checkout .add-address + p { margin-top: 8px; }

/* Payment options and conditions. */
.em-checkout .payment-options { display: grid; gap: 10px; margin: 8px 0 18px; }
.em-checkout .payment-option { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 12px; min-width: 0; min-height: 58px; padding: 11px 13px; border: 1px solid var(--em-commerce-line); border-radius: 10px; background: #fff; }
.em-checkout .payment-option:has(input:checked) { border-color: var(--em-accent); background: #f4fafb; box-shadow: 0 0 0 1px var(--em-accent); }
.em-checkout .payment-option label { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; margin: 0; cursor: pointer; }
.em-checkout .payment-option label span { min-width: 0; overflow-wrap: anywhere; }
.em-checkout .payment-option label img { width: auto; height: auto; max-width: 110px; max-height: 36px; object-fit: contain; }
.em-checkout .additional-information, .em-checkout .js-payment-option-form { min-width: 0; max-width: 100%; margin: 8px 0 14px; overflow-wrap: anywhere; }
.em-checkout .additional-information img, .em-checkout .additional-information iframe, .em-checkout .js-payment-option-form img, .em-checkout .js-payment-option-form iframe { max-width: 100%; }
.em-checkout #conditions-to-approve { margin: 16px 0; }
.em-checkout #conditions-to-approve ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.em-checkout #conditions-to-approve li { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 11px; margin: 0; padding: 12px; border: 1px solid var(--em-commerce-line); border-radius: 10px; background: #fff; list-style: none; }
.em-checkout #conditions-to-approve .float-xs-left { float: none; }
.em-checkout #conditions-to-approve .condition-label { min-width: 0; }
.em-checkout #conditions-to-approve label { margin: 0; color: var(--em-commerce-ink); font-size: 13px; font-weight: 500; line-height: 1.55; cursor: pointer; }
.em-checkout #payment-confirmation { margin-top: 14px; }
.em-checkout #payment-confirmation .btn { min-height: 48px; white-space: normal; }
.em-checkout #payment-confirmation .btn.disabled, .em-checkout #payment-confirmation .btn:disabled { border-color: #c8d4d7; background: #dce5e7; color: #35515d; opacity: 1; }

/* Order summary and confirmation remain usable without Bootstrap columns. */
.em-checkout .cart-summary-products ul, .page-order-confirmation ul, #content-hook_order_confirmation ul { list-style: none; }
.em-checkout .js-show-details { display: inline-flex; align-items: center; gap: 6px; }
.em-checkout .order-options { margin-top: 14px; }
#content-hook_order_confirmation, .page-order-confirmation, #content-hook_payment_return { margin-bottom: 18px; border: 1px solid var(--em-commerce-line); border-radius: 14px; background: #fff; overflow: hidden; }
#content-hook_order_confirmation .card-block, .page-order-confirmation .card-block, #content-hook_payment_return .card-block { padding: 20px; }
#content-hook_order_confirmation .card-title { display: flex; align-items: center; gap: 10px; }
#content-hook_order_confirmation .card-title .em-icon { color: var(--em-success); }

/* Product page: denser gallery and aligned action hooks. */
.em-product--premium .em-product__extra { min-width: 0; overflow-wrap: anywhere; }
.em-product--premium .em-product__extra :is(img, video, iframe, object, embed) { max-width: 100%; }
.em-product--premium .em-product__extra table { display: block; width: 100%; max-width: 100%; overflow-x: auto; }
@media (min-width: 900px) {
  .em-product--premium .em-gallery .product-cover { max-height: 440px; }
  .em-product--premium .em-buyline .add { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; }
  .em-product--premium .em-buyline .add .add-to-cart { grid-column: 1; }
  .em-product--premium .em-buyline .add > :not(.add-to-cart) { grid-column: 2; margin: 0; }
}

.page-stores .store-item-container li, .page-stores .store-item-container a { min-width: 0; }
.page-stores .store-item-container li { display: flex; align-items: center; gap: 8px; }

@media (max-width: 1023.98px) {
  .em-cartpage .em-cartgrid { grid-template-columns: minmax(0, 1fr); }
  .em-cartpage .cart-grid-right { position: static; width: 100%; max-width: none; }
}
@media (min-width: 1024px) and (max-height: 759px) {
  .em-cartpage .cart-grid-right, .em-checkout .cart-grid-right { position: static; }
}
@media (max-width: 767.98px) {
  .em-checkout .address-selector { grid-template-columns: minmax(0, 1fr); }
  .em-checkout .payment-option label { align-items: flex-start; flex-direction: column; gap: 8px; }
  .em-checkout .checkout-step .step-title { min-height: 56px; padding: 10px 12px; font-size: 15px; }
  .em-checkout .checkout-step .step-number, .em-checkout .checkout-step .em-step-check { width: 28px; height: 28px; flex-basis: 28px; }
  .em-cartpage #block-reassurance .block-reassurance-item, .em-checkout #block-reassurance .block-reassurance-item { padding: 10px 11px; }
}
@media (max-width: 767.98px) and (orientation: landscape) and (max-height: 500px) {
  .em-home .em-hero__stage { height: min(330px, calc(100svh - 88px)); min-height: 260px; }
  .em-home .em-hero__copy { bottom: 46px; }
}
@media (max-width: 419.98px) {
  .em-sitefooter__grid { grid-template-columns: minmax(0, 1fr); }
  .em-sitefooter__store { grid-column: auto; }
  .em-checkout .address-footer { flex-direction: column; align-items: flex-start; }
  .em-product--premium .em-buyline { align-items: stretch; }
  .em-product--premium .em-buyline .em-qty { width: 100%; }
  .btn { white-space: normal; }
}
