/* Style for WooCommerce Trailer Specs */
/* Contact Sales Button */
.contact-sales-button {
    display: inline-block;
    background-color: #ff6600;
    color: #fff;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 5px;
    text-transform: uppercase;
    text-decoration: none;
}

.contact-sales-button:hover {
    background-color: #cc5500;
}

/* Hide payment methods when Contact Sales button is active */
.trailer-contact-sales-active .ast-single-product-payments {
    display: none !important;
}

/* Style Read More button to match theme */
.products .product_type_simple {
    margin-top: 10px;
    text-align: center;
    width: auto;
    display: inline-block;
}

/* Enhanced wholesale pricing styling for single product */
.wholesale-pricing-box {
    background: #f8f8f8;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    border: 1px solid #ddd;
}

.wholesale-intro {
    color: #333;
    font-weight: 600;
    margin: 0 0 8px 0;
    font-size: 1em;
}

.wholesale-pricing-box .wholesale-pricing-link {
    margin: 10px 0;
}

.wholesale-pricing-box .wholesale-pricing-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ff6600;
    font-weight: 600;
    font-size: 1.1em;
    text-decoration: none;
}

.wholesale-pricing-box .wholesale-pricing-link a:hover {
    color: #cc5500;
}

.wholesale-arrow {
    transition: transform 0.2s ease;
}

.wholesale-pricing-box .wholesale-pricing-link a:hover .wholesale-arrow {
    transform: translateX(5px);
}

.wholesale-contact {
    color: #666;
    font-size: 0.9em;
    margin: 8px 0 0 0;
    font-style: italic;
}

/* Specific styling for catalog/shop page */
.products .wholesale-pricing-link {
    text-align: center;
    margin-top: -5px;
    margin-bottom: 10px;
}

.wholesale-pricing-link a {
    color: #666;
    text-decoration: underline;
}

.wholesale-pricing-link a:hover {
    color: #ff6600;
}

/* Category Badge Styling */
.trailer-category-badge {
    position: absolute;
    top: -20px;
    right: 5px;
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 9;
}

/* Mobile adjustments for shop/catalog view */
@media (max-width: 544px) {
    .woocommerce ul.products li.product .trailer-category-badge {
        display: none;
    }
}

/* Rest of your existing badge styles */
.trailer-category-badge.high-cube {
    background-color: #ff6600;
    color: white;
}

.trailer-category-badge.standard {
    background-color: #2f4f4f;
    color: white;
}

/* Ensure product images have relative positioning */
.woocommerce ul.products li.product a img,
.woocommerce div.product div.images {
    position: relative;
}

/* Adjust badge position for single product page */
.single-product .trailer-category-badge {
    top: 20px;
    right: 20px;
    font-size: 14px;
}

/* Hide category badges in related products on tablet and mobile */
@media (max-width: 921px) {
    .related.products .trailer-category-badge {
        display: none;
    }
}

@media only screen and (max-width: 544px) {
    body.single-product .related.products,
    .single-product section.related.products,
    .woocommerce .related.products {
        display: none !important;
    }
}

/* Hide payment methods when Contact Sales button is active */
.trailer-contact-sales-active .ast-single-product-payments {
    display: none !important;
}

/* Shop page and catalog Add to Cart button */
.products .product_type_simple {
    border: 2px solid #0073aa !important; /* Add a custom border */
    background-color: #fff !important; /* Set a white background */
    color: #0073aa !important; /* Custom text color */
    padding: 10px 20px !important; /* Adjust padding */
    text-transform: none !important; /* Remove uppercase text */
    font-weight: bold !important; /* Make text bold */
    transition: all 0.3s ease !important; /* Smooth hover effect */
}

/* Hover effect for shop/catalog Add to Cart buttons */
.products .product_type_simple:hover {
    background-color: #0073aa !important; /* Change background color on hover */
    color: #fff !important; /* Change text color on hover */
    border-color: #005177 !important; /* Darken the border on hover */
}

/* Single product page Add to Cart button */
.woocommerce .single_add_to_cart_button {
    border: 2px solid #ff6600 !important; /* Custom border for single product page */
    border-radius: 8px !important; /* Rounded corners */
    background-color: #ff6600 !important; /* Set orange background */
    color: #fff !important; /* Set white text color */
    padding: 12px 25px !important; /* Adjust padding */
    font-weight: bold !important; /* Bold text */
    text-transform: uppercase !important; /* Force uppercase */
    transition: all 0.3s ease !important; /* Smooth hover effect */
}

/* Hover effect for single product page Add to Cart button */
.woocommerce .single_add_to_cart_button:hover {
    background-color: #cc5200 !important; /* Darker orange on hover */
    border-color: #cc5200 !important; /* Match border color */
}

/* Optional: Center the button on the shop page */
.products .product_type_simple {
    display: block !important; /* Ensure the button spans full width */
    text-align: center !important;
    margin: 10px auto !important; /* Center it horizontally */
    width: auto; /* Allow for dynamic button sizing */
}

.subcategory-container {
    margin: 20px 0;
}

.subcategory-container h2 {
    font-size: 1.8em;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #333;
    text-transform: uppercase;
}

.subcategory-container h3 {
    font-size: 1.5em;
    margin-top: 10px;
    margin-bottom: 10px;
    color: #666;
    text-transform: capitalize;
}

.subcategory-container .products {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.subcategory-container .products .product {
    flex: 1 1 calc(33.333% - 20px); /* 3 products per row */
    box-sizing: border-box;
}

/* Hide the product grid on shop and category pages */
body.woocommerce-shop .products.columns-4,
body.woocommerce-page .products.columns-4 {
    display: none !important;
}

/* Ensure related products remain visible on single product pages */
body.single-product .related.products .products.columns-4 {
    display: flex !important;
}

.woocommerce-result-count,
.woocommerce-ordering {
    display: none !important;
}

.custom-wholesale-message {
    text-align: center;
    padding: 10px 20px;
    font-size: 14px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 100vw; /* Use viewport width instead of percentage */
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    box-sizing: border-box;
}

.custom-wholesale-message p {
    margin: 0;
    color: #0073aa;
    max-width: 1200px; /* Or whatever your site's main content width is */
    margin: 0 auto;
}

.custom-wholesale-message a {
    text-decoration: none;
    color: #0073aa;
}

/* Financing section within wholesale box */
.financing-divider {
    border-top: 1px solid #e0e0e0;
    margin: 12px 0 15px 0;
}

.wholesale-pricing-box .financing-intro {
    color: #333;
    font-weight: 600;
    margin: 0 0 8px 0;
    font-size: 1em;
}

.wholesale-pricing-box .financing-link {
    margin: 10px 0;
}

.wholesale-pricing-box .financing-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ff6600;
    font-weight: 600;
    font-size: 1.1em;
    text-decoration: none;
}

.wholesale-pricing-box .financing-link a:hover {
    color: #cc5500;
}

.wholesale-pricing-box .financing-link .financing-arrow {
    transition: transform 0.2s ease;
}

.wholesale-pricing-box .financing-link a:hover .financing-arrow {
    transform: translateX(5px);
}