/* --- Core Web Vitals Optimization --- */
.ahamo-wari-container { contain: content; }
.device-thumb { 
    width: 60px; height: 60px; aspect-ratio: 1 / 1; 
    object-fit: contain; display: block; background-color: #f7f7f7; 
}

/* --- UI Components --- */
.ahamo-wari-container .ahamo-badge { padding: 4px 8px; border-radius: 4px; color: #fff; font-size: 85%; display: inline-block; white-space: nowrap; line-height: 1.2; }
.ahamo-wari-container .ahamo-badge.mnp { background-color: #ff5722; }
.ahamo-wari-container .ahamo-badge.new { background-color: #4caf50; }

.ahamo-filter-buttons { display: flex; gap: 10px; margin-bottom: 10px; }
.filter-btn { flex: 1; padding: 8px; border: 1px solid #ccc; background-color: #f9f9f9; border-radius: 4px; cursor: pointer; font-weight: bold; transition: background 0.2s; color: #666; }
.filter-btn.active { background-color: var(--color_htag, #ff9b9b); color: #ffffff; border-color: var(--color_htag, #ff9b9b); }

.ahamo-search-box input { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; font-size: 16px; }

/* --- Table Styles --- */
#ahamo_list_table thead th { background: var(--color_htag, #f9f9f9); text-align: center !important; }
#ahamo_list_table th, #ahamo_list_table td { vertical-align: middle; }
.center-align { text-align: center !important; }

.device-wrapper { display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.device-name-box { display: flex; flex-direction: column; gap: 4px; }

.device-main-name, .device-capacity { 
    font-weight: bold; line-height: 1.4; display: block; 
    word-break: keep-all; overflow-wrap: anywhere; font-size: 17px; color: inherit; 
}
.discount-text { font-size: 18px; font-weight: bold; color: #333; }

.sp-contract-label { display: none; }
.pc-only-col { display: table-cell; }

@media screen and (min-width: 601px) {
    .device-wrapper { justify-content: flex-start; text-align: left; }
    .device-name-box { align-items: flex-start; }
}

@media screen and (max-width: 600px) {
    .pc-only-col { display: none; }
    .sp-contract-label { display: block; margin-bottom: 4px; }
    #ahamo_list_table th, #ahamo_list_table td { padding: 15px 5px; }
    .device-wrapper { flex-direction: column; gap: 10px; }
    .device-thumb { width: 55px; height: 55px; }
    .device-main-name, .device-capacity { font-size: 16px; }
    #ahamo_list_table th.device-name-cell { width: 55%; }
}