/* Compare Page Styles */

/* Enhanced Empty State Styles */
.compare-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.empty-state-content {
    max-width: 900px;
    width: 100%;
    padding: 3rem;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(163, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.empty-state-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #052F25 0%, #052F25 50%, #052F25 100%);
}

.empty-state-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    text-align: center;
}

.empty-state-icon {
    flex-shrink: 0;
}

.icon-wrapper {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #052F25 0%, #052F25 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(5, 47, 37, 0.2);
    position: relative;
}

.icon-wrapper::before {
    content: '';
    position: absolute;
    inset: 3px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 50%;
    pointer-events: none;
}

.icon-wrapper i {
    font-size: 3rem;
    color: #ffffff;
}

.empty-state-text {
    flex: 1;
    min-width: 0;
}

.empty-state-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #052F25;
    margin: 0 0 0.75rem 0;
    line-height: 1.2;
}

.empty-state-subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    margin: 0;
    font-weight: 400;
    line-height: 1.4;
}

.empty-state-description {
    margin-bottom: 2.5rem;
    text-align: center;
}

.empty-state-description p {
    font-size: 1.1rem;
    color: #495057;
    line-height: 1.6;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn-primary-theme,
.btn-outline-theme {
    padding: 1rem 2rem;
    font-weight: 500;
    font-size: 1rem;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 200px;
}

.btn-primary-theme {
    background: #052F25;
    border: 1px solid #052F25;
    color: #ffffff;
}

.btn-primary-theme:hover {
    background: #052F25;
    border-color: #052F25;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(163, 0, 0, 0.35), 
                0 4px 12px rgba(5, 47, 37, 0.2), 
                inset 0 1px 2px rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.btn-outline-theme {
    background: #052F25;
    border: 1px solid #052F25;
    color: #052F25;
}

.btn-outline-theme:hover {
    background: #052F25;
    border-color: #052F25;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(163, 0, 0, 0.35), 
                0 4px 12px rgba(5, 47, 37, 0.2), 
                inset 0 1px 2px rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.empty-state-features {
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(163, 0, 0, 0.08);
    border-color: #052F25;
}

.feature-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #052F25;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon i {
    font-size: 1.2rem;
    color: #ffffff;
}

.feature-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #052F25;
    margin: 0 0 0.5rem 0;
}

.feature-content p {
    font-size: 0.95rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
}

.empty-state-cta {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(163, 0, 0, 0.03) 0%, rgba(163, 0, 0, 0.08) 100%);
    border-radius: 12px;
    border: 1px solid rgba(163, 0, 0, 0.1);
}

.cta-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #052F25;
    margin: 0 0 0.5rem 0;
}

.cta-content p {
    font-size: 1rem;
    color: #6c757d;
    margin: 0;
}

