.popup-door-style-detail-footer {
    text-align: center;
    padding: 10px 0px;
    border-top: 1px solid #eee;
}

.popup-door-style-detail-apply-btn {
    background-color: #d4b87c;
    color: white;
    border: none;
    padding: 5px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.popup-door-style-detail-apply-btn:hover {
    opacity: 0.9;
}

.popup-door-style-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.popup-door-style-detail-container {
    background: white;
    border-radius: 12px;
    max-width: 1000px;
    width: 100%;
    max-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.popup-door-style-detail-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
    /* margin-bottom: 20px; */
}

.popup-door-style-detail-header span {
    margin: 0 auto;
    font-weight: 700;
    font-size: 20px;
}

.popup-door-style-detail-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.popup-door-style-detail-close-btn:hover {
    background-color: #f0f0f0;
    color: #333;
}

.popup-door-style-detail-content {
    /* padding: 10px 20px 20px; */
    overflow-y: auto;
    flex: 1;
}

/* Radio group under product name */
.product-checkbox-group {
    display: flex;
    gap: 20px;
    justify-content: space-around;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.product-checkbox-group label.checkbox-option {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #2c3e50;
    cursor: pointer;
    user-select: none;
    padding-left: 24px;
    /* space for fake checkbox */
    white-space: nowrap;
    flex-shrink: 0;
}

.product-checkbox-group input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    margin: 0;
}

.product-checkbox-group .checkbox-mark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #3498db;
    border-radius: 3px;
    background: #fff;
    box-sizing: border-box;
}

.product-checkbox-group .checkbox-mark::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 5px;
    height: 10px;
    border: solid #3498db;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg) scale(0);
    transition: transform 0.12s ease;
}

.product-checkbox-group input[type="checkbox"]:checked+.checkbox-mark::after {
    transform: translate(-50%, -60%) rotate(45deg) scale(1);
}

.product-checkbox-group input[type="checkbox"]:checked+.checkbox-mark {
    border-color: #3498db;
}

.popup-door-style-detail-main {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.door-title {
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    text-align: center;
    border-bottom: 2px solid #3498db;
    padding-bottom: 15px;
}

.door-visualization {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px;
    min-height: 300px;
    touch-action: pan-y pinch-zoom;
    overflow: hidden;
}

.visualization-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.visualization-nav-btn:hover:not(:disabled) {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.visualization-nav-btn:active:not(:disabled) {
    transform: translateY(-50%) scale(0.95);
}

.visualization-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(200, 200, 200, 0.5);
}

.visualization-prev-btn {
    left: 10px;
}

.visualization-next-btn {
    right: 10px;
}

.primary-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    touch-action: pan-y pinch-zoom;
    user-select: none;
    -webkit-user-select: none;
}

.primary-door-image {
    max-width: 100%;
    max-height: 52vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-track {
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    border-radius: 6px;
    padding: 0 5px;
}

.carousel-images {
    display: flex;
    transition: transform 0.3s ease;
    gap: 10px;
}

.carousel-image {
    width: 80px;
    height: 130px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.carousel-image:hover {
    transform: scale(1.05);
    border-color: #3498db;
}

.carousel-image.active {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.carousel-btn:hover:not(:disabled) {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(200, 200, 200, 0.5);
}

.prev-btn {
    left: -15px;
}

.next-btn {
    right: -15px;
}

.door-slider-section {
    padding: 5px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.door-slider {
    width: 100%;
    max-width: 400px;
    height: 8px;
    border-radius: 4px;
    background: #ddd;
    outline: none;
    opacity: 0.7;
    transition: opacity 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.door-slider:hover {
    opacity: 1;
}

.door-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.door-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.action-buttons {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.btn-primary {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 150px;
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.door-style-image-preview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 12, 16, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000001;
    padding: 24px;
    backdrop-filter: blur(2px);
}

.door-style-image-preview-overlay.show {
    display: flex;
}

.door-style-image-preview-content {
    position: relative;
    width: 100%;
    height: 100vh;
    background: #10131a;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.door-style-image-preview-wrapper {
    flex: 1;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
}

.door-style-image-preview-wrapper img {
    max-width: 100%;
    max-height: 100%;
    transform-origin: center;
    transition: transform 0.2s ease;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

.door-style-image-preview-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    color: #f7f7f7;
    font-size: 14px;
    margin-bottom: 10px;
}

.door-style-image-preview-controls button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.door-style-image-preview-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.door-style-image-preview-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    z-index: 999;
}

.door-style-image-preview-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    .popup-door-style-detail-container {
        width: 100%;
        /* margin: 10px; */
    }

    .door-visualization {
        flex-direction: column;
    }

    .door-slider-section {
        margin: 10px 0;
        padding: 5px 15px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .popup-door-style-detail-overlay {
        padding: 10px;
    }

    .popup-door-style-detail-content {
        /* padding: 10px 20px 20px; */
    }

    .door-title {
        font-size: 24px;
    }

    .door-slider-section {
        margin: 10px 0;
        padding: 5px 15px;
    }

    .btn-primary {
        padding: 10px 20px;
        font-size: 14px;
    }

    .visualization-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .visualization-prev-btn {
        left: 5px;
    }

    .visualization-next-btn {
        right: 5px;
    }
}

/* Responsive for checkbox group on small screens */
@media (max-width: 600px) {
    .product-checkbox-group {
        gap: 12px 16px;
        justify-content: flex-start;
        row-gap: 12px;
    }

    .product-checkbox-group label.checkbox-option {
        font-size: 13px;
        flex-basis: calc(50% - 8px);
        max-width: calc(50% - 8px);
    }

    /* First 2 items in first row */
    .product-checkbox-group label.checkbox-option:nth-child(1),
    .product-checkbox-group label.checkbox-option:nth-child(2) {
        margin-bottom: 0;
    }
}

/* Extra Small Mobile */
@media (max-width: 320px) {
    .popup-door-style-detail-container {
        margin: 5px;
        border-radius: 8px;
    }

    .popup-door-style-detail-content {
        /* padding: 10px 15px 15px; */
    }

    .door-title {
        font-size: 20px;
        padding-bottom: 10px;
    }

    .door-visualization {
        min-height: 200px;
    }

    .primary-door-image {
        max-height: 250px;
    }

    .carousel-image {
        width: 70px;
        height: 50px;
    }

    .carousel-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .visualization-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .door-slider-section {
        margin: 10px 0;
        padding: 5px 12px;
    }

    .btn-primary {
        padding: 8px 16px;
        font-size: 13px;
        min-width: 120px;
    }
}