/* /assets/css/compare_styles.css - v1.0 - Styles for Game Comparison Page */

/* --- Base & Layout --- */
html {
    scroll-padding-top: 70px;
    /* Adjust based on final nav height if sticky */
    font-family: 'Roboto', sans-serif;
    line-height: 1.5;
    color: #333;
}

body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    background-color: #f4f6f8;
    /* Light grey background */
    margin: 0;
}

main {
    flex: 1;
    /* Allow main content to grow and push footer down */
    padding: 1.5rem 0;
}

.container {
    width: 95%;
    max-width: 1200px;
    /* Max width for content */
    margin: 0 auto;
    /* Center container */
}

.section {
    background: #fff;
    /* White background for sections */
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* Add padding to specific sections if needed */
#game-selection,
#popular-comparisons,
#add-game-section {
    padding: 1.5rem 2rem;
}

#comparison-results {
    /* Remove default section padding for table */
    padding: 0;
    background: transparent;
    box-shadow: none;
}

/* --- Typography & Headings --- */
h1 {
    font-size: 2.2rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #263238;
    /* Dark blue-grey */
    line-height: 1.3;
    font-weight: 500;
}

h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid #64b5f6;
    /* Light blue border */
    margin-bottom: 1.5rem;
    padding-bottom: .6rem;
    color: #1e88e5;
    /* Blue */
    display: flex;
    align-items: center;
    font-weight: 400;
}

h2 i.material-icons {
    /* Icon within H2 */
    margin-right: 10px;
    font-size: 2rem;
    vertical-align: middle;
    color: inherit;
    /* Inherit H2 color */
}

h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #455a64;
    /* Medium blue-grey */
    display: flex;
    align-items: center;
    font-weight: 400;
}

h3 i.material-icons {
    /* Icon within H3 */
    margin-right: 8px;
    font-size: 1.8rem;
    vertical-align: middle;
    color: inherit;
}

h4 {
    /* Recommendation section titles */
    font-size: 1.3rem;
    margin-top: 1rem;
    margin-bottom: 1.2rem;
    color: #37474f;
    /* Darker blue-grey */
    font-weight: 500;
}

.divider {
    margin: 2.5rem 0;
    background-color: #e0e0e0;
    /* Lighter grey divider */
}

.caption {
    /* Small text notes */
    font-size: 0.85rem;
    color: #757575;
    /* Grey text */
}

.caption i.material-icons {
    /* Icon in caption */
    font-size: 1em;
    /* Match text size */
    vertical-align: text-bottom;
    margin-right: 4px;
}


/* --- Game Selection Form --- */
#game-selection .input-field {
    position: relative;
    /* Needed for suggestion positioning */
}

.input-field .prefix~input {
    /* Adjust input position when prefix icon is present */
    margin-left: 3rem;
    width: calc(100% - 3.5rem);
}

.input-field .remove-game-icon {
    /* Style the 'X' icon to clear input */
    position: absolute;
    top: 0.8rem;
    /* Adjust vertical position */
    right: 0.5rem;
    /* Adjust horizontal position */
    cursor: pointer;
    color: #9e9e9e;
    /* Grey */
    display: none;
    /* Hidden by default */
    font-size: 1.4rem;
}

.input-field .remove-game-icon:hover {
    color: #f44336;
    /* Red on hover */
}

.input-field input[type=text]:read-only {
    /* Style for selected/readonly game input */
    color: #555;
    border-bottom: 1px solid #9e9e9e;
    box-shadow: none;
    cursor: default;
    background-color: #f0f0f0;
    padding-left: 5px;
    /* Add some padding */
    font-weight: 500;
}

/* Suggestions Dropdown */
.suggestions-container {
    position: relative;
    /* Or absolute, depending on desired behavior */
    z-index: 1000;
    /* Ensure suggestions appear above other content */
}

.suggestions-container ul.collection {
    /* Style the suggestion list */
    position: absolute;
    width: 100%;
    margin: 0;
    border: 1px solid #ccc;
    border-top: none;
    max-height: 300px;
    /* Limit height and enable scroll */
    overflow-y: auto;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 4px 4px;
    left: 0;
    /* Align with input field */
    display: none;
    /* Hidden by default */
}

