/* ===========================
   DIY Phone Case Editor - Custom Styles
   Mobile: Full-screen canvas + Bottom toolbar with slide-up panels
   Desktop: Side-by-side layout
   =========================== */
.product-page #diy-phone-case-editor .dpce-tool-btn[data-tool="ai-expand"] {
    grid-column: 1 / -1;
    border: none;
    background: linear-gradient(136deg, #286aff, #4e6ef2, #7274f9, #9f66ff);
}

.product-page #diy-phone-case-editor .dpce-tool-btn[data-tool="ai-expand"]:hover {
    background: linear-gradient(rgba(0, 0, 0, 0.09), rgba(0, 0, 0, 0.09)), linear-gradient(136deg, #286aff, #4e6ef2, #7274f9, #9f66ff);
}

.product-page #diy-phone-case-editor .dpce-tool-btn[data-tool="ai-expand"] * {
    color: #fff;
}

.product-page #diy-phone-case-editor .dpce-ai-expand-fab {
    display: none;
}

/* ===========================
   MOBILE: Full-screen Editor Layout
   =========================== */
@media (max-width: 991px) {
    .product-page #diy-phone-case-editor .dpce-ai-expand-fab {
        position: fixed;
        right: calc(16px + env(safe-area-inset-right, 0px));
        bottom: calc(86px + env(safe-area-inset-bottom, 0px));
        z-index: 79; /* Keep below the tool panel backdrop. */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        width: 50px;
        height: 50px;
        padding: 0;
        border: none;
        border-radius: 50%;
        background: linear-gradient(136deg, #286aff, #4e6ef2, #7274f9, #9f66ff);
        color: #fff;
        box-shadow: 0 4px 16px rgba(78, 110, 242, 0.35);
        cursor: pointer;
    }

    .product-page #diy-phone-case-editor .dpce-ai-expand-fab i {
        font-size: 20px;
    }

    .product-page #diy-phone-case-editor .dpce-ai-expand-fab span {
        font-size: 12px;
        font-weight: 600;
        line-height: 1;
    }

    .product-page #diy-phone-case-editor .dpce-ai-expand-fab:disabled {
        cursor: not-allowed;
    }

    /* The editor wrapper (#diy-phone-case-editor) */
    .product-page #diy-phone-case-editor {
        display: flex;
        flex-direction: column;
        flex: 1;
        position: static;
        min-height: calc(100vh - 200px);
    }

    /* LEFT COL: Canvas - fills remaining vertical space */
    .product-page #diy-phone-case-editor .left-col {
        flex: 1;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        padding: 0;
        min-height: 0; /* allow flex shrink */
    }

    /* Canvas wrapper fills left-col */
    .product-page #diy-phone-case-editor .dpce-workspace-wrapper {
        flex: 1;
        display: flex;
        flex-direction: column;
        border-radius: 0;
        border: none;
        box-shadow: none;
        background: #f0f2f5;
        overflow: hidden;
    }

    /* Canvas stage: center the canvas, fill available height */
    .product-page #diy-phone-case-editor .dpce-canvas-stage {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1rem;
        min-height: 0;
    }

    .product-page #diy-phone-case-editor .left-col .dpce-workspace {
        width: auto;
        margin: 0 auto;
        position: relative;
    }

    /* RIGHT COL: hidden on mobile (its content is in mobile toolbar) */
    .product-page #diy-phone-case-editor .right-col {
        flex: none;
        padding: 0;
        width: 100%;
    }

    /* ===========================
       MOBILE BOTTOM TOOLBAR
       Fixed at bottom, above everything
       =========================== */
    .product-page #diy-phone-case-editor .dpce-mobile-toolbar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background: #ffffff;
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
        /* Safe area for notched phones */
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    /* Hide old toolbar header / toggle button on mobile */
    .product-page #diy-phone-case-editor .dpce-toolbar-header {
        display: none;
    }

    /* Toolbar content: contains both tool-row and panels */
    .product-page #diy-phone-case-editor .dpce-toolbar-content {
        max-height: none;
        overflow: visible;
    }

    .product-page #diy-phone-case-editor .dpce-toolbar-content.collapsed {
        max-height: none;
        overflow: visible;
    }

    /* ===========================
       SLIDE-UP PANEL (the pop-up sheet)
       =========================== */
    /* Panel container: positioned above the tool-row */
    .product-page #diy-phone-case-editor .dpce-tool-panels {
        border: none;
        background: transparent;
        position: relative;
    }

    /* Each panel: hidden by default, slides up from bottom */
    .product-page #diy-phone-case-editor .dpce-tool-panel {
        display: none;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 490;
        background: #ffffff;
        border-radius: 20px 20px 0 0;
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15);
        padding: 0 1.25rem 1.25rem;
        max-height: 40vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        animation: slideUpPanel 0.25s ease-out;
    }

    .product-page #diy-phone-case-editor .dpce-tool-panel.active {
        display: block;
    }

    @keyframes slideUpPanel {
        from {
            transform: translateY(30px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    /* Panel drag handle at top */
    .product-page #diy-phone-case-editor .dpce-tool-panel::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: #d1d5db;
        border-radius: 99px;
        margin: 12px auto 16px;
    }

    /* Panel close button */
    .dpce-panel-close-btn {
        position: absolute;
        top: 2px;
        right: 1.25rem;
        width: 28px;
        height: 28px;
        background: #f3f4f6;
        border: none;
        border-radius: 50%;
        color: #6b7280;
        font-size: 14px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        padding: 0;
        z-index: 10;
    }

    .dpce-panel-close-btn:active {
        background: #e5e7eb;
    }

    /* Backdrop for panels */
    .dpce-panel-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.25);
        z-index: 80;
        animation: fadeInBackdrop 0.2s ease;
    }

    .dpce-panel-backdrop.active {
        display: block;
    }

    @keyframes fadeInBackdrop {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }

    /* ===========================
       TOOL ROW (bottom icon bar)
       =========================== */
    .product-page #diy-phone-case-editor .dpce-tools-scroll {
        padding: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        background: #ffffff;
    }

    .product-page #diy-phone-case-editor .dpce-tools-scroll::-webkit-scrollbar {
        display: none;
    }

    /* Horizontal icon row */
    .product-page #diy-phone-case-editor .dpce-tools-list {
        display: flex;
        flex-direction: row;
        gap: 0;
        min-width: min-content;
        padding: 0.5em 1rem;
    }

    /* Individual tool button: compact icon + label */
    .product-page #diy-phone-case-editor .dpce-tool-btn {
        padding: 8px 10px;
        min-width: 62px;
        background: transparent;
        border: none;
        border-radius: 12px;
        cursor: pointer;
        transition: background 0.15s ease;
    }

    .product-page #diy-phone-case-editor .dpce-tool-btn:active {
        background: #f3f4f6;
        transform: none;
    }

    .product-page #diy-phone-case-editor .dpce-tool-btn.active {
        background: #eef2ff;
        border: none;
    }

    .product-page #diy-phone-case-editor .dpce-tool-btn i {
        font-size: 1.35rem;
        color: #6b7280;
        transition: color 0.15s ease;
    }

    .product-page #diy-phone-case-editor .dpce-tool-btn.active i {
        color: #6366f1;
    }

    .product-page #diy-phone-case-editor .dpce-tool-btn span {
        font-size: 12px;
        color: #6b7280;
        font-weight: 500;
        text-align: center;
        white-space: nowrap;
    }

    .product-page #diy-phone-case-editor .dpce-tool-btn.active span {
        color: #6366f1;
    }

    /* Quick controls (rotation/scale/delete) inside panel view */
    .product-page #diy-phone-case-editor .dpce-quick-controls {
        display: grid;
        grid-template-columns: 1fr 1fr auto;
        gap: 2rem;
        padding: 1rem !important;

        display: none !important;
    }

    /* Add bottom padding to canvas area to avoid content being hidden behind fixed toolbar */
    .product-page #diy-phone-case-editor .left-col {
        padding-bottom: 0;
    }

    /* Body padding to account for fixed bottom bar (~70px toolbar) */
    body.diy-editor-mobile-active {
        padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    }

    .product-page #diy-phone-case-editor .dpce-tool-panel .dpce-slider-group {
        margin-bottom: 1rem;
    }
}

