.pbpc-compare-button {
    padding: 5px;
    font-weight: 700;
}

/* Match the button style when it's next to add to cart */
.single-product div.product form.cart .pbpc-compare-button {
    float: left;
    margin-left: 10px;
    height: 40px;
}

/* Match WooCommerce button hover state */
.pbpc-compare-button:hover {
    text-decoration: none;
    color: #515151;
}

/* Ensure proper alignment with quantity input */
.single-product div.product form.cart {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.single-product div.product form.cart .quantity {
    margin-right: 10px;
    float: none;
}

.single-product div.product form.cart .button {
    float: none;
}

.pbpc-comparison-table {
    margin: 20px 0;
    width: 100%;
    overflow-x: auto;
}

.pbpc-comparison-table table {
    width: 100%;
    border-collapse: collapse;
}

.pbpc-comparison-table th,
.pbpc-comparison-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: center;
}

.pbpc-comparison-table th {
    position: relative;
    padding: 15px 30px 15px 15px; /* Increased right padding for button */
    background-color: #f5f5f5;
}

/* Common styles for all remove/close buttons */
.pbpc-remove-compare-product {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff0000;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
}

.pbpc-remove-compare-product:hover {
    background: #cc0000;
    transform: scale(1.1);
}

/* Remove any previous button styles */
.pbpc-comparison-table th .pbpc-remove-compare-product:before {
    content: none;
}

/* Product title spacing */
.pbpc-comparison-table th .product-title {
    display: block;
    padding-right: 5px;
    font-weight: bold;
}

.pbpc-comparison-table td {
    padding: 15px;
    text-align: center;
    vertical-align: middle;
    border: 1px solid #ddd;
    width: 25%;
}

.pbpc-comparison-table tr:first-child td {
    padding: 15px;
    height: auto;
}

.pbpc-comparison-table img {
    max-width: 150px;
    height: auto;
}

.pbpc-floating-compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 999;
}

.pbpc-compare-bar-products {
    display: flex;
    gap: 15px;
}

.pbpc-compare-bar-product {
    position: relative;
    max-width: 60px;
    margin: 8px;
}

.pbpc-compare-bar-product img {
    width: 100%;
    height: auto;
}

.pbpc-compare-bar-product .pbpc-remove-compare-product {
    top: -8px;
    right: -8px;
}

.pbpc-comparison-table .cart {
    display: inline-block;
    margin-left: 10px;
}

.pbpc-comparison-table .button {
    margin: 5px;
    display: inline-block;
}

.pbpc-comparison-table .stock.out-of-stock {
    color: #ff0000;
    margin: 5px;
    display: inline-block;
}

.pbpc-comparison-table .rating-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.pbpc-comparison-table .star-rating {
    float: none;
    display: inline-block;
    margin: 0;
}

.pbpc-comparison-table .rating-count {
    color: #666;
    font-size: 0.9em;
    line-height: 1;
}

.pbpc-comparison-table .no-rating {
    color: #666;
    font-style: italic;
}

.pbpc-review-summary {
    text-align: left;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 4px;
}

.pbpc-rating-distribution {
    margin-bottom: 10px;
    text-align: center;
}

.pbpc-avg-rating {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
}

.pbpc-common-phrases {
    margin: 10px 0;
    font-size: 0.9em;
    line-height: 1.4;
}

.pbpc-phrases-label {
    color: #666;
    font-style: italic;
}

.pbpc-phrases {
    color: #333;
    font-weight: 500;
}

.pbpc-review-meta {
    font-size: 0.8em;
    color: #666;
    text-align: center;
    margin-top: 8px;
    border-top: 1px solid #eee;
    padding-top: 8px;
}

.pbpc-review-date {
    color: #999;
}

.pbpc-no-reviews {
    color: #666;
    font-style: italic;
    font-size: 0.9em;
    text-align: center;
    display: block;
}

.pbpc-notification {
    position: fixed;
    top: 32px;
    right: 20px;
    padding: 15px 25px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 999999;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.pbpc-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.pbpc-notification.success {
    border-left: 4px solid #4CAF50;
}

.pbpc-notification.error {
    border-left: 4px solid #f44336;
}

.pbpc-notification.warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffeeba;
}

.pbpc-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 1;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

.pbpc-badge.pbpc-top-rated {
    background-color: #4CAF50;
    color: white;
}

.pbpc-badge.pbpc-best-value {
    background-color: #2196F3;
    color: white;
}

.pbpc-badge + .pbpc-badge {
    top: 35px;
}

