.cpc-comparison-wrapper {
    margin: 20px 0;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    background: #fff;
    width: 100%;
}


.cpc-comparison-wrapper h3 {
    padding: 15px;
    margin: 0;
    background: #f7f7f7;
    border-bottom: 1px solid #e1e1e1;
    font-size: 18px;
    text-align: center; /* Centered Title */
}


/* Main Price Wrapper */
.cpc-main-price-wrap {
    display: inline-flex;
    align-items: center;
    gap: 15px;
}
.cpc-main-price-wrap .cpc-best-price-label {
    margin-right: 5px;
    font-weight: bold;
    color: #555; /* Unified */
    font-size: 1.5em; /* Increased size */
}

/* Custom Meta */
.cpc-product-meta-custom {
    margin: 10px 0;
    font-size: 0.9em;
    color: #555;
}
.cpc-product-meta-custom a {
    color: #555;
    text-decoration: none;
}
.cpc-main-price-wrap .woocommerce-Price-amount {
    font-size: 1.5em; /* Increased size for price */
    font-weight: bold;
}

/* Trend Tab */
.cpc-trend-tab-content {
    background: #fff;
    padding: 20px;
    border: 1px solid #eee;
    margin-top: 10px;
}

/* Sparkline */
.cpc-sparkline-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    background: #fcfcfc;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    padding: 0; /* No padding for full fill */
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    height: 30px; /* Reduced from 40px */
    width: 80px; /* Reduced from 110px */
    overflow: hidden; /* Ensure canvas doesn't bleed */
}

/* Loop Prices */
.cpc-loop-prices {
    margin-top: 10px;
    font-size: 0.9em;
    border-top: 1px solid #eee;
    padding-top: 5px;
}
.cpc-loop-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.cpc-loop-shop {
    flex: 0 0 35%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cpc-loop-logo {
    max-height: 20px;
    vertical-align: middle;
}
.cpc-loop-name {
    font-weight: normal; /* Removed bold */
    color: #555; /* Gray */
}
.cpc-loop-price-col {
    flex: 0 0 40%;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.cpc-loop-diff-col {
    flex: 0 0 25%;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.cpc-loop-price {
    font-weight: bold;
    color: #555; /* Unified to Product Name Color */
    font-size: 0.9em;
}
.cpc-loop-diff {
    font-size: 0.8em;
    color: #555; /* Unified */
    margin-left: 2px;
}
.cpc-loop-diff.best {
    color: #555; /* Unified */
    font-weight: bold;
}

/* Diff Labels */
.cpc-diff-label {
    font-size: 0.8em;
    color: #555; /* Unified */
    margin-left: 5px;
    font-weight: normal;
}
.cpc-diff-label.best {
    color: #555; /* Unified */
    font-weight: bold;
}

/* Common Styles */
.cpc-table-header { display: none; }
.cpc-table-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}
.cpc-table-row:last-child { border-bottom: none; }

/* Columns - 30-40-30 Layout */
.cpc-col-shop { flex: 0 0 30%; display: flex; align-items: center; }
.cpc-col-price-group { 
    flex: 0 0 40%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
}
.cpc-col-action-group { 
    flex: 0 0 30%; 
    display: flex; 
    align-items: center; 
    justify-content: flex-end; 
    gap: 15px; 
}
/* Inner Column Resets */
.cpc-col-price { text-align: right; font-weight: bold; color: #555; }
.cpc-col-diff { text-align: left; font-size: 0.9em; }
.cpc-col-ship { text-align: right; color: #555; font-size: 0.9em; }
.cpc-col-action { text-align: right; }

/* Logo Sizing */
.cpc-shop-logo {
    max-height: 1.5em;
    max-width: 100px;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}
.cpc-shop-name { font-weight: 500; }

/* Button */
.cpc-buy-btn {
    padding: 5px 15px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .cpc-table-header { display: none; }
    .cpc-table-row { flex-wrap: wrap; padding: 15px; }
    .cpc-col-shop { flex: 0 0 100%; margin-bottom: 5px; }
    .cpc-col-price-group, .cpc-col-action-group { flex: 0 0 100%; justify-content: space-between; margin-bottom: 5px; }
}

/* Loop Main Price Wrapper Override */
.cpc-loop-main-price {
    width: 100%;
    justify-content: flex-start;
    gap: 3px !important; /* Reduced spacing */
}
.cpc-loop-main-price .cpc-best-price-label {
    font-size: 1.1em;
    font-weight: bold;
    color: #555; /* Unified to Product Name Color */
    margin-right: 2px;
}
.cpc-loop-main-price .woocommerce-Price-amount {
    font-size: 1.1em; /* Slightly larger */
    font-weight: bold;
    color: #555; /* Unified to Product Name Color */
}
.cpc-loop-main-price .cpc-sparkline-wrap {
    height: 20px;
    width: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0;
    margin-left: auto; /* Alignment to Right */
}

/* Enhanced Product Card in Loop */
.woocommerce ul.products li.product {
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 15px !important; /* Force padding */
    background: #fff;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.woocommerce ul.products li.product:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: #d1d1d1;
}

/* Loop Prices Adjustments */
.cpc-loop-prices {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
}
