/* General Styling for Product Detail Page */
.page-post-container {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    font-family: "Montserrat", sans-serif;
}

/* Product Wrapper Styling */
.product-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 40px;
}

/* Product Image */
.product-image {
    flex: 1 1 45%;
    position: relative; /* Needed for zoom icon placement */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.product-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}


/*hack to remove the top emptrybar from product image*/
.product-image .woocommerce-product-gallery{margin-top:-25px;}

/* Hide the default zoom text icon (🔍) inside the anchor */
.woocommerce-product-gallery__trigger {
    font-size: 0; /* Hides the inner text (🔍) */
    background: none !important;
    border: none !important;
    color: inherit !important;
    display: inline-block; /* Ensures it's inline */
    margin: 0; /* Remove any default margin */
    padding: 0; /* Remove any default padding */
    line-height: 0; /* Set line-height to avoid extra space */
}

/* Custom Zoom Icon Styling with FontAwesome */
.product-image .woocommerce-product-gallery__trigger::before {
    display: block;
    content: "\f002"; /* FontAwesome magnifying glass icon */
    font-family: "FontAwesome";
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(128, 125, 124, 0.8); /* Background color */
    color: #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: scale(1); /* Initial scale */
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 10;
    font-size: 18px;
}

/* Hover Effect for Custom Zoom Icon */
.product-image .woocommerce-product-gallery__trigger:hover {
    background-color: #bc3430 !important; /* Change color on hover */
    transform: scale(1.1); /* Slight zoom effect */
}