.suggestion-item {
    /* Individual suggestion item */
    display: flex !important;
    /* Override Materialize default if needed */
    align-items: center;
    cursor: pointer;
    padding: .5rem .8rem !important;
    transition: background-color 0.1s ease;
    min-height: auto !important;
    border-bottom: 1px solid #eee;
    /* Separator line */
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.active {
    /* Highlight on hover or keyboard selection */
    background-color: #e3f2fd;
    /* Light blue background */
}

.suggestion-item img.circle {
    /* Suggestion image */
    width: 30px !important;
    height: 30px !important;
    vertical-align: middle;
    margin-right: 10px;
    flex-shrink: 0;
    object-fit: contain;
}

.suggestion-title {
    /* Suggestion game title */
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
    flex-grow: 1;
    /* Allow title to take remaining space */
}

.suggestion-price {
    /* Suggestion price (if shown) */
    font-size: .8rem;
    color: #00796b;
    /* Teal color */
    margin-left: 10px;
    /* Space from title */
    flex-shrink: 0;
}


/* --- Comparison Table Styles --- */
#comparison-table-container {
    overflow-x: visible;
    /* Changed from auto - overflow:auto breaks position:sticky */
    overflow-y: visible;
    margin-top: 1.5rem;
}

#comparison-table {
    width: 100%;
    border-collapse: separate;
    /* Use separate for border-spacing */
    border-spacing: 0 10px;
    /* Vertical spacing between rows */
    table-layout: fixed;
    /* Fixed layout helps column width */
    background-color: #fff;
    /* White background for table itself */
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

#comparison-table thead {
    position: sticky;
    top: 0;
    /* Will be adjusted by JS based on nav height */
    z-index: 100;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* Shadow under sticky header */
}

#comparison-table thead th {
    text-align: center;
    vertical-align: top;
    padding: 15px 10px;
    border-bottom: 2px solid #e0e0e0;
    background-color: transparent;
    /* Use thead background */
    /* Calculate width based on number of games */

    width: 25%;
    /* Use a static default OR add dynamic width in inline style */
}


#comparison-table thead th:not(:last-child) {
    border-right: 1px solid #eee;
    /* Vertical separator */
}

/* Header Content (Image, Title, Price) */
.game-title-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-height: 130px;
    /* Ensure headers have a minimum height */
    padding-bottom: 5px;
    /* Add some padding below content */
}

.game-title-header img {
    /* Styles for game header images */
    display: block;
    /* Correct display */
    max-width: 100%;
    /* Fit within the cell width */
    width: auto;
    /* Maintain aspect ratio */
    height: auto;
    /* Maintain aspect ratio */
    max-height: 80px;
    /* Max height constraint */
    object-fit: contain;
    /* Scale down, preserve aspect ratio */
    border-radius: 3px;
    border: 1px solid #ddd;
    margin: 0 auto 10px auto;
    /* Center and add bottom margin */
}

.game-title-header .game-name {
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.3;
    color: #1e88e5;
    /* Blue */
    margin-bottom: 5px;
    word-break: break-word;
    /* Allow long titles to wrap */
}

.game-title-header .game-price {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

/* Remove Column Button in Header */
.remove-column-btn {
    position: absolute;
    top: 2px;
    /* Adjust position */
    right: 2px;
    /* Adjust position */
    background: rgba(0, 0, 0, 0.08);
    color: #555 !important;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    line-height: 0;
    /* Important for icon alignment */
    transition: all 0.2s ease;
    z-index: 101;
    border: none;
    display: inline-flex;
    /* Use flex for centering icon */
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    text-decoration: none !important;
}

.remove-column-btn:hover {
    background: rgba(211, 47, 47, 0.8);
    /* Red background on hover */
    color: #fff !important;
    /* White icon on hover */
}

.remove-column-btn i.material-icons {
    font-size: 18px;
    vertical-align: middle;
    color: inherit !important;
    /* Inherit color from link */
    display: block;
    line-height: 1;
}

/* Table Body Row Styles */
#comparison-table tr.group-header {
    /* Group titles like "General Information" */
    position: sticky;
    /* JS will set 'top' style dynamically */
    z-index: 90;
    /* Below main header */
}

