/* Custom Product Designer Workspace Styles */

.designer-wrapper {
    display: grid;
    grid-template-columns: 320px 1fr 280px;
    height: calc(100vh - 80px);
    background: #f1f5f9;
}

@media (max-width: 992px) {
    .designer-wrapper {
        display: flex;
        flex-direction: column;
        height: auto;
        padding-bottom: 90px; /* Space for the sticky bottom bar */
    }

    .designer-sidebar {
        order: 2; /* Text/Upload tools below canvas */
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding: 20px;
    }

    .designer-workspace {
        order: 1; /* Keep canvas prominently at the top */
        width: 100%;
        padding: 20px 10px;
    }

    .designer-sidebar-right {
        order: 3; /* Layers list and controls at bottom */
        width: 100%;
        border-left: none;
        padding: 20px;
    }

    /* Sticky Bottom Bar for Action Buttons on Mobile */
    .designer-sidebar-right .border-top {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 12px 20px;
        box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.08);
        display: flex;
        gap: 12px;
        z-index: 999;
        border-top: 1px solid #e2e8f0 !important;
        margin-top: 0 !important;
    }

    .designer-sidebar-right .border-top button {
        margin-bottom: 0 !important;
        flex: 1;
        font-size: 14px;
        padding: 12px 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Sidebar Panels styling */
.designer-sidebar {
    background: white;
    border-right: 1px solid #e2e8f0;
    overflow-y: auto;
    padding: 24px;
}

.designer-sidebar-right {
    background: white;
    border-left: 1px solid #e2e8f0;
    overflow-y: auto;
    padding: 24px;
}

/* Canvas Area Panel */
.designer-workspace {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 30px;
    background: radial-gradient(circle, #e2e8f0 10%, transparent 11%);
    background-size: 20px 20px;
}

/* Canvas bounding container */
.canvas-container-box {
    position: relative;
    background: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    overflow: hidden;
}

/* Overlay Bounding box representing printable area */
.printable-area-guide {
    position: absolute;
    top: 50px;
    left: 50px;
    right: 50px;
    bottom: 50px;
    border: 2px dashed rgba(99, 102, 241, 0.4);
    pointer-events: none;
    z-index: 5;
}

/* Tool Tab Selector buttons */
.tab-btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.tab-btn.active {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
    border-color: transparent;
}

/* Zoom controls block */
.zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    background: white;
    padding: 6px 12px;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    z-index: 10;
}

/* Color Palette Selector */
.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 1px #cbd5e1;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.color-swatch:hover {
    transform: scale(1.15);
}

/* Layer item card */
.layer-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 12px;
}

.layer-card:hover {
    background: #f1f5f9;
}
