/*
Theme Name: Hello Elementor Child
Template: hello-elementor
Version: 1.0
*/

.content-area{
    max-width: 100vw;
    margin: 0 auto; /* Center content area */
}
.site-main {
    max-width: 100vw;
    margin: 0 auto;
}

.flower-card {
    border: 1px solid #ccc;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    box-shadow: 2px 2px 12px rgba(0,0,0,0.1);
    background-color: #fff;
    transition: transform 0.2s;
    flex-grow: 1;
    flex-basis: 250px; /* Better than 10vw for responsiveness */
    max-width: 300px; 
    height: auto; /* Changed from 100px */
}

.flower-card:hover {
    transform: scale(1.02);
}

.flower-card h2 {
    margin-top: 0;
    font-size: 1.5em;
}

.flower-card-image {
    display: flex;
    gap: 10px; /* Adds a small gap between the two images */
    justify-content: center; /* Centers the images horizontally */
    align-items: center; /* Centers the images vertically */
    margin-bottom: 10px; /* Provides space between images and text below */
    width:100%;
    height: auto;
}

.flower-image {
    max-width: 100%;
    max-width:100%;
    height: auto;
    display: block;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 300px;
    height: 100px;
    object-fit: contain;
    margin-right: 20px;
    cursor: pointer;
}
/* Also target the <td> that holds the image */
.flowers-data-table td.image-cell{
    /* Set a small, fixed width for the image column on mobile */
    width: 50px;
    height: 50px;
    padding: 5px;
    vertical-align: middle;
}

.flower-card-image .flower-image-container {
    flex: 1 1 50%;  /* ALlow each image container to grow and shrink */
    max-width: 100%; /* Ensure images don't get too big */
    max-height: 100%;
}

.table-responsive-wrapper{
    /* Ensure the wrapper fits the width of its parent container */
    width: 100%;
    /* Enable horizontal scrolling if content overflows */
    overflow-x: auto;
    /* Ensures the table doesn't disappear when scrolling */
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px){

    
    /* Stack the container vertically */
    .flower-card-image, 
    .flower-thumbnails,
    .flower-container {
        flex-direction: column !important;
        align-items: center;
    }

    /* Reset fixed widths so images can fill the screen width */
    .flower-card-image .flower-image-container,
    .flower-image,
    .flower-thumbnail {
        width: 100% !important; 
        max-width: 100%;
        height: auto; /* Maintains aspect ratio */
        margin-right: 0;
        margin-bottom: 15px;
    }

    /* Adjust the table cell if you are using the table layout on mobile */
    .flowers-data-table td.image-cell {
        display: block; /* Turns the cell into a block to allow stacking */
        width: 100%;
        text-align: center;
    }
}


.flower-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
}

.flower-details-grid{
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 5px 10px;
    margin-bottom: 15px;
}
.flower-details-grid strong{
    font-weight: 600;
}

/* Container for the thumbnails to ensure proper spacing */
.flower-thumbnails{
    display: flex;
    gap: 5px;
    justify-content: center;
    align-items: center;

}
/* Style for the thumbnail images */
.flower-thumbnail{
    flex: 1;
    width: 100%; /* Changed from 500px to be responsive */
    max-width: 500px;
    height: auto;
    aspect-ratio: 1 / 1; /* Keeps it square */
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
/* Hover effect to enlarge the image */
.flower-thumbnail:hover{

    transform: scale(3); /* Increase size on hover */
    z-index: 10; /* Bring image to the front so not get hidden behind text */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Add a subtle shadow */
}
/* Magnifying effect on cursor location. Uses JS too */
#image-zoom-box{
    display: none;
    position: fixed;
    width: 50vw; /* zoom-box size */
    height: 50vh; /* zoom-box size */
    border: 1px solid #ccc;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    background-repeat: no-repeat;
    background-size: 150%; /* Zoom level */
    pointer-events: none;
    z-index: 1000;
}

.image-modal-overlay{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none; /* Initially hidden */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0; /* For fade-in effect */
    transition: opacity 0.3s ease-in-out;
}
.image-modal-overlay.active{
    display: flex;
    opacity: 1;
}
.image-modal-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.left {
	float: left;
}
.right {
	float: right;
}
.clear {
	clear:both;
}


.navigation-buttons {
    margin-top: 20px;
    margin-bottom: 20px;
    display: flex; /* Makes buttons appear in a row */
    gap: 10px; /* Adds space between buttons */
    flex-wrap: wrap; /* Allows buttons to wrap to the next line on smaller screens */
}

.navigation-buttons .button {
    display: inline-block;
    padding: 10px 15px;
    background-color: #0073aa; /* WordPress blue */
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.navigation-buttons .button:hover,
.navigation-buttons .button:focus {
    background-color: #005177; /* Darker blue on hover */
    color: #fff; /* Ensure text color stays white on hover */
    text-decoration: none; /* Remove underline on hover */
}


/* Print Styles for the entire site (optional, but good practice) */
@media print {
    /* Hide common elements not needed for print */
    .site-header,
    .main-navigation,
    .site-footer,
    .elementor-location-header, /* If you use Elementor header */
    .elementor-location-footer, /* If you use Elementor footer */
    .navigation-buttons, /* Hide buttons like "Print Sales Order" itself on the print page */
    .wp-toolbar, /* Hide WordPress admin bar if user is logged in */
    .comments-area,
    .sidebar {
        display: none !important;
        visibility: hidden;
        /* Prevent scrollbars from hidden content */
        overflow: hidden; 
    }

    /* Make the print-container and its descendants visible */
    .print-container,
    .print-container *{
        visibility: visible;
    }

    /* Adjust content width for print */
    .container,
    .content-area,
    .print-container {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
        position: absolute;
        left: 0;
        top: 0;
        box-shadow: none;
        border: none;
    }

    .print-container table{
        /* Ensure tables within print-container take full width */
        width: 100%;
        /* For clean table borders */
        border-collapse: collapse;
    }
    .print-container table,
    .print-container th,
    .print-container td {
        border: 1px solid #000;
        padding: 8px;
    }

    /* Hide navigation buttons or other non-print elements within print-container if they exist */
    .print-container .navigation-buttons { /* Example for navigation buttons */
        display: none;
    }
    /* Hide any other specific elements within the print-container you don't want to print */
    .print-container .exclude-from-print {
        display: none;
    }
    
    /* Ensure text is black and legible */
    body {
        color: #000;
        background: #fff;
    }

    /* Remove shadows and borders that don't print well */
    .flower-card,
    .print-container {
        box-shadow: none !important;
        border: none !important;
        transition: transform 0.2s;
    }

    /* Ensure links don't show URLs (optional) */
    a[href]:after {
        content: none !important;
    }
}