/* ===========================
   COMMON STYLES (shared mobile & desktop)
   =========================== */

/* Canvas Workspace Card */
.product-page #diy-phone-case-editor .dpce-workspace-wrapper {
    background: #ffffff;
    overflow: hidden;
}

/* Canvas Stage */
.product-page #diy-phone-case-editor .dpce-canvas-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-page #diy-phone-case-editor .left-col .dpce-workspace {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    position: relative;
}

/* Text Input Panel */
.product-page #diy-phone-case-editor .dpce-text-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-page #diy-phone-case-editor .dpce-input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.product-page #diy-phone-case-editor .dpce-input-label {
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-page #diy-phone-case-editor .dpce-text-input {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    outline: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.product-page #diy-phone-case-editor .dpce-text-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Color Swatches */
.product-page #diy-phone-case-editor .dpce-color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 0.625rem;
}

.product-page #diy-phone-case-editor .dpce-color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-page #diy-phone-case-editor .dpce-color-swatch:active {
    transform: scale(0.9);
}

.product-page #diy-phone-case-editor .dpce-color-swatch.active {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Sliders */
.product-page #diy-phone-case-editor .dpce-slider-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid #e5e7eb;
    background-color: #f9fafb;
    padding: 1rem 1rem 2rem 1rem;
    border-radius: 1rem;
}

