/*
 * Theme guard for the repairOS frontend wizard.
 *
 * These rules intentionally stay inside the wizard body markers. They neutralize
 * common WordPress-theme defaults without changing the surrounding website.
 */
body.ros-wizard-active #ros-stepper#ros-stepper,
html.ros-has-wizard body #ros-stepper#ros-stepper {
  box-sizing: border-box !important;
  float: none !important;
  clear: both !important;
  max-width: 100% !important;
  font-family: inherit !important;
  font-style: normal !important;
  letter-spacing: 0 !important;
  text-indent: 0 !important;
  text-transform: none !important;
  text-shadow: none !important;
  writing-mode: horizontal-tb !important;
  transform: none !important;
}

body.ros-wizard-active #ros-stepper#ros-stepper *,
body.ros-wizard-active #ros-stepper#ros-stepper *::before,
body.ros-wizard-active #ros-stepper#ros-stepper *::after,
html.ros-has-wizard body #ros-stepper#ros-stepper *,
html.ros-has-wizard body #ros-stepper#ros-stepper *::before,
html.ros-has-wizard body #ros-stepper#ros-stepper *::after {
  box-sizing: border-box !important;
}

body.ros-wizard-active #ros-stepper#ros-stepper > .ros-step,
html.ros-has-wizard body #ros-stepper#ros-stepper > .ros-step {
  -webkit-appearance: none !important;
  appearance: none !important;
  float: none !important;
  font-family: inherit !important;
  font-style: normal !important;
  letter-spacing: 0 !important;
  line-height: normal !important;
  text-indent: 0 !important;
  text-transform: none !important;
  text-shadow: none !important;
  list-style: none !important;
}

body.ros-wizard-active #ros-stepper#ros-stepper > .ros-step::marker,
html.ros-has-wizard body #ros-stepper#ros-stepper > .ros-step::marker {
  content: "" !important;
}

body.ros-wizard-active :is(
  .ros-frontend-wizard,
  .ros-step-content,
  .ros-frontend-form,
  .ros-wizard-nav,
  .ros-fw-stylebar,
  .ros-preview-card,
  .ros-brand-grid,
  .ros-category-grid,
  .ros-color-grid,
  .ros-form-grid,
  .ros-payment-method-grid,
  .ros-repair-grid
),
html.ros-has-wizard body :is(
  .ros-frontend-wizard,
  .ros-step-content,
  .ros-frontend-form,
  .ros-wizard-nav,
  .ros-fw-stylebar,
  .ros-preview-card,
  .ros-brand-grid,
  .ros-category-grid,
  .ros-color-grid,
  .ros-form-grid,
  .ros-payment-method-grid,
  .ros-repair-grid
) {
  box-sizing: border-box !important;
  float: none !important;
  min-width: 0 !important;
  max-width: 100% !important;
  text-indent: 0 !important;
}

body.ros-wizard-active :is(.ros-step-content, .ros-frontend-form, .ros-wizard-nav) *,
body.ros-wizard-active :is(.ros-step-content, .ros-frontend-form, .ros-wizard-nav) *::before,
body.ros-wizard-active :is(.ros-step-content, .ros-frontend-form, .ros-wizard-nav) *::after,
html.ros-has-wizard body :is(.ros-step-content, .ros-frontend-form, .ros-wizard-nav) *,
html.ros-has-wizard body :is(.ros-step-content, .ros-frontend-form, .ros-wizard-nav) *::before,
html.ros-has-wizard body :is(.ros-step-content, .ros-frontend-form, .ros-wizard-nav) *::after {
  box-sizing: border-box !important;
}

body.ros-wizard-active :is(.ros-step-content, .ros-frontend-form, .ros-wizard-nav) :is(button, input, select, textarea),
html.ros-has-wizard body :is(.ros-step-content, .ros-frontend-form, .ros-wizard-nav) :is(button, input, select, textarea) {
  box-sizing: border-box !important;
  float: none !important;
  max-width: 100% !important;
  font-family: inherit !important;
  font-style: normal !important;
  letter-spacing: normal !important;
  text-indent: 0 !important;
  text-transform: none !important;
  text-shadow: none !important;
}

