/* Stocklist Frontend Styles */

/* General container for the stocklist shortcode */
.printoholic-stocklist {
    margin: 2em 0; /* Adds vertical spacing around the stocklist */
}

/* Heading style for stocklist sections */
.stocklist-heading {
    color: #00875b; /* Green color for heading text */
    font-weight: 600; /* Bold font weight */
    margin-top: 0px; /* Removes top margin */
    padding-bottom: 10px; /* Adds space below the heading */
    border-bottom: 2px solid #00875b; /* Green underline */
    display: inline-block; /* Ensures border-bottom fits the text width */
    width: 100%; /* Full width for consistency */
}
.sold-stocklist-heading{
    color: #ff0000; /* Green color for heading text */
    font-weight: 600; /* Bold font weight */
    margin-top: 0px; /* Removes top margin */
    padding-bottom: 10px; /* Adds space below the heading */
    border-bottom: 2px solid #ff0000; /* Green underline */
    display: inline-block; /* Ensures border-bottom fits the text width */
    width: 100%; /* Full width for consistency */
}
/* Style for details button in stocklist */
.details-button.btn.btn-sm.btn-primary {
    background: #00A6A6 !important; /* Custom teal background */
    color: white; /* White text */
    border-color: #0dcaf0 !important; /* Custom border color */
}
.details-button.btn.btn-sm.btn-primary:hover {
	background: #BD0278 !important;
	border-color: #BD0278 !important; 
}

/* Container for machine tabs */
.machine-tabs {
    margin-top: 1em; /* Space above tabs */
}

/* Table styling for machine data */
.machine-table {
    width: 100%; /* Full width table */
    border-collapse: collapse; /* Removes spacing between table cells */
    margin-bottom: 2em; /* Space below the table */
}

/* Table cell styling */
.machine-table th,
.machine-table td {
    padding: 12px; /* Inner spacing for table cells */
    font-size: 14px !important; /* Consistent font size */
    text-align: center; /* Center-align text */
    border: 1px solid #ddd; /* Light gray border */
}

/* Table header styling */
.machine-table th {
    background-color: #00875b !important; /* Green background for headers */
    color: white; /* White text */
}

/* Table image styling */
.machine-table img {
    max-width: 100px; /* Limits image width */
    height: auto; /* Maintains aspect ratio */
    border-radius: 4px; /* Rounded corners */
}

/* Machine category section styling */
.machine-category {
    background-color: #f8f9fa; /* Light gray background */
    color: #333; /* Dark text */
    padding: 10px 15px; /* Inner spacing */
    margin: 25px 0 15px; /* Vertical spacing */
    font-size: 1.25em; /* Larger font for emphasis */
    border-left: 4px solid #00875b; /* Green left border */
}

/* Color subcategory heading */
.color-subcategory {
    font-size: 1.1em; /* Slightly larger font */
    margin: 20px 0 10px; /* Vertical spacing */
    color: #555; /* Medium gray text */
    font-weight: 600; /* Bold font */
}

/* Placeholder for when no data is available */
.no-data {
    text-align: center; /* Center-align text */
    padding: 2em; /* Inner spacing */
    color: #666; /* Medium gray text */
    font-style: italic; /* Italicized for emphasis */
}

/* Single Machine Template Styles */

/* Container for carousel thumbnails */
.carousel-thumbnails {
    display: flex; /* Flexbox for horizontal layout */
    overflow-x: auto; /* Horizontal scrolling if thumbnails overflow */
    padding: 5px 0; /* Vertical padding */
}

/* Individual thumbnail styling */
.thumbnail-img {
    border: 2px solid #ddd; /* Light gray border */
    transition: border-color 0.3s; /* Smooth border color transition */
}

/* Active thumbnail styling */
.thumbnail-img.active {
    border-color: #00875b; /* Green border for active thumbnail */
}

/* Hover effect for thumbnails */
.thumbnail-img:hover {
    border-color: #00A6A6; /* Teal border on hover */
}

/* Carousel image and iframe styling */
.carousel-inner img,
.carousel-inner iframe {
    object-fit: cover; /* Ensures content fills the space without distortion */
    height: 350px; /* Fixed height for desktop */
    max-width: 100%; /* Prevents overflow beyond column width */
}

