/* OROS Shopping mobile polish V3 - scoped to homepage and product detail.
   Desktop layout, APIs, cart logic and product listing remain unchanged. */
@media (max-width: 770px) {
  /* Four concise service promises in a single horizontal row. */
  .oros-marketplace-home .trust-strip__inner {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
    padding: 7px 8px;
  }
  .oros-marketplace-home .trust {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 57px;
    margin: 0;
    padding: 5px 2px;
    border-radius: 9px;
    background: #fff;
    text-align: center;
  }
  .oros-marketplace-home .trust > .icon {
    display: block;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
  }
  .oros-marketplace-home .trust span { display: block; min-width: 0; width: 100%; }
  .oros-marketplace-home .trust strong {
    display: block;
    font-size: clamp(9px, 2.5vw, 11px);
    line-height: 1.2;
    font-weight: 750;
    overflow-wrap: normal;
  }
  .oros-marketplace-home .trust small { display: none; }

  /* Lower homepage category heading height; retain discoverability and links. */
  .oros-marketplace-home #shop-categories.catalog-section.container {
    padding-top: 10px;
    padding-bottom: 12px;
  }
  .oros-marketplace-home #shop-categories .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    column-gap: 8px;
    margin: 0 0 10px;
  }
  .oros-marketplace-home #shop-categories .section-head > div { min-width: 0; }
  .oros-marketplace-home #shop-categories .section-eyebrow {
    margin: 0 0 3px;
    font-size: 9px;
    letter-spacing: .1em;
  }
  .oros-marketplace-home #shop-categories .section-head h2 {
    font-size: 1.15rem;
    line-height: 1.15;
  }
  .oros-marketplace-home #shop-categories .section-head p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    overflow: hidden;
    margin: 4px 0 0;
    font-size: .66rem;
    line-height: 1.3;
  }
  .oros-marketplace-home #shop-categories .view-link {
    max-width: 98px;
    min-height: 32px;
    margin: 0;
    padding: 0;
    font-size: .66rem;
    line-height: 1.25;
    white-space: normal;
  }
  .oros-marketplace-home #shop-categories .view-link .icon { width: 13px; height: 13px; flex-shrink: 0; }
  .oros-marketplace-home #shop-categories .category-grid { gap: 8px; padding-block: 2px 5px; }
  .oros-marketplace-home #shop-categories .category-tile {
    gap: 5px;
    min-width: 0;
    padding: 5px 3px 7px;
    border-radius: 13px;
    align-items: center;
    text-align: center;
  }
  .oros-marketplace-home #shop-categories .category-tile__image {
    display: block;
    width: clamp(56px, 18vw, 70px);
    height: clamp(56px, 18vw, 70px);
    aspect-ratio: 1 / 1;
    flex: 0 0 auto;
    padding: 0;
    margin-inline: auto;
    border-radius: 50%;
    overflow: hidden;
  }
  .oros-marketplace-home #shop-categories .category-tile__image img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
  }
  .oros-marketplace-home #shop-categories .category-tile__name {
    padding: 0;
    min-height: 0;
    font-size: .69rem;
    line-height: 1.18;
  }

  /* Product rails: two compact horizontal product cards per swipe column. */
  .oros-marketplace-home #featured-products.catalog-section.container { padding-top: 12px; }
  .oros-marketplace-home #home-category-rails { gap: 13px; }
  .oros-marketplace-home .oros-home-collection__head { gap: 6px; margin-bottom: 6px; }
  .oros-marketplace-home .oros-home-collection__head h3 {
    min-width: 0;
    font-size: .91rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
  .oros-marketplace-home .oros-home-collection__actions { gap: 4px; }
  .oros-marketplace-home .oros-home-collection__arrow { width: 27px; height: 27px; }
  .oros-marketplace-home .oros-home-collection__arrow svg { width: 14px; height: 14px; }
  .oros-marketplace-home .oros-home-collection__see-all { font-size: .7rem; padding: 4px 0 4px 3px; }
  .oros-marketplace-home .oros-home-collection__track {
    display: grid;
    grid-template-rows: repeat(2, 117px);
    grid-auto-flow: column;
    grid-auto-columns: clamp(250px, 77vw, 316px);
    align-items: stretch;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    min-width: 0;
    padding: 2px 1px 8px;
    scroll-snap-type: x proximity;
    touch-action: auto;
    -webkit-overflow-scrolling: touch;
  }
  .oros-marketplace-home .oros-home-collection__track > .product-card {
    display: grid;
    grid-template-columns: 95px minmax(0, 1fr);
    width: 100%;
    height: 117px;
    min-height: 0;
    min-width: 0;
    max-width: none;
    flex: none;
    align-self: stretch;
    overflow: hidden;
    border-radius: 12px;
    scroll-snap-align: start;
  }
  .oros-marketplace-home .oros-home-collection__track > .product-card .product-card__picture {
    display: flex;
    width: 95px;
    height: 100%;
    aspect-ratio: auto;
    min-width: 0;
  }
  .oros-marketplace-home .oros-home-collection__track > .product-card .product-card__picture img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    padding: 4px;
    object-fit: contain;
  }
  .oros-marketplace-home .oros-home-collection__track > .product-card .product-card__pill { display: none; }
  .oros-marketplace-home .oros-home-collection__track > .product-card .product-card__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    gap: 3px;
    padding: 7px 7px 6px;
  }
  .oros-marketplace-home .oros-home-collection__track > .product-card .product-card__name {
    margin: 0;
    min-height: 0;
    font-size: .69rem;
    line-height: 1.25;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
  .oros-marketplace-home .oros-home-collection__track > .product-card .product-card__prices {
    display: flex;
    align-items: baseline;
    gap: 2px 5px;
    flex-wrap: wrap;
  }
  .oros-marketplace-home .oros-home-collection__track > .product-card .product-card__prices strong { font-size: .82rem; }
  .oros-marketplace-home .oros-home-collection__track > .product-card .product-card__prices del { font-size: .57rem; }
  .oros-marketplace-home .oros-home-collection__track > .product-card .product-card__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 5px;
    margin-top: auto;
  }
  .oros-marketplace-home .oros-home-collection__track > .product-card .product-card__stock,
  .oros-marketplace-home .oros-home-collection__track > .product-card .product-card__discount { font-size: .56rem; }
  .oros-marketplace-home .oros-home-collection__track > .product-card .product-card__discount { padding: 2px 4px; }

  /* Product page: readable compact breadcrumbs and detail hierarchy. */
  .product-detail-page .product-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 5px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    margin: 1px 0 12px;
    padding: 7px 9px;
    border: 1px solid #eee2d0;
    border-radius: 9px;
    background: #fffaf1;
    font-size: .69rem;
    line-height: 1.3;
    white-space: nowrap;
  }
  .product-detail-page .product-breadcrumb > a {
    min-width: 0;
    max-width: 31%;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 0 1 auto;
    color: #79551b;
  }
  .product-detail-page .product-breadcrumb > a:first-child { flex-shrink: 0; }
  .product-detail-page .product-breadcrumb > span:not(#breadcrumb-product) { flex-shrink: 0; }
  .product-detail-page .product-breadcrumb #breadcrumb-product {
    display: block;
    flex: 1 1 30px;
    min-width: 28px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #514635;
  }
  .product-detail-page .product-breadcrumb [hidden] { display: none !important; }
  .product-detail-page .product-detail-shell { gap: 13px; }
  .product-detail-page .product-detail-copy { padding: 2px 0; }
  .product-detail-page .product-detail-category { margin-bottom: 5px; font-size: .65rem; }
  .product-detail-page .product-detail-copy h1 {
    font-size: clamp(1.25rem, 4.4vw, 1.5rem);
    line-height: 1.28;
    letter-spacing: -.012em;
    overflow-wrap: anywhere;
  }
  .product-detail-page .product-detail-description {
    margin: 9px 0 11px;
    font-size: .83rem;
    line-height: 1.45;
  }
  .product-detail-page .product-price-row { padding: 10px 0; gap: 7px; }
  .product-detail-page .product-price-row strong { font-size: 1.2rem; }
  .product-detail-page .product-promise {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 3px;
    margin: 10px 0 12px;
    min-width: 0;
  }
  .product-detail-page .product-promise span {
    min-width: 0;
    white-space: nowrap;
    font-size: clamp(7.5px, 2.2vw, 10px);
    line-height: 1.25;
    padding: 6px 3px;
    border-radius: 99px;
  }
  .product-detail-page .variant-select-wrap { margin: 12px 0; }
  .product-detail-page .product-stock-state { margin-top: 10px; }
  .product-detail-page .product-cart-actions {
    display: grid;
    grid-template-columns: 60px minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 7px;
    margin-top: 13px;
  }
  .product-detail-page .product-cart-actions label,
  .product-detail-page .product-cart-actions input,
  .product-detail-page .product-cart-actions .btn { min-width: 0; width: 100%; }
  .product-detail-page .product-cart-actions input {
    height: 44px;
    padding: 7px 4px;
    border: 1px solid #d9c49a;
    border-radius: 9px;
    text-align: center;
    font-size: 16px;
  }
  .product-detail-page .product-cart-actions .btn {
    min-height: 44px;
    padding: 8px 4px;
    font-size: .74rem;
    white-space: nowrap;
  }
  .product-detail-page .product-continue { margin-top: 12px; }
}
@media (max-width: 350px) {
  .product-detail-page .product-cart-actions {
    grid-template-columns: 48px minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 5px;
  }
  .product-detail-page .product-cart-actions .btn { font-size: .68rem; }
  .product-detail-page .product-promise span { padding-inline: 2px; font-size: 7.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .oros-marketplace-home .oros-home-collection__track { scroll-behavior: auto; }
}