.product-page #diy-phone-case-editor .dpce-slider-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-page #diy-phone-case-editor .dpce-slider-label {
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.product-page #diy-phone-case-editor .dpce-slider-label i {
    color: #6366f1;
}

.product-page #diy-phone-case-editor .dpce-slider-value {
    font-weight: 700;
    font-size: 12px;
    color: #6366f1;
    background: #eef2ff;
    padding: 0.125rem 0.5rem;
    border-radius: 6px;
}

.product-page #diy-phone-case-editor input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 999px;
    background: #e5e7eb;
    outline: none;
    cursor: pointer;
}

.product-page #diy-phone-case-editor input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #6366f1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
    transition: transform 0.15s ease;
}

.product-page #diy-phone-case-editor input[type="range"]::-webkit-slider-thumb:active {
    transform: scale(1.2);
}

.product-page #diy-phone-case-editor input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #6366f1;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
}

/* Action Buttons */
.product-page #diy-phone-case-editor .dpce-action-btns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.product-page #diy-phone-case-editor .dpce-action-btn {
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.product-page #diy-phone-case-editor .dpce-action-btn:active {
    transform: scale(0.95);
}

.product-page #diy-phone-case-editor .dpce-action-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.product-page #diy-phone-case-editor .dpce-action-btn i {
    color: #6366f1;
}

.product-page #diy-phone-case-editor .dpce-action-btn.danger i {
    color: #ef4444;
}

.product-page #diy-phone-case-editor .dpce-action-btn.danger:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

/* Text font choices */
.product-page #diy-phone-case-editor .dpce-font-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.product-page #diy-phone-case-editor .dpce-font-btn {
    border-radius: 999px;
    padding: 0.7rem 1.4rem;
    font-size: 1.6rem;
    font-weight: 400;
}

.product-page #diy-phone-case-editor .dpce-font-btn.active {
    color: #4f46e5;
    background: #eef2ff;
    border-color: #6366f1;
}

.product-page #diy-phone-case-editor .dpce-font-btn:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.product-page #diy-phone-case-editor #addTextBtn:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* Uploaded images */
.product-page #diy-phone-case-editor .dpce-image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.product-page #diy-phone-case-editor .dpce-image-card {
    position: relative;
    height: 132px;
    padding: 42px 8px 8px;
    box-sizing: border-box;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #f9fafb;
}

