/* Core Wrapper */
.procat-compare-wrapper {
    width: 100%;
    margin: 2rem 0;
    box-sizing: border-box;
}

/* Horizontal Scrolling - Cursor set to default arrow */
.procat-compare-scroll-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    cursor: default;
}

/*
 * Table layout.
 * Horizontal gap between product columns = 19.8px (matches Figma product cards).
 * Vertical gap between rows is kept tight (2px) like the Figma data grid; the
 * larger 10px gaps (image -> title, header -> data) are added with margins below
 * so we get Figma-accurate spacing without one uniform value stretching everything.
 */
.procat-compare-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: var(--space-2xs) 2px;
    margin-left: -19.8px; /* Offsets the first left gap to align with page */
}
.procat-label-text{font-size:var(--text-m);font-weight:medium}
/* Strip default table padding to allow our inner DIVs to control flex/padding */
.procat-compare-table th,
.procat-compare-table td {
    padding: 0;
    vertical-align: top;
}

/* Main Title styling mapped to Figma vars.
   NOTE: the old 288px bottom padding forced the rowspan cell taller than the
   image, which was the cause of the large gap under the product images. */
.procat-main-title {
    display: flex;
    align-items: flex-start;
    padding: 33.65px 22.467px 0 12px;
    font-size: var(--text-l);
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: var(--text-color, #000);
}

.procat-title-cell {
    text-align: left;
    vertical-align: top;
    min-width: 250px;
}

/* 1. Image Wrapper Exact Match */
.procat-image-wrapper {
    display: flex;
    height: 249px;
    padding: var(--space-s);
    justify-content: center;
    align-items: flex-end;
    gap: 10px;
    align-self: stretch;
    border-radius: 0 40px 0 0;
    border: 1px solid var(--logogrey-l-4);
    box-sizing: border-box;
    /* 2px border-spacing + 8px margin = 10px gap down to the title row (Figma) */
    margin-bottom: 8px;
}

/* The product image itself must have NO border/box-shadow */
.procat-img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    object-fit: contain;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* 2. Product Category Title Background Exact Match */
.procat-meta-cell-inner {
    display: flex;
    padding: var(--space-2xs) var(--space-s);
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3xs);
    align-self: stretch;
    border-radius: 0 0 0 40px;
    background: var(--bgcolor);
    height: 100%;
    box-sizing: border-box;
    transition: background 0.3s ease;
    /* 2px border-spacing + 8px margin = 10px gap down to the data grid (Figma) */
    margin-bottom: 8px;
}

.procat-term-title {
    font-size: var(--text-m);
    font-weight: 400;
    color: var(--text-color, #111);
    line-height: 1.4;
}

.procat-view-link {
    color: #ef4444;
    text-decoration: none;
   font-size: var(--text-m);
    font-weight: 400;
    align-self: flex-end;
}

.procat-view-link:hover {
    text-decoration: underline;
}

/* 3. Standard Cell Flex Constraints */
.procat-cell-inner {
    display: flex;
    padding: var(--space-2xs) var(--space-s);
    align-items: center;
    gap: 10px;
    align-self: stretch;
    background: var(--bgcolor);
    height: 100%;
    box-sizing: border-box;
    transition: background 0.3s ease;
}

.label-inner {
    font-weight: 600;
}

.value-inner {
    color: var(--text-color, #444);
}

/* Make sure every data cell fills the full row height so label + value columns
   are always the same height (fixes the ragged mobile rows). */
.procat-label-cell,
.procat-value-cell {
    height: 1px; /* forces the td to resolve to the row height so height:100% works */
}

/* 4. Table Cell Hovering effect -> primary-10 */
.procat-cell-inner:hover,
.procat-meta-cell-inner:hover {
    background: var(--primary-10);
}

/* Mobile Adjustments */
@media (max-width: 991px) {

    /* Shrink the label columns so the 1st product column fits on screen load */
    .procat-title-cell,
    .procat-label-cell {
        position: sticky;
        left: 0;
        z-index: 2;
        min-width: 125px; /* Shrunk from 250px */
        width: 125px;
        background: #fff; /* Solid bg so scrolling content doesn't show through gap */
    }

    .procat-title-cell {
        z-index: 3;
    }

    /* Adjust enormous top title padding so it doesn't break mobile layout */
    .procat-main-title {
        padding: 20px 10px;
        font-size: 22px;
    }

    /* Provide a guaranteed minimum width for the first data column so it displays next to labels */
    .procat-image-cell,
    .procat-meta-cell,
    .procat-value-cell {
        min-width: 160px;
    }

    /* Reduce the tall image area on mobile for a cleaner, tighter card */
    .procat-image-wrapper {
        height: 150px;
        padding: 8px;
    }

    /* Lower line-height so wrapped labels/values stay compact and rows line up.
       align-items:stretch + height:100% keeps label & value cells equal height. */
    .procat-cell-inner {
        align-items: stretch;
        line-height: 1.25;
        padding: 8px 10px;
    }

    .procat-cell-inner .procat-label-text,
    .procat-cell-inner.value-inner {
        display: flex;
        align-items: center;
        width: 100%;
    }

    .procat-term-title {
        line-height: 1.25;
    }
}


/* Image is now clickable (links to the category permalink) */
.procat-image-link {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* 2. Product Category Title Background Exact Match */
.procat-meta-cell-inner {
    display: flex;
    padding: var(--space-2xs) var(--space-s);
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3xs);
    align-self: stretch;
    border-radius: 0 0 0 40px;
    background: var(--bgcolor);
    height: 100%;
    box-sizing: border-box;
    transition: background 0.3s ease;
    /* 2px border-spacing + 8px margin = 10px gap down to the data grid (Figma) */
    margin-bottom: 8px;
}

/* Title is now a link with a hover style.
   Reserve 2 lines so 1-line and 2-line titles keep the SAME box height,
   and clamp anything longer than 2 lines with an ellipsis (...). */
.procat-term-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.8em;      /* 2 lines at line-height 1.4 -> consistent height */
    font-size: var(--text-m);
    font-weight: 400;
    line-height: 1.4;
    color: var(--text-color, #111);
    text-decoration: none;
    transition: color 0.2s ease;
}

.procat-term-title:hover,
.procat-term-title:focus {
    color: var(--primary, #de121d);
    text-decoration: underline;
}