/* Product Details */
.product-details {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Target all direct child elements inside .product-details */
.product-details > * {
    margin: 15px 0; /* Adjust this value as needed */
}

.product-title {
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 15px;
}

/* Pricing Section */
.product-price {
    font-size: 1.8rem;
    font-weight: normal;
    color: #bc3430;
    margin-bottom: 20px;
}

.cart {
    display: flex; /* Use flexbox for layout */
    align-items: center; /* Center items vertically */
    gap: 10px; /* Space between elements */
    margin-top: 20px; /* Add some space above the form */
}

.quantity {
    display: flex; /* Align input field and label */
    align-items: center; /* Center input vertically */
    border: 1px solid #ccc; /* Add border */
    border-radius: 5px; /* Rounded corners */
    overflow: hidden; /* Prevent overflow */
}

.quantity label {
    display: none; /* Hide the label */
}

.input-text.qty {
    border: none; /* Remove border from input */
    outline: none; /* Remove outline on focus */
    padding: 10px; /* Add padding */
    width: 60px; /* Set width */
    font-size: 16px; /* Increase font size */
    text-align: center; /* Center the text */
}

.input-text.qty:focus {
    border: 2px solid #a00000; /* Highlight border on focus */
}

.single_add_to_cart_button {
    background-color: #e9e6ed; /* Primary button color */
    color: #323030; /* Button text color */
    border: none; /* Remove border */
    border-radius: 5px; /* Rounded corners */
    padding: 12px 20px; /* Add padding */
    font-size: 16px; /* Increase font size */
    cursor: pointer; /* Change cursor on hover */
    transition: background-color 0.3s ease; /* Smooth transition */
}

.single_add_to_cart_button:hover {
    background-color: #a00000; /* Darken button on hover */
}

.single_add_to_cart_button:active {
    background-color: #a00000;
    color:white
}

@media (max-width: 600px) {
    .cart {
        flex-direction: column; /* Stack elements on small screens */
        align-items: stretch; /* Stretch items to full width */
    }

    .single_add_to_cart_button {
        width: 100%; /* Full width button */
    }
}


.add-to-cart .button:hover {
    background-color: #a00000;
    color:white;
}

/* hide category name */
.woocommerce div.product div.summary {
    margin-bottom: 2em;
    display: none;
}


.related-products {
    margin: 20px 0; /* Space above and below the section */
}

.related-products h3 {
    text-align: center; /* Center the heading */
    margin-bottom: 20px; /* Space below the heading */
    font-size: 24px; /* Font size for the heading */
    font-weight: bold; /* Bold text for emphasis */
}

.related-products-slider {
    position: relative; /* For absolute positioning of navigation arrows */
}

/* Style each product item */
.related-products-slider .item {
    background-color: #fff; /* Background color for product cards */
    border: 1px solid #ddd; /* Border for product cards */
    border-radius: 5px; /* Rounded corners */
    overflow: hidden; /* Hide overflow content */
    text-align: center; /* Center text inside the item */
    padding: 10px; /* Padding inside product cards */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

/* Product images */
.related-products-slider .item img {
    width: 100%; /* Responsive images */
    height: auto; /* Maintain aspect ratio */
    border-radius: 5px; /* Match rounded corners */
    margin-bottom: 10px; /* Space below the image */
}

/* Product title styling */
.related-products-slider .item h2 {
    font-size: 18px; /* Font size for product title */
    margin: 0; /* Remove default margin */
    text-decoration: none; /* Remove underline */
    color: #333; /* Text color for title */
}

/* Price styling */
.related-products-slider .item span {
    font-size: 16px; /* Font size for price */
    color: #a00000; /* Color for the price */
    display: block; /* Block-level to separate from title */
    margin-bottom: 0px; /* Space below the price */
}

.related-products-slider .item span.price{margin:5px;}


.related-products-slider .item span .woocommerce-Price-currencySymbol{display: inline-block;}

/* Add to Cart button styling */
.related-products-slider .item .button {
    background-color: #e9e6ed; /* Button background color */
    color: #232222; /* Button text color */
    padding: 10px 15px; /* Button padding */
    border: none; /* Remove border */
    border-radius: 5px; /* Rounded corners */
    text-decoration: none; /* Remove underline */
    display: block; /* Make it block for better alignment */
    transition: background-color 0.3s ease; /* Smooth background color transition */
}

.related-products-slider .item .button:hover {
    background-color:#a00000; /* Darker shade on hover */
    color:white;
}

/* Optional: Adjust margin between items */
.related-products-slider .item {
    margin-right: 20px; /* Space between items */
}

/* Remove margin from last item */
.related-products-slider .item:last-child {
    margin-right: 0; /* No right margin for the last item */
}

.related-products-slider .item a {text-decoration: none;}

/* Navigation arrows styling (optional) */
.related-products-slider .owl-nav button {
    background: rgb(237, 237, 236) !important; /* Button background color */
    color: #fff; /* Button text color */
    border: none; /* Remove border */
    border-radius: 50%; /* Rounded buttons */
    padding: 10px; /* Padding for arrows */
    margin: 0 5px; /* Space between arrows */
    transition: background-color 0.3s ease; /* Smooth transition for hover */
}

.related-products-slider .owl-nav button:hover {
    background: #a00000 !important; /* Darker shade on hover */
    color:#fff !important;
}

.owl-nav {
    position: absolute;
    top: 50%; /* Center vertically */
    transform: translateY(-50%); /* Adjust to truly center */
    width: 100%;
    display: flex;
    justify-content: space-between; /* Space between arrows */
    z-index: 10; /* Ensure it appears above other elements */
}

.owl-nav button {
    background-color: #fff; /* Background color */
    border: 1px solid #ccc; /* Border color */
    border-radius: 50%; /* Make them circular */
    width: 40px; /* Width of the arrows */
    height: 40px; /* Height of the arrows */
    display: flex;
    align-items: center; /* Center icon vertically */
    justify-content: center; /* Center icon horizontally */
    font-size: 20px; /* Increase icon size */
    line-height: 1; /* Ensure line height doesn't affect alignment */
    transition: background-color 0.3s ease, box-shadow 0.3s ease; /* Smooth background and shadow transition */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle drop shadow */
    cursor: pointer; /* Change cursor to pointer */
    padding: 0; /* Remove default padding */
}

.owl-nav button:hover {
    background-color: #f0f0f0; /* Change background on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Slightly stronger shadow on hover */
}

/* For left arrow (previous button) */
.owl-prev::before {
    content: "\f104"; /* Font Awesome icon for left arrow */
    font-family: "Font Awesome 5 Free"; /* Ensure the correct font family is used */
    font-weight: 900; /* Ensure the solid version of the icon is displayed */
}

/* For right arrow (next button) */
.owl-next::before {
    content: "\f105"; /* Font Awesome icon for right arrow */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.owl-prev span, .owl-next span {
    display: none; /* Hide the span elements */
}


.owl-nav button:disabled {
    opacity: 0.5; /* Make disabled buttons less visible */
    cursor: not-allowed; /* Show not-allowed cursor */
}


/* Responsive Design */

/* Adjust Layout for Tablets */
@media (max-width: 768px) {
    /* Stack product image and details vertically on smaller screens */
    .product-wrapper {
        flex-direction: column;
    }

    .product-image,
    .product-details {
        flex: 1 1 100%;
    }

    /* Related Products - adjust number of columns */
    .related-products ul.products li {
        flex: 1 1 48%;
    }
}

/* Adjust Layout for Mobile */
@media (max-width: 480px) {
    /* Make related product cards full-width on small screens */
    .related-products ul.products li {
        flex: 1 1 100%;
    }
}
