/* ==========================================================================
   AIWEB compatibility exceptions — 2026-09-12
   Keep this file tiny. `!important` is allowed here only when normal cascade
   cannot solve the problem (inline style / hidden state / third-party widget).
   ========================================================================== */

/* HTML hidden must win even when a component has display:flex/block. */
[hidden] { display: none !important; }

/* Tab/plugin code can leave inline padding/margin on product boxes. */
body #goods_info .box[style] {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* LINE share widget injects/ships an explicit height; normalize the real content box. */
body .goods-share-bar .goods-share-line-wrap .line-it-button,
body .goods-share-bar .goods-share-line-wrap iframe {
    height: 20px !important;
    max-height: none !important;
    max-width: 100% !important;
}

/* Rich-text editor can save an inline fixed height; responsive width alone would distort. */
body .article_content img,
body .product_description img {
    max-width: 100%;
    height: auto !important;
}


/* Mobile catalog polish — prevent narrow cards / vertical-stacked names on category-like pages. */
@media screen and (max-width: 768px) {
    body#page_category ul.product-grid,
    body#page_search ul.product-grid,
    body#page_brand ul.product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    body#page_category ul.product-grid > li.product-card,
    body#page_search ul.product-grid > li.product-card,
    body#page_brand ul.product-grid > li.product-card {
        width: auto;
        min-width: 0;
        margin: 0;
    }

    body#page_category li.product-card .product-image-container,
    body#page_search li.product-card .product-image-container,
    body#page_brand li.product-card .product-image-container {
        padding-top: 92%;
    }

    body#page_category li.product-card .product-info,
    body#page_search li.product-card .product-info,
    body#page_brand li.product-card .product-info {
        padding: 12px 10px 14px;
        text-align: left;
    }

    body#page_category li.product-card .product-name,
    body#page_search li.product-card .product-name,
    body#page_brand li.product-card .product-name {
        height: auto;
        min-height: 2.9em;
        margin: 0 0 8px;
        line-height: 1.45;
    }

    body#page_category li.product-card .product-name a,
    body#page_search li.product-card .product-name a,
    body#page_brand li.product-card .product-name a {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        font-size: 16px;
        line-height: 1.45;
        word-break: break-word;
    }

    body#page_category li.product-card .product-price,
    body#page_search li.product-card .product-price,
    body#page_brand li.product-card .product-price {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 6px 10px;
        font-size: 18px;
    }

    body#page_category li.product-card .product-price del,
    body#page_search li.product-card .product-price del,
    body#page_brand li.product-card .product-price del {
        display: block;
        width: 100%;
        margin: 0;
        font-size: 13px;
    }

    body#page_category li.product-card .btn-collect-icon,
    body#page_search li.product-card .btn-collect-icon,
    body#page_brand li.product-card .btn-collect-icon {
        margin-left: auto;
        flex-shrink: 0;
        font-size: 18px;
        line-height: 1;
    }
}
