:root {
    --light-green: #e8f2ea;
    --secure-green: #1dbf73;
    --dark-green: #589d62;
    --dark-gray: #231f20;
}

/* Settings */

#product-compare-component h1,
#product-compare-component h2,
#product-compare-component h3,
#product-compare-component h4,
#product-compare-component h5,
#product-compare-component h6,
#product-compare-component p,
#product-compare-component select,
#product-compare-component label {
    margin: 0;
    padding: 0;
}


.compare-component-wrapper {
    padding: 0 1rem;
}

#product-compare-component {
    display: flex;
    flex-direction: column;
    padding: 1.75rem 0;
    gap: 1rem;
    color: var(--dark-gray);
    border-bottom: 1px solid #aaa;
    border-top: 1px solid #aaa;
}

#product-compare-component .product-comparison-title {
    font-size: 1.375rem;
}

#product-compare-component .product-comparison-title span:nth-child(3) {
    color: var(--secure-green);
}


#product-compare-component .product-selector select {
    padding: 0.25rem 1rem 0.25rem 2rem;
    border: 1px solid var(--dark-gray);
    text-align: center;
    height: unset;
    font-size: 0.875rem;
    direction: rtl;
}


#product-compare-component .product-comparison-row {
    gap: 1rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#product-compare-component .product-comparison-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#product-compare-component .product-display {
    flex-grow: 1;
    padding: 0.5rem;
    text-align: center;
}

#product-compare-component .product-display img {
    max-width: 18rem;
    width: 84%;
    margin: 0 auto;
    object-fit: contain;
    aspect-ratio: 1 / 1;
}

#product-compare-component a.product-link {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.875rem;
    cursor: pointer;
    height: 100%;
}

#product-compare-component a.product-link:focus .compare-price,
#product-compare-component a.product-link:hover .compare-price {
    color: var(--dark-gray);
}


#product-compare-component .product-details, .compare-titles {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.25rem;
}

#product-compare-component .compare-title {
    font-size: 0.875rem;
    font-weight: 600;
}

#product-compare-component .compare-subtitle {
    font-size: 0.875rem;
    flex: 1;
}

#product-compare-component .compare-price {
    color: var(--dark-green);
    font-weight: 600;
    transition: color 0.3s ease-in-out;
}

#product-compare-component .compare-link-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}


.compare-component-wrapper:has(.home-page) {
    padding: 1rem 0;
}

/* Home Page */
#product-compare-component.home-page {
    padding: 0;
    border: none;
}

#product-compare-component.home-page .product-comparison-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.compare-component-wrapper:has(.compare-page) {
    padding: 1rem 0 0.5rem;
}

/* Compare Page */
#product-compare-component.compare-page {
    padding: 0;
    border: none;
}

#product-compare-component.compare-page .product-comparison-title {
    text-align: center;
    font-weight: 700;
}


@media screen and (min-width: 768px) {
    #product-compare-component .product-selector select {
        font-size: 1rem;
    }

    /*Home Page*/
    #product-compare-component.home-page .product-comparison-title {
        font-size: 2.5rem;
        font-weight: 400;
    }

    #product-compare-component.home-page .product-selector select {
        font-size: 1.125rem;
        padding: 0.5rem 1rem 0.5rem 2rem;
    }

    #product-compare-component.home-page .product-display {
        padding: 0.75rem;
    }

    #product-compare-component.home-page .compare-title {
        font-size: 1.125rem;
    }

    #product-compare-component.home-page .compare-subtitle {
        font-size: 1rem;
    }

    #product-compare-component.home-page .compare-price {
        font-size: 1.25rem;
    }

    /*Compare Page*/
    #product-compare-component.compare-page .product-comparison-title {
        font-size: 2rem;
    }
}

@media screen and (min-width: 1024px) {
    #product-compare-component .product-selector select {
        font-size: 1.125rem;
        padding: 0.5rem 1rem 0.5rem 2rem;
    }

    #product-compare-component .product-display {
        padding: 0.75rem;
    }

    #product-compare-component .compare-title {
        font-size: 1.125rem;
    }

    #product-compare-component .compare-subtitle {
        font-size: 1rem;
    }

    #product-compare-component .compare-price {
        font-size: 1.25rem;
    }

    #product-compare-component.compare-page .product-comparison-title {
        font-size: 2.5rem;
    }
}