/* Product Details Section */
.product-details {
    width: 85%;
    margin: 30px auto;
    padding: 40px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap; /* Ensures elements wrap on smaller screens */
}

/* Header */
.product-header {
    text-align: center;
    margin-top: 5rem;
    width: 100%; /* Ensure it takes full width */
}

.product-header h2 {
    font-family: 'Arial', sans-serif;
    color: #333;
    font-size: 36px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Main Content Area */
.product-main {
    display: flex;
    gap: 30px;
    width: 100%; /* Ensure it takes full width */
}

/* Product Image */
.product-image {
    flex: 0.4;
    width: 100%; /* Makes sure image takes full width on smaller screens */
}

.product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out;
}

.product-image:hover img {
    transform: scale(1.1);
}

/* Product Info */
.product-info {
    flex: 0.6;
    font-family: 'Arial', sans-serif;
    color: #555;
}

/* Description & Sections */
.product-description,
.product-uses,
.product-rate,
.product-rating {
    margin-bottom: 25px;
}

.product-description h4,
.product-uses h4,
.product-rate h4,
.product-rating h4 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #444;
    text-transform: uppercase;
}

.product-description p,
.product-uses p,
.product-rate p,
.product-rating p {
    font-size: 16px;
    line-height: 1.8;
    color: #777;
}

/* Product Rate and Rating */
.product-rate p {
    font-size: 22px;
    font-weight: bold;
    color: #00b300;
}

.product-rating p {
    font-size: 20px;
    font-weight: bold;
    color: #ffaa00;
}

.product-rating .star-rating {
    color: #ffaa00;
}

/* Button Styles */
.btn-add-to-cart {
    background-color: #007bff;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    text-transform: uppercase;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-add-to-cart:hover {
    background-color: #0056b3;
}

/* Hover Effect for Image */
.product-image:hover img {
    transform: scale(1.1);
    transition: transform 0.3s ease-in-out;
}

/* Border animation for Description, Uses, Rate */
.product-description, .product-uses, .product-rate, .product-rating {
    border-left: 4px solid #00b300;
    padding-left: 20px;
    transition: border-color 0.3s ease;
}

.product-description:hover, .product-uses:hover, .product-rate:hover, .product-rating:hover {
    border-color: #007bff;
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
    .product-details {
        flex-direction: column; /* Stack content vertically on mobile */
        align-items: center;
        padding: 20px;
    }

    .product-main {
        flex-direction: column;
        gap: 15px;
    }

    .product-image img {
        max-width: 90%; /* Image takes less width on mobile */
        margin-bottom: 20px; /* Adds space below the image */
    }

    .product-info {
        width: 100%; /* Make product info full width on mobile */
        text-align: center; /* Center align text for mobile view */
    }

    .product-header h2 {
        font-size: 28px; /* Smaller font size for mobile */
    }
}

/* Tablet and larger devices (up to 768px) */
@media (min-width: 769px) {
    .product-details {
        flex-direction: row; /* Keep side by side on tablet and larger devices */
        align-items: flex-start;
    }

    .product-image {
        flex: 0.4;
    }

    .product-info {
        flex: 0.6;
    }
}