#comparison-table tr.group-header td {
    background-color: #3b5998;
    /* Dark blue background */
    color: #fff !important;
    /* White text */
    text-align: left;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 10px 15px;
    border-radius: 4px;
    /* Rounded corners */
    /* Clip background to padding box to prevent bleeding with border-spacing */
    background-clip: padding-box;
}

#comparison-table tr.group-header td i.material-icons {
    /* Icon in group header */
    vertical-align: middle;
    margin-right: 10px;
    font-size: 1.3rem;
    color: #ffeb3b;
    /* Yellow icon */
}

#comparison-table tr.feature-name-header td {
    /* Feature name rows (e.g., "Developer") */
    text-align: left;
    /* Align left */
    padding-left: 15px;
    /* Indent slightly */
    font-weight: 600;
    font-size: 0.9rem;
    color: #555;
    /* Dark grey text */
    background-color: #f9f9f9;
    /* Very light grey background */
    padding-top: 8px;
    padding-bottom: 8px;
    border-top: 1px solid #eee;
    /* Separator */
}

#comparison-table tr.feature-value-row td {
    /* Rows containing the actual comparison data */
    text-align: left;
    /* Align text left for readability */
    padding: 12px 10px 12px 15px;
    /* Add left padding to align with feature name */
    font-size: 0.9rem;
    vertical-align: top;
    border-bottom: 1px dotted #eee;
    /* Dotted separator */
    /* Column width (calculated in thead, inherited here due to table-layout: fixed) */
    overflow-wrap: break-word;
    /* Break long words/URLs */
    word-wrap: break-word;
}

#comparison-table tr.feature-value-row td:not(:last-child) {
    border-right: 1px solid #eee;
    /* Vertical separator between game columns */
}

#comparison-table tr.feature-value-row:last-of-type td {
    border-bottom: none;
    /* Remove bottom border on last row */
}

/* Collapsible Content (Read More) */
.collapsible-content {
    position: relative;
}

.collapsible-content .truncated-content {
    max-height: 65px;
    /* Initial collapsed height */
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease-out;
}

.collapsible-content .truncated-content::after {
    /* Fade out effect */
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1) 90%);
    pointer-events: none;
    /* Allow clicking through fade */
}

.collapsible-content.is-expanded .truncated-content {
    /* Expanded state */
    max-height: 1000px;
    /* Large enough height */
    transition: max-height 0.4s ease-in;
    overflow: visible;
}

.collapsible-content.is-expanded .truncated-content::after {
    display: none;
    /* Remove fade when expanded */
}

.read-more-btn {
    /* "Read More" / "Read Less" button */
    font-size: 0.8rem !important;
    display: block;
    margin: 5px auto 0 auto;
    width: fit-content;
    color: #1e88e5 !important;
    /* Ensure button text color */
}

.read-more-btn i.material-icons {
    font-size: 1.1rem;
    vertical-align: middle;
    margin-left: 2px;
}

/* Styles for specific content within table cells */
td .compact-list {
    /* Unordered lists */
    margin: 0;
    padding-left: 0;
    /* Remove default padding */
    list-style-type: none;
    font-size: 0.85rem;
    line-height: 1.6;
    text-align: left;
}

td .compact-list li {
    margin-bottom: 4px;
    padding-left: 15px;
    /* Indent list items */
    position: relative;
}

td .compact-list li::before {
    /* Custom bullet point */
    content: '•';
    color: #64b5f6;
    /* Light blue bullet */
    position: absolute;
    left: 0;
    top: 1px;
}

td .compact-list li strong {
    /* Bold text within list */
    color: #333;
}

td .faq-list {
    /* Specific styling for FAQ lists */
    text-align: left;
}

td .faq-list li {
    margin-bottom: 8px;
    border-bottom: 1px dotted #eee;
    padding-bottom: 5px;
}

td .faq-list li:last-child {
    border-bottom: none;
}

.ssd-recommended,
.ssd-required {
    /* Storage notes */
    font-style: italic;
    font-size: 0.85em;
    display: block;
    margin-top: 2px;
}

.ssd-recommended {
    color: #4caf50;
}

