/**
 * BASE Products Display - CSS
 */

/* コンテナ */
.base-products-container {
    display: grid !important;
    gap: 20px !important;
    margin: 20px 0 !important;
    padding: 0 !important;
}

/* 自動挿入されるpタグやbrタグをリセット */
.base-products-container > p,
.base-products-container > br {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
}

.base-products-container::before,
.base-products-container::after {
    display: none !important;
}

/* 列数の設定 */
.base-products-container[data-columns="1"] {
    grid-template-columns: repeat(1, 1fr) !important;
}

.base-products-container[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr) !important;
}

.base-products-container[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr) !important;
}

.base-products-container[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr) !important;
}

.base-products-container[data-columns="5"] {
    grid-template-columns: repeat(5, 1fr) !important;
}

.base-products-container[data-columns="6"] {
    grid-template-columns: repeat(6, 1fr) !important;
}

/* レスポンシブ対応 */
@media screen and (max-width: 1024px) {
    .base-products-container[data-columns="5"],
    .base-products-container[data-columns="6"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media screen and (max-width: 768px) {
    .base-products-container[data-columns="3"],
    .base-products-container[data-columns="4"],
    .base-products-container[data-columns="5"],
    .base-products-container[data-columns="6"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media screen and (max-width: 480px) {
    .base-products-container {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}

/* 商品カード */
.base-product-item {
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
}

.base-product-item:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
}

/* 商品画像 */
.base-product-image-wrapper {
    position: relative !important;
    width: 100% !important;
    padding-top: 100% !important;
    overflow: hidden !important;
    background: #f5f5f5 !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

.base-product-image-wrapper a {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.base-product-image {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
}

/* 商品コンテンツ */
.base-product-content {
    padding: 15px !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    gap: 8px !important;
    margin: 0 !important;
}

/* 商品タイトル */
.base-product-title {
    font-size: 16px !important;
    font-weight: bold !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}

.base-product-title a {
    color: #333 !important;
    text-decoration: none !important;
}

.base-product-title a:hover {
    color: #0073aa !important;
}

/* 商品説明 */
.base-product-description {
    font-size: 14px !important;
    color: #666 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.6 !important;
}

/* 価格 */
.base-product-price {
    font-size: 18px !important;
    font-weight: bold !important;
    color: #e53935 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.base-product-proper-price {
    font-size: 14px !important;
    color: #999 !important;
    text-decoration: line-through !important;
    margin-left: 10px !important;
}

/* 在庫 */
.base-product-stock {
    font-size: 12px !important;
    color: #666 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ボタン */
.base-product-button {
    display: block !important;
    width: 100% !important;
    padding: 10px !important;
    background: #0073aa !important;
    color: #fff !important;
    text-align: center !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    margin-top: auto !important;
    margin-bottom: 0 !important;
    transition: background 0.3s ease !important;
    border: none !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}

.base-product-button:hover {
    background: #005a87 !important;
    color: #fff !important;
    text-decoration: none !important;
}

/* エラーメッセージ */
.base-products-error {
    padding: 15px !important;
    background: #ffebee !important;
    border: 1px solid #ef5350 !important;
    border-radius: 4px !important;
    color: #c62828 !important;
    margin: 20px 0 !important;
}

/* 空メッセージ */
.base-products-empty {
    padding: 30px !important;
    text-align: center !important;
    background: #f5f5f5 !important;
    border-radius: 4px !important;
    color: #666 !important;
    margin: 20px 0 !important;
}

/* ページネーション */
.base-products-pagination {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 30px 0 20px 0 !important;
    padding: 20px 0 !important;
    flex-wrap: wrap !important;
}

.base-page-link {
    display: inline-block !important;
    padding: 8px 12px !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    color: #333 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    min-width: 40px !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

.base-page-link:hover {
    background: #0073aa !important;
    color: #fff !important;
    border-color: #0073aa !important;
    text-decoration: none !important;
}

.base-page-link.base-page-current {
    background: #0073aa !important;
    color: #fff !important;
    border-color: #0073aa !important;
    font-weight: bold !important;
    cursor: default !important;
}

.base-page-link.disabled {
    background: #f5f5f5 !important;
    color: #999 !important;
    border-color: #ddd !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.base-page-prev,
.base-page-next {
    font-weight: bold !important;
}

.base-page-dots {
    padding: 8px 4px !important;
    color: #999 !important;
}

/* エラーメッセージ */
.base-products-error {
    padding: 15px;
    background: #ffebee;
    border: 1px solid #ef5350;
    border-radius: 4px;
    color: #c62828;
    margin: 20px 0;
}

/* 空メッセージ */
.base-products-empty {
    padding: 30px;
    text-align: center;
    background: #f5f5f5;
    border-radius: 4px;
    color: #666;
    margin: 20px 0;
}