/* Product actions container */
.pbpc-product-actions {
    text-align: center;
    margin-top: 10px;
    min-height: 50px; /* Fixed height for actions container */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cart form */
.pbpc-product-actions .cart {
    display: inline-block;
    margin: 0;
    width: 100%;
}

/* All buttons and out of stock text */
.pbpc-product-actions .button,
.pbpc-product-actions .stock.out-of-stock {
    min-width: 120px;
    height: 40px;
    margin: 0;
    padding: 0 1em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    white-space: nowrap;
}

/* Out of stock message */
.pbpc-product-actions .stock.out-of-stock {
    color: #ff0000;
    border: 1px solid #ff0000;
    background: #fff;
    border-radius: 3px;
    margin: 0 auto;
}

/* Variable product button */
.pbpc-product-actions .button.alt {
    background-color: #ebe9eb;
    color: #515151;
}

.pbpc-product-actions .button.alt:hover {
    background-color: #dfdcde;
    color: #515151;
}

/* Ensure table cells have consistent height */
.pbpc-comparison-table tr:first-child td {
    height: auto;
    padding-bottom: 70px; /* Space for product actions */
}

/* Product image wrapper */
.pbpc-product-image-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
}

.pbpc-product-image-wrapper a {
    display: block;
    text-align: center;
}

.pbpc-product-image-wrapper img {
    max-width: 150px;
    max-height: 150px;
    width: auto;
    height: auto;
    display: inline-block;
    transition: opacity 0.3s ease;
}

.pbpc-product-image-wrapper a:hover img {
    opacity: 0.8;
}

/* Button group container */
.pbpc-button-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}


/* Match the button style when it's next to add to cart */
.single-product div.product form.cart .pbpc-button-group {
    float: left;
    margin-left: 10px;
}

/* Ensure proper alignment with quantity input */
.single-product div.product form.cart {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}



/* Products Overview */
.pbpc-products-overview {
    margin: 0 -30px 20px;
    padding: 20px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.pbpc-compared-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.pbpc-compared-product {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
}

.pbpc-product-number {
    display: none;
}

.pbpc-compared-product h3 {
    margin: 15px 0 10px;
    font-size: 1em;
    line-height: 1.3;
    color: #333;
    height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.pbpc-product-price {
    font-size: 1.2em;
    font-weight: 600;
    color: #2c3338;
    margin: 8px 0;
}

.pbpc-product-rating {
    margin: 8px 0;
    font-size: 0.9em;
}

.pbpc-rating-stars {
    color: #ffc107;
    letter-spacing: 2px;
    margin-right: 5px;
}

.pbpc-review-count {
    color: #666;
    font-size: 0.9em;
}

.pbpc-product-link {
    display: inline-block;
    padding: 6px 12px;
    background: #7952b3;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.9em;
    margin-top: 10px;
    transition: all 0.2s ease;
}

.pbpc-product-link:hover {
    background: #614092;
    color: #fff;
    transform: translateY(-1px);
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .pbpc-products-overview {
        margin: 0 -15px 20px;
        padding: 15px;
    }

    .pbpc-compared-products {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }

    .pbpc-compared-product {
        padding: 10px;
    }
}

.pbpc-recommended {
    position: relative;
    border: 2px solid #7952b3;
    box-shadow: 0 4px 8px rgba(121, 82, 179, 0.1);
}

.pbpc-recommended-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #7952b3;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1;
}

.pbpc-recommended .pbpc-product-link {
    background: #7952b3;
}

.pbpc-recommended .pbpc-product-link:hover {
    background: #614092;
}

/* Archive page button styles */
.pbpc-archive-button-group {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    justify-content: center;
}

/* Adjust button sizes for archive pages */
.pbpc-archive-button-group .pbpc-compare-button,
.pbpc-archive-button-group  {
    font-size: 0.9em;
    padding: 5px;
    min-width: 0;
}
.pbpc-compare-button .dashicons {
    font-size: 17px;
}

/* Make AI button more compact on archive pages */
.pbpc-archive-button-group {
    padding: 0 0.8em;
}

.pbpc-archive-button-group .pbpc-ai-icon {
    font-size: 14px;
}

/* Responsive adjustments for archive pages */
@media screen and (max-width: 768px) {
    .pbpc-archive-button-group {
        flex-direction: column;
        gap: 5px;
    }

    .pbpc-archive-button-group .pbpc-compare-button,
    .pbpc-archive-button-group {
        width: 100%;
    }
}

/* Ensure buttons don't overflow product cards */
.product-type-simple .pbpc-archive-button-group {
    clear: both;
    width: 100%;
}

/* Adjust spacing with other WooCommerce elements */
.woocommerce ul.products li.product .pbpc-archive-button-group {
    margin-bottom: 1em;
}

/* Fix button alignment in different themes */
.woocommerce-LoopProduct-link + .pbpc-archive-button-group {
    margin-top: 1em;
}

/* Ensure proper stacking with add to cart button */
.woocommerce ul.products li.product .button + .pbpc-archive-button-group {
    margin-top: 0.5em;
}

.pbpc-product-attributes {
    margin: 12px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9em;
}

.pbpc-attribute {
    margin: 4px 0;
    line-height: 1.4;
}

.pbpc-attribute-label {
    font-weight: 600;
    color: #555;
}

.pbpc-attribute-value {
    color: #666;
}

/* Adjust spacing for attributes */
.pbpc-compared-product .pbpc-product-link {
    margin-top: 8px;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .pbpc-product-attributes {
        padding: 8px;
        font-size: 0.85em;
    }
} 