.product-page #diy-phone-case-editor .dpce-image-card.is-selected {
    border-color: #6366f1;
    box-shadow: 0 0 0 1px #6366f1;
}

.product-page #diy-phone-case-editor .dpce-image-preview {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-page #diy-phone-case-editor .dpce-image-layer-controls {
    position: absolute;
    top: 5px;
    left: 5px;
    display: flex;
    gap: 3px;
}

.product-page #diy-phone-case-editor .dpce-image-control,
.product-page #diy-phone-case-editor .dpce-slider-step-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #4f46e5;
    font-size: 14px;
    cursor: pointer;
}

.product-page #diy-phone-case-editor .dpce-image-delete {
    position: absolute;
    top: 5px;
    right: 5px;
    color: #dc2626;
}

.product-page #diy-phone-case-editor .dpce-image-control:hover:not(:disabled),
.product-page #diy-phone-case-editor .dpce-slider-step-button:hover:not(:disabled) {
    background: #eef2ff;
}

.product-page #diy-phone-case-editor .dpce-image-delete:hover {
    background: #fef2f2;
}

.product-page #diy-phone-case-editor .dpce-image-control:disabled,
.product-page #diy-phone-case-editor .dpce-slider-step-button:disabled {
    opacity: 0.35;
    cursor: default;
}

.product-page #diy-phone-case-editor .dpce-image-add {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    height: 132px;
    padding: 1rem;
    background: #f0f9ff;
    border: 2px dashed #3b82f6;
    border-radius: 1rem;
    color: #3b82f6;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.product-page #diy-phone-case-editor .dpce-image-add i {
    font-size: 24px;
}

.product-page #diy-phone-case-editor .dpce-image-add:hover {
    background: #e0f2fe;
}

.product-page #diy-phone-case-editor .dpce-image-control:focus-visible,
.product-page #diy-phone-case-editor .dpce-slider-step-button:focus-visible,
.product-page #diy-phone-case-editor .dpce-image-add:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.product-page #diy-phone-case-editor .dpce-slider-step-controls {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
}

/* Quick controls: rotation/scale/delete - mobile style */
.product-page #diy-phone-case-editor .dpce-quick-controls {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    padding: 2rem;
    gap: 1rem;
    border-top: 1px solid #f3f4f6;
}

/* ===========================
   DESKTOP: Side-by-Side Layout (unchanged)
   =========================== */