/* Green */
.ssd-required {
    color: #f44336;
    font-weight: bold;
}

/* Red and bold */

/* System Requirement Mini Block */
.sys-req-mini {
    font-size: 0.85rem;
    line-height: 1.45;
    text-align: left;
    padding-left: 5px;
}

.sys-req-mini .req-label {
    /* Label like "CPU:", "GPU:" */
    display: inline-block;
    min-width: 35px;
    /* Align labels */
    font-weight: 500;
    color: #555;
}

.sys-req-mini .req-label i.material-icons {
    /* Icon next to label */
    font-size: 0.9rem;
    margin-right: 3px;
    vertical-align: text-bottom;
    color: #777;
}

.na-placeholder {
    /* Style for "N/A" or missing data */
    color: #9e9e9e;
    /* Grey text */
    font-style: italic;
}

td .btn-small {
    /* Buttons within table cells (e.g., video links) */
    padding: 0 1rem;
    height: 28px;
    line-height: 28px;
    font-size: 0.8rem;
    vertical-align: middle;
    /* Align button better with text */
}

td .btn-small i.material-icons {
    font-size: 1rem;
    height: 28px;
    line-height: 28px;
    vertical-align: middle;
}

/* --- Popular Comparisons Slider --- */
#popular-comparisons {
    margin-top: 2rem;
}

#popular-comparisons h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #37474f;
    /* Dark blue-grey */
    border-bottom: none;
    /* No border needed */
}

.popular-swiper {
    /* Add padding to prevent buttons/pagination overlap */
    padding: 10px 40px 40px 40px;
    overflow: hidden;
    /* Needed for Swiper */
}

.comparison-card {
    /* Individual slide content */
    display: flex;
    align-items: center;
    justify-content: space-around;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background-color: #fff;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
    height: 100%;
    /* Make cards fill slide height */
    box-sizing: border-box;
}

.comparison-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    /* Add hover effect */
}

.comparison-card .game-info {
    text-align: center;
    flex: 1;
    /* Allow game info sections to take space */
    min-width: 0;
    /* Prevent flex items from overflowing */
}

.comparison-card .game-info img {
    max-width: 80px;
    max-height: 50px;
    /* Adjust size as needed */
    object-fit: contain;
    display: block;
    margin: 0 auto 8px auto;
    /* Center image */
    border: 1px solid #eee;
    border-radius: 3px;
}

.comparison-card .game-info .name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    display: block;
    line-height: 1.3;
    word-wrap: break-word;
    /* Wrap long game titles */
    min-height: 2.6em;
    /* Reserve space for two lines */
}

.comparison-card .vs-separator {
    /* "VS" text */
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    background-color: #555;
    /* Dark grey background */
    border-radius: 50%;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    flex-shrink: 0;
    /* Prevent VS from shrinking */
    margin: 0 10px;
    /* Space around VS */
}

/* Swiper Navigation/Pagination */
.popular-swiper .swiper-button-next,
.popular-swiper .swiper-button-prev {
    color: #607d8b !important;
    /* Button color */
    top: 45%;
    /* Adjust vertical position */
}

.popular-swiper .swiper-button-next:hover,
.popular-swiper .swiper-button-prev:hover {
    color: #1e88e5 !important;
    /* Blue on hover */
}

.popular-swiper .swiper-button-next.swiper-button-disabled,
.popular-swiper .swiper-button-prev.swiper-button-disabled {
    opacity: 0.35;
    /* Fade disabled buttons */
}

.popular-swiper .swiper-pagination {
    bottom: 8px !important;
    /* Position pagination at bottom */
}

.popular-swiper .swiper-pagination-bullet {
    background: #90a4ae;
    /* Bullet color */
    opacity: 0.6;
}

.popular-swiper .swiper-pagination-bullet-active {
    background: #1e88e5;
    /* Active bullet color */
    opacity: 1;
}

/* --- Laptop Recommendations Section --- */
#laptop-recommendations .tabs .tab a {
    color: #1e88e5;
    /* Blue tab text */
}

#laptop-recommendations .tabs .tab a.active {
    color: #0d47a1;
    /* Darker blue for active tab */
}

