body {
    background-color: #f2f2f2; /* Match the background color of your view_category.php page */
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    display: flex;
    flex: 1;
}

/* Product List Container */
.category_product_list {
    flex-basis: 20%;
    background-color: #1a1a1a; /* deeper dark to match site palette */
    color: #f5f7fa;
    padding: 20px 15px;
    box-sizing: border-box;
    height: 80vh;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}


/* Product List Items */
.category_product_list ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}


/* Scrollbar Customization */
.category_product_list::-webkit-scrollbar {
    width: 8px;
}

.category_product_list::-webkit-scrollbar-track {
    background: #444; /* Dark track */
    border-radius: 8px;
}

.category_product_list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 8px;
}

.category_product_list::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

.category_product_list li {
    margin-bottom: 12px;
    background-color: #2a2a2a;
    border-radius: 6px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    padding: 10px 14px;
}


/* Product Links */
.category_product_list a {
    color: #f5f7fa;
    text-decoration: none;
    font-size: 11px;
    display: block;
    font-weight: 500;
}

/* Hover */
.category_product_list li:hover {
    background-color: #3a3a3a;
    transform: translateX(4px);
}

.category_product_list li:hover a {
    color: #9ab6d2;
}

/* Active link styling */
.category_product_list a.active {
    background-color: #9ab6d2;
    color: #1a1a1a;
    font-weight: 600;
    border-radius: 6px;
    padding: 10px 14px;
    box-shadow: 0 0 0 2px #cf8d8c80; /* soft glow */
}


/* Optional subtle separator between items */
.category_product_list li:not(:last-child) {
    border-bottom: 1px solid #2e2e2e;
}

/* Style for product details */
.product-details {
    display: flex;
    flex: 1;
    flex-direction: row;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 80%;
    min-height: 400px;
}

.product-details h1 {
    color: #333; /* Match the heading color of your view_category.php page */
}

.product-details p {
    color: #666; /* Match the text color of your view_category.php page */
}

.navbar-spacing {
    height: 130px;
    width: 100%;
}

.product-image {
    width: 400px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff; /* White background for smaller images */
    border-radius: 8px; /* Optional: Rounded corners */
    overflow: hidden; /* Ensure content fits within the container */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Optional: Add a shadow for better appearance */
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Resize the image while maintaining aspect ratio */
    background-color: #fff; /* Ensure white space for smaller images */
}

.product-info {
    margin-left: 50px; /* Add 50px space between the image and the product info */
    display: flex;
    flex-direction: column; /* Stack content vertically */
    justify-content: center; /* Align content vertically in the center */
    gap: 15px; /* Add consistent spacing between elements in the container */
    color: #333; /* Ensure text color matches your theme */
}

.add-to-cart-form {
    display: flex;
    align-items: center; /* Align elements vertically */
    gap: 15px; /* Add spacing between the elements */
    margin-top: 20px; /* Add some space above the form */
}

/* Label styling */
.add-to-cart-form label {
    font-size: 16px;
    font-weight: bold;
    color: #333; /* Match the text color of your theme */
}

/* Input field styling */
.add-to-cart-form input[type="number"] {
    width: 80px;
    padding: 5px;
    font-size: 16px;
    border: 2px solid #ccc; /* Border to match theme */
    border-radius: 5px;
    text-align: center; /* Center-align the number */
    transition: border-color 0.3s ease; /* Smooth transition on focus */
}

/* Input field focus styling */
.add-to-cart-form input[type="number"]:focus {
    border-color: #666; /* Change border color on focus */
    outline: none; /* Remove default focus outline */
}

/* Button styling */
.add-to-cart-form button {
    padding: 10px 20px;
    background-color: #333; /* Button background to match your theme */
    color: #fff; /* Text color for the button */
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease; /* Smooth transition on hover */
}

/* Button hover effect */
.add-to-cart-form button:hover {
    background-color: #555; /* Slightly lighter background on hover */
}

/* Button active effect */
.add-to-cart-form button:active {
    background-color: #222; /* Darker background on active click */
}

/* Mobile Responsive Layout */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .category_product_list {
        display: none; /* Hide product list on smaller screens */
    }

    .product-details {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        max-width: 100%;
        padding: 20px 10px;
        box-shadow: none;
    }

    .product-image {
        width: 100%;
        height: auto;
        max-width: 400px;
    }

    .product-info {
        margin-left: 0;
        margin-top: 20px;
        width: 100%;
        text-align: center;
    }

    .add-to-cart-form {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .add-to-cart-form input[type="number"],
    .add-to-cart-form button {
        width: 100%;
        max-width: 200px;
    }
}


@media (max-width: 768px) {
    .navbar-spacing {
        height: 170px; /* slightly more space for mobile navbar */
    }
}