body.ros-wizard-active :is(.ros-step-content, .ros-frontend-form, .ros-wizard-nav) :is(button, [type="button"], [type="submit"], [type="reset"], .ros-btn),
html.ros-has-wizard body :is(.ros-step-content, .ros-frontend-form, .ros-wizard-nav) :is(button, [type="button"], [type="submit"], [type="reset"], .ros-btn) {
  -webkit-appearance: none !important;
  appearance: none !important;
  font-family: inherit !important;
  text-decoration: none !important;
}

body.ros-wizard-active :is(.ros-step-content, .ros-frontend-form) :is(
  .brand-card,
  .repair-card,
  .ros-card,
  .ros-cat-card,
  .ros-category-card,
  .ros-payment-method-card,
  .ros-popular-model-card,
  .ros-preview-card
),
html.ros-has-wizard body :is(.ros-step-content, .ros-frontend-form) :is(
  .brand-card,
  .repair-card,
  .ros-card,
  .ros-cat-card,
  .ros-category-card,
  .ros-payment-method-card,
  .ros-popular-model-card,
  .ros-preview-card
) {
  box-sizing: border-box !important;
  float: none !important;
  min-width: 0 !important;
  max-width: 100% !important;
  font-family: inherit !important;
  text-indent: 0 !important;
  text-transform: none !important;
}

body.ros-wizard-active :is(.ros-step-content, .ros-frontend-form) :is(h1, h2, h3, h4, h5, h6, label, legend),
html.ros-has-wizard body :is(.ros-step-content, .ros-frontend-form) :is(h1, h2, h3, h4, h5, h6, label, legend) {
  float: none !important;
  max-width: 100% !important;
  font-family: inherit !important;
  font-style: normal !important;
  letter-spacing: normal !important;
  text-indent: 0 !important;
  text-transform: none !important;
  text-shadow: none !important;
}

body.ros-wizard-active :is(.ros-step-content, .ros-frontend-form) :is(ul, ol),
html.ros-has-wizard body :is(.ros-step-content, .ros-frontend-form) :is(ul, ol) {
  list-style-position: outside !important;
}

body.ros-wizard-active :is(.ros-step-content, .ros-frontend-form) :is(img, svg),
html.ros-has-wizard body :is(.ros-step-content, .ros-frontend-form) :is(img, svg) {
  box-sizing: border-box !important;
  float: none !important;
  max-width: 100% !important;
}

/*
 * The country-code control in the price-request popup is generated at runtime
 * outside .ros-step-content. Keep it independent from generic theme buttons.
 */
body.ros-wizard-active #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form .ros-phone-field,
html.ros-has-wizard body #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form .ros-phone-field {
  display: grid !important;
  grid-template-columns: minmax(108px, 132px) minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 10px !important;
  box-sizing: border-box !important;
  float: none !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

body.ros-wizard-active #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form .ros-phone-field.ros-phone-field--stack,
html.ros-has-wizard body #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form .ros-phone-field.ros-phone-field--stack {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.ros-wizard-active #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form .ros-phone-country-wrap,
html.ros-has-wizard body #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form .ros-phone-country-wrap {
  position: relative !important;
  box-sizing: border-box !important;
  float: none !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

body.ros-wizard-active #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form button.ros-phone-country-trigger,
html.ros-has-wizard body #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form button.ros-phone-country-trigger {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  box-sizing: border-box !important;
  float: none !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 10px 10px 10px 14px !important;
  border: 2px solid #e3e3e3 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #374151 !important;
  font: 600 1rem/1.1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  text-decoration: none !important;
  text-indent: 0 !important;
  text-transform: none !important;
  text-shadow: none !important;
  transform: none !important;
  filter: none !important;
  opacity: 1 !important;
}

body.ros-wizard-active #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form button.ros-phone-country-trigger:hover,
body.ros-wizard-active #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form button.ros-phone-country-trigger:active,
html.ros-has-wizard body #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form button.ros-phone-country-trigger:hover,
html.ros-has-wizard body #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form button.ros-phone-country-trigger:active {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  color: #374151 !important;
  transform: none !important;
}

