/* Preorder series photos must show the entire package, including landscape shots. */
html body .product-card.product-card.product-card--preorder {
    min-height: 0 !important;
}
html body .product-card.product-card.product-card--preorder .product-card-media,
html body .product-card.product-card.product-card--preorder .product-thumb-link,
html body .product-card.product-card.product-card--preorder .product-thumb {
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 4 / 3 !important;
}
html body .product-card.product-card.product-card--preorder .product-thumb img {
    object-fit: contain !important;
    aspect-ratio: auto !important;
}
/* The supplied Dong Ding series photos are portrait 4:5, not the old landscape sample. */
html body .product-card.product-card.product-card--preorder[data-id^="competition-dong-ding-"] .product-card-media,
html body .product-card.product-card.product-card--preorder[data-id^="competition-dong-ding-"] .product-thumb-link,
html body .product-card.product-card.product-card--preorder[data-id^="competition-dong-ding-"] .product-thumb {
    aspect-ratio: 4 / 5 !important;
}
html body .product-card.product-card.product-card--preorder .product-info {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    padding: 14px 12px !important;
    height: auto !important;
    gap: 12px !important;
}
html body .product-card.product-card.product-card--preorder .product-title {
    min-height: 0 !important;
    height: auto !important;
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
    font-size: 17px !important;
    line-height: 1.35 !important;
}
html body .product-card.product-card.product-card--preorder .product-title a {
    display: block !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
}
html body .product-card.product-card.product-card--preorder .product-footer {
    margin-top: auto !important;
    padding-top: 8px !important;
}
html body .product-image-caption {
    margin: 0;
    padding: 8px 12px;
    color: #607267;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}
html body .product-stock-block--preorder {
    display: grid;
    gap: 5px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--brand-accent);
    color: #1e3a2b;
}
html body .product-stock-block--preorder p {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
}
@media (max-width: 768px) {
    html body .product-card.product-card.product-card--preorder .product-title {
        font-size: 14px !important;
    }
}

/* Shared product-photo framing for every public page and viewport.
   Only previews are cropped; the full-screen viewer keeps the original image. */
html body .product-card.product-card .product-thumb {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
    background: #ffffff !important;
}

html body .product-card.product-card .product-thumb img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    object-fit: cover !important;
    object-position: center !important;
    /* Cover already fills the frame; legacy pottery zoom would crop it twice. */
    transform: none !important;
    background: #ffffff !important;
}

html body .product-page .product-gallery .product-main-image,
html body .product-gallery-thumbnail img,
html body .cart-item-image img,
html body .opt-cart-item-image img {
    display: block;
    object-fit: cover !important;
    object-position: center !important;
    background: #ffffff !important;
}

html body .product-main-image-stage,
html body .product-gallery-thumbnail,
html body .cart-item-image,
html body .opt-cart-item-image {
    background: #ffffff;
}

/* Tea photos keep their original frame below a separate badge/favorite row.
   Normal flow also reserves enough room when a long badge wraps. */
html body .product-card.product-card .product-card-toolbar {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    min-height: 56px;
    padding: 6px 7px;
    background: #ffffff;
}

html body .product-card.product-card .product-card-toolbar .product-badge-group {
    position: static !important;
    flex: 1 1 0;
    min-width: 0;
    max-width: none !important;
    gap: 4px;
}

html body .product-card.product-card .product-card-toolbar .product-badge {
    max-width: 100%;
    overflow-wrap: anywhere;
}

html body .product-card.product-card .product-card-toolbar .product-favorite-btn {
    position: static !important;
    flex: 0 0 auto;
    margin-left: auto;
}
