:root {
    --psm-primary-color: #2fb5d2;
    --psm-secondary-color: #7a7a7a;
    --psm-success-color: #4cbb6c;
    --psm-warning-color: #f39c12;
    --psm-danger-color: #e00038;
    --psm-info-color: #3498db;
    
    --psm-table-bg: #ffffff;
    --psm-table-border: #dee2e6;
    --psm-row-odd-bg: #f8f9fa;
    --psm-row-even-bg: #ffffff;
    --psm-highlight-color: #87ceeb;

    --psm-btn-bg: #2fb5d2;
    --psm-btn-text: #ffffff;
    --psm-btn-border: #2fb5d2;
    --psm-btn-hover-bg: #248a9f;
    --psm-btn-hover-text: #ffffff;
    --psm-btn-hover-border: #248a9f;
    
    --psm-spacing-xs: 0.25rem;
    --psm-spacing-sm: 0.5rem;
    --psm-spacing-md: 1rem;
    --psm-spacing-lg: 1.5rem;
    --psm-spacing-xl: 2rem;
    
    --psm-border-radius: 4px;
    --psm-border-radius-lg: 8px;
    
    --psm-transition-fast: 150ms ease-in-out;
    --psm-transition-normal: 300ms ease-in-out;
}

.psm-compare-btn-wrapper {
    display: inline-block;
    position: relative;
}

.psm-compare-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--psm-spacing-xs);
    padding: var(--psm-spacing-sm) var(--psm-spacing-md);
    background-color: var(--psm-btn-bg);
    color: var(--psm-btn-text);
    border: 1px solid var(--psm-btn-border);
    border-radius: var(--psm-border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--psm-transition-fast);
    text-decoration: none;
}

.psm-compare-add-btn:hover,
.psm-compare-add-btn:focus {
    background-color: var(--psm-btn-hover-bg);
    color: var(--psm-btn-hover-text);
    border-color: var(--psm-btn-hover-border);
    text-decoration: none;
}

.psm-compare-add-btn:focus {
    outline: 2px solid var(--psm-primary-color);
    outline-offset: 2px;
}

.psm-compare-add-btn.added,
.psm-compare-add-btn.active {
    background-color: var(--psm-success-color);
    border-color: var(--psm-success-color);
    color: #ffffff;
}

.psm-compare-add-btn.added:hover {
    background-color: #3ea55c;
    border-color: #3ea55c;
}

.psm-compare-add-btn.loading {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

.psm-compare-add-btn .psm-compare-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.psm-compare-add-btn.psm-compare-btn-icon {
    padding: var(--psm-spacing-sm);
    min-width: 36px;
    min-height: 36px;
}

.psm-compare-add-btn.psm-compare-btn-icon .psm-compare-btn-text {
    display: none;
}

.psm-compare-add-btn.psm-compare-btn-text-icon .psm-compare-icon {
    margin-right: var(--psm-spacing-xs);
}

.psm-compare-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background-color: var(--psm-danger-color);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 10px;
    line-height: 1;
}

.psm-compare-count:not(.has-items) {
    display: none;
}

.psm-compare-nav-link {
    display: inline-flex;
    align-items: center;
    gap: var(--psm-spacing-xs);
}

.psm-compare-nav-link .psm-compare-count {
    margin-left: var(--psm-spacing-xs);
}

.psm-compare-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    overflow-x: hidden;
    overflow-y: auto;
}

.psm-compare-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.psm-compare-modal-dialog {
    position: relative;
    max-width: 95%;
    width: 1200px;
    margin: var(--psm-spacing-xl) auto;
    pointer-events: none;
}

.psm-compare-modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 4rem);
    background-color: #ffffff;
    border-radius: var(--psm-border-radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
}

.psm-compare-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--psm-spacing-md) var(--psm-spacing-lg);
    border-bottom: 1px solid #dee2e6;
}

.psm-compare-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.psm-compare-close-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    border-radius: var(--psm-border-radius);
    transition: all var(--psm-transition-fast);
}

.psm-compare-close-modal:hover {
    background-color: #f0f0f0;
    color: #333;
}