body.ros-wizard-active #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form .ros-phone-country-trigger *,
body.ros-wizard-active #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form .ros-phone-country-trigger *::before,
body.ros-wizard-active #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form .ros-phone-country-trigger *::after,
html.ros-has-wizard body #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form .ros-phone-country-trigger *,
html.ros-has-wizard body #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form .ros-phone-country-trigger *::before,
html.ros-has-wizard body #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form .ros-phone-country-trigger *::after {
  box-sizing: border-box !important;
  font-family: inherit !important;
  text-transform: none !important;
  text-shadow: none !important;
}

body.ros-wizard-active #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form .ros-phone-country-trigger-main,
html.ros-has-wizard body #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form .ros-phone-country-trigger-main {
  display: flex !important;
  align-items: center !important;
  flex: 1 1 auto !important;
  gap: 7px !important;
  min-width: 0 !important;
  transform: none !important;
}

body.ros-wizard-active #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form .ros-phone-country-trigger-text,
html.ros-has-wizard body #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form .ros-phone-country-trigger-text {
  display: inline-flex !important;
  align-items: baseline !important;
  flex: 0 0 auto !important;
  gap: 4px !important;
  min-width: max-content !important;
  white-space: nowrap !important;
}

body.ros-wizard-active #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form .ros-phone-country-chevron,
html.ros-has-wizard body #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form .ros-phone-country-chevron {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 13px !important;
  width: 13px !important;
  min-width: 13px !important;
  height: 13px !important;
  margin: 0 0 0 auto !important;
  padding-left: 4px !important;
  color: #58657f !important;
}

body.ros-wizard-active #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form .ros-phone-country-menu,
html.ros-has-wizard body #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form .ros-phone-country-menu {
  box-sizing: border-box !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  color: #374151 !important;
}

body.ros-wizard-active #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form button.ros-phone-country-option,
html.ros-has-wizard body #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form button.ros-phone-country-option {
  -webkit-appearance: none !important;
  appearance: none !important;
  box-sizing: border-box !important;
  float: none !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #374151 !important;
  text-align: left !important;
  text-decoration: none !important;
  text-transform: none !important;
  text-shadow: none !important;
  transform: none !important;
}

body.ros-wizard-active #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form button.ros-phone-country-option:hover,
body.ros-wizard-active #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form button.ros-phone-country-option:focus,
html.ros-has-wizard body #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form button.ros-phone-country-option:hover,
html.ros-has-wizard body #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form button.ros-phone-country-option:focus {
  background: #f4f7fb !important;
  background-color: #f4f7fb !important;
  background-image: none !important;
  color: #1f2937 !important;
}

body.ros-wizard-active #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form button.ros-phone-country-option.is-selected,
html.ros-has-wizard body #ros-price-popup#ros-price-popup #ros-price-form#ros-price-form button.ros-phone-country-option.is-selected {
  background: #eef4ff !important;
  background-color: #eef4ff !important;
  background-image: none !important;
  color: #1d4f91 !important;
}

/*
 * Step 2 model live search: compact desktop actions.
 *
 * The generic wizard control baseline intentionally keeps regular buttons at
 * 16px. Badges and result-row actions are compact controls, so they need their
 * own final values. Keeping this in the protected layer prevents themes from
 * reintroducing button min-heights, padding or typography on wide viewports.
 * Tablet and phone layouts retain their dedicated responsive rules.
 */
