/* Fill homepage card image areas on tablet and mobile. */
@media (max-width: 1024px) {
  html body[data-tt-route="common/home"] #tt-collections .tt-cat-image img,
  html body[data-tt-route="common/home"] #tt-showcase-full .pbox .image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
  }
}

@layer tt-card-layout {
  @media (max-width: 767px) {
    html body[data-tt-route="common/home"] :is(.tt-sc-icon, .tt-process-icon, .tt-why-icon, .tt-process-step, .tt-section-eyebrow, .tt-process-tag) {
      align-self: flex-start !important;
      margin-left: 0 !important;
      margin-right: auto !important;
    }
    html body[data-tt-route="common/home"] .tt-process-step {
      width: 100% !important;
      justify-content: space-between !important;
      align-items: center !important;
    }
    html body[data-tt-route="common/home"] .tt-process-step .tt-process-icon {
      margin-inline: 0 !important;
      align-self: center !important;
    }
    html body[data-tt-route="common/home"] .tt-strategy-title {
      justify-content: flex-start !important;
    }
    html body[data-tt-route="common/home"] .tt-strategy-content {
      align-items: flex-start !important;
    }
    html body[data-tt-route="common/home"] .tt-strategy-text {
      margin-left: 0 !important;
      margin-right: auto !important;
    }
    html body[data-tt-route="common/home"] #tt-showcase-full .pbox .name {
      width: 100% !important;
      max-width: none !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
      align-self: flex-start !important;
      justify-content: flex-start !important;
    }
    html body[data-tt-route="common/home"] #tt-showcase-full .pbox .p-actions {
      display: flex !important;
      flex-direction: row !important;
      flex-wrap: nowrap !important;
      align-items: stretch !important;
      gap: 10px !important;
    }
    html body[data-tt-route="common/home"] #tt-showcase-full .pbox .p-actions :is(.btn-details, .btn-quote) {
      display: flex !important;
      flex: 1 1 0 !important;
      width: auto !important;
      min-width: 0 !important;
      height: auto !important;
      min-height: 48px !important;
      padding: 12px 10px !important;
      margin: 0 !important;
      box-sizing: border-box !important;
      align-items: center !important;
      justify-content: center !important;
      text-align: center !important;
      white-space: normal !important;
    }
  }
}

/* Match the shared typography layer so mobile alignment wins over legacy rules. */
@layer tt-storefront-typography {
  @media (max-width: 767px) {
    html body[data-tt-route="common/home"],
    html body[data-tt-route="common/home"] * {
      text-align: left !important;
    }
    html body[data-tt-route="common/home"] :is(.tt-heading-stack, .tt-sc-header, .tt-process-header, .tt-why-header, .tt-sc-card, .tt-process-card, .tt-why-card) {
      text-align: left !important;
      align-items: flex-start !important;
    }
    html body[data-tt-route="common/home"] #tt-showcase-full .pbox :is(.name, .name a, .description) {
      text-align: left !important;
    }
    html body[data-tt-route="common/home"] #tt-showcase-full .p-actions :is(.btn-details, .btn-quote),
    html body[data-tt-route="common/home"] #tt-showcase-full .p-actions :is(.btn-details, .btn-quote) * {
      text-align: center !important;
      line-height: 1.4 !important;
    }
  }
}