.psm-compare-modal-body {
    flex: 1;
    padding: var(--psm-spacing-lg);
    overflow-y: auto;
}

.psm-compare-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--psm-spacing-sm);
    padding: var(--psm-spacing-md) var(--psm-spacing-lg);
    border-top: 1px solid #dee2e6;
}

body.psm-compare-modal-open {
    overflow: hidden;
}

.psm-cmp-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.psm-cmp-header {
    text-align: center;
    padding: 2rem 0 1.5rem;
    margin-bottom: 1.5rem;
}

.psm-cmp-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.psm-cmp-title .material-icons {
    font-size: 2.5rem;
}

.psm-cmp-subtitle {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
}

.psm-cmp-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.psm-cmp-toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.psm-cmp-toolbar-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
}

.psm-cmp-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: var(--psm-btn-bg, #fff);
    border: 1px solid var(--psm-btn-border, #dee2e6);
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--psm-btn-text, #495057);
    cursor: pointer;
    transition: all 0.2s ease;
}

.psm-cmp-filter-btn:hover {
    background: var(--psm-btn-hover-bg, #248a9f);
    border-color: var(--psm-btn-hover-border, #248a9f);
    color: var(--psm-btn-hover-text, #fff);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.psm-cmp-filter-btn.active {
    background: var(--psm-btn-hover-bg, #248a9f);
    border-color: var(--psm-btn-hover-border, transparent);
    color: var(--psm-btn-hover-text, #fff);
}

.psm-cmp-filter-btn .material-icons {
    font-size: 18px;
}

.psm-cmp-filter-btn--secondary {
    background: var(--psm-btn-bg, transparent);
    border-color: var(--psm-btn-border, transparent);
    color: var(--psm-btn-text, #6c757d);
}

.psm-cmp-filter-btn--secondary:hover {
    background: var(--psm-btn-hover-bg, #fff);
    border-color: var(--psm-btn-hover-border, #dee2e6);
    color: var(--psm-btn-hover-text, #fff);
}

.psm-cmp-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #dc3545;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #dc3545;
    cursor: pointer;
    transition: all 0.2s ease;
}

.psm-cmp-clear-btn:hover {
    background: #dc3545;
    color: #fff;
}

.psm-cmp-clear-btn .material-icons {
    font-size: 18px;
}

.psm-cmp-products-header {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.psm-cmp-product-card {
    position: relative;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.psm-cmp-product-card:hover {
    border-color: #ced4da;
}

.psm-cmp-product-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 50%;
    color: #6c757d;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    box-shadow: none;
}

.psm-cmp-product-remove:hover {
    color: #dc3545;
    border-color: #dc3545;
    background: #fff;
}

.psm-cmp-product-remove .material-icons {
    font-size: 18px;
}

.psm-cmp-product-image {
    display: block;
    padding: 1.5rem;
    background: #f8f9fa;
}

.psm-cmp-product-image img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.psm-cmp-product-card:hover .psm-cmp-product-image img {
    transform: scale(1.05);
}

.psm-cmp-product-info {
    padding: 1.25rem;
}

.psm-cmp-product-name {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    text-decoration: none;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.psm-cmp-product-name:hover {
    color: #000000;
}

.psm-cmp-product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.psm-cmp-price-old {
    font-size: 0.875rem;
    color: #999;
    text-decoration: line-through;
}

.psm-cmp-price-current {
    font-size: 1.25rem;
    font-weight: 700;
    color: #212529;
}

.psm-cmp-price-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: #dc3545;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
}

.psm-cmp-product-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.psm-cmp-view-btn,
.psm-cmp-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 0;
}

.psm-cmp-view-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
}

.psm-cmp-view-btn:hover {
    background: #000000;
    border-color: #000000;
    color: #fff;
}

.psm-cmp-cart-btn {
    background: #495057;
    border: 1px solid #495057;
    color: #fff;
}

.psm-cmp-cart-btn:hover {
    background: #343a40;
    border-color: #343a40;
    color: #fff;
}

.psm-cmp-view-btn .material-icons,
.psm-cmp-cart-btn .material-icons {
    font-size: 16px;
}

.psm-cmp-table-wrapper {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.psm-cmp-table {
    width: 100%;
    border-collapse: collapse;
}

.psm-cmp-section-header th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
}

.psm-cmp-section-header th .material-icons {
    font-size: 20px;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.psm-cmp-row {
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.psm-cmp-row:hover {
    background-color: #f8f9fa;
}

.psm-cmp-row:last-child {
    border-bottom: none;
}
/*
.psm-cmp-label {
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: #495057;
    background: #f8f9fa;
    min-width: 180px;
    border-right: 1px solid #eee;
}*/

th.psm-cmp-label {
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: #495057;
    text-align: left;
    border-right: 1px solid #eee;
}

.psm-cmp-value {
    padding: 1rem 1.25rem;
    text-align: center;
    color: #212529;
    border-right: 1px solid #eee;
}

.psm-cmp-value:last-child {
    border-right: none;
}

.psm-cmp-value-text {
    display: inline-block;
}

.psm-cmp-empty {
    color: #adb5bd;
}

/* Highlight Styles */
.psm-cmp-row.psm_compare_different_comparison.highlighted,
.psm-cmp-row.psm_compare_similiar_comparison.highlighted {
    background-color: var(--psm-highlight-color, #87ceeb);
}

/* Non-color cue for highlighted rows so the emphasis does not rely on hue
   alone (WCAG 1.4.1 Use of Color). */
.psm-cmp-row.highlighted th.psm-cmp-label {
    box-shadow: inset 4px 0 0 0 var(--psm-primary-color, #2c3e50);
    font-weight: 700;
}

/* Mobile View */
.psm-cmp-mobile {
    display: none;
}

@media (max-width: 992px) {
    .psm-cmp-table-wrapper {
        display: none;
    }
    
    .psm-cmp-mobile {
        display: block;
    }
    
    .psm-cmp-products-header {
        display: none;
    }
}

.psm-cmp-mobile-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.psm-cmp-mobile-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: #f8f9fa;
    position: relative;
}

.psm-cmp-mobile-image {
    flex-shrink: 0;
    width: 100px;
}

.psm-cmp-mobile-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.psm-cmp-mobile-info {
    flex: 1;
    min-width: 0;
}

.psm-cmp-mobile-name {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.psm-cmp-mobile-name:hover {
    color: #000000;
}

.psm-cmp-mobile-price-old {
    font-size: 0.875rem;
    color: #999;
    text-decoration: line-through;
    margin-right: 0.5rem;
}

.psm-cmp-mobile-price-current {
    font-size: 1.25rem;
    font-weight: 700;
    color: #212529;
}

.psm-cmp-mobile-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 50%;
    color: #6c757d;
    cursor: pointer;
    box-shadow: none;
}

.psm-cmp-mobile-remove:hover {
    color: #dc3545;
    border-color: #dc3545;
}

.psm-cmp-mobile-specs {
    padding: 1.25rem;
}

.psm-cmp-mobile-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 1rem 0 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.psm-cmp-mobile-spec {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.psm-cmp-mobile-spec:last-child {
    border-bottom: none;
}

.psm-cmp-mobile-spec-label {
    font-weight: 500;
    color: #6c757d;
    font-size: 0.875rem;
}

.psm-cmp-mobile-spec-value {
    font-weight: 600;
    color: #212529;
    font-size: 0.875rem;
    text-align: right;
}

.psm-cmp-mobile-footer {
    padding: 1.25rem;
    background: #f8f9fa;
    text-align: center;
}

.psm-cmp-mobile-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.625rem 1.25rem;
    background: #495057;
    color: #fff;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.psm-cmp-mobile-view-btn:hover {
    background: #343a40;
    color: #fff;
}

/* Empty State */
.psm-cmp-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.psm-cmp-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: #f8f9fa;
    border-radius: 50%;
    margin-bottom: 1.25rem;
}

.psm-cmp-empty-icon .material-icons {
    font-size: 40px;
    color: #adb5bd;
}

.psm-cmp-empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin: 0 0 0.75rem;
}

.psm-cmp-empty-text {
    font-size: 1rem;
    color: #6c757d;
    margin: 0 0 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.psm-cmp-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: #495057;
    color: #fff;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.psm-cmp-empty-btn:hover {
    background: #343a40;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .psm-cmp-header {
        padding: 1.5rem 1rem;
        border-radius: 12px;
    }
    
    .psm-cmp-title {
        font-size: 1.5rem;
    }
    
    .psm-cmp-title .material-icons {
        font-size: 1.75rem;
    }
    
    .psm-cmp-toolbar {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .psm-cmp-filter-btn span,
    .psm-cmp-clear-btn span {
        display: none;
    }
    
    .psm-cmp-filter-btn,
    .psm-cmp-clear-btn {
        padding: 0.75rem;
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
    }
    
    .psm-cmp-filter-btn .material-icons,
    .psm-cmp-clear-btn .material-icons {
        font-size: 20px;
    }
    
    .psm-cmp-toolbar-label {
        display: none;
    }
    
    .psm-cmp-toolbar-group {
        gap: 0.375rem;
    }
}

/* Mobile highlight/hide state feedback */
.psm-mobile-different.highlighted,
.psm-mobile-similar.highlighted {
    position: relative;
    /* Non-color cue so highlight does not rely on hue alone (WCAG 1.4.1). */
    border-left: 4px solid var(--psm-primary-color, #2c3e50);
}

.psm-cmp-mobile-spec[style*="background-color"] {
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

/* ==========================================================================
   Legacy Compare Table (kept for backward compatibility)
   ========================================================================== */

.psm-compare-compare-card {
    width: 100%;
}

#psm_compare_table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--psm-table-bg);
}

#psm_compare_table th,
#psm_compare_table td {
    border: 1px solid var(--psm-table-border);
    padding: var(--psm-spacing-md);
    vertical-align: middle;
}

#psm_compare_table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    text-align: center;
    min-width: 180px;
}

#psm_compare_table tbody tr:nth-child(odd) {
    background-color: var(--psm-row-odd-bg);
}

#psm_compare_table tbody tr:nth-child(even) {
    background-color: var(--psm-row-even-bg);
}

.psm_compare_lowpadding {
    padding: var(--psm-spacing-sm) var(--psm-spacing-md);
}

.psm-compare-title {
    min-width: 150px;
    background-color: #f8f9fa !important;
    font-weight: 600;
    text-align: left;
}

.psm-compare-value {
    text-align: center;
}

/* Product Header in Table */
.psm-compare-product-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--psm-spacing-sm);
}

.psm-compare-product-link {
    text-decoration: none;
    color: inherit;
}

.psm-compare-product-link:hover {
    text-decoration: none;
}

.psm-compare-product-img {
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
}

.psm-compare-product-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    color: #333;
    line-height: 1.3;
}

.psm-compare-product-name:hover {
    color: var(--psm-primary-color);
}

.psm-compare-product-price {
    font-size: 1rem;
    font-weight: 600;
}

.psm-compare-old-price {
    text-decoration: line-through;
    color: #999;
    margin-right: var(--psm-spacing-xs);
}

.psm-compare-current-price {
    color: var(--psm-danger-color);
}

/* Product Actions in Table */
.psm-compare-product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--psm-spacing-xs);
    justify-content: center;
}

/* Section Headers */
.psm-compare-section-header {
    background-color: #e9ecef !important;
}

.psm-compare-section-header td {
    padding: var(--psm-spacing-sm) var(--psm-spacing-md);
}

.psm-compare-section-title {
    font-weight: 700;
    color: #495057;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* Action Buttons Row */
.compare-action-btns {
    display: flex;
    flex-wrap: wrap;
    gap: var(--psm-spacing-sm);
    justify-content: center;
    padding: var(--psm-spacing-md);
    background-color: #f8f9fa;
    border-radius: var(--psm-border-radius);
}

.psm-compare-action-btn {
    font-size: 0.875rem;
}

.psm-compare-action-btn.active {
    background-color: var(--psm-primary-color);
    border-color: var(--psm-primary-color);
    color: #ffffff;
}

/* ==========================================================================
   Mobile Cards Layout (for responsive comparison)
   ========================================================================== */

.psm-compare-mobile-cards {
    display: none;
}

@media (max-width: 768px) {
    .table-responsive {
        display: none;
    }

    .psm-compare-mobile-cards {
        display: block;
    }
}

.psm-compare-mobile-card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: var(--psm-border-radius-lg);
    margin-bottom: var(--psm-spacing-md);
    overflow: hidden;
}

.psm-compare-mobile-card-header {
    display: flex;
    gap: var(--psm-spacing-md);
    padding: var(--psm-spacing-md);
    background-color: #f8f9fa;
}

.psm-compare-mobile-card-image {
    flex-shrink: 0;
    width: 80px;
}

.psm-compare-mobile-card-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: var(--psm-border-radius);
}