@media (min-width: 1025px) {
  body.ros-wizard-active #ros-step-2#ros-step-2 .gsma-suggest .gsma-badge,
  html.ros-has-wizard body #ros-step-2#ros-step-2 .gsma-suggest .gsma-badge {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    box-sizing: border-box !important;
    inline-size: auto !important;
    block-size: auto !important;
    width: auto !important;
    height: auto !important;
    min-inline-size: 0 !important;
    min-block-size: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-inline-size: none !important;
    max-block-size: none !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 0 0 6px !important;
    padding: 2px 6px !important;
    border: 1px solid transparent !important;
    border-radius: 4px !important;
    font: 700 9px/1 var(--font-family-main, "Bai Jamjuree", Arial, sans-serif) !important;
    letter-spacing: 0 !important;
    text-indent: 0 !important;
    text-transform: none !important;
    text-shadow: none !important;
    white-space: nowrap !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
  }

  body.ros-wizard-active #ros-step-2#ros-step-2 .gsma-suggest .gsma-badge .gsma-badge-label,
  html.ros-has-wizard body #ros-step-2#ros-step-2 .gsma-suggest .gsma-badge .gsma-badge-label {
    display: inline !important;
    inline-size: auto !important;
    block-size: auto !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    color: inherit !important;
    font: inherit !important;
    letter-spacing: inherit !important;
    line-height: inherit !important;
    white-space: inherit !important;
  }

  body.ros-wizard-active #ros-step-2#ros-step-2 .gsma-suggest .gsma-badge .gsma-badge-dot,
  html.ros-has-wizard body #ros-step-2#ros-step-2 .gsma-suggest .gsma-badge .gsma-badge-dot {
    display: block !important;
    inline-size: 5px !important;
    block-size: 5px !important;
    width: 5px !important;
    height: 5px !important;
    min-width: 5px !important;
    min-height: 5px !important;
    flex: 0 0 5px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
  }

  body.ros-wizard-active #ros-step-2#ros-step-2 .gsma-suggest .gsma-badge-online-local,
  html.ros-has-wizard body #ros-step-2#ros-step-2 .gsma-suggest .gsma-badge-online-local {
    border-color: #c8ebd7 !important;
    background: #e9f7ef !important;
    color: #146a43 !important;
  }

  body.ros-wizard-active #ros-step-2#ros-step-2 .gsma-suggest .gsma-badge-online-server,
  html.ros-has-wizard body #ros-step-2#ros-step-2 .gsma-suggest .gsma-badge-online-server {
    border-color: #cfe0ff !important;
    background: #eaf2ff !important;
    color: #1f53b8 !important;
  }

  body.ros-wizard-active #ros-step-2#ros-step-2 .gsma-suggest button.gsma-info-btn,
  body.ros-wizard-active #ros-step-2#ros-step-2 .gsma-suggest button.gsma-info-btn:hover,
  body.ros-wizard-active #ros-step-2#ros-step-2 .gsma-suggest button.gsma-info-btn:focus,
  body.ros-wizard-active #ros-step-2#ros-step-2 .gsma-suggest button.gsma-info-btn:focus-visible,
  body.ros-wizard-active #ros-step-2#ros-step-2 .gsma-suggest button.gsma-info-btn:active,
  html.ros-has-wizard body #ros-step-2#ros-step-2 .gsma-suggest button.gsma-info-btn,
  html.ros-has-wizard body #ros-step-2#ros-step-2 .gsma-suggest button.gsma-info-btn:hover,
  html.ros-has-wizard body #ros-step-2#ros-step-2 .gsma-suggest button.gsma-info-btn:focus,
  html.ros-has-wizard body #ros-step-2#ros-step-2 .gsma-suggest button.gsma-info-btn:focus-visible,
  html.ros-has-wizard body #ros-step-2#ros-step-2 .gsma-suggest button.gsma-info-btn:active {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    inline-size: auto !important;
    block-size: 27px !important;
    width: auto !important;
    height: 27px !important;
    min-inline-size: 0 !important;
    min-block-size: 27px !important;
    min-width: 0 !important;
    min-height: 27px !important;
    max-inline-size: none !important;
    max-block-size: 27px !important;
    max-width: none !important;
    max-height: 27px !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 12px !important;
    border: 0 !important;
    border-radius: 5px !important;
    outline-offset: 2px !important;
    background: #f2f3f5 !important;
    color: #222 !important;
    -webkit-text-fill-color: #222 !important;
    font: 600 11px/1 var(--font-family-main, "Bai Jamjuree", Arial, sans-serif) !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    text-decoration: none !important;
    text-indent: 0 !important;
    text-transform: none !important;
    text-shadow: none !important;
    white-space: nowrap !important;
    box-shadow: none !important;
    animation: none !important;
    filter: none !important;
    transform: none !important;
    --ros-suggest-status-color: #222 !important;
  }

  body.ros-wizard-active #ros-step-2#ros-step-2 .gsma-suggest button.gsma-info-btn::before,
  body.ros-wizard-active #ros-step-2#ros-step-2 .gsma-suggest button.gsma-info-btn::after,
  html.ros-has-wizard body #ros-step-2#ros-step-2 .gsma-suggest button.gsma-info-btn::before,
  html.ros-has-wizard body #ros-step-2#ros-step-2 .gsma-suggest button.gsma-info-btn::after {
    content: none !important;
    display: none !important;
  }
}

