/* Shared catalogue cards. Product detail text is intentionally outside this scope. */
#container .sct_li .sct_txt > a,
#container .sct_li a.sct_txt,
#container #sct .sct_li .sct_txt > a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    box-sizing: content-box;
    width: auto;
    min-width: 0;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
    letter-spacing: 0;
    word-spacing: 0;
    word-break: keep-all;
    overflow-wrap: anywhere;
    text-align: left;
    color: #333;
}

#container .sct_li .sct_basic {
    display: none !important;
}

#container .sct_li .sct_txt,
#container .sct_li .sct_txt_wr {
    min-width: 0;
}

#container .sct_li .sct_cost,
#container #sct .sct_li .sct_cost {
    min-height: 22px;
    margin-top: 8px;
    margin-bottom: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 22px;
}

#container .sct_li .sct_cost .sct_discount {
    font-size: 12px;
    font-weight: 400;
}

/* Keep gallery rows aligned when product names or badges differ. */
#container #sct > .con_right > .sct_10 {
    row-gap: 28px;
}

#container #sct > .con_right > .sct_10 > .sct_li > .sct_txt {
    padding-top: 14px;
}

#container #sct > .con_right .sct_txt > .sct_icon {
    min-height: 22px;
    margin-top: 8px;
    line-height: 18px;
}

/* Mobile image badges stay inside the square, without an empty badge row. */
#container .sct_li .sct_img > a {
    display: block;
    position: relative;
}

#container #sct_wrap .sct_li .sct_img {
    margin-bottom: 0;
}

#container #sct_wrap .sct_li .sct_icon_wr {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    display: block;
    height: auto;
    margin: 0;
    line-height: 18px;
    text-align: left;
}

#container #sct_wrap .sct_li .sct_icon {
    margin: 0;
}

#container #sct_wrap.sct_10 .sct_txt {
    margin: 12px 0 0;
}

/* Separate explicit factory and shipping labels from the two-line product name. */
#container .sct_li .sct_txt > a.oerep-catalog-name,
#container .sct_li a.sct_txt.oerep-catalog-name,
#container #sct .sct_li .sct_txt > a.oerep-catalog-name {
    display: block;
    -webkit-line-clamp: unset;
    height: auto;
    min-height: 68px;
    max-height: none;
    overflow: visible;
}

#container .sct_li .oerep-catalog-tags {
    display: flex;
    align-items: flex-start;
    align-content: flex-start;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 20px;
    margin-bottom: 6px;
}

#container .sct_li .oerep-catalog-tag {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    max-width: 100%;
    height: 20px;
    padding: 0 6px;
    border: 1px solid #dcdfe2;
    border-radius: 3px;
    background: #f4f5f6;
    color: #4b5157;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    letter-spacing: 0;
    white-space: nowrap;
}

#container .sct_li .oerep-catalog-tag--domestic {
    border-color: #c9ded4;
    background: #eef6f1;
    color: #276348;
}

#container .sct_li .oerep-catalog-tag--overseas {
    border-color: #cbd9e9;
    background: #eff4fb;
    color: #365f8b;
}

#container .sct_li .oerep-catalog-product-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    height: 42px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

/* Reserve the same badge space for narrower cards, including unlabelled items. */
@media (max-width: 639px) {
    #container .sct_best.oerep-has-delivery-tags .oerep-catalog-tags,
    #container .srl_10.oerep-has-delivery-tags .oerep-catalog-tags {
        min-height: 44px;
    }
}

@media (max-width: 359px) {
    #container .oerep-has-delivery-tags .oerep-catalog-tags {
        min-height: 44px;
    }
}