.psm-compare-mobile-card-info {
    flex: 1;
    min-width: 0;
}

.psm-compare-mobile-card-title {
    font-weight: 600;
    margin-bottom: var(--psm-spacing-xs);
}

.psm-compare-mobile-card-title a {
    color: #333;
    text-decoration: none;
}

.psm-compare-mobile-card-title a:hover {
    color: var(--psm-primary-color);
}

.psm-compare-mobile-card-price {
    font-size: 1rem;
}

.psm-compare-mobile-card-price .regular-price {
    text-decoration: line-through;
    color: #999;
    margin-right: var(--psm-spacing-xs);
}

.psm-compare-mobile-card-price .price {
    font-weight: 600;
    color: var(--psm-danger-color);
}

.psm-compare-mobile-card-body {
    padding: var(--psm-spacing-md);
}

.psm-compare-mobile-card-section {
    margin-bottom: var(--psm-spacing-md);
}

.psm-compare-mobile-card-section:last-child {
    margin-bottom: 0;
}

.psm-compare-mobile-card-section-title {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #495057;
    margin-bottom: var(--psm-spacing-sm);
    padding-bottom: var(--psm-spacing-xs);
    border-bottom: 2px solid #e9ecef;
}

.psm-compare-mobile-card-attrs {
    display: flex;
    flex-direction: column;
    gap: var(--psm-spacing-xs);
}