/* Site Theme Button Styles - Updated for Better Contrast */
.btn-theme-primary {
    background: #052F25;
    border: 1px solid #052F25;
    color: #ffffff;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-theme-primary:hover {
    background: #052F25;
    border-color: #052F25;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(163, 0, 0, 0.35), 
                0 3px 10px rgba(5, 47, 37, 0.2), 
                inset 0 1px 2px rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.btn-theme-secondary {
    background: #052F25;
    border: 1px solid #052F25;
    color: #ffffff;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-theme-secondary:hover {
    background: #052F25;
    border-color: #052F25;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(163, 0, 0, 0.35), 
                0 3px 10px rgba(5, 47, 37, 0.2), 
                inset 0 1px 2px rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.btn-theme-danger {
    background: #052F25;
    border: 1px solid #052F25;
    color: #ffffff;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-theme-danger:hover {
    background: #052F25;
    border-color: #052F25;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(163, 0, 0, 0.35), 
                0 3px 10px rgba(5, 47, 37, 0.2), 
                inset 0 1px 2px rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.btn-theme-outline {
    background: #ffffff;
    border: 1px solid #052F25;
    color: #052F25;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-theme-outline:hover,
.btn-theme-outline.active {
    background: #052F25;
    border-color: #052F25;
    color: #ffffff;
    text-decoration: none;
}

/* Enhanced Header Styles - 2x2 Grid Layout */
.compare-header-section {
    background: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    border-top: #052F25 4px solid;
    margin-bottom: 2rem;
   
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.header-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    
    align-items: start;
}

.header-bottom-section {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
    padding: 1.5rem 2rem;
    margin: 1rem -2rem -2rem -2rem;
    border-radius: 0 0 16px 16px;
    border-top: 1px solid #e9ecef;
    position: relative;
}

.header-top-left {
    grid-column: 1;
    grid-row: 1;
}

.header-top-right {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
}

.header-bottom-left {
    grid-column: 1;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.header-bottom-right {
    grid-column: 2;
    justify-self: end;
    display: flex;
    align-items: center;
}

.compare-main-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #052F25;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    line-height: 1.2;
}

.compare-main-title i {
    color: #052F25;
    font-size: 1.6rem;
}

.compare-description {
    font-size: 1rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
    font-weight: 400;
}

.comparison-status-wrapper {
    display: flex;
    align-items: center;
}

.comparison-status {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: #e8f5e8;
    color: #2d5a2d;
    border: 1px solid #d1e7d1;
    transition: all 0.3s ease;
}

.comparison-status:hover {
    background: #d4edda;
    border-color: #c3e6cb;
}

.comparison-status.incomplete {
    background: #fff8e1;
    color: #8b6914;
    border-color: #ffeaa7;
}

.comparison-status.incomplete:hover {
    background: #fff3cd;
    border-color: #ffdc70;
}

.quick-stats {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.stat-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #052F25;
    border-radius: 10px;
    min-width: auto;
    box-shadow: 0 2px 6px rgba(5, 47, 37, 0.15);
    transition: all 0.3s ease;
    border: 1px solid rgba(163, 0, 0, 0.8);
}

.stat-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 47, 37, 0.2);
    background: #052F25;
}

.stat-label {
    font-size: 1rem;
    color: #052F25;
    font-weight: 600;
 
    letter-spacing: 0.5px;
    margin: 0;
    text-align: left;
    line-height: 1;
}

.stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: #052F25;
    line-height: 1;
    margin: 0;
}

.action-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.btn-action {
  background: #052F25;
  border: 1px solid #052F25;
  color: #ffffff;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.btn-action:hover {
  background: #074235; /* lighter green */
  border-color: #074235;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(5, 47, 37, 0.25);
}

.btn-action i {
  font-size: 0.95rem;
}


.btn-action:hover::before {
    left: 100%;
}

.btn-action:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(5, 47, 37, 0.25);
}

.btn-action i {
    font-size: 0.95rem;
}

/* Specific button variations with enhanced gradient shadows */
.btn-print:hover {
    background: #052F25;
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(6, 78, 59, 0.4), 
                0 4px 12px rgba(0, 123, 255, 0.15), 
                inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.btn-email:hover {
    background: #052F25;
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(6, 78, 59, 0.4), 
                0 4px 12px rgba(40, 167, 69, 0.15), 
                inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.btn-clear:hover {
    background: #f50202;
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(6, 78, 59, 0.4), 
                0 4px 12px rgba(220, 53, 69, 0.15), 
                inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

/* Desktop view toggle */
.view-toggle {
    display: flex;
    align-items: center;
}

/* Ensure desktop view toggle is always visible */
@media (min-width: 769px) {
    .view-toggle {
        display: flex !important;
    }
    
    /* Default to table view on desktop, but allow switching */
    #compareTable {
        display: block;
    }
    
    #compareCards {
        display: none;
    }
    
    /* Allow card view when explicitly set */
    body.desktop-card-view #compareTable {
        display: none !important;
    }
    
    body.desktop-card-view #compareCards {
        display: block !important;
    }
}

.btn-view-toggle {
    background: #ffffff;
    border: 1px solid #D9E2DF;
    color: #052F25 !important;
    padding: 0.7rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(163, 0, 0, 0.1);
}

.btn-view-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(163, 0, 0, 0.05), transparent);
    transition: left 0.5s ease;
}

.btn-view-toggle:first-child {
    border-radius: 10px 0 0 10px;
    border-right: none;
}

.btn-view-toggle:last-child {
    border-radius: 0 10px 10px 0;
}

