.add-to-compare {
    position: absolute;
    top: 20px;
    right: 20px;
    display: grid;
    place-items: center;
    width: 32px!important;
    height: 32px!important;
    padding: 0;
    border-radius: 99px;
    box-shadow: rgba(0, 0, 0, 0.08) 0px 1px 2px, rgba(0, 0, 0, 0.05) 0px 4px 12px!important;
    background-color: #fff;
    border: none;
}
.add-to-compare:hover{
    background-color: #2349b8;
}

.add-to-compare:focus{
    background-color: #2349b8;
}

.add-to-compare:hover svg{
    fill: #fff;
}

.add-to-compare:focus svg{
    fill: #fff;
}
.add-to-compare .compare-icon{
    width: 18px;
    height: 18px;
    line-height: 0;
}
.add-to-compare svg{
    width: 18px;
    height: 18px;
    line-height: 0;
    fill: #000;
}

/* spinner animation */
.compare-spinner{
    width: 18px;
    height: 18px;
    line-height: 0;
}
.compare-spinner svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Single Compare Button */

/* Single product compare button */
.single-compare-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #fca12e;
    color: #fff;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.single-compare-btn:hover {
    background: #fca12e;
}

.single-compare-btn.added {
    background: #27ae60;
}

.single-compare-btn.added:hover {
    color: #fff;
}

.single-compare-icon svg,
.single-compare-spinner svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: #fff;
}

.single-compare-spinner svg {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.single-compare-text {
    display: inline-block;
}

/* Full-screen semi-transparent overlay */
.compare-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* dark semi-transparent */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9998;
}

/* Popup styling inside overlay */
.compare-overlay .compare-popup {
    background: #fff;
    padding: 25px 30px;
    border-radius: 8px;
    max-width: 350px;
    width: 90%;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 9999; /* ensure it's above overlay */
    font-family: "Poppins", Sans-serif;
}

