/* The generated PNG stays untouched. Crop its transparent padding in the
   display box while preserving the reference header's original brand slot. */
img[data-brand-logo="true"] {
  display: block;
  object-fit: contain;
  object-position: center;
}

#header img[data-brand-logo="true"] {
  width: 212px;
  height: 34px;
  max-width: none;
  max-height: none;
  flex-shrink: 0;
  object-fit: contain;
}

a[data-brand-link] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

#header a[data-brand-link="main"] {
  width: 212px;
  height: 24px;
  flex: 0 0 212px;
}

/* Preserve the mobile drawer's flexible, centered link rather than making
   its image width determine the surrounding navigation layout. */
#header a[data-brand-link="drawer"] {
  display: flex;
}

header:not(#header) a[data-brand-link="account"] {
  width: 172px;
  height: 24px;
  flex: 0 0 172px;
}

a[data-brand-link="account"] img[data-brand-logo="true"] {
  width: 172px;
  height: 28px;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

a[data-brand-link="commerce"] {
  width: 124px;
  height: 24px;
  flex: 0 0 124px;
}

a[data-brand-link="commerce"] img[data-brand-logo="true"] {
  width: 124px;
  height: 20px;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

/* Keep the smaller help/business footer brand within its existing responsive
   slot. Article cards keep their original image box and show the whole mark. */
a[data-brand-link="secondary"] {
  width: 106px;
  height: 12px;
}

a[data-brand-link="secondary"] img[data-brand-logo="true"] {
  width: 106px;
  height: 17px;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

article img[data-brand-logo="true"] {
  object-fit: contain;
}

@media (min-width: 768px) {
  a[data-brand-link="secondary"] { width: 141px; height: 16px; }
  a[data-brand-link="secondary"] img[data-brand-logo="true"] { width: 141px; height: 23px; }
}

@media (min-width: 1200px) {
  a[data-brand-link="secondary"] { width: 176px; height: 20px; }
  a[data-brand-link="secondary"] img[data-brand-logo="true"] { width: 176px; height: 28px; }
}

@media (max-width: 767px) {
  #header img[data-brand-logo="true"] {
    width: clamp(120px, calc(100vw - 180px), 170px);
    height: 26px;
  }

  #header a[data-brand-link="main"] {
    width: clamp(120px, calc(100vw - 180px), 170px);
    height: 16px;
    flex-basis: clamp(120px, calc(100vw - 180px), 170px);
  }
}

/* Shared visual caption for local-demo payment logo panels. */
.rl-purchase-marks .rl-payment-secure-caption,.rl-checkout-payment-marks .rl-payment-secure-caption,.rl-payment-secure-caption{display:flex;align-items:center;justify-content:center;gap:4px;margin:8px 0 0;font:600 14px/20px BMDupletTXT,HelveticaTXT,sans-serif;color:#6b6d75}
.rl-payment-secure-caption svg{display:block;flex:0 0 16px;width:16px;height:16px}

.rl-payment-secure-caption.rl-payment-secure-caption>span{font:inherit}

/* C10：全站同类单选/复选 focus 统一为暗色细边（取消紫色 focus ring） */
.rl-delivery-option:has(input:focus-visible),
.rl-cart-plan:has(input:focus-visible),
.rl-payment-method-label:has(input:focus-visible),
.rl-warranty-default-selection:has(input:focus-visible),
.rl-bb-choice:has(input:focus-visible),
.rl-bb-mode button:focus-visible,
.rl-apple-option:has(input:focus-visible),
.rl-import-option:has(input:focus-visible),
[data-demo-config]:has(input[type="radio"]:focus-visible) .rl-config-panel,
.rl-brand-new:has(input:focus-visible),
.rl-condition-controls button:focus-visible,
.rl-catalog-filter-toolbar button:focus-visible,
[data-catalog-pagination].rl-category-pagination a:focus-visible,
[data-catalog-pagination].rl-category-pagination button:focus-visible,
.rl-purchase-dialog button:focus-visible,
.rl-purchase-dialog a:focus-visible,
.rl-cart-trade :focus-visible,
.rl-purchase-trade-in :focus-visible,
.rl-pdp-trade :focus-visible,
.rl-plp-trade :focus-visible{outline:2px solid #0e1016 !important;outline-offset:2px !important;}

/* C10：其余页面同类/相邻控件的紫色 focus ring 一并统一为暗色细边 */
.rl-buyback-page :focus-visible,
.rl-bb-banner :focus-visible,
.rl-pdp-trade-card :focus-visible,
.rl-pdp-trade-price-info:focus-visible,
.rl-brand-new-saving button:focus-visible,
.rl-apple-pagination a:focus-visible,
.rl-apple-pagination button:focus-visible{outline:2px solid #0e1016 !important;outline-offset:2px !important;}
