/* ============================================================
   UNATECA — EX Series Product Comparison Styles
   Apple-inspired, fresh clean design matching navy/amber theme
   ============================================================ */

.comparison-wrapper {
    /* Full-bleed. A comparison sheet carries far more columns than the 1200px
       page column can hold, so it breaks out and uses the whole viewport width.
       The 50% resolves against the padded .subcat-expand-inner, which makes the
       offset self-correcting at any viewport — including below 1200px, where it
       cancels out to just the parent's own padding. The enclosing
       .subcat-expand-panel is already 100vw, so nothing clips this. */
    width: 100vw;
    max-width: 100vw;
    margin: 0 calc(50% - 50vw) !important;
    padding: 14px clamp(16px, 2.5vw, 44px);
    background: transparent !important;
    border: none !important;
    border-radius: 0;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    box-sizing: border-box;
    font-family: var(--font-family, 'Avenir', 'Avenir Next', sans-serif);
    font-weight: 400;
    text-shadow: none !important; /* Remove text shadows */
    animation: comparisonFadeIn 0.3s ease;
}

@keyframes comparisonFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.comparison-header {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Align close button to the right */
    margin-bottom: 16px; /* More compact header */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
}

.comparison-header h3 {
    display: none !important;
}

/* General description at the top of the page (editable) */
.comparison-desc {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.7);
    max-width: 820px;
    white-space: pre-line; /* lets you use line breaks in the text */
}
/* Comparison pages live on the always-dark underground layer — no light override */

.comparison-scroll-container {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.comparison-scroll-container::-webkit-scrollbar {
    height: 4px;
}
.comparison-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
}
.comparison-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.comparison-grid {
    display: grid;
    /* Narrower, more compact columns */
    grid-template-columns: minmax(260px, 1.3fr) repeat(3, minmax(130px, 1fr));
    min-width: 760px; 
}

/* Rows & Cells */
.comparison-row {
    display: contents;
}

.comparison-cell {
    padding: 6px 10px; /* Reduced padding for compact cells */
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    font-size: 12px; /* one step bigger */
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.4;
    transition: background-color 0.15s ease, color 0.15s ease;
    text-shadow: none !important;
}

/* Secondary rows (everything beyond nominal flowrate/pressure) are hidden
   until "More details" is clicked, which toggles .expanded on the wrapper.
   display:contents (not none) when shown, matching .comparison-row's own
   base display so the grid layout is unaffected. */
.comparison-row-extra {
    display: none;
}
.comparison-wrapper.expanded .comparison-row-extra {
    display: contents;
}

.comparison-toggle-cell {
    justify-content: center !important;
    padding: 10px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
}
/* Pill material from design-system.css. */

/* Row Hover Effect linking all cells in a row */
.comparison-row:hover .comparison-cell {
    background-color: rgba(255, 255, 255, 0.02);
    color: #ffffff;
}

/* Header Row & Sticky Title Column */
.comparison-cell.sticky-col {
    position: sticky;
    left: 0;
    background-color: transparent; /* blend with the general background */
    z-index: 10;
    font-weight: 400; /* Avenir Regular */
    color: #ffffff;
    justify-content: flex-start;
    border-right: none;
    text-align: left;
}

