/* General Body Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/* Navigation Bar */
.navbar {
    background-color: #232f3e;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.navbar .logo {
    font-size: 1.8em;
    font-weight: bold;
    color: #febd69; /* Amazon orange */
}

.navbar nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.navbar nav ul li {
    margin-right: 25px;
}

.navbar nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.navbar nav ul li a:hover {
    color: #febd69;
}

.cart-icon {
    position: relative;
    font-size: 1.5em;
    cursor: pointer;
}

.cart-count {
    background-color: #ff9900;
    color: white;
    border-radius: 50%;
    padding: 2px 7px;
    font-size: 0.7em;
    position: absolute;
    top: -8px;
    right: -8px;
}

/* Product Page Layout */
.product-page {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 30px;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.product-images {
    flex: 1; /* Take available space */
    min-width: 300px; /* Minimum width for images section */
    max-width: 500px;
    text-align: center;
}

.main-image img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 15px;
}

.thumbnail-images {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.thumbnail-images img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.thumbnail-images img:hover,
.thumbnail-images img.active {
    border-color: #ff9900;
}

.product-details {
    flex: 2; /* Take more space for details */
    min-width: 350px; /* Minimum width for details section */
}

.product-title {
    font-size: 2.2em;
    margin-top: 0;
    margin-bottom: 10px;
    color: #0f1111;
}

.product-rating {
    color: #ff9900;
    margin-bottom: 10px;
}

.product-rating .fas {
    font-size: 1.1em;
}

.product-rating span {
    color: #555;
    font-size: 0.9em;
    margin-left: 5px;
}

.product-brand {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 10px;
}

.product-price {
    font-size: 2em;
    color: #b12704;
    font-weight: bold;
    margin-bottom: 10px;
}

.original-price {
    text-decoration: line-through;
    color: #888;
    font-size: 0.7em;
    margin-left: 10px;
    font-weight: normal;
}

.product-availability {
    font-size: 1em;
    margin-bottom: 20px;
}

.in-stock {
    color: #007600;
    font-weight: bold;
}

/* Product Options */
.product-options {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.option-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.option-group select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    background-color: #f8f8f8;
}

/* Quantity Input */
.product-quantity {
    margin-bottom: 20px;
}

.product-quantity label {
    font-weight: bold;
    margin-right: 10px;
}

.product-quantity input[type="number"] {
    width: 60px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    text-align: center;
}

/* Buttons */
.add-to-cart-btn, .buy-now-btn {
    background-color: #ff9900;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1.1em;
    border-radius: 20px;
    cursor: pointer;
    margin-right: 15px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.buy-now-btn {
    background-color: #fa8211;
}

.add-to-cart-btn:hover, .buy-now-btn:hover {
    background-color: #e08e00;
    transform: translateY(-2px);
}

.add-to-cart-btn .fas, .buy-now-btn .fas {
    margin-right: 8px;
}

/* Product Description & Shipping Info */
.product-description, .shipping-info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.product-description h2, .shipping-info h2 {
    font-size: 1.5em;
    color: #0f1111;
    margin-bottom: 15px;
}

.product-description ul {
    list-style: disc;
    margin-left: 20px;
    padding: 0;
}

.product-description ul li {
    margin-bottom: 8px;
}

.shipping-info p {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: #555;
}

.shipping-info .fas {
    margin-right: 10px;
    color: #888;
}

/* Related Products Section */
.related-products {
    margin-top: 40px;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.related-products h2 {
    font-size: 1.8em;
    color: #0f1111;
    text-align: center;
    margin-bottom: 25px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    justify-content: center;
}

.related-item {
    background-color: #fcfcfc;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.related-item img {
    max-width: 100%;
    height: 180px; /* Fixed height for consistency */
    object-fit: contain; /* Ensure images fit without cropping */
    margin-bottom: 15px;
    border-radius: 4px;
}

.related-item h3 {
    font-size: 1.2em;
    margin-top: 0;
    margin-bottom: 8px;
    color: #333;
}

.related-item p {
    font-size: 1.1em;
    font-weight: bold;
    color: #b12704;
    margin-bottom: 15px;
}

.related-item .view-btn {
    background-color: #007bff;
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
}

.related-item .view-btn:hover {
    background-color: #0056b3;
}

/* Footer */
.footer {
    background-color: #232f3e;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    font-size: 0.9em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-page {
        flex-direction: column;
        align-items: center;
    }

    .product-images, .product-details {
        min-width: unset;
        width: 100%;
    }

    .thumbnail-images {
        flex-wrap: wrap;
    }

    .product-options {
        flex-direction: column;
        gap: 15px;
    }

    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar nav ul {
        flex-direction: column;
        width: 100%;
        margin-top: 15px;
    }

    .navbar nav ul li {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .cart-icon {
        align-self: flex-end;
        margin-top: -30px;
    }

    .add-to-cart-btn, .buy-now-btn {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
}