.product-container {
    display: flex;
    gap: 12px;
    justify-content: start;
    align-items: start;
    flex-direction: row; /* default: side by side */
    flex-wrap: wrap;
    max-width: 1200px;
    margin: auto;
}

.product-gallery {
    flex: 1.5;
    max-width: 550px;
    margin-right: 0;
    margin-bottom: 0;
}

.collapsible-container {
    flex: 2;
    width: 100%; /* Or remove width entirely if using flex */
}

#main-image {
    width: 100%;
    max-width: 550px;
    max-height: 450px;
    height: 400px;
    object-fit: cover;  /* crops instead of squishing */
    object-position: center; /* Center crop */
    display: block;
}

        .thumbnails img {
            width: 70px;
            height: 80px;
            object-fit: cover;
            margin: 5px;
            cursor: pointer;
            opacity: 0.6;
            transition: opacity 0.3s;
        }

        .thumbnails img:hover {
            opacity: 1;
        }

        .collapsible-container {
            flex: 2; /* Allows this section to take more space than the gallery */
            display: flex;
            flex-direction: column; /* Stacks collapsible sections vertically */
        }

        .collapsible-section {
            margin-top: 10px; /* Spacing between sections */
        }

.collapsible-header {
    cursor: pointer;
    background-color: #0b2e63;
    color: white;
    padding: 3px 3px;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #0a2540;

    border-top-left-radius: 30px;    /*Rounded left corner */
    border-bottom-left-radius: 30px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}


.step-number {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    color: #0b2e63;
    border: 2px solid #0b2e63;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-weight: bold;
    font-size: 14px;
    margin-left: -1px; /*Pull into the rounded edge */
    z-index: 1;
}



        .collapsible-content {
            display: block; /* Starts open */
            background: white;
            padding: 15px;
        }

        .color-options {
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-start; /* Ensures even spacing */
            padding: 8px 0;
        }

.color-box {
    position: relative;
    margin: 3px;
    width: 100px;
    height: auto;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 3px;
}

.color-box img {
    width: 100%;             /* fill full width of .color-box */
    cursor: pointer;
}

.color-box span {
    margin-top: 2px;
    font-size: 12px;
    color: #333;
    text-align: center;
    overflow-wrap: break-word;
    width: 100%;
}

.color-box.selected {
    height: auto; 
    border: 2px solid #2c509c;
    box-shadow: 0 0 10px #4d6db3;
}

.color-box.selected::after {
    content: '\2714';
    position: absolute;
    top: 5px;
    right: 5px;
    background: #28a745;
    color: white;
    font-size: 14px;
    font-weight: bold;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
}


i.fas.fa-chevron-down {
    transform: rotate(180deg); /* Indicates the section is open */
}

.form-group.inline {
    display: flex;
    gap: 10px;
}
.form-group.inrow {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
}
.mount-option {
    position: relative;
    border: 2px solid transparent;
    padding: 5px;
    text-align: center;
    transition: border-color 0.3s;
}

.mount-option, .measureWrap {
    flex: 1; /* Each child takes equal space */
    margin: 5px; /* Spacing between items */
    text-align: center; /* Center the text and content */
}

.mount-option img, .measureWrap img {
    cursor: pointer; /* Changes the cursor to a pointer when hovering over the label */
    width: 100%; /* Responsive images */
    max-width: 150px; /* Limit the size to maintain aspect ratio */
    height: auto; /* Maintain aspect ratio */
}

.mount-option span {
    display: block;
    font-size: 15px;
    color: #333;
}

.mount-option:hover {
    border-color: #2c509c
}

.mount-option.active {
    border: 2px solid #2c509c !important; /* Green border for selected item */
    box-shadow: 0 0 10px #4d6db3; /* Shadow to highlight selection */
}
.mount-option.active::after {
    content: '\2714';
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: #28a745;
    color: white;
    font-weight: bold;
    font-size: 16px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
}
.mount-image {
    margin-bottom: 8px; /* Space between image and text */
}

/* 确保 mount-notice 为空时仍然占据空间 */
#mount-notice {

    min-height: 60px; /* 预留空间，防止高度塌陷 */
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    visibility: visible; /* 即使内容为空，也保持占位 */
}

/* 如果 mount-notice 为空，则隐藏文字，但保持空间 */
#mount-notice:empty::before {
    content: " "; /* 添加一个空格来占位 */
    visibility: hidden;
}

.unit-option {
    cursor: pointer; /* Changes the cursor to a pointer when hovering over the label */
}

.unit-option input[type="radio"] {
    cursor: pointer; /* Ensures the cursor is also a pointer when hovering over the radio button itself */
}

.select-row {
    display: inline-flex;
    gap: 4px;
    margin-top: 5px;
}

