/**
 * BAOGAAO Custom Membership — Public CSS
 *
 * @package BCM
 */

/* =============================================
   共用元件
   ============================================= */

.bcm-badge-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 4px;
}

/* =============================================
   價格顯示
   ============================================= */

.bcm-price--member {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    line-height: 1.5;
}

.bcm-price__original {
    color: #999 !important;
    font-size: 0.85em;
    text-decoration: line-through;
}

.bcm-price__discounted {
    color: #e74c3c !important;
    font-weight: 700;
    font-size: 1.1em;
    text-decoration: none !important;
    background: none !important;
}

.bcm-price__badge {
    display: inline-block;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: 600;
    line-height: 1.4;
    vertical-align: middle;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

.bcm-price__savings {
    display: block;
    width: 100%;
    color: #27ae60;
    font-size: 0.8em;
    font-weight: 500;
    margin-top: 2px;
}

/* =============================================
   商品列表頁徽章
   ============================================= */

.bcm-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    line-height: 1.4;
}

.bcm-badge--restricted {
    background: #ffc107;
    color: #333;
}

.bcm-badge--discount {
    background: #27ae60;
    color: #fff;
}

.bcm-badge--restricted-btn {
    display: inline-block;
    padding: 6px 16px;
    background: #f0f0f0;
    color: #888;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    cursor: default;
}

/* 確保商品圖片容器是相對定位 */
.woocommerce ul.products li.product {
    position: relative;
}

/* =============================================
   購買限制提示
   ============================================= */

.bcm-restriction-notice {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-left: 4px solid #ffc107;
    padding: 16px 20px;
    border-radius: 0 4px 4px 0;
    margin: 16px 0;
}

.bcm-restriction-notice__icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.bcm-restriction-notice__message {
    font-size: 14px;
    color: #495057;
    margin-bottom: 8px;
    line-height: 1.6;
}

.bcm-restriction-notice__cta {
    margin-top: 8px;
}

.bcm-restriction-notice__cta a {
    display: inline-block;
    padding: 6px 16px;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

.bcm-restriction-notice__cta a:hover {
    background: #135e96;
    color: #fff;
}

/* =============================================
   我的帳號 — 會員資訊
   ============================================= */

.bcm-account-membership {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.bcm-account-membership h3 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px 0;
    font-size: 15px;
    color: #333;
}

.bcm-account-membership h3 .dashicons {
    color: #2271b1;
}

.bcm-account-level {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
}

.bcm-account-level .bcm-badge-dot {
    width: 16px;
    height: 16px;
}

.bcm-account-level-desc {
    color: #666;
    font-size: 13px;
}

.bcm-account-since {
    color: #888;
    font-size: 13px;
    margin: 6px 0 0 0;
}

.bcm-account-no-level {
    color: #888;
    font-style: italic;
}

/* =============================================
   響應式
   ============================================= */

@media (max-width: 768px) {
    .bcm-price--member {
        gap: 4px;
    }

    .bcm-price__badge {
        font-size: 0.65em;
        padding: 1px 6px;
    }

    .bcm-restriction-notice {
        padding: 12px 16px;
    }
}