.btn-view-toggle:hover:not(.active) {
    background: #ffffff;
    color: #052F25 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(5, 47, 37, 0.25), 
                0 3px 8px rgba(5, 47, 37, 0.15), 
                inset 0 1px 2px rgba(163, 0, 0, 0.05);
}

.btn-view-toggle:hover::before {
    left: 100%;
}

.header-bottom-section {
  background: linear-gradient(90deg, #F4F7F6 0%, #FFFFFF 80%);
  position: relative;
  border-top: 1px solid #D9E2DF;
  padding: 1.25rem 2rem 1.25rem 2.25rem;
  margin: 1rem -2rem -2rem -2rem;
  border-radius: 0 0 16px 16px;
}

.quick-stats .stat-item { background:#FFF; border:1px solid #D9E2DF; }
.btn-view-toggle { background:#FFF; border:1px solid #D9E2DF; color:#052F25 !important; }
.btn-view-toggle.active { background:#052F25; border-color:#052F25; color:#FFF !important; }


.btn-view-toggle i {
    font-size: 0.875rem;
}

.view-label {
    color: #052F25;
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
}

/* Card View Styles */
.compare-cards-wrapper {
    margin-top: 2rem;
}

.compare-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.compare-card {
    color: #010101;
}

.compare-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #d0d0d0;
}

.card-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #fff;
    border-bottom: 2px solid #f5f5f5;
}

.product-badge {
    background: #f8f9fa;
    color: #495057;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid #e9ecef;
    letter-spacing: 0.5px;
}

.remove-btn {
    background: #fff;
    border: none;
    color: #6c757d;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    line-height: 1;
}

.remove-btn:hover {
    background: #f8f9fa;
    color: #dc3545;
    transform: rotate(90deg);
}

.product-image-section {
    padding: 2rem 1.5rem;
    text-align: center;
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
}

.product-image {
    width: 100%;
    max-width: 220px;
    height: 180px;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.4s ease;
}

.product-image:hover {
    transform: scale(1.05);
}

.product-details-section {
    padding: 1.5rem 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: #fafbfc;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: #212529;
    min-height: 3rem;
}

.product-title a {
    color: #212529;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: #052F25;
    text-decoration: none;
}

.product-sku, .product-brand {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}



.product-brand {
    font-weight: 500;
    color: #495057;
}



.product-specs {
    margin: 0.5rem 0;
    flex-grow: 1;
    
    background: #f8f9fa;
    
}

.spec-item {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #495057;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.spec-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.spec-item strong {
    color: #212529;
    font-weight: 600;
    margin-right: 0.5rem;
    display: inline-block;
    min-width: 80px;
}

.card-actions {
    display: flex;
    gap: 0.625rem;
    margin-top: auto;
    padding: 1.25rem;
    border-top: 2px solid #f0f0f0;
    background: #fafbfc;
}

/* Enhanced Card Action Buttons */
.btn-card-action {
    border: none;
    color: #ffffff;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    flex: 1;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-card-action i {
    font-size: 0.875rem;
}

.btn-card-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s ease;
}

.btn-card-action:hover::before {
    left: 100%;
}

.btn-card-action:hover {
    color: #ffffff;
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-view {
    background: linear-gradient(135deg, #052F25 0%, #10705a 100%);
}

.btn-view:hover {
    background: linear-gradient(135deg, #10705a 0%, #700000 100%);
}

.btn-remove {
    background: linear-gradient(135deg, #052F25 0%, #10705a 100%);
   
}

.btn-remove:hover {
     background: linear-gradient(135deg, #10705a 0%, #700000 100%);
}

/* Table Wrapper */
.compare-list-table-wrapper {
    width: 100%;
    overflow: auto;
    display: block;
}

.compare-list-table {
    min-width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.compare-list-table tr td {
    border: 1px solid #f1f1f1;
    padding: 11px;
    text-align: left;
}

.compare-list-table tr:nth-child(even) {
    background: #fafafa;
}

.compare-list-table tr td:first-child {
    width: 25%;
    min-width: 200px;
    max-width: 300px;
    font-weight: bold;
    color: #010101;
    page-break-inside: avoid;
}

/* Dynamic column widths based on product count */
.compare-list-table {
    table-layout: fixed;
    width: 100%;
}

.compare-list-table[data-products="2"] tr td:first-child { width: 35%; }
.compare-list-table[data-products="2"] tr td:not(:first-child) { width: 32.5%; }

.compare-list-table[data-products="3"] tr td:first-child { width: 28%; }
.compare-list-table[data-products="3"] tr td:not(:first-child) { width: 24%; }

.compare-list-table[data-products="4"] tr td:first-child { width: 22%; }
.compare-list-table[data-products="4"] tr td:not(:first-child) { width: 19.5%; }

.compare-list-table[data-products="5"] tr td:first-child { width: 20%; }
.compare-list-table[data-products="5"] tr td:not(:first-child) { width: 16%; }

.compare-list-table[data-products="6"] tr td:first-child { width: 18%; }
.compare-list-table[data-products="6"] tr td:not(:first-child) { width: 13.66%; }

/* Large Product Images without border/text */
.compare-list-product-img-large {
    display: block;
    width: 100%;
    height: 250px;
    padding: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.compare-list-product-img-large:hover {
    transform: scale(1.02);
}

.compare-product-img-large {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    border-radius: 8px;
}

.compare-list-product-img-large:hover .compare-product-img-large {
    transform: scale(1.05);
}

.compare-list-table .compare-list-table-content {
    font-size: 1rem;
    color: #010101;
    font-weight: 400;
}

.compare-list-table .compare-list-remove {
    color: #dc3545;
    background: rgba(255, 255, 255, 0.9);
    position: absolute;
    right: 8px;
    top: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none;
    z-index: 10;
    border: 2px solid #dc3545;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.compare-list-table .compare-list-remove:hover {
    color: #fff;
    background: #dc3545;
    border-color: #dc3545;
    transform: scale(1.1);
}

.actions .btn {
    background-color: var(--base);
}

.actions .btn:hover {
    background-color: var(--base);
}

.hidden-field {
    display: none;
}

.print-header {
    display: none;
}

/* Ensure print header shows during printing */
@media print {
    .print-header {
        display: block !important;
    }
}

.compare-list-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .user_dashboard_header .actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .user_dashboard_header .actions .btn {
        width: 100%;
        text-align: center;
    }

    .compare-header-section {
        padding: 1.5rem 1rem;
    }

    .header-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 1.5rem;
        text-align: center;
    }

    .header-top-left {
        grid-column: 1;
        grid-row: 1;
    }

    .header-top-right {
        grid-column: 1;
        grid-row: 2;
        justify-self: center;
    }

    .header-bottom-section {
        grid-column: 1;
        grid-row: 3;
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
        margin: 1rem -1rem -1.5rem -1rem;
        padding: 1.5rem 1rem;
        border-top: 1px solid #e9ecef;
    }

    .header-bottom-left {
        grid-column: 1;
        justify-content: center;
        flex-direction: column;
        gap: 1rem;
    }

    .header-bottom-right {
        grid-column: 1;
        justify-self: center;
    }

    .compare-main-title {
        font-size: 1.5rem;
        justify-content: center;
    }

    .compare-subtitle {
        justify-content: center;
        gap: 0.75rem;
    }

    .quick-stats {
        justify-content: center;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        flex-direction: column;
    }

    .stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 1rem;
  background: #F4F7F6; /* light brand tint */
  border: 1px solid #D9E2DF;
  border-radius: 12px;
  min-width: 90px;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #052F25;
  margin: 0;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #052F25;
}


    .compare-actions-enhanced {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        align-items: stretch;
    }

    .action-group {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 0.5rem;
    }

    .btn-action {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
        justify-content: center;
    }

    .btn-action span {
        display: inline !important;
    }

    .view-toggle {
        justify-content: center;
    }

    .btn-view-toggle {
        flex: 1;
        max-width: 120px;
        justify-content: center;
    }

    .empty-state-content {
        padding: 2rem 1rem;
        margin: 0 1rem;
    }

    .empty-state-hero {
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .icon-wrapper {
        width: 100px;
        height: 100px;
    }

    .icon-wrapper i {
        font-size: 2.5rem;
    }

    .empty-state-title {
        font-size: 2rem;
    }

    .empty-state-subtitle {
        font-size: 1.1rem;
    }

    .empty-state-description p {
        font-size: 1rem;
    }

    .empty-state-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .btn-primary-theme,
    .btn-outline-theme {
        width: 100%;
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        min-width: auto;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feature-item {
        padding: 1rem;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
    }

    .feature-icon {
        width: 40px;
        height: 40px;
    }

    .feature-icon i {
        font-size: 1rem;
    }

    .feature-content h4 {
        font-size: 1rem;
    }

    .feature-content p {
        font-size: 0.875rem;
    }

    .empty-state-cta {
        padding: 1.5rem 1rem;
        margin-top: 1.5rem;
    }

    .cta-content h3 {
        font-size: 1.25rem;
    }

    .cta-content p {
        font-size: 0.95rem;
    }

    .compare-cards-wrapper .col-lg-6,
    .compare-cards-wrapper .col-xl-4 {
        margin-bottom: 1rem;
    }

    .compare-list-table td,
    .compare-list-table th {
        font-size: 0.875rem;
        padding: 8px;
    }

    .compare-list-table tr td:first-child {
        min-width: 150px;
        max-width: 200px;
    }

    .compare-list-table .compare-list-product-img {
        max-width: 120px;
    }

    /* Mobile responsive - Show both view options */
    .view-toggle {
        display: flex !important;
        justify-content: center;
        margin-bottom: 1rem;
    }
    
    /* Default to TABLE view on mobile */
    #compareTable {
        display: block;
    }
    
    #compareCards {
        display: none;
    }
    
    .compare-cards-wrapper {
        display: none;
    }
    
    /* When card view is active on mobile - Use !important to override inline styles */
    body.mobile-card-active #compareTable {
        display: none !important;
    }
    
    body.mobile-card-active #compareCards {
        display: block !important;
    }
    
    body.mobile-card-active .compare-cards-wrapper {
        display: block !important;
    }
    
    /* Mobile table styling - Enhanced */
    .compare-list-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1rem;
        padding: 0;
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        position: relative;
        /* Add scroll snap for better UX */
        scroll-snap-type: x proximity;
        scroll-padding-left: 90px; /* Account for sticky column */
    }
    
    /* Add scroll snap to product columns */
    .compare-list-table tr td:not(:first-child) {
        scroll-snap-align: start;
    }
    
    /* Remove scroll indicator shadow - removed per user request */
    
    /* Add a visual hint with animation */
    .compare-list-table-wrapper::before {
        content: '← Swipe to see more →';
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(163, 0, 0, 0.9);
        color: white;
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 0.65rem;
        font-weight: 600;
        z-index: 20;
        pointer-events: none;
        opacity: 0.9;
        animation: fadeInOut 3s ease-in-out;
        white-space: nowrap;
    }
    
    @keyframes fadeInOut {
        0%, 100% { opacity: 0; }
        10%, 90% { opacity: 0.9; }
    }
    
    .compare-list-table {
        min-width: max-content;
        width: auto;
        font-size: 0.75rem;
        table-layout: fixed;
        border-collapse: separate;
        border-spacing: 0;
    }
    
    /* Allow rows to expand as needed */
    .compare-list-table tr {
        height: auto;
    }
    
    .compare-list-table tr td {
        height: auto;
        max-height: none;
        overflow: visible;
    }
    
    /* Sticky first column with enhanced styling */
    .compare-list-table tr td:first-child {
        min-width: 100px;
        max-width: 100px;
        width: 110px !important;
        font-size: 1rem;
        position: sticky;
        left: 0;
        background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
        z-index: 10;
        font-weight: 600;
        color: #1a202c;
        padding: 14px 14px !important;
        line-height: 1.4;
        word-break: break-word;
        white-space: normal;
        vertical-align: middle;
    }
    
    /* Add the separator line as a pseudo-element so it stays fixed */
    .compare-list-table tr td:first-child::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 2px;
        background-color: #ccc;
        z-index: 15;
    }
    
    /* Shadow effect for sticky column */
    .compare-list-table tr td:first-child {
        box-shadow: 2px 0 4px rgba(250, 250, 250, 0.3);
    }
    
    .compare-list-table tr:nth-child(even) td:first-child {
        background: linear-gradient(135deg, #fafafa 0%, #f8f9fa 100%) !important;
    }
    
    /* Product columns - fixed width for proper scrolling */
    .compare-list-table tr td:not(:first-child) {
        min-width: 260px;
        max-width: 260px;
        width: 260px !important;
        padding: 18px 20px !important;
        font-size: 0.875rem;
        color: #374151;
        line-height: 1.8;
        vertical-align: middle;
        word-break: break-word;
        white-space: normal;
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
        text-align: left;
        position: relative;
    }
    
    /* Ensure all content inside product columns wraps properly */
    .compare-list-table tr td:not(:first-child) * {
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        max-width: 100%;
        overflow: visible !important;
    }
    
    /* Product images - optimized for mobile */
    .compare-list-product-img-large {
        height: 150px;
        padding: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fff;
    }
    
    .compare-product-img-large {
        max-height: 140px;
        max-width: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        display: block;
    }
    
    /* Ensure images show properly */
    .compare-list-table tr td img {
        max-width: 100%;
        height: auto;
        display: block;
    }
    
    /* Better text wrapping and visibility */
    .compare-list-table-content {
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        display: block;
        width: 100%;
        max-height: none;
        overflow: visible;
    }
    
    /* Special styling for product title row */
    .compare-list-table tr td a {
        color: #052F25;
        text-decoration: none;
        font-weight: 600;
        display: block;
        line-height: 1.4;
        word-break: break-word;
        white-space: normal;
        margin-bottom: 8px;
    }
    
    .compare-list-table tr td a:hover {
        color: #052F25;
        text-decoration: underline;
    }
    
    /* Add breathing space to all text content */
    .compare-list-table tr td:not(:first-child) .compare-list-table-content {
        margin-bottom: 10px;
        display: block;
    }
    
    /* Special spacing for first row (Product title/image) */
    .compare-list-table tr:first-child td:not(:first-child) {
        padding-bottom: 20px !important;
    }
    
    /* Extra spacing between different attributes */
    .compare-list-table tr td:not(:first-child) {
        padding-top: 18px !important;
        padding-bottom: 18px !important;
    }
    
    /* Clip product columns content behind the red line */
    .compare-list-table tr td:not(:first-child) {
        overflow: hidden !important;
        clip-path: inset(0 0 0 0);
    }
    
    /* Remove button positioning for mobile - HIDDEN behind red line */
    .compare-list-table .compare-list-remove {
        right: 8px;
        top: 8px;
        width: 26px;
        height: 26px;
        font-size: 13px;
        position: absolute;
        color: #dc3545;
        background: rgba(255, 255, 255, 0.95);
        border: 2px solid #dc3545;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        transition: all 0.3s ease;
        text-decoration: none;
        z-index: 5;
        box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    }
    
    .compare-list-table .compare-list-remove:hover {
        color: #fff;
        background: #dc3545;
        border-color: #dc3545;
        transform: scale(1.1);
    }
    
    /* Row striping more subtle on mobile */
    .compare-list-table tr:nth-child(even) {
        background: #fafafa;
    }
    
    .compare-list-table tr:nth-child(odd) {
        background: #ffffff;
    }
}

@media (max-width: 576px) {
    #emailSendModal .modal-dialog {
        margin: 10px;
    }

    #emailSendModal .form-label {
        font-size: 0.875rem;
    }

    #emailSendModal .form-control {
        font-size: 0.875rem;
    }
}