.psm-compare-mobile-card-attr {
    display: flex;
    justify-content: space-between;
    padding: var(--psm-spacing-xs) var(--psm-spacing-sm);
    background-color: #f8f9fa;
    border-radius: var(--psm-border-radius);
}

.psm-compare-mobile-card-attr.psm-mobile-similar,
.psm-compare-mobile-card-attr.psm-mobile-different {
    background-color: var(--psm-highlight-color, #87ceeb);
}

.psm-compare-mobile-card-attr-label {
    font-weight: 500;
    color: #495057;
}

.psm-compare-mobile-card-attr-value {
    color: #333;
}

.psm-compare-mobile-card-footer {
    display: flex;
    gap: var(--psm-spacing-sm);
    padding: var(--psm-spacing-md);
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.psm-compare-mobile-card-footer .btn {
    flex: 1;
}

/* ==========================================================================
   Notifications
   ========================================================================== */

.psm-compare-notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: var(--psm-spacing-sm);
    max-width: 400px;
}

.psm-compare-notification {
    background: #ffffff;
    border-radius: var(--psm-border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: psm-compare-slide-in 300ms ease-out;
    overflow: hidden;
}

.psm-compare-notification-clickable {
    cursor: pointer;
}

.psm-compare-notification-clickable:focus {
    outline: 2px solid var(--psm-primary-color);
    outline-offset: 2px;
}

.psm-compare-notification-clickable:hover .psm-compare-notification-message {
    text-decoration: underline;
}

.psm-compare-notification-hide {
    animation: psm-compare-slide-out 300ms ease-out forwards;
}

@keyframes psm-compare-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes psm-compare-slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.psm-compare-notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--psm-spacing-md);
    gap: var(--psm-spacing-md);
}

