/* Focused regression fixes after the final product polish pass. */
.product-image-frame {
  display: block;
  padding: 0;
  background: transparent;
  overflow: hidden;
}

.product-card img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: none;
  border-radius: 0;
  object-fit: cover;
  object-position: center center;
}

.product-cart-controls {
  grid-template-columns: 1fr;
  row-gap: 12px;
}

.quantity-selector {
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 56px;
}

.quantity-selector :is([data-quantity-decrease], [data-quantity-increase]) {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  min-width: 56px;
  max-width: 56px;
  height: 56px;
  min-height: 56px;
  max-height: 56px;
  border: 0;
  border-radius: 0;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
  text-align: center;
  appearance: none;
}

.quantity-selector input {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 56px;
  min-height: 56px;
  padding: 0 8px;
  line-height: 56px;
}

.product-cart-controls .button {
  width: 100%;
  min-width: 0;
}

.cart-items {
  align-content: start;
}

.cart-item {
  align-self: start;
}

@media (max-width: 760px) {
  .product-image-frame {
    margin: 0;
    padding: 0;
    aspect-ratio: 4 / 3;
    width: 100%;
    border-radius: 0;
  }

  .product-card img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center center;
    transform: none;
  }

  .product-card:hover img,
  .product-card:focus-within img {
    transform: none;
  }

  .cart-drawer {
    gap: 12px;
    grid-template-rows: auto minmax(0, 1fr) auto auto auto auto;
  }

  .cart-items {
    gap: 8px;
    overflow-y: auto;
  }

  .cart-item {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 8px 10px;
    padding: 12px;
  }

  .cart-item-thumb {
    width: 48px;
    height: 48px;
  }

  .cart-item-body {
    gap: 8px;
  }

  .cart-item h4 {
    margin-bottom: 2px;
    font-size: 1.02rem;
    line-height: 1.22;
  }

  .cart-item p,
  .cart-item strong {
    margin-bottom: 2px;
    font-size: 0.88rem;
    line-height: 1.4;
  }

  .cart-item-actions {
    gap: 6px;
    margin-top: 0;
  }

  .cart-item-actions button {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 0.74rem;
  }

  .cart-item-actions span {
    min-width: 24px;
    font-size: 0.88rem;
  }
}