/* Button styling */
.machine-actions .btn {
    width: 100%;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.machine-table tbody tr.sold-row td:nth-child(7) {
    position: relative;
}

.machine-table tbody tr.sold-row td:nth-child(7) span.sold-status {
    display: inline-block;
    padding: 2px 6px;
    background-color: #ff0000; /* Red background for the "Sold" text */
    color: #ffffff; /* White text */
    font-weight: bold; /* Bold text */
    border-radius: 3px; /* Optional: Slight rounding for aesthetics */
    transition: background-color 0.3s ease; /* Smooth transition for hover effect */
}

.machine-table tbody tr.sold-row td:nth-child(7) span.sold-status:hover {
    background-color: #cc0000; /* Darker red on hover */
}

@media (min-width: 768px) {
    .machine-actions .btn {
        width: auto;
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .machine-actions .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

.machine-actions .btn:hover,
.machine-actions .btn:focus {
    opacity: 0.9;
    box-shadow: 0 0 0 0.25rem rgba(0, 0, 0, 0.1);
}

.btn.btn-primary {
    background-color: #00B1AB !important;
    border-color: #6c757d;
    color: #fff;
}
.btn.btn-secondary {
    background-color: #00B1AB !important;
    border-color: #6c757d;
    color: #fff;
}
.btn.btn-primary:hover {
    background-color: #e6005c !important;
    border-color: #545b62;
    color: #fff;
}
.btn.btn-secondary:hover {
    background-color: #e6005c !important;
    border-color: #545b62;
    color: #fff;
}
/* Media query for mobile devices (≤ 991px) */
@media (max-width: 991px) {
    /* Make table scrollable on mobile */
    .machine-table {
        display: block;  /*Allows table to scroll*/
        overflow-x: auto; /* Horizontal scrolling */
    }
    
    /* Stack filter row vertically */
    .filter-row {
        flex-direction: column; /* Vertical stacking */
    }
    
    /* Full-width filter groups */
    .filter-group {
        width: 100%; /* Full width on mobile */
    }
    
    /* Stack row children vertically */
    .container .row {
        flex-direction: column; /* Vertical stacking */
    }
    
    /* Full-width columns on mobile */
    .container .col-lg-6 {
        width: 100%; /* Full width */
    }
    
    /* Adjust carousel height for mobile */
    .carousel-inner img,
    .carousel-inner iframe {
        height: 200px; /* Reduced height for mobile */
    }
}

/* Media query for desktop devices (≥ 992px) */
@media (min-width: 992px) {
    /* Ensure row displays columns side by side */
    .container .row {
        display: flex !important; /* Flexbox layout, override theme styles */
        flex-direction: row !important; /* Horizontal alignment */
        flex-wrap: nowrap !important; /* Prevent columns from wrapping */
        align-items: flex-start; /* Align items to the top */
    }

    /* Ensure columns take correct width and don't overflow */
    .container .col-lg-6 {
        width: 50%; /* 50% width for side-by-side layout */
        padding: 15px; /* Add spacing between carousel and details */
        box-sizing: border-box; /* Ensure padding is included in width */
        max-width: 50%; /* Prevent column from exceeding 50% width */
    }

    /* Prevent details content from overflowing */
    .container .col-lg-6 ul.list-unstyled {
        max-width: 100%; /* Ensure content fits within column */
        word-wrap: break-word; /* Break long words to prevent overflow */
    }
}
/* Container styling */
.container.mt-4 {
	padding-left: 16px;
    padding-right: 16px;
}
/* Breadcrumps styling */
.breadcrumb {
    font-size: 12px;
    color: #666;
    background: none;
    padding: 0;
    margin-bottom: 1rem;
}
.breadcrumb.mb-3 {
	font-size: 14px;
}

.breadcrumb a {
    color: #c20182;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #04aab6;
    text-decoration: underline;
}

.breadcrumb span {
    color: #333;
}

/* Remove any additional separators since the PHP template already includes » */
.breadcrumb a:not(:last-child),
.breadcrumb span:not(:last-child) {
    margin-right: 8px;
}

/* Optional: Add some spacing after the » separator for better readability */
.breadcrumb a + a::before,
.breadcrumb a + span::before {
    content: '';
    margin-right: 8px;
}


.machine-table tbody tr.sold-row td:nth-child(7) {
    color: #ff0000; /* Red text for the "Sold" status */
}