.psm-compare-notification-message {
    flex: 1;
}

.psm-compare-notification-link {
    color: inherit;
    text-decoration: none;
}

.psm-compare-notification-link:focus,
.psm-compare-notification-link:hover {
    color: inherit;
    text-decoration: underline;
}

.psm-compare-notification-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.psm-compare-notification-close:hover {
    color: #333;
}

/* Notification types */
.psm-compare-notification-success {
    border-left: 4px solid var(--psm-success-color);
}

.psm-compare-notification-error {
    border-left: 4px solid var(--psm-danger-color);
}

.psm-compare-notification-warning {
    border-left: 4px solid var(--psm-warning-color);
}

.psm-compare-notification-info {
    border-left: 4px solid var(--psm-info-color);
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.psm-compare-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--psm-spacing-xl);
    color: #666;
}

.psm-compare-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: var(--psm-primary-color);
    border-radius: 50%;
    animation: psm-compare-spin 1s linear infinite;
}

@keyframes psm-compare-spin {
    to {
        transform: rotate(360deg);
    }
}

.psm-compare-loading p {
    margin-top: var(--psm-spacing-md);
    font-size: 0.9rem;
}

/* ==========================================================================
   Error State
   ========================================================================== */

.psm-compare-error {
    text-align: center;
    padding: var(--psm-spacing-xl);
    color: var(--psm-danger-color);
}

/* ==========================================================================
   Footer Compare Widget
   ========================================================================== */

.psm-compare-footer-widget {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #dee2e6;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1040;
    padding: var(--psm-spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transform: translateY(100%);
    transition: transform var(--psm-transition-normal);
}

.psm-compare-footer-widget.active {
    transform: translateY(0);
}

.psm-compare-footer-products {
    display: flex;
    gap: var(--psm-spacing-sm);
    flex-wrap: wrap;
    flex: 1;
}

.psm-compare-footer-product {
    display: flex;
    align-items: center;
    gap: var(--psm-spacing-xs);
    padding: var(--psm-spacing-xs) var(--psm-spacing-sm);
    background: #f8f9fa;
    border-radius: var(--psm-border-radius);
}

.psm-compare-footer-product img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.psm-compare-footer-product-name {
    font-size: 0.8rem;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.psm-compare-footer-actions {
    display: flex;
    gap: var(--psm-spacing-sm);
}

/* ==========================================================================
   Compare Page Styles
   ========================================================================== */

.psm-compare-page {
    padding: var(--psm-spacing-lg) 0;
}

.psm-compare-page-header {
    margin-bottom: var(--psm-spacing-lg);
}

.psm-compare-page-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 var(--psm-spacing-sm);
}

.psm-compare-page-subtitle {
    color: #666;
    font-size: 1rem;
}

.psm-compare-empty-state {
    text-align: center;
    padding: var(--psm-spacing-xl);
    background: #f8f9fa;
    border-radius: var(--psm-border-radius-lg);
}

.psm-compare-empty-state h4 {
    color: #333;
    margin-bottom: var(--psm-spacing-sm);
}

.psm-compare-empty-state p {
    color: #666;
    margin-bottom: var(--psm-spacing-md);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.psm-compare-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.psm-compare-hidden {
    display: none !important;
}

/* Column-header row that exists only for screen readers (table semantics).
   Kept in the accessibility tree — collapsed, not display:none. */
.psm-cmp-table thead.psm-cmp-sr-head th {
    padding: 0;
    border: 0;
    height: 0;
    line-height: 0;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .psm-compare-modal,
    .psm-compare-notifications,
    .psm-compare-footer-widget,
    .psm-compare-add-btn,
    .psm-compare-remove-btn,
    .compare-action-btns,
    .psm-compare-product-actions {
        display: none !important;
    }

    #psm_compare_table {
        font-size: 10pt;
    }

    #psm_compare_table th,
    #psm_compare_table td {
        padding: 4px 8px;
    }

    .psm-compare-product-img {
        max-width: 60px;
        max-height: 60px;
    }
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 992px) {
    .psm-compare-modal-dialog {
        max-width: 98%;
        margin: var(--psm-spacing-md) auto;
    }

    .compare-action-btns {
        flex-direction: column;
    }

    .compare-action-btns .psm-compare-action-btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .psm-compare-notifications {
        left: 10px;
        right: 10px;
        max-width: none;
    }

    .psm-compare-modal-header,
    .psm-compare-modal-body,
    .psm-compare-modal-footer {
        padding: var(--psm-spacing-md);
    }

    .psm-compare-modal-footer {
        flex-direction: column;
    }

    .psm-compare-modal-footer .btn {
        width: 100%;
    }

    .psm-compare-footer-widget {
        flex-direction: column;
        gap: var(--psm-spacing-sm);
    }

    .psm-compare-footer-products {
        justify-content: center;
    }

    .psm-compare-footer-actions {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Compare Button (Template Button)
   ========================================================================== */

.psm-cmp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--psm-spacing-xs);
    padding: var(--psm-spacing-sm) var(--psm-spacing-md);
    background-color: transparent;
    color: var(--psm-primary-color);
    border: 1px solid var(--psm-primary-color);
    border-radius: var(--psm-border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--psm-transition-fast);
    text-decoration: none;
    margin-top: var(--psm-spacing-sm);
}

