/* V7 静态精修：仅在 Products 与七个产品类别页入队。 */

/* Products：同一行的无图卡与有图卡齐底，不制造空媒体容器。 */
@media (min-width: 700px) {
  body.ff-site main.products-hero #product-browser .product-grid > .product-card:not(:has(.ff-media)) {
    align-self: stretch;
    padding-top: 0;
  }

  body.ff-site main.products-hero #product-browser .product-grid > .product-card:not(:has(.ff-media)) .ff-card__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* Home Fragrance：横向场景图填满媒体列；其他瓶型图沿用 contain。 */
@media (min-width: 1024px) {
  body.ff-site main.hf-home #reed-diffuser .hf-product-image img {
    object-fit: cover !important; /* 图片已有内联 object-fit。 */
  }
}

@media (max-width: 600px) {
  /* Products 分类入口只调整本页七项导航。 */
  body.ff-site main.products-hero #product-browser .category-tabs--seven {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.ff-site main.products-hero #product-browser .category-tabs--seven > a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 56px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.3;
    text-align: center;
  }

  body.ff-site main.products-hero #product-browser .category-tabs--seven > a:last-child {
    grid-column: 1 / -1;
  }

  /* Personal Fragrance：图片在上、完整文案在下，保持图像自然比例。 */
  body.ff-site main.pf-page #fragrance-formats .pf-product-card {
    display: flex;
    flex-direction: column;
  }

  body.ff-site main.pf-page #fragrance-formats .pf-product-image {
    width: 100%;
    height: 260px;
    aspect-ratio: auto;
  }

  body.ff-site main.pf-page #fragrance-formats .pf-product-image img {
    object-fit: contain !important; /* 图片已有内联 object-fit。 */
  }

  body.ff-site main.pf-page #fragrance-formats .pf-product-copy {
    width: 100%;
  }

  /* 七个类别末尾 RFQ：保留原有 DOM 与阅读顺序，仅收紧垂直节奏。 */
  body.ff-site main:is(.pf-page, .bb-page, .ff-hair, .hf-home, .ff-fabric, .ff-car, .ff-freshness)
    :is(.pf-final, .bb-final, .hc-final, .hf-final, .fl-final, .cr-final, .fr-final) {
    padding-block: 48px;
  }

  body.ff-site main:is(.pf-page, .bb-page, .ff-hair, .hf-home, .ff-fabric, .ff-car, .ff-freshness)
    :is(.pf-final, .bb-final, .hc-final, .hf-final, .fl-final, .cr-final, .fr-final) .ff-sampling-layout {
    margin-block: 16px 0;
    row-gap: 16px;
  }

  body.ff-site main:is(.pf-page, .bb-page, .ff-hair, .hf-home, .ff-fabric, .ff-car, .ff-freshness)
    :is(.pf-final, .bb-final, .hc-final, .hf-final, .fl-final, .cr-final, .fr-final) .ff-sampling-steps h3 {
    margin-bottom: 10px;
  }

  body.ff-site main:is(.pf-page, .bb-page, .ff-hair, .hf-home, .ff-fabric, .ff-car, .ff-freshness)
    :is(.pf-final, .bb-final, .hc-final, .hf-final, .fl-final, .cr-final, .fr-final) .ff-sampling-steps > p {
    margin-bottom: 12px;
  }

  body.ff-site main:is(.pf-page, .bb-page, .ff-hair, .hf-home, .ff-fabric, .ff-car, .ff-freshness)
    :is(.pf-final, .bb-final, .hc-final, .hf-final, .fl-final, .cr-final, .fr-final) .ff-sampling-steps ol {
    margin-top: 12px;
    gap: 12px;
  }

  body.ff-site main:is(.pf-page, .bb-page, .ff-hair, .hf-home, .ff-fabric, .ff-car, .ff-freshness)
    :is(.pf-final, .bb-final, .hc-final, .hf-final, .fl-final, .cr-final, .fr-final) .ff-sampling-steps li {
    padding-left: 40px;
  }

  body.ff-site main:is(.pf-page, .bb-page, .ff-hair, .hf-home, .ff-fabric, .ff-car, .ff-freshness)
    :is(.pf-final, .bb-final, .hc-final, .hf-final, .fl-final, .cr-final, .fr-final) .ff-sampling-steps li::before {
    width: 28px;
    height: 28px;
  }

  body.ff-site main:is(.pf-page, .bb-page, .ff-hair, .hf-home, .ff-fabric, .ff-car, .ff-freshness)
    :is(.pf-final, .bb-final, .hc-final, .hf-final, .fl-final, .cr-final, .fr-final) .ff-sampling-steps h4 {
    font-size: 16px;
    line-height: 1.35;
    margin-bottom: 4px;
  }

  body.ff-site main:is(.pf-page, .bb-page, .ff-hair, .hf-home, .ff-fabric, .ff-car, .ff-freshness)
    :is(.pf-final, .bb-final, .hc-final, .hf-final, .fl-final, .cr-final, .fr-final) .ff-sampling-steps li p {
    font-size: 15px;
    line-height: 1.5;
  }
}