#laptop-recommendations .tabs .indicator {
    background-color: #1e88e5;
    /* Blue indicator line */
}

.tabs-container {
    margin-bottom: 1.5rem;
    /* Space below tabs */
}

.tabs-container .tab-content-wrapper {
    /* Container for slider in each tab */
    padding-top: 1.5rem;
    opacity: 1;
    transition: opacity 0.3s ease;
    position: relative;
    /* For loader positioning if needed */
}

/* Optional: Loading state for recommendations */
.tabs-container .tab-content-wrapper.loading {
    min-height: 450px;
    /* Prevent collapsing during load */
    opacity: 0.5;
    pointer-events: none;
    /* Disable interaction during load */
}

/* Laptop Slider Styles */
.laptop-slider {
    width: 100%;
    overflow: hidden;
    /* Padding accounts for nav buttons */
    padding: 0 40px 40px 40px;
    box-sizing: border-box;
}

.laptop-slider .swiper-wrapper {
    align-items: stretch;
    /* Make slides stretch vertically */
}

.laptop-slider .swiper-slide {
    height: auto !important;
    /* Override Swiper's height */
    display: flex;
    /* Use flex to help card stretching */
    justify-content: center;
    align-items: stretch;
    /* Stretch items vertically */
    flex-shrink: 0;
    box-sizing: border-box;
}

.laptop-slider .card {
    /* Style individual laptop card */
    display: flex;
    flex-direction: column;
    /* Stack card sections vertically */
    margin: 5px 0;
    width: 100%;
    /* Card fills slide width */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    background-color: #fff;
}

.laptop-slider .card .card-image {
    max-height: 180px;
    /* Limit image height */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
    /* Padding around image */
    border-bottom: 1px solid #eee;
    /* Separator */
}

.laptop-slider .card .card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* Scale image within bounds */
}

.laptop-slider .card .card-content {
    flex-grow: 1;
    /* Allow content to take remaining space */
    padding: 14px;
}

.laptop-slider .card .card-content .card-title {
    font-size: 0.95rem;
    line-height: 1.3;
    margin-bottom: 8px;
    font-weight: 500;
}

.laptop-slider .card .card-action {
    padding: 10px 14px;
    border-top: 1px solid #eee;
    /* Separator */
    text-align: center;
}

/* Styles for revealed content (scores, etc.) */
.laptop-slider .card .card-reveal {
    padding: 16px;
}

.laptop-slider .card .card-reveal p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.laptop-slider .card .card-reveal .btn-small {
    margin-top: 15px;
}

/* Laptop Slider Navigation/Pagination */
.laptop-slider .swiper-button-next,
.laptop-slider .swiper-button-prev {
    color: #607d8b !important;
    top: 50%;
    /* Center vertically */
    transform: translateY(-70%);
    /* Adjust vertical centering fine-tuning */
    /* Adjust size if needed */
    /* width: calc(var(--swiper-navigation-size) / 44 * 27); */
    /* height: var(--swiper-navigation-size); */
    /* margin-top: calc(0px - (var(--swiper-navigation-size) / 2)); */
    transition: opacity 0.2s ease;
}

.laptop-slider .swiper-button-next:hover,
.laptop-slider .swiper-button-prev:hover {
    color: #1e88e5 !important;
    /* Blue on hover */
}

.laptop-slider .swiper-button-next.swiper-button-disabled,
.laptop-slider .swiper-button-prev.swiper-button-disabled {
    opacity: 0.35;
    cursor: auto;
    pointer-events: none;
}

.laptop-slider .swiper-button-prev {
    left: 5px;
}

/* Position button left */
.laptop-slider .swiper-button-next {
    right: 5px;
}

/* Position button right */

.laptop-slider .swiper-pagination {
    position: absolute;
    bottom: 8px !important;
    /* Position pagination */
    left: 0;
    width: 100%;
}

.laptop-slider .swiper-pagination-bullet {
    background: #90a4ae;
    /* Bullet color */
    opacity: 0.6;
}

.laptop-slider .swiper-pagination-bullet-active {
    background: #1e88e5;
    /* Active bullet color */
    opacity: 1;
}

