/* Reset box-sizing for all elements to include padding and border in element's total width and height */


/* Existing Styles */
body {
    background-color: #f8f9fa;
    font-family: 'Arial', sans-serif;
    padding-top: 20px;
    padding-bottom: 20px;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

.product-specs {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.specs-header {
    background-color: #007bff;
    color: white;
    padding: 10px;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.specs-content {
    border: 1px solid #007bff;
    padding: 10px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.table-heading {
    font-size: 1.5rem;
    color: black;
    text-align: left;
    border: 2px solid #333;
    padding: 10px;
    border-radius: 10px;
    background-color: #f1f1f1;
    margin-bottom: 20px;
    font-weight: bold;
}

.product-card {
    border: 1px solid #007bff;
    border-radius: 10px;
    padding: 8px; /* Reduced padding for compactness */
    margin-bottom: 12px;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-size: 14px; /* Adjusted font size for mobile */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%; /* Ensure equal height */
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    background-color: #e7f1ff;
}

.icon {
    font-size: 18px; /* Adjusted icon size */
    margin-right: 6px; /* Reduced margin */
    color: #007bff;
}



.highlight.sticky {
        background-color: #6c757d; /* Example color for sticky table header */
        color: white; /* Text color for contrast */
    }

.active-group {
    background-color: #00BA93;
    color: white;
}

.sticky {
    position: sticky;
    top: 0;
    background-color: #00BA93 !important;
    z-index: 10;
    padding: 10px 0;
    border-bottom: 20px solid #007bff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Scroll to Top Button Styles */
#scrollToTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    padding: 10px 15px;
    display: none;
    z-index: 1000;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#scrollToTopBtn:hover {
    background-color: #0056b3;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.summary-section {
    margin-top: 30px;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.summary-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

.summary-heading {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: #007bff;
}

.summary-heading i {
    margin-right: 10px;
    font-size: 24px;
}

.summary-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333333;
}

/* Comparison Modal Styles */
.modal-header {
    background-color: #007bff;
    color: white;
}

.modal-title {
    font-weight: bold;
}

.comparison-modal-product {
    text-align: center;
    margin-bottom: 15px;
}

.comparison-modal-product img {
    width: 100px;
    height: auto;
    border-radius: 10px;
    margin-bottom: 10px;
}

.comparison-modal-search {
    margin-bottom: 20px;
    position: relative;
}

.comparison-modal-suggestions {
    position: absolute;
    background-color: white;
    border: 1px solid #dee2e6;
    z-index: 1000;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: none; /* Initially hidden */
}

.suggestion-item {
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.suggestion-item:hover {
    background-color: #f1f1f1;
}

.suggestion-item img {
    width: 35px;
    height: 35px;
    object-fit: contain;
    margin-right: 8px;
    border-radius: 5px;
}

.suggestion-item .product-info {
    display: flex;
    flex-direction: column;
}

.suggestion-item .product-info .name {
    font-weight: bold;
    color: #343a40;
}

.suggestion-item .product-info .price {
    color: #28a745;
}

/* Product Name Comparison Section Styles */
.product-name-comparison {
    border: 2px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 20px;
    background-color: #fff;
    margin-top: 40px;
    overflow: hidden; /* Prevent overflow */
}

.comparison-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 8px;
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 300px; /* Adjusted for better layout */
    margin: 10px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background-color: #f9f9f9;
    height: 200px; /* Fixed height for equal height cards */
    box-sizing: border-box;
    flex-shrink: 0; /* Prevent shrinking */
}

.comparison-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.comparison-product {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 45%;
    position: relative;
}

.comparison-product img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: transform 0.3s;
}

.comparison-product img:hover {
    transform: scale(1.1);
}

.phone-name {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    word-wrap: break-word;
    color: #333;
}

.vs-icon {
    font-size: 24px;
    color: #ff5722;
    font-weight: bold;
    margin: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .comparison-card {
        max-width: 250px; /* Smaller width for tablets */
    }
}

@media (max-width: 768px) {
    /* Adjust Swiper's container to prevent overflow */
    .swiper-container {
        padding-bottom: 40px; /* Space for navigation arrows */
    }

    .comparison-card {
        max-width: 100%; /* Full width for tablets and small devices */
        height: auto; /* Allow height to adjust based on content */
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .comparison-product {
        width: 100%;
    }

    .vs-icon {
        margin: 10px 0;
    }
}

@media (max-width: 576px) {
    .comparison-card {
        padding: 10px;
    }

    .comparison-product img {
        width: 60px;
        height: 60px;
    }

    .phone-name {
        font-size: 12px;
    }

    .vs-icon {
        font-size: 20px;
        margin: 5px 0;
    }

    .summary-section {
        padding: 15px;
    }

    .summary-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .summary-heading i {
        margin-bottom: 5px;
    }

    /* Swiper Navigation Arrows Positioning for Mobile */
    .swiper-button-next, .swiper-button-prev {
        bottom: 10px;
    }

    .swiper-button-next {
        right: 10px;
    }

    .swiper-button-prev {
        left: 10px;
    }
}

/* Swiper Custom Styles */
.swiper-container {
    width: 100%;
    padding-bottom: 50px; /* Space for navigation arrows */
}

.swiper-slide {
    display: flex;
    justify-content: center;
    /* Ensure slides don't exceed container's width */
    width: auto !important;
}

/* Carousel Control Arrows */
.swiper-button-next, .swiper-button-prev {
    color: #007bff;
    width: 27px;
    height: 27px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.swiper-button-next::after, .swiper-button-prev::after {
    font-size: 16px;
}

.swiper-button-next {
    right: 10px;
    bottom: 10px;
}

.swiper-button-prev {
    left: 10px;
    bottom: 10px;
}

/* Ensure no horizontal scroll due to swiper */
.swiper-wrapper {
    align-items: stretch;
}

/* Adjust Swiper's slide padding to prevent overflow */
.swiper-slide {
    padding: 0 5px;
}

/* Prevent Swiper's container from causing overflow */
.product-name-comparison {
    overflow: hidden;
}

/* Adjust Feature Group Card Width */
.product-card h5 {
    font-size: 16px;
    margin-bottom: 8px;
}

.product-card p {
    margin-bottom: 4px;
    font-size: 13px;
}
/* Reset box-sizing for all elements to include padding and border in element's total width and height */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Existing Styles */
body {
    background-color: #f8f9fa;
    font-family: 'Arial', sans-serif;
    padding-top: 20px;
    padding-bottom: 20px;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

.product-specs {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.specs-header {
    background-color: #007bff;
    color: white;
    padding: 10px;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.specs-content {
    border: 1px solid #007bff;
    padding: 10px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.table-heading {
    font-size: 1.5rem;
    color: black;
    text-align: left;
    border: 2px solid #333;
    padding: 10px;
    border-radius: 10px;
    background-color: #f1f1f1;
    margin-bottom: 20px;
    font-weight: bold;
}

.product-card {
    border: 1px solid #007bff;
    border-radius: 10px;
    padding: 8px; /* Reduced padding for compactness */
    margin-bottom: 12px;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-size: 14px; /* Adjusted font size for mobile */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%; /* Ensure equal height */
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    background-color: #e7f1ff;
}

.icon {
    font-size: 18px; /* Adjusted icon size */
    margin-right: 6px; /* Reduced margin */
    color: #007bff;
    
}

.highlight {
    background-color:#00BA93 !important;
    font-size: 20px !important;
    color: #00BA93;
}

.active-group {
    background-color: #007bff;
    color: white;
}

.sticky {
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 10;
    padding: 10px 0;
    border-bottom: 2px solid #007bff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Scroll to Top Button Styles */
#scrollToTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    padding: 10px 15px;
    display: none;
    z-index: 1000;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#scrollToTopBtn:hover {
    background-color: #0056b3;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.summary-section {
    margin-top: 30px;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.summary-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

.summary-heading {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: #007bff;
}

.summary-heading i {
    margin-right: 10px;
    font-size: 24px;
}

.summary-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333333;
}

/* Comparison Modal Styles */
.modal-header {
    background-color: #007bff;
    color: white;
}

.modal-title {
    font-weight: bold;
}

.comparison-modal-product {
    text-align: center;
    margin-bottom: 15px;
}

.comparison-modal-product img {
    width: 100px;
    height: auto;
    border-radius: 10px;
    margin-bottom: 10px;
}

.comparison-modal-search {
    margin-bottom: 20px;
    position: relative;
}

.comparison-modal-suggestions {
    position: absolute;
    background-color: white;
    border: 1px solid #dee2e6;
    z-index: 1000;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: none; /* Initially hidden */
}

.suggestion-item {
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.suggestion-item:hover {
    background-color: #f1f1f1;
}

.suggestion-item img {
    width: 35px;
    height: 35px;
    object-fit: contain;
    margin-right: 8px;
    border-radius: 5px;
}

.suggestion-item .product-info {
    display: flex;
    flex-direction: column;
}

.suggestion-item .product-info .name {
    font-weight: bold;
    color: #343a40;
}

.suggestion-item .product-info .price {
    color: #28a745;
}

/* Product Name Comparison Section Styles */
.product-name-comparison {
    border: 2px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 20px;
    background-color: #fff;
    margin-top: 40px;
    overflow: hidden; /* Prevent overflow */
}

.comparison-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 8px;
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 300px; /* Adjusted for better layout */
    margin: 10px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background-color: #f9f9f9;
    height: 200px; /* Fixed height for equal height cards */
    box-sizing: border-box;
    flex-shrink: 0; /* Prevent shrinking */
}

.comparison-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.comparison-product {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 45%;
    position: relative;
}

.comparison-product img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: transform 0.3s;
}

.comparison-product img:hover {
    transform: scale(1.1);
}

.phone-name {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    word-wrap: break-word;
    color: #333;
}

.vs-icon {
    font-size: 24px;
    color: #ff5722;
    font-weight: bold;
    margin: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .comparison-card {
        max-width: 250px; /* Smaller width for tablets */
    }
}

@media (max-width: 768px) {
    /* Adjust Swiper's container to prevent overflow */
    .swiper-container {
        padding-bottom: 40px; /* Space for navigation arrows */
    }

    .comparison-card {
        max-width: 100%; /* Full width for tablets and small devices */
        height: auto; /* Allow height to adjust based on content */
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .comparison-product {
        width: 100%;
    }

    .vs-icon {
        margin: 10px 0;
    }
}

@media (max-width: 576px) {
    .comparison-card {
        padding: 10px;
    }

    .comparison-product img {
        width: 60px;
        height: 60px;
    }

    .phone-name {
        font-size: 12px;
    }

    .vs-icon {
        font-size: 20px;
        margin: 5px 0;
    }

    .summary-section {
        padding: 15px;
    }

    .summary-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .summary-heading i {
        margin-bottom: 5px;
    }

    /* Swiper Navigation Arrows Positioning for Mobile */
    .swiper-button-next, .swiper-button-prev {
        bottom: 10px;
    }

    .swiper-button-next {
        right: 10px;
    }

    .swiper-button-prev {
        left: 10px;
    }
}

/* Swiper Custom Styles */
.swiper-container {
    width: 100%;
    padding-bottom: 50px; /* Space for navigation arrows */
}

.swiper-slide {
    display: flex;
    justify-content: center;
    /* Ensure slides don't exceed container's width */
    width: auto !important;
}

/* Carousel Control Arrows */
.swiper-button-next, .swiper-button-prev {
    color: #007bff;
    width: 27px;
    height: 27px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.swiper-button-next::after, .swiper-button-prev::after {
    font-size: 16px;
}

.swiper-button-next {
    right: 10px;
    bottom: 10px;
}

.swiper-button-prev {
    left: 10px;
    bottom: 10px;
}

/* Ensure no horizontal scroll due to swiper */
.swiper-wrapper {
    align-items: stretch;
}

/* Adjust Swiper's slide padding to prevent overflow */
.swiper-slide {
    padding: 0 5px;
}

/* Prevent Swiper's container from causing overflow */
.product-name-comparison {
    overflow: hidden;
}

/* Adjust Feature Group Card Width */
.product-card h5 {
    font-size: 16px;
    margin-bottom: 8px;
}

.product-card p {
    margin-bottom: 4px;
    font-size: 13px;
}