/* Popup buttons */
.compare-popup .compare-popup-actions {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.compare-popup .compare-popup-actions button,
.compare-popup .compare-popup-actions .view-compare {
    min-width: 80px;
}

/* Optional: fade-in animation */
.compare-overlay {
    animation: fadeInOverlay 0.3s ease forwards;
}

@keyframes fadeInOverlay {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.close-compare{
    border: none;
    padding: 0;
    color: #000;
    font-size: 14px;
}
.close-compare:hover{
    background-color: transparent;
    color: #000;
}

.close-compare:focus{
    background-color: transparent;
}

.view-compare{
    border: none;
    background-color: #2349b8;
    padding: 5px 20px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
}
.view-compare:hover{
    color: #fff;
}

/* Compare Page */

/* compare-table.css - styles for compare page table */

/* container */
.compare-wrap {
}

/* grid-based table:
   first column = labels (fixed width), then one column per product (fluid)
*/
.compare-table {
    display: grid;
    gap: 0;
    align-items: start;
    background: transparent;
    border-radius: 8px;
    overflow: visible;
    border-right: 1px solid #f1f1f1;
    font-family: "Poppins", Sans-serif;
}

.compare-table a{
    color: #000;
}
.compare-table a:hover{
    color: #000;
}
.compare-table h2{
    font-size: 16px;
}

.compare-table ul{

}

/* cells */
.compare-cell {
    padding: 18px 16px;
    border-bottom: 1px solid #f1f1f1;
    background: #fff;
    min-height: 100%;
    box-sizing: border-box;
}

/* label column */
.compare-cell--label {
    background: transparent;
    color: #333;
    font-weight: 400;
    border: none;
    display: flex;
    font-size: 14px;
}

/* header label style */
.compare-header {
    border-bottom: none;
    border-right: 1px solid #f1f1f1;
    background: transparent;
}

/* product header cell */
.compare-cell--product-header {
    border-bottom: 1px solid #e9e9e9;
    min-height: 90px;
    max-height: 90px;
}
.compare-header-inner {
    display:flex;
    flex-direction:column;
    gap:6px;
}
.compare-product-title a {
    color: #111;
    font-weight:700;
    text-decoration:none;
}
.compare-product-sku {
    font-size:13px;
    color:#7d7d7d;
}

/* product cells (normal) */
.compare-product-cell {
    border-left: 1px solid #e9e9e9;
}


/* image */
.compare-product-cell .attachment-woocommerce_thumbnail,
.compare-image img {
    max-width: 140px;
    height: auto;
    display:block;
}

/* attributes list */
.compare-attributes {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: #444;
}
.compare-attributes li { margin-bottom: 6px; }

/* price */
.compare-price {
    font-weight: 700;
    font-size: 18px;
    color: #111;
}
.compare-product-cell .remove-from-compare{
    background-color: #000;
    border: none;
    color: #fff;
}
.compare-product-cell .remove-from-compare:hover{
     background-color: #000;
    border: none;
    color: #fff;
}

.compare-product-cell .remove-from-compare:focus{
     background-color: #000;
    border: none;
    color: #fff;
}
/* add-to-cart button */
.compare-product-cell .add-to-cart,
.compare-actions .remove-from-compare {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
}

/* add-to-cart style */
.add-to-cart {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}
.add-to-cart:hover { opacity: .95; }

/* remove button */
.compare-actions .remove-from-compare {
    background: transparent;
    color: #e74c3c;
    border-color: #e74c3c;
}
.compare-actions .remove-from-compare:hover {
    background: #e74c3c;
    color: #fff;
}

/* empty message */
.compare-empty {
    text-align: center;
    padding: 40px 8px;
    font-size: 16px;
    color: #666;
}

/* Responsive: stack vertically on small screens */
@media (max-width: 900px) {

    .compare-table {
        display: block;
    }

    /* labels hidden because each product block will include label headings */
    .compare-cell--label { display: none; }

    /* each product becomes its own card */
    .compare-product-cell,
    .compare-cell--product-header {
        display: block;
        width: 100%;
        border-bottom: 1px solid #eee;
        padding: 14px;
        text-align: left;
    }

    .compare-product-cell .compare-product-title {
        font-weight:700;
        margin-bottom: 8px;
    }

    .compare-product-cell .compare-attributes li {
        display:block;
    }

    .compare-wrap { padding: 12px; }
}



/* New */
.compare-page{
    width: 100%;
    max-width: 1600px;
    font-family: "Poppins", Sans-serif;
}
:root {
    --epson-blue: #2346b4;
    --epson-blue-dark: #2346b4;
    --epson-blue-light: #E8F0FC;
    --epson-blue-mid: #C2D5F5;
    --accent: #1AABF0;
    --bg: #F7F8FA;
    --surface: #FFFFFF;
    --border: #E2E6EC;
    --border-strong: #C8CDD8;
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;
    --success: #16A34A;
    --success-bg: #DCFCE7;
    --warn: #D97706;
    --warn-bg: #FEF3C7;
    --c8-accent: #0D4FA0;
    --c8-bg: #EBF2FC;
    --row-alt: #F9FAFB;
    --header-h: 180px;
    --col-w: 155px;
    --label-w: 155px;
    --radius: 8px;
    --radius-lg: 12px;
  }

  .remove-from-compare{
     background-color: #000!important;
    border: none!important;
    color: #fff!important;
  }

  
  .remove-from-compare:hover{
     background-color: #000!important;
    border: none!important;
    color: #fff!important;
}

.remove-from-compare:focus{
     background-color: #000!important;
    border: none!important;
    color: #fff!important;
}

  /* ── PAGE HEADER ── */
  .page-header {
    background: var(--epson-blue);
    color: #fff;
    padding: 56px 32px 48px;
    text-align: center;
  }
  .page-header .eyebrow {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
  }
  .page-header h1 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
  }
  .page-header p {
    font-size: 16px;
    color: rgba(255,255,255,0.78);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.6;
  }



  /* ── COMPARISON TABLE ── */

  .compare-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
    border: 1px solid #eee;
    background: var(--surface);
  }

  table.compare {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    table-layout: auto;
  }

  table.compare col.label-col { width: 20%; }
  table.compare col.data-col { width: 20%; }

  /* Sticky product header */
  table.compare thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--surface);
    border-bottom: 2px solid var(--border);
    vertical-align: bottom;
    padding: 0;
  }
  table.compare thead th.label-th {
    background: var(--surface);
    z-index: 11;
  }

  .th-inner {
    padding: 20px 16px 18px;
    border-left: 1px solid var(--border);
  }
  .th-inner.featured-th {
    background: var(--c8-bg);
    border-left: 2px solid var(--epson-blue);
  }

  .th-model {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--epson-blue);
    line-height: 1;
    margin-bottom: 4px;
  }
  .th-series {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 10px;
  }
  .th-tagline {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    font-weight: 500;
  }
  .th-badge {
    display: inline-block;
    margin-bottom: 8px;
    background: var(--epson-blue);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
  }

  /* Info explanation row */
  tr.info-row td {
    padding: 0;
    background: #F0F5FC !important;
    border-bottom: 1px solid var(--epson-blue-mid);
    border-top: 1px solid var(--epson-blue-mid);
  }
  .info-box {
    display: flex;
    gap: 0;
    padding: 18px 20px;
  }
  .info-col {
    flex: 1;
    padding: 0 18px;
  }
  .info-col-narrow {
    flex: 0 0 220px;
  }
  .info-divider {
    width: 1px;
    background: var(--epson-blue-mid);
    flex-shrink: 0;
  }
  .info-heading {
    font-size: 12px;
    font-weight: 600;
    color: var(--epson-blue);
    margin-bottom: 6px;
    line-height: 1.4;
  }
  .info-body {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
  }
  .info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-top: 4px;
  }
  .info-table tr td {
    padding: 4px 0;
    border-bottom: 1px solid var(--epson-blue-mid);
    color: var(--text-secondary);
    background: transparent !important;
  }
  .info-table tr td:last-child {
    text-align: right;
    font-weight: 600;
    color: var(--epson-blue-dark);
  }
  .info-table tr:last-child td { border-bottom: none; }

  /* Section headers */
  tr.section-row td {
    background: var(--epson-blue-light);
    color: var(--epson-blue-dark);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 9px 16px;
    border-top: 1px solid var(--epson-blue-mid);
    border-bottom: 1px solid var(--epson-blue-mid);
  }
  tr.section-row td.section-label { color: var(--epson-blue-dark); }

  /* Data rows */
  tr.data-row td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-size: 14px;
  }
  tr.data-row:last-child td { border-bottom: none; }
  tr.data-row:nth-child(even) td { background: var(--row-alt); }
  tr.data-row:hover td { background: var(--epson-blue-light); }
  td[rowspan] { background: var(--c8-bg) !important; border-left: 2px solid var(--epson-blue); }

  td.row-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--surface) !important;
    border-right: 1px solid var(--border);
    padding-left: 20px;
  }
  td.row-label[colspan] {
    background: var(--epson-blue-light) !important;
    border-right: none;
  }
  tr.data-row:hover td.row-label { background: var(--epson-blue-light) !important; }

  td.data-cell {
    text-align: center;
    font-weight: 500;
    color: var(--text-primary);
    border-left: 1px solid var(--border);
  }
  td.data-cell.featured-col {
    background: var(--c8-bg) !important;
    border-left: 2px solid var(--epson-blue);
    
  }
  tr.data-row:hover td.data-cell.featured-col {
    background: var(--epson-blue-mid) !important;
  }
  td.section-label,
    tr.info-row td,
  th:first-child,
  td.row-label{
    border-left: none!important;
  }
    th:last-child,
  tr.info-row td,
  td.featured-th,
    td.data-cell.featured-col, 
  td.section-label{
    border-right: none;
  }

  /* Value types */
  .val-primary {
    font-weight: 600;
    color: var(--text-primary);
  }
  .val-unit {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
    display: block;
    margin-top: 1px;
  }
  .val-big {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--epson-blue);
  }
  .val-big.feat { color: var(--epson-blue-dark); }
  .val-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--success-bg);
    color: var(--success);
    font-size: 12px;
    font-weight: 700;
  }
  .val-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text-muted);
    font-size: 11px;
    border: 1px solid var(--border);
  }
  .chip {
    display: inline-block;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    color: var(--text-secondary);
  }
  .chip.highlight {
    background: var(--epson-blue-light);
    border-color: var(--epson-blue-mid);
    color: var(--epson-blue);
  }

  /* Legend / Note */
  .note {
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.7;
  }
  .note strong { color: var(--text-secondary); }

  /* CTA strip */
  .cta-strip {
    background: var(--epson-blue);
    padding: 48px 32px;
    text-align: center;
    color: #fff;
  }
  .cta-strip h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 10px;
  }
  .cta-strip p {
    color: rgba(255,255,255,0.75);
    font-size: 15px;
    margin-bottom: 24px;
  }
  .cta-btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-family: 'Barlow', sans-serif;
    font-size: 15px;
    font-weight: 700;
    padding: 13px 32px;
    border-radius: var(--radius);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: background 0.18s;
  }
  .cta-btn:hover { background: #138fc8; }

  /* Responsive tweaks */
  @media (max-width: 900px) {
    .page-header h1 { font-size: 32px; }
    .compare-wrap { padding: 0 16px; margin-bottom: 40px; }
  }
  @media (max-width: 600px) {
    .page-header { padding: 36px 20px; }
    .val-big { font-size: 16px; }
    table.compare thead th { position: static; }
  }