.grecaptcha-badge {
        visibility: hidden !important;
        font-family: 'Arial', sans-serif !important;
    }

/* Print Styles - Comprehensive Print Support */
@media print {
    /* Force landscape orientation */
    @page {
        size: landscape;
        margin: 0.5in;
    }

    /* Reset everything for print */
    * {
        box-sizing: border-box !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Body and base styles */
    body {
        font-family: Arial, sans-serif !important;
        font-size: 10px !important;
        line-height: 1.3 !important;
        color: #000 !important;
        background: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Hide everything except print content */
    body > *:not(.user_dashboard) {
        display: none !important;
    }

    /* Show dashboard container */
    .user_dashboard {
        display: block !important;
        position: static !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #fff !important;
    }

    .container {
        max-width: none !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .user_dashboard_body {
        display: block !important;
        position: static !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .container {
        max-width: none !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .user_dashboard_body {
        display: block !important;
        position: static !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Hide non-printable elements */
    .compare-header-section,
    .compare-cards-wrapper,
    #compareCards,
    .btn,
    .actions,
    .view-options,
    .compare-list-remove,
    .modal,
    .view-toggle,
    .action-group,
    .btn-action,
    .header-grid,
    .header-top-left,
    .header-top-right,
    .header-bottom-section {
        display: none !important;
    }

    /* Show print header and content */
    .print-header,
    body.compare-printing .print-header,
    #printCompareList,
    .user_dashboard_body {
        display: block !important;
        margin-bottom: 20px !important;
        border-bottom: 2px solid #ddd !important;
        padding-bottom: 15px !important;
        page-break-inside: avoid !important;
        background: #fff !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    #printCompareList {
        border-bottom: none !important;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    .print-header h2 {
        font-size: 18px !important;
        margin: 0 0 10px 0 !important;
        text-align: center !important;
        color: #333 !important;
        font-weight: bold !important;
    }

    .print-header div {
        text-align: center !important;
        margin-bottom: 5px !important;
        font-size: 12px !important;
    }

    .print-header img {
        width: 150px !important;
        height: auto !important;
        max-width: 150px !important;
    }

    .print-header a {
        color: #333 !important;
        text-decoration: none !important;
        font-weight: 500 !important;
    }

    /* Force table view to show */
    #compareTable,
    body.compare-printing #compareTable,
    .compare-list-table-wrapper,
    .compare-list-table,
    .compare-list-table tbody,
    .compare-list-table tr,
    .compare-list-table td {
        display: table !important;
        width: 100% !important;
        overflow: visible !important;
        page-break-inside: auto !important;
        background: #fff !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .compare-list-table {
        display: table !important;
    }
    
    .compare-list-table tbody {
        display: table-row-group !important;
    }
    
    .compare-list-table tr {
        display: table-row !important;
    }
    
    .compare-list-table td {
        display: table-cell !important;
    }

    .compare-list-table {
        width: 100% !important;
        border-collapse: collapse !important;
        table-layout: auto !important;
        font-size: 9px !important;
        background: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .compare-list-table tr {
        page-break-inside: avoid !important;
        background: #fff !important;
    }

    .compare-list-table tr:nth-child(even) {
        background: #fafafa !important;
    }

    .compare-list-table tr td {
        border: 1px solid #ccc !important;
        padding: 6px !important;
        text-align: left !important;
        vertical-align: top !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        font-size: 8px !important;
        color: #333 !important;
    }

    /* First column (labels) styling */
    .compare-list-table tr td:first-child {
        width: 20% !important;
        min-width: 120px !important;
        max-width: 150px !important;
        font-weight: bold !important;
        color: #333 !important;
        background-color: #f8f9fa !important;
        font-size: 1rem !important;
        white-space: nowrap !important;
    }

    .compare-list-table tr:nth-child(even) td:first-child {
        background-color: #f0f0f0 !important;
    }

    /* Large product images for print */
    .compare-list-product-img-large {
        display: block !important;
        width: 100% !important;
        height: 180px !important;
        padding: 0.25rem !important;
        text-decoration: none !important;
        overflow: hidden !important;
        background: #fff !important;
        border: 1px solid #ddd !important;
    }

    .compare-product-img-large {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        border-radius: 4px !important;
        max-width: 100% !important;
        max-height: 100% !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        display: block !important;
    }

    /* Ensure images load properly in print */
    .compare-list-product-img-large img,
    .compare-product-img-large {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Content styling */
    .compare-list-table-content {
        font-size: 8px !important;
        color: #333 !important;
        font-weight: normal !important;
        line-height: 1.3 !important;
        word-break: break-word !important;
        hyphens: auto !important;
    }

    /* Link styling */
    a {
        color: #333 !important;
        text-decoration: none !important;
    }

    /* Ensure nothing else interferes */
    .position-relative {
        position: relative !important;
    }
    
    /* Override any hidden elements for print */
    * {
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Force main content areas to show */
    section.user_dashboard,
    .container, 
    .user_dashboard_body,
    #printCompareList,
    .print-header,
    #compareTable,
    .compare-list-table-wrapper,
    .compare-list-table {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        max-height: none !important;
    }
}