.psm-cmp-button:hover,
.psm-cmp-button:focus {
    background-color: var(--psm-primary-color);
    color: #ffffff;
    text-decoration: none;
}

.psm-cmp-button:focus {
    outline: 2px solid var(--psm-primary-color);
    outline-offset: 2px;
}

.psm-cmp-button.psm-cmp-active,
.psm-cmp-button.added,
.psm-cmp-button.active {
    background-color: var(--psm-danger-color);
    border-color: var(--psm-danger-color);
    color: #ffffff;
}

.psm-cmp-button.psm-cmp-active:hover,
.psm-cmp-button.added:hover,
.psm-cmp-button.active:hover {
    background-color: #c0392b;
    border-color: #c0392b;
}

.psm-cmp-button.loading {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

.psm-cmp-button .material-icons {
    font-size: 20px;
}

.product-actions .psm-cmp-button,
.product-add-to-cart .psm-cmp-button {
    width: 100%;
    margin-top: var(--psm-spacing-md);
}

/* Positioned relative to `.thumbnail-container` (the product image), into
   which front.js relocates the wrapper. Sits directly below the theme's
   wishlist icon (top-right of the image) for a consistent placement in both
   the Classic and Hummingbird themes. */
.psm-cmp-list-btn {
    position: absolute;
    top: 3.5rem;
    right: 0.5rem;
    z-index: 3;
}

.psm-cmp-list-btn .psm-cmp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background-color: #fff;
  border: none;
  border-radius: 50%;
  box-shadow: 2px -2px 4px rgba(0, 0, 0, 0.2);
  color: #7a7a7a;
  cursor: pointer;
  transition: all 0.2s ease;
}

.psm-cmp-list-btn .psm-cmp-button:hover {
    color: var(--psm-primary-color);
    background-color: #fff;
    transform: scale(1.1);
}

.psm-cmp-list-btn .psm-cmp-button.psm-cmp-active {
    color: var(--psm-primary-color);
    background-color: #fff;
}

.psm-cmp-list-btn .psm-cmp-button .material-icons {
    font-size: 20px;
}

.psm-cmp-list-btn .psm-cmp-btn-text {
    display: none;
}

.product-miniature .thumbnail-container {
    position: relative;
}

.product-miniature {
    position: relative;
}

.product-miniature > .psm-cmp-button {
    padding: var(--psm-spacing-sm);
    border: none;
    background: transparent;
    color: var(--psm-secondary-color);
}

.product-miniature > .psm-cmp-button:hover {
    color: var(--psm-primary-color);
    background: transparent;
}

.product-miniature > .psm-cmp-button.psm-cmp-active {
    color: var(--psm-danger-color);
    background: transparent;
    border: none;
}

#psm_cmp_nav {
    display: inline-flex;
    align-items: center;
}

#psm_cmp_nav a {
    display: inline-flex;
    align-items: center;
    gap: var(--psm-spacing-xs);
    color: inherit;
    text-decoration: none;
    padding: var(--psm-spacing-xs) var(--psm-spacing-sm);
}

#psm_cmp_nav a:hover {
    color: var(--psm-primary-color);
}