.comparison-row:hover .comparison-cell.sticky-col {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Parameter value alignment */
.comparison-cell:not(.sticky-col) {
    justify-content: center;
    text-align: center;
    font-weight: 400;
}

/* Section title rows — no band, no divider lines, just accent text */
.comparison-row.section-row .comparison-cell {
    background-color: transparent;
    border-bottom: none;
    padding: 12px 10px 4px; /* group spacing without a band */
    font-size: 12px;
    font-weight: 500;
    color: var(--primary-color, #20d21a); /* accent */
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.comparison-row.section-row:hover .comparison-cell {
    background-color: transparent;
}

/* Top Product Header Cells */
.product-header-cell {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start !important;
    padding: 10px 6px 16px; /* Compact padding */
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.product-title {
    margin: 6px 0 2px;
    font-size: 15px; /* one step bigger */
    font-weight: 500; /* Avenir Regular / Medium look */
    color: #ffffff;
    letter-spacing: -0.01em;
    text-shadow: none !important;
}

/* Apple-style clean CTA buttons with Amber Accent */
/* Pill material from design-system.css; the buy action keeps its
   accent-fill hover. */
.compare-buy-btn:hover {
    background: var(--primary-color, #20d21a);
    color: #000000;
    border-color: transparent;
    box-shadow: 0 3px 8px rgba(32, 210, 26, 0.35);
}

/* Icon-only variant — geometry and fill from design-system.css; the
   preflight guard there is what keeps the fill alive. */

.compare-buy-btn.compare-buy-icon svg {
    width: 17px;
    height: 17px;
    display: block;
}

/* Icon variant geometry comes from design-system.css. */
.compare-buy-btn.compare-buy-icon:hover {
    background: var(--primary-color, #20d21a);
}

/* Bottom Footer Row */
.comparison-row.footer-row .comparison-cell {
    border-bottom: none;
    padding-top: 14px;
    padding-bottom: 14px;
}

/* Floor Reflection Container */
.reflect-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 170px; /* fits the double-size product shot plus its reflection */
    width: 100%;
    margin-bottom: 14px;
}

/* Reflection Shadow Grounding */
.reflect-container::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 20%;
    width: 60%;
    height: 5px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.35) 0%, transparent 75%);
    z-index: 1;
    pointer-events: none;
}

.reflect-img {
    max-height: 110px; /* double size — the sheet is full-bleed, there is room */
    max-width: 100%;
    object-fit: contain;
    z-index: 2;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* Apple-style Box Reflect with gradients */
    -webkit-box-reflect: below -2px linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 45%,
        rgba(0, 0, 0, 0.08) 75%,
        rgba(0, 0, 0, 0.22) 100%
    );
}

.reflect-container:hover .reflect-img {
    transform: translateY(-2px) scale(1.02);
}

/* Dot Bullet Indicators - Amber Accent */
.bullet-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--primary-color, #20d21a); /* Amber Accent */
    box-shadow: 0 0 5px rgba(32, 210, 26, 0.5);
}

.bullet-dot-opt {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1.2px solid var(--primary-color, #20d21a); /* Amber Accent */
    background-color: transparent;
}

/* Accent text color where text is colored */
.on-dev-text {
    font-size: 12px;
    color: var(--primary-color, #20d21a); /* Amber Accent color */
    font-weight: 500;
}

.empty-val {
    color: rgba(255, 255, 255, 0.2);
    font-weight: 300;
}

/* Legend Info Footer */
.comparison-legend {
    margin-top: 12px; /* More compact legend */
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11px; /* one step bigger */
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: flex-start;
    text-shadow: none !important;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Light theme: comparison pages live on the always-dark underground
   layer, so the dark styling applies in every theme. */

/* Responsive adjustments */
@media (max-width: 768px) {
    .comparison-wrapper {
        padding: 10px 8px;
        border-radius: 8px;
    }
    .comparison-header {
        margin-bottom: 12px;
    }
    .comparison-header h3 {
        font-size: 11px;
    }
    .reflect-container {
        height: 130px;
        margin-bottom: 10px;
    }
    .reflect-img {
        max-height: 90px;
    }
    .product-title {
        font-size: 12px;
    }
}

/* ===== Brand logos in the top-left header cell ===== */
.comparison-cell.comparison-brand {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 14px;
    padding: 16px 14px;
}
.comparison-brand .brand-logo {
    display: block;
    max-width: 100%;
}
.comparison-brand .brand-logo-main {
    width: 150px;
    height: auto;
}
.comparison-brand .brand-logo-sub {
    height: 34px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}