/*
 * Step 1 manufacturer cards: generated text logos use one neutral wordmark.
 * Real image logos are intentionally untouched.
 */
body.ros-wizard-active #ros-step-1#ros-step-1 .brand-card.ros-brand-no-logo::before,
html.ros-has-wizard body #ros-step-1#ros-step-1 .brand-card.ros-brand-no-logo::before {
  font-family: "Bai Jamjuree", Arial, sans-serif !important;
  font-size: 18px !important;
  font-style: normal !important;
  font-weight: 400 !important;
  font-stretch: normal !important;
  font-synthesis: none !important;
  font-variant: normal !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  text-shadow: none !important;
  -webkit-text-stroke: 0 !important;
}

/* ROS stepper: visited number steps match upcoming steps with a soft gray fill. */
body.ros-wizard-active #ros-stepper#ros-stepper.ros-icon-stepper > .ros-step.completed:not(.active):not(:first-child) .ros-step-orb,
html.ros-has-wizard body #ros-stepper#ros-stepper.ros-icon-stepper > .ros-step.completed:not(.active):not(:first-child) .ros-step-orb {
  border-color: var(--ros-icon-stepper-border, #c4cfdd) !important;
  background: #f1f3f5 !important;
  color: #667085 !important;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, .12) !important;
}

/* ROS stepper: use the same muted visited state on tablet and phone. */
@media (max-width: 1024px) {
  body.ros-wizard-active.ros-fw-experience-active.ros-fw-stepper-ros #ros-stepper#ros-stepper.ros-ros-stepper > .ros-step.completed:not(.active):not([data-step="0"]) .ros-step-orb,
  html.ros-has-wizard body.ros-wizard-active.ros-fw-experience-active.ros-fw-stepper-ros #ros-stepper#ros-stepper.ros-ros-stepper > .ros-step.completed:not(.active):not([data-step="0"]) .ros-step-orb {
    border-color: #c4cfdd !important;
    background: #f1f3f5 !important;
    box-shadow: 0 0 0 2px rgba(148, 163, 184, .12) !important;
  }

  body.ros-wizard-active.ros-fw-experience-active.ros-fw-stepper-ros #ros-stepper#ros-stepper.ros-ros-stepper > .ros-step.completed:not(.active):not([data-step="0"]) .ros-step-no,
  html.ros-has-wizard body.ros-wizard-active.ros-fw-experience-active.ros-fw-stepper-ros #ros-stepper#ros-stepper.ros-ros-stepper > .ros-step.completed:not(.active):not([data-step="0"]) .ros-step-no {
    color: #667085 !important;
  }
}

/* Classic Step 2: keep every thumbnail pinned to the left of its card. */
body.ros-wizard-active:not(.ros-fw-modelcards) #ros-step-2#ros-step-2 .ros-popular-model-card,
html.ros-has-wizard body:not(.ros-fw-modelcards) #ros-step-2#ros-step-2 .ros-popular-model-card {
  justify-content: flex-start !important;
}

body.ros-wizard-active:not(.ros-fw-modelcards) #ros-step-2#ros-step-2 .ros-popular-model-card > img.ros-model-thumb,
body.ros-wizard-active:not(.ros-fw-modelcards) #ros-step-2#ros-step-2 .ros-popular-model-card > .ros-model-thumb-pane,
html.ros-has-wizard body:not(.ros-fw-modelcards) #ros-step-2#ros-step-2 .ros-popular-model-card > img.ros-model-thumb,
html.ros-has-wizard body:not(.ros-fw-modelcards) #ros-step-2#ros-step-2 .ros-popular-model-card > .ros-model-thumb-pane {
  flex: 0 0 auto !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.ros-wizard-active:not(.ros-fw-modelcards) #ros-step-2#ros-step-2 .ros-popular-model-card > .ros-popular-model-text,