@media (min-width: 992px) {
    .product-page #diy-phone-case-editor {
        display: grid;
        grid-template-columns: 1fr 480px;
        gap: 2.5rem;
        align-items: start;
    }

    .product-page #diy-phone-case-editor .left-col {
        position: static;
        margin-bottom: 0;
        padding: 0;
    }

    .product-page #diy-phone-case-editor .right-col {
        position: sticky;
        top: 2rem;
    }

    .product-page #diy-phone-case-editor .dpce-workspace-wrapper {
        border-radius: 20px;
        border: 1px solid #e5e7eb;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    }

    .product-page #diy-phone-case-editor .dpce-canvas-stage {
        padding: 4rem 2rem;
    }

    .product-page #diy-phone-case-editor .left-col .dpce-workspace {
        max-width: 400px;
    }

    /* Desktop: Static Right Panel */
    .product-page #diy-phone-case-editor .dpce-mobile-toolbar {
        position: static;
        border: 1px solid #e5e7eb;
        border-radius: 20px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
        padding-bottom: 0;
        background: #ffffff;
    }

    /* Restore toolbar header on desktop */
    .product-page #diy-phone-case-editor .dpce-toolbar-header {
        display: flex;
        padding: 2rem;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid #f3f4f6;
        background: #fafafa;
        border-radius: 20px 20px 0 0;
    }

    .product-page #diy-phone-case-editor .dpce-toolbar-title {
        font-weight: 600;
        color: #111827;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .product-page #diy-phone-case-editor .dpce-toolbar-title i {
        color: #6366f1;
    }

    .product-page #diy-phone-case-editor .dpce-toolbar-toggle {
        display: none;
    }

    .product-page #diy-phone-case-editor .dpce-toolbar-content {
        max-height: none !important;
        overflow: visible;
    }

    /* Desktop: grid layout for tools */
    .product-page #diy-phone-case-editor .dpce-tools-scroll {
        padding: 2rem;
        overflow: visible;
    }

    .product-page #diy-phone-case-editor .dpce-tools-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1rem;
        min-width: auto;
        padding: 0;
    }

    .product-page #diy-phone-case-editor .dpce-tool-btn {
        min-width: auto;
        padding: 1rem;
        background: #f9fafb;
        border: 1px solid #e5e7eb;
        border-radius: 1rem;
    }

    .product-page #diy-phone-case-editor .dpce-tool-btn.active {
        background: #eef2ff;
        border-color: #6366f1;
    }

    .product-page #diy-phone-case-editor .dpce-tool-btn i {
        font-size: 1.4rem;
        color: #6b7280;
    }

    .product-page #diy-phone-case-editor .dpce-tool-btn.active i {
        color: #6366f1;
    }

    .product-page #diy-phone-case-editor .dpce-tool-btn span {
        color: #374151;
    }

    /* Desktop: panels are inline (not fixed) */
    .product-page #diy-phone-case-editor .dpce-tool-panels {
        border-top: 1px solid #e5e7eb;
        border-bottom: 1px solid #e5e7eb;
        background: #ffffff;
    }

    .product-page #diy-phone-case-editor .dpce-tool-panel {
        display: none;
        position: static;
        padding: 1.25rem 1.5rem;
        max-height: none;
        overflow: visible;
        border-radius: 0;
        border: none;
        box-shadow: none;
        animation: none;
    }

    .product-page #diy-phone-case-editor .dpce-tool-panel::before {
        display: none;
    }

    .product-page #diy-phone-case-editor .dpce-tool-panel.active {
        display: block;
    }

    /* Desktop: hide close button */
    .dpce-panel-close-btn {
        display: none;
    }

    .dpce-panel-backdrop {
        display: none !important;
    }

    .product-page #diy-phone-case-editor .dpce-quick-controls {
        display: grid;
        grid-template-columns: 1fr 1fr auto;
        padding: 2rem;
        gap: 1rem;
        border-top: 1px solid #f3f4f6;
    }

    .product-page #diy-phone-case-editor .dpce-color-grid {
        grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
    }

    .product-page #diy-phone-case-editor .dpce-color-swatch {
        width: 36px;
        height: 36px;
    }

    .product-page #diy-phone-case-editor .dpce-slider-group {
        padding: 2rem;
    }

    .product-page #diy-phone-case-editor .dpce-tool-panel .dpce-slider-group {
        margin-bottom: 1rem;
    }
}

@media (min-width: 1200px) {
    .product-page #diy-phone-case-editor {
        grid-template-columns: 1fr 550px;
        gap: 3rem;
    }

    .product-page #diy-phone-case-editor .dpce-tools-list {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
}

/* ===========================
   SMALL MOBILE OPTIMIZATIONS
   =========================== */

@media (max-width: 400px) {
    .product-page #diy-phone-case-editor .dpce-tool-btn {
        min-width: 54px;
        padding: 1rem;
    }

    .product-page #diy-phone-case-editor .dpce-tool-btn i {
        font-size: 1.2rem;
    }

    .product-page #diy-phone-case-editor .dpce-tool-btn span {
    }
}

/* Smooth Transitions (avoid transitioning layout-affecting props) */
.product-page #diy-phone-case-editor .dpce-tool-btn,
.product-page #diy-phone-case-editor .dpce-color-swatch,
.product-page #diy-phone-case-editor .dpce-action-btn {
    transition-property: background-color, border-color, color, opacity, box-shadow, transform;
    transition-duration: 180ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.product-page #diy-phone-case-editor .dpce-tool-btn {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
