/* This css file contains all styles for the product landing pages. */

/* Product detail styles */
.product-detail-container {
    display: flex;
    justify-content: space-between;
    padding-left: 100px;
    padding-right: 100px;
}

.product-detail {
    display: flex;
    align-items: center;
}

.product-detail .product-image {
    max-width: 400px;
    max-height: 400px;
    width: auto;
    height: auto;
}

.product-detail .product-detail-text {
    margin-left: 20px;
}

/* Vendor table styling */
.vendor-tables-container {
    width: 100%;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding-left: 100px;
    padding-right: 100px;
}

.vendor-table-in-stock-container,
.vendor-table-out-of-stock-container {
    width: 100%;
    margin-bottom: 20px;
}

/* Ensure the tables take up the full width */
.in-stock-vendor-table,
.out-of-stock-vendor-table {
    width: 100%;
    border-collapse: collapse;
}

.in-stock-vendor-table th, 
.in-stock-vendor-table td,
.out-of-stock-vendor-table th, 
.out-of-stock-vendor-table td {
    border: 1px solid #cccccc;
    padding: 10px;
    text-align: left;
}

.in-stock-vendor-table th,
.out-of-stock-vendor-table th {
    background-color: #f2f2f2;
}

.in-stock-vendor-table td button,
.out-of-stock-vendor-table td button {
    padding: 5px 10px;
    font-size: 14px;
}

/* Modal Styles for contact button */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    padding-top: 100px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    text-align: center;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.contact-info {
    margin-top: 20px;
}

.contact-details {
    display: none; /* Initially hidden */
    justify-content: space-between;
    align-items: center; /* Align items vertically centered */
    margin-top: 20px;
}

.contact-email, .contact-phone {
    flex: 1;
    text-align: center;
}

#reveal-contact {
    margin-top: 20px;
}

/* Specific style for the Contact Seller button page */
#contact-button {
    background-color: #d6cbd2; /* Green background */
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#contact-button:hover {
    background-color: #d6cbd2; /* Darker green on hover */
    transform: translateY(-2px); /* Slight lift effect */
}

#contact-button:active {
    background-color: #d6cbd2; /* Even darker green on click */
    transform: translateY(0); /* Remove lift effect */
}

#contact-form #name {
    width: 100%;
    padding: 5px;
    margin-bottom: 10px;
}

#contact-form #email {
    width: 100%;
    padding: 5px;
    margin-bottom: 10px;
}

#contact-form #subject {
    width: 100%;
    padding: 5px;
    margin-bottom: 10px;
}

#contact-form #message {
    width: 100%;
    padding: 5px;
    margin-bottom: 10px;
    height: 100px;
}

/* Related Products Section */
.related-products-container {
    display: flex;
    align-items: center;
    position: relative;
}

.related-products {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    width: 100%;
    padding-right: 75px;
    padding-left: 75px;
}

.related-product-item {
    flex: 0 0 auto;
    width: 200px;
    margin: 10px;
    text-align: center;
}

.related-product-image {
    max-width: 200px;
    height: 200px;
}

.scroll-button {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.scroll-button.left {
    left: 0;
}

.scroll-button.right {
    right: 0;
}