html.ros-has-wizard body:not(.ros-fw-modelcards) #ros-step-2#ros-step-2 .ros-popular-model-card > .ros-popular-model-text {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Step 2: model photos keep a soft edge even when a theme resets image radii. */
body.ros-wizard-active.ros-fw-modelcards #ros-step-2#ros-step-2 .ros-popular-model-card img.ros-model-thumb,
html.ros-has-wizard body.ros-fw-modelcards #ros-step-2#ros-step-2 .ros-popular-model-card img.ros-model-thumb {
  width: min(112px, 96%) !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  border-radius: 8px !important;
  background-color: #fff !important;
  box-shadow: none !important;
}

/* Step 2 phones/tablets/watches: a subtle portrait tile reduces side whitespace. */
body.ros-wizard-active.ros-fw-modelcards #ros-step-2#ros-step-2 .ros-popular-model-card[data-category*="Smartphone" i] img.ros-model-thumb,
body.ros-wizard-active.ros-fw-modelcards #ros-step-2#ros-step-2 .ros-popular-model-card[data-category*="Tablet" i] img.ros-model-thumb,
body.ros-wizard-active.ros-fw-modelcards #ros-step-2#ros-step-2 .ros-popular-model-card[data-category*="Watch" i] img.ros-model-thumb,
html.ros-has-wizard body.ros-fw-modelcards #ros-step-2#ros-step-2 .ros-popular-model-card[data-category*="Smartphone" i] img.ros-model-thumb,
html.ros-has-wizard body.ros-fw-modelcards #ros-step-2#ros-step-2 .ros-popular-model-card[data-category*="Tablet" i] img.ros-model-thumb,
html.ros-has-wizard body.ros-fw-modelcards #ros-step-2#ros-step-2 .ros-popular-model-card[data-category*="Watch" i] img.ros-model-thumb {
  aspect-ratio: 3 / 4 !important;
}

/* Step 2 tablet: enlarge photos within the narrower thumbnail rail. */
@media (min-width: 721px) and (max-width: 1120px) {
  body.ros-wizard-active.ros-fw-modelcards #ros-step-2#ros-step-2 .ros-popular-model-card img.ros-model-thumb,
  html.ros-has-wizard body.ros-fw-modelcards #ros-step-2#ros-step-2 .ros-popular-model-card img.ros-model-thumb {
    width: min(96px, 96%) !important;
  }
}

/* Step 2 phone: use the available 50px rail without overflowing it. */
@media (max-width: 720px) {
  body.ros-wizard-active.ros-fw-modelcards #ros-step-2#ros-step-2 .ros-popular-model-card img.ros-model-thumb,
  html.ros-has-wizard body.ros-fw-modelcards #ros-step-2#ros-step-2 .ros-popular-model-card img.ros-model-thumb {
    width: min(50px, 96%) !important;
  }
}

/* Step 2 desktop: keep the existing three-column layout inside narrow themes. */
@media (min-width: 1121px) {
  body.ros-wizard-active.ros-fw-modelcards #ros-step-2#ros-step-2 #ros-popular-models,
  body.ros-wizard-active.ros-fw-modelcards #ros-step-2#ros-step-2 #ros-imported-models,
  html.ros-has-wizard body.ros-fw-modelcards #ros-step-2#ros-step-2 #ros-popular-models,
  html.ros-has-wizard body.ros-fw-modelcards #ros-step-2#ros-step-2 #ros-imported-models {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  body.ros-wizard-active.ros-fw-modelcards #ros-step-2#ros-step-2 .ros-popular-model-card,
  html.ros-has-wizard body.ros-fw-modelcards #ros-step-2#ros-step-2 .ros-popular-model-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}