.select-row select {
    flex: 1;
    min-width: 20px;
}

.measureInputs input[type="number"] {
    width: 100%; /* Full width of the container */
    padding: 8px; /* Padding for better touch interaction */
}

.measureInputs label {
    display: block; /* Ensure the label is above the input */
}

.lift-option {
    position: relative;
    padding: 5px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Soft shadow for 3D effect */
}

.lift-option img {
    cursor: pointer;
    width: 100%;
    height: auto;
    margin-bottom: 8px;
}

.lift-option span {
    display: block;
    font-size: 18px;
}
.lift-option.active::after {
    content: '\2714';
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: #28a745;
    color: white;
    font-size: 14px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

.image-container {
    position: relative;
    display: inline-block;
}

.info-wrapper {
    position: absolute;
    bottom: 15px;
    right: 8px;
    z-index: 2;
}

.info-icon {
    color: #1177bb;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 0 0px rgba(0,0,0,0.2);
    font-weight: bold;
}

.tooltip-text {
    display: none;
    position: absolute;
    top: 28px;
    right: 0;
    background-color: #fff;
    color: #333;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 12px;
    width: 180px;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.info-wrapper:hover .tooltip-text {
    display: block;
}
.notavailable-notice {
    position: relative;
    cursor: help;
}

.tooltip-unavailable {
    visibility: hidden;
    width: 240px;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.notavailable-notice:hover .tooltip-unavailable {
    visibility: visible;
    z-index: 2;
    background: white;
    font-size: 16px;
    opacity:1;
}
.notavailable-notice {
    pointer-events: auto; // Ensures hover effects are still active
}

.lift-option-wrapper .notavailable-notice {
    font-size: 12px;
    color: blue;
}

.lift-option.unavailable {
    background-color: #f9f9f9; /* Light gray background for unavailable options */
}

.lift-option.unavailable span.note {
    font-size: 12px;
    color: #d00;
    font-style: italic;
}

.lift-option.active {
    border: 2px solid #2c509c; /* Highlight selected option */
    box-shadow: 0 0 10px rgba(77, 109, 179, 0.5); /* Add shadow for emphasis */
}

.remote-control-section select {
    width: 200px;  /* Or whatever width fits your design */
    padding: 4px;
    margin-top: 5px;
}

.remote-control-section select option {
    padding: 4px;
}
.remote-control-header {
    position: relative;
    display: inline-block;
}
.roomname-header {
    position: relative;
    display: inline-block;
}
.info-icon-text {
    cursor: help;
    margin-left: 5px;
    color: #1177bb;
}

.tooltip-content {
    visibility: hidden;
    width: 280px; /* Adjust based on content width */
    background-color: black;
    color: white;
    margin-left: 80px;
    text-align: center;
    border-radius: 6px;
    padding: 5px 10px;
    position: absolute;
    z-index: 2;
    bottom: 20px; /* Adjust as necessary */
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75); /* Optional: Adds a shadow for better visibility */
}

.info-icon-text:hover + .tooltip-content {
    z-index:2;
    visibility: visible;
}

#cpw-1 {
    border: none;
    background-color: transparent; /* Optional: remove background too */
    font-size: 16px;               /* Optional: make it readable */
    color: #333;                   /* Optional: set text color */
    outline: none;                 /* Prevent border on focus */
    pointer-events: none;          /* Optional: make it completely non-editable */
}

.ct-cart-actions {
    display: flex;              /* This will lay out children in a row */
    align-items: center;        /* This aligns children vertically in the center */
    justify-content: space-between; /* This adds space between the children */
}

.quantity,
.ct-cart-submit {
    flex: 1; /* This allows each child to take equal space, you can adjust it as per your design */
}

@media (max-width: 768px) {
    .product-container {
        flex-direction: column; /* stack vertically */
    }

    .product-gallery {
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px; /* add space below gallery */
    }

    .collapsible-container {
        width: 100%;
    }

    .dimension-display {
        flex-direction: column; /* Force two lines on mobile */
        gap: 4px;
    }

    .form-group.inline {
        display: flex;
        flex-wrap: wrap;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Always at least 2 */
        gap: 16px;
    }

    .form-group.inrow {
        display: flex;
        flex-wrap: nowrap;
        gap: 10px;
    }

    .lift-option {
        max-width: 250px;
        width: 100%;
        box-sizing: border-box;
    }
    .lift-option img {
    width: 70%;
    }
    .ct-cart-actions {
        flex-direction: column; /* Stack them vertically on smaller screens */
    }
        .color-options {
        justify-content: center;
    }

    .color-box {
        width: 45%;            /* 自动两列排列 */
        max-width: 160px;
    }

    .color-box span {
        font-size: 13px;
    }
}