/* Styles for "No Laptops Found" messages */
.tab-content-wrapper p.no-laptops-message {
    width: 100%;
    text-align: center;
    padding: 3rem 0;
    color: #757575;
    font-size: 1.1rem;
    font-style: italic;
}

.recommendation-group {
    /* Add spacing between recommendation groups */
    border-top: 1px dashed #ccc;
    padding-top: 1.5rem;
    margin-top: 2rem;
}

.recommendation-group:first-of-type {
    border-top: none;
    /* No border on the very first group */
    margin-top: 0;
    padding-top: 0;
}

/* Tier Notice Styles (Match, Fallback) */
.tier-notice {
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.tier-notice i.material-icons {
    margin-right: 8px;
    font-size: 1.2rem;
    /* Slightly larger icon */
}

/* --- Footer --- */
footer.page-footer {
    padding-top: 20px;
    /* Reduce default padding */
    margin-top: 3rem;
    /* Space above footer */
}

footer.page-footer .footer-copyright {
    padding: 15px 0;
    /* Adjust padding */
}


/* --- Responsive Adjustments --- */
@media only screen and (max-width: 992px) {

    /* Medium devices */
    .container {
        width: 96%;
    }

    .section {
        padding: 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.4rem;
    }
}

/*────────────────────────────────────────────────────────────────*/
/*  MOBILE (≤600px)                                               */
/*────────────────────────────────────────────────────────────────*/
@media only screen and (max-width: 600px) {

    /* Container MUST have overflow:visible for sticky to work */
    #comparison-table-container {
        overflow: visible !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        max-height: none;
    }

    /* Sticky header on the viewport */
    #comparison-table thead {
        position: sticky;
        top: 0;
        z-index: 100;
        background-color: #fff;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    #comparison-table tr.group-header {
        position: sticky;
        top: 110px;
        /* match your thead height */
        z-index: 99;
        background-color: #3b5998;
    }

    /* Tighten up cell padding & fonts */
    #comparison-table thead th {
        padding: 10px 5px;
        min-height: 110px;
    }

    #comparison-table tr.group-header td {
        padding: 8px 10px;
    }

    #comparison-table tr.feature-name-header td {
        padding: 6px 5px 6px 10px;
        font-size: 0.8rem;
    }

    #comparison-table tr.feature-value-row td {
        padding: 8px 5px 8px 10px;
        font-size: 0.85rem;
    }

    /* Small‐screen tweaks */
    .game-title-header img {
        max-height: 60px;
    }

    td .btn-small {
        display: block;
        margin: 2px auto;
    }

    .caption {
        font-size: 0.8rem;
    }
}


/* ==========================================================================
   Custom Laptop Card Styles (Building on Materialize)
   ========================================================================== */

/*────────────────────────────────────────────────────────────────*/
/*   Laptop‐card slider styles                                   */
/*────────────────────────────────────────────────────────────────*/

/*─────────────────────────────────────────────────*/
/*  Compact laptop‐card styling                   */
/*─────────────────────────────────────────────────*/

/* 1) Card container – allow flexible height */
.laptop-card {
    border-radius: 6px;
    background: #fff;
    display: flex;
    flex-direction: column;
    margin: 8px;
}

/* 2) Clickable image box – fixed/clamped height */
.laptop-card .card-image-link,
.laptop-card .card-image {
    display: block;
    overflow: hidden;
    padding: 0;
    height: clamp(150px, 20vw, 200px);
    margin-bottom: 4px;
}

.laptop-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* overflow menu */
.laptop-card .card-menu-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    padding: 4px;
    cursor: pointer;
    z-index: 10;
}

/* 3) Content */
.laptop-card .card-content {
    padding: 8px;
    flex-grow: 1;
    overflow: visible;
}

.laptop-card .card-title {
    font-size: clamp(1rem, 3vw, 1.2rem);
    line-height: 1.2;
    margin-bottom: 6px;
    word-break: break-word;
}

/* 4) Specs – flex wrap per line */
.laptop-card .spec-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.laptop-card .laptop-spec {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 4px;
}

.laptop-card .laptop-spec i.material-icons {
    flex: 0 0 auto;
    margin-right: 6px;
    font-size: 1rem;
}

.laptop-card .spec-text {
    flex: 1 1 auto;
    font-size: clamp(0.75rem, 2.5vw, 0.85rem);
    line-height: 1.2;
    word-break: break-word;
}

/* 5) Action */
.laptop-card .card-action {
    padding: 6px 8px;
    background: #fafafa;
    margin-top: auto;
}

.laptop-card .view-details-btn {
    width: 100%;
    font-size: 0.85rem;
    padding: 6px 0;
    text-transform: uppercase;
}

/*─────────────────────────────────────────────────*/
/*  Tablet (601–1024px)                            */
/*─────────────────────────────────────────────────*/
@media (min-width: 601px) and (max-width: 1024px) {
    .laptop-card {
        margin: 6px;
    }

    .laptop-card .card-image,
    .laptop-card .card-image-link {
        height: clamp(140px, 25vw, 180px);
    }

    .laptop-card .card-content {
        padding: 6px;
    }

    .laptop-card .card-title {
        font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    }

    .laptop-card .spec-text {
        font-size: clamp(0.75rem, 2.2vw, 0.85rem);
    }
}

/*─────────────────────────────────────────────────*/
/*  Mobile (≤600px)                                */
/*─────────────────────────────────────────────────*/
@media (max-width: 600px) {
    .laptop-card {
        margin: 4px;
        border-radius: 4px;
    }

    .laptop-card .card-image,
    .laptop-card .card-image-link {
        height: clamp(120px, 30vw, 150px);
    }

    .laptop-card .card-content {
        padding: 4px;
    }

    .laptop-card .card-title {
        font-size: clamp(0.8rem, 4vw, 1rem);
    }

    .laptop-card .spec-text {
        font-size: clamp(0.7rem, 3.5vw, 0.8rem);
    }

    .laptop-card .card-action {
        padding: 4px 6px;
    }

    .laptop-card .view-details-btn {
        font-size: 0.75rem;
        padding: 4px 0;
    }

    .laptop-card .card-menu-btn {
        display: none;
    }
}


/*────────────────────────────────────────────────────────────────*/
/*  1) Fix laptop‐image height & ensure no cropping             */
/*────────────────────────────────────────────────────────────────*/

/* override any previous aspect‐ratio hacks */
.laptop-card .card-image,
.laptop-card .card-image-link {
    padding-top: 0 !important;
    /* clamp between 100px and 140px, scaling with vw in between */
    height: clamp(100px, 15vw, 140px) !important;
    overflow: hidden;
}

.laptop-card .card-image img {
    /* let the image size itself within that box without cropping */
    max-height: 100%;
    max-width: 100%;
    height: auto;
    width: auto;
    object-fit: contain;
    /* preserve full image */
    display: block;
    margin: 0 auto;
}

/* tighten up margins so cards stay compact */
.laptop-card {
    margin: 4px;
}

.laptop-card .card-content {
    padding: 4px;
}

.laptop-card .card-action {
    padding: 4px 6px;
}

.laptop-card .view-details-btn {
    font-size: 0.8rem;
    padding: 4px 0;
}

/*────────────────────────────────────────────────────────────────*/
/*   1) Ensure the .card-action lays out two buttons side-by-side */
/*────────────────────────────────────────────────────────────────*/
.laptop-slider .card .card-action {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* buttons hug left */
    gap: 8px;
    /* space between buttons */
}

/* Existing “View Details” styling (keep yours exactly as before) */
.laptop-slider .card .card-action .view-details-btn {
    font-size: 0.8rem;
    padding: 6px 10px;
    text-transform: uppercase;
    background: #4caf50;
    /* example green—use your color */
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
}

/*────────────────────────────────────────────────────────────────*/
/*   2) New “Buy Now” button styling                             */
/*────────────────────────────────────────────────────────────────*/
.laptop-slider .card .card-action .buy-now-btn a {
    font-size: 0.8rem;
    padding: 6px 10px;
    text-transform: uppercase;
    background: #ff9900;
    /* Amazon-style orange */
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
}

/* Subtle hover effect */
.laptop-slider .card .card-action .buy-now-btn:hover {
    background: #fff;
    color: #ff9900;
    border: 1px solid #ff9900;
}