#psm_cmp_nav .material-icons {
    font-size: 20px;
}

#psm_cmp_nav .psm-cmp-count,
#psm_nav_compare_count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background-color: var(--psm-danger-color);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 9px;
    line-height: 1;
}

/* ==========================================================================
   Mobile Floating Action Button (FAB)
   ========================================================================== */

.psm-cmp-fab {
    display: none;
    position: fixed;
    z-index: 1040;
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    border-radius: 50%;
    background-color: var(--psm-btn-bg, var(--psm-primary-color));
    color: var(--psm-btn-text, #ffffff);
    border: 2px solid var(--psm-btn-border, transparent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease, background-color 0.2s ease;
}

.psm-cmp-fab:hover,
.psm-cmp-fab:focus {
    background-color: var(--psm-btn-hover-bg, var(--psm-primary-color));
    color: var(--psm-btn-hover-text, #ffffff);
    border-color: var(--psm-btn-hover-border, transparent);
    text-decoration: none;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.psm-cmp-fab:active {
    transform: scale(0.95);
}

.psm-cmp-fab .material-icons {
    font-size: 28px;
}

.psm-cmp-fab-count {
    position: absolute;
    top: -4px;
    right: -4px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background-color: var(--psm-danger-color);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 11px;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* FAB Position Variants */
.psm-cmp-fab--bottom-right {
    bottom: 20px;
    right: 20px;
}

.psm-cmp-fab--bottom-left {
    bottom: 20px;
    left: 20px;
}

.psm-cmp-fab--top-right {
    top: 80px;
    right: 20px;
}

.psm-cmp-fab--top-left {
    top: 80px;
    left: 20px;
}

/* Hide FAB when no products */
.psm-cmp-fab--hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

/* Show FAB only on mobile (max-width: 991px to match typical PrestaShop breakpoints) */
@media (max-width: 991px) {
    .psm-cmp-fab {
        display: flex;
        width: 56px;
        height: 56px;
    }
}

/* Adjust for very small screens */
@media (max-width: 480px) {
    .psm-cmp-fab {
        width: 50px;
        height: 50px;
    }
    
    .psm-cmp-fab .material-icons {
        font-size: 24px;
    }
    
    .psm-cmp-fab-count {
        min-width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    
    .psm-cmp-fab--bottom-right,
    .psm-cmp-fab--bottom-left {
        bottom: 15px;
    }
    
    .psm-cmp-fab--bottom-right {
        right: 15px;
    }
    
    .psm-cmp-fab--bottom-left {
        left: 15px;
    }
}

/* ==========================================================================
   Icon-only PDP variant (SHOW_BTN_LABEL = 0)
   Styled as a circular button that matches the theme's wishlist icon and is
   vertically aligned with it in the add-to-cart row (Classic & Hummingbird).
   ========================================================================== */
.psm-cmp-iconmode {
    display: inline-flex;
    align-items: center;
}
.psm-cmp-iconmode .psm-cmp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #7a7a7a;
    box-shadow: 2px -2px 4px rgba(0, 0, 0, 0.2);
    transition: color 0.2s ease;
}
.psm-cmp-iconmode .psm-cmp-button:hover,
.psm-cmp-iconmode .psm-cmp-button:focus {
    background: #fff;
    color: var(--psm-primary-color);
    border: 0;
    box-shadow: 2px -2px 4px rgba(0, 0, 0, 0.2);
}
.psm-cmp-iconmode .psm-cmp-button:focus-visible {
    outline: 2px solid var(--psm-primary-color);
    outline-offset: 2px;
}
.psm-cmp-iconmode .psm-cmp-button .psm-cmp-btn-text {
    display: none;
}
.psm-cmp-iconmode .psm-cmp-button .material-icons {
    font-size: 20px;
}
.psm-cmp-iconmode .psm-cmp-button.psm-cmp-active {
    background: #fff;
    border: 0;
    color: var(--psm-danger-color, #dc3545);
}

.psm-cmp-btn-wrapper.psm-cmp-iconmode.eshop {
    margin: -25px 0 0 10px;
}
