.etc-customizer-launch {
    margin: 1.5em 0;
}

.etc-checkout-design-preview {
    display: block;
    width: 180px;
    height: 115px;
    object-fit: contain;
    margin: 8px 0;
    background: #fff;
    border: 1px solid #dcdcde;
}

.etc-cart-design-preview {
    margin-top: 8px;
}

.etc-checkout-block-design-preview {
    display: block;
    width: 180px;
    height: 115px;
    object-fit: contain;
    margin: 8px 0 12px;
    border: 1px solid #dcdcde;
    background: #fff;
}

.etc-checkout-design-line,
.etc-checkout-design-view {
    display: block;
    margin: 4px 0;
}

.etc-checkout-design-line small {
    display: block;
    color: #646970;
}

.etc-open-customizer,
.etc-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9em 1.25em;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    max-width: 320px;
}

.etc-customizer-panel {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 999999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.etc-customizer-panel.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-sizing: border-box;
}

.etc-customizer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.etc-customizer-content {
    position: relative;
    z-index: 1;
    width: min(100%, 1040px);
    max-width: 100%;
    height: auto;
    max-height: 90vh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    overflow: hidden;
    border-radius: 18px;
    overscroll-behavior: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

@media (max-width: 900px) {
    .etc-customizer-panel.active {
        padding: 0;
        align-items: stretch;
    }

    .etc-customizer-content {
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }
}

.etc-customizer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.3rem;
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid #ebebeb;
    background: #f7f7f7;
    min-height: auto;
    flex-wrap: nowrap;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.02);
}

.etc-header-title-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    flex-wrap: nowrap;
    min-width: 0;
}

.etc-customizer-header h2 {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.15rem 0;
    letter-spacing: 0.01em;
}

.etc-header-actions {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: nowrap;
    justify-content: flex-end;
    overflow-x: visible;
    white-space: nowrap;
}

.etc-close-customizer {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.25rem;
    flex-shrink: 0;
}

.etc-tab-nav {
    display: flex;
    background: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 1rem;
    gap: 0.25rem;
    flex-shrink: 0;
}

.etc-tab-btn {
    padding: 0.65rem 1.25rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
}

.etc-tab-btn-inline {
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #d9d9d9;
    font-size: 0.75rem;
    line-height: 1.1;
    white-space: nowrap;
    color: #333333;
    transition: all 0.2s ease;
}

.etc-tab-btn.active {
    color: #ffffff;
    border-color: #1a1a1a;
    background: #1a1a1a;
    font-weight: 600;
}

.etc-view-button.active {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
}

.etc-customizer-preview,
.etc-customizer-controls {
    padding: 0.9rem;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    overscroll-behavior: contain;
}

.etc-customizer-preview {
    position: relative;
    align-self: start;
    max-width: 100%;
    width: 100%;
    overflow: visible;
    min-height: 0;
    z-index: 3;
}

.etc-flat-preview {
    position: sticky;
    top: 0;
    z-index: 3;
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
    min-height: 220px;
}

.etc-flat-preview canvas {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    min-height: 140px;
}

.etc-customizer-body {
    display: grid;
    grid-template-columns: minmax(320px, 1.08fr) minmax(320px, 0.92fr);
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: calc(90vh - 55px);
    overflow-y: auto;
    overflow-x: hidden;
    align-items: start;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 900px) {
    .etc-customizer-body {
        grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr) !important;
        gap: 2rem !important;
    }

    .etc-customizer-preview {
        padding-right: 0.75rem;
    }

    .etc-customizer-controls {
        width: 100%;
        padding-left: 0.75rem;
    }
}

.etc-customizer-preview,
.etc-customizer-controls {
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.etc-customizer-preview {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    order: 0;
    min-width: 0;
    max-width: 100%;
    min-height: 0;
}

.etc-customizer-controls {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    width: min(100%, 420px);
    margin: 0 auto;
    padding-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.etc-customizer-controls {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    position: relative;
    z-index: 1;
}

.etc-customizer-body {
    gap: 1rem;
    min-height: 0;
}

.etc-preview-canvas canvas {
    width: 100% !important;
    height: 100% !important;
}

.etc-preview-canvas {
    width: 100%;
    min-height: 260px;
    height: min(48vh, 340px);
    background: #ffffff;
    border: 1px solid #d8dadd;
    border-radius: 16px;
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.etc-flat-preview {
    width: 100%;
    padding: 0.5rem 0.8rem 0.8rem;
    background: linear-gradient(180deg, #fbfbfb 0%, #f4f4f4 100%);
    border: 1px solid #ddd;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    flex-shrink: 0;
}

.etc-flat-preview-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
}

/* Ensure the label appears above decorative boundary lines */
.etc-flat-preview-label {
    position: relative;
    display: block;
    margin: 0 0 0.45rem 0;
    padding: 0.45rem 0.8rem;
    background: #fafafa;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
}

/* label moved out of preview so no pseudo-element mask needed */

.etc-drag-hint {
    font-size: 0.8rem;
    font-weight: 400;
    color: #888;
}

.etc-boundary-line {
    display: none !important;
}

.etc-3d-wrapper {
    display: none;
    flex-direction: column;
    flex: 1;
    gap: 0.75rem;
    min-height: 280px;
}

.etc-customizer-controls .etc-layer-section,
.etc-customizer-controls > .etc-step:last-child {
    display: none;
}

.etc-tab-3d-active .etc-flat-preview {
    display: none;
}

.etc-tab-3d-active .etc-customizer-controls {
    display: flex;
    width: min(100%, 420px);
    margin: 0;
    padding-top: 0.5rem;
    flex-direction: column;
    gap: 1rem;
}

.etc-tab-3d-active .etc-customizer-preview {
    overflow: visible;
    max-height: none;
}

.etc-tab-3d-active .etc-toggle-bar,
.etc-tab-3d-active .etc-step[data-section="text"],
.etc-tab-3d-active .etc-step[data-section="image"] {
    display: none !important;
}

.etc-tab-3d-active .etc-layer-section {
    display: flex !important;
    flex-direction: column;
    margin: 0;
}

.etc-tab-3d-active .etc-step:last-child {
    display: flex !important;
    margin: 20px;
}

.etc-tab-3d-active .etc-customizer-body {
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 420px);
}

.etc-tab-3d-active .etc-3d-wrapper {
    display: flex;
    flex: 1 1 auto;
    min-height: 320px;
    width: 100%;
}

.etc-tab-3d-active .etc-preview-controls {
    display: flex !important;
    width: 100%;
    flex-wrap: wrap;
    align-items: center;
    visibility: visible;
    opacity: 1;
}

#etc-texture-preview-canvas {
    width: 100%;
    height: auto;
    min-height: 140px;
    max-height: min(48vh, 260px);
    aspect-ratio: 2 / 1;
    object-fit: contain;
    display: block;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #ccc;
    box-shadow: inset 0 0 0 1px #d8d8d8;
    cursor: grab;
}

/* Allow vertical touch/trackpad panning on the preview canvas so two-finger
   scroll gestures reach the modal instead of being captured by the canvas */
#etc-texture-preview-canvas, .etc-preview-canvas {
    touch-action: pan-y;
}

@media (max-width: 900px) {
    .etc-customizer-content {
        width: 100%;
        height: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        box-shadow: none;
    }
    .etc-customizer-header {
        padding: 0.55rem 0.8rem;
        flex-shrink: 0;
    }
    .etc-header-title-group {
        flex-wrap: nowrap;
        gap: 0.45rem;
    }
    .etc-header-actions {
        gap: 0.2rem;
        width: auto;
        justify-content: flex-end;
        flex-wrap: nowrap;
        min-width: 0;
        flex-shrink: 0;
    }
    .etc-customizer-body {
        display: block;
        flex: 1 1 auto;
        overflow-y: auto;
        overflow-x: hidden;
        width: 100%;
        min-height: 0;
        height: 100%;
        max-height: none;
        -webkit-overflow-scrolling: touch;
    }
    .etc-customizer-preview,
    .etc-customizer-controls {
        display: block;
        width: 100%;
        max-width: 100%;
        padding: 0.85rem 0.8rem 1rem;
        overflow: visible;
        z-index: auto;
    }
    .etc-customizer-preview {
        position: relative;
        z-index: 3;
        order: 0;
        flex: none;
        max-height: none;
        min-height: 0;
        border-bottom: 1px solid #ececec;
    }
    .etc-customizer-controls {
        position: relative;
        z-index: 1;
        flex: none;
        max-height: none;
        border-top: none;
        width: 100%;
        max-width: 100%;
        padding-top: 0.9rem;
    }
    .etc-tab-3d-active .etc-customizer-body,
    .etc-tab-3d-active .etc-customizer-preview,
    .etc-tab-3d-active .etc-customizer-controls {
        display: block;
    }
    .etc-tab-3d-active .etc-customizer-preview {
        max-height: none;
        min-height: 0;
        overflow: visible;
    }
    .etc-tab-3d-active .etc-customizer-controls {
        max-height: none;
    }
    .etc-tab-3d-active .etc-3d-wrapper {
        display: flex;
        min-height: 300px;
        width: 100%;
    }
    .etc-preview-canvas {
        min-height: 220px;
        height: min(34vh, 260px);
    }
    .etc-flat-preview {
        padding: 1rem 0.7rem 0.8rem;
        width: 100%;
        max-width: 520px;
        margin: 0 auto;
    }
    .etc-step {
        margin-bottom: 0.8rem;
    }
    .etc-toggle-bar {
        margin-bottom: 0.65rem;
    }
    .etc-header-title-group {
        justify-content: space-between;
    }
    .etc-header-actions {
        flex-wrap: nowrap;
    }
    .etc-customizer-header h2 {
        font-size: 0.95rem;
    }
    .etc-tab-btn-inline {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
    }
    .etc-toggle-bar {
        margin-top: 0.5rem;
    }
    .etc-flat-preview {
        padding: 1rem 0.75rem 1.25rem;
        max-width: 100%;
    }
    .etc-field {
        padding: 0.75rem 0.85rem;
    }
    .etc-image-action-row {
        gap: 0.45rem;
    }
    #etc-texture-preview-canvas {
        min-height: 140px;
        max-height: 200px;
    }
    .etc-preview-controls {
        position: static;
        background: transparent;
        border-radius: 0;
        padding: 0.5rem 0;
        margin-top: 0.5rem;
    }
    .etc-view-button {
        min-width: 60px;
        padding: 0.55rem 0.8rem;
    }
}

@media (max-width: 640px) {
    .etc-customizer-header {
        padding: 0.25rem 0.75rem 0.4rem;
    }
    .etc-header-title-group {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .etc-header-actions {
        width: auto;
        justify-content: flex-end;
        flex-wrap: nowrap;
        min-width: 0;
    }
    .etc-customizer-preview,
    .etc-customizer-controls {
        padding: 0.75rem;
    }
    .etc-flat-preview {

        padding: 0.5rem 0.75rem 1.2rem;
        max-width: 310px;
    }
    .etc-preview-canvas {
        min-height: 220px;
        height: 240px;
    }
    #etc-texture-preview-canvas {
        min-height: 120px;
        max-height: 200px;
    }
    .etc-preview-controls {
        max-width: 330px !important;
        padding: 0.4rem 0.5rem;
        gap: 0.45rem;
    }
    .etc-view-button {
        min-width: 58px;
        padding: 0.55rem 0.7rem;
    }
    .etc-layer-item {
        grid-template-columns: 1fr;
    }
}
.etc-model-selector {
    width: 100%;
    border-radius: 16px;
    border: 1px solid #ddd;
    background: #fafafa;
    padding: 0.85rem;
}

.etc-model-selector label {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.etc-model-selector select {
    width: 100%;
}

.etc-preview-controls {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.25rem;
    max-width: 503px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    position: sticky;
    bottom: 0;
    background: linear-gradient(#ffffff, rgba(255,255,255,0.95));
    padding: 0.5rem 0.75rem 0.5rem 0.75rem;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-right: 28px;
}

.etc-zoom-panel {
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #333;
    touch-action: manipulation;
}

.etc-zoom-panel label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.etc-zoom-panel input[type="range"] {
    flex: 1;
}

.etc-view-button {
    flex: 1 1 auto;
    min-width: 70px;
    padding: 0.65rem 0.9rem;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    border-radius: 999px;
    box-sizing: border-box;
    text-align: center;
}

.etc-step {
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 1rem;
}

.etc-step.etc-layer-section {
    border: 1px solid #e5e5e5;
    padding-top: 1rem;
    margin-top: 1rem;
}

.etc-toggle-bar,
.etc-segmented-tabs {
    display: flex;
    background: #f1f3f5;
    padding: 4px;
    border-radius: 12px;
    gap: 4px;
    margin-bottom: 1.25rem;
    border: 1px solid #e2e8f0;
}

.etc-toggle-section,
.etc-tab-pill {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    border: none;
    background: transparent;
    color: #4b5563;
    cursor: pointer;
    padding: 0.65rem 1rem;
    font-size: 0.92rem;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.etc-toggle-section:hover:not(.active),
.etc-tab-pill:hover:not(.active) {
    color: #111827;
    background: rgba(255, 255, 255, 0.5);
}

.etc-toggle-section.active,
.etc-tab-pill.active {
    background: #ffffff;
    color: #111827;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.etc-step-hidden {
    display: none;
}

.etc-step h3 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.etc-step label {
    display: block;
    margin-bottom: 0.85rem;
    font-weight: 500;
    color: #1a1a1a;
    font-size: 20px;
    line-height: 1.4;
}

.etc-step label .etc-field {
    margin-top: 0.4rem;
}

.etc-field {
    width: 100%;
    padding: 0.85rem;
    margin-bottom: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-sizing: border-box;
}

.etc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    align-items: start;
    width: 100%;
}

.etc-form-row label {
    margin-bottom: 0;
}

.etc-font-preview {
    margin: 0.75rem 0;
    padding: 0.9rem 1rem;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fafafa;
    color: #1a1a1a;
    min-height: 3.2rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.etc-preview-actions {
    display: none !important;
    justify-content: center;
    width: 100%;
    margin-top: 14px;
    margin-bottom: 8px;
}

.etc-tab-3d-active .etc-preview-actions {
    display: flex !important;
}

.etc-preview-actions .etc-save-design {
    width: 100%;
    max-width: 440px;
    padding: 0.9rem 1.6rem;
    font-size: 1.05rem;
    font-weight: 700;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.etc-preview-actions .etc-save-design:hover {
    background: #000;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.etc-note {
    margin: 0 0 0.75rem;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    background: #f2f7ff;
    border: 1px solid #dfe7fb;
    color: #1f3d7a;
    font-size: 0.95rem;
}

.full-width {
    width: 100%;
}

.etc-layer-list {
    display: grid;
    gap: 0.5rem;
    padding-bottom: 0.65rem;
    
}

.etc-layer-item {
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 14px;
    padding: 0.95rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    cursor: pointer;
    box-sizing: border-box;
    width: 100%;
}

.etc-layer-content {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
}

.etc-layer-title {
    text-align: left;
    width: 100%;
}

.etc-layer-title strong {
    display: block;
    text-align: left;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.35;
    word-break: break-word;
}

.etc-layer-font-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-align: left;
    width: 100%;
}

.etc-layer-font-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    white-space: nowrap;
}

.etc-layer-font-select {
    padding: 0.35rem 0.65rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #ffffff;
    font-size: 0.9rem;
    color: #222;
    cursor: pointer;
    min-width: 120px;
    max-width: 220px;
}

.etc-layer-tools-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    width: 100%;
}

.etc-layer-move-controls,
.etc-layer-resize-controls {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.etc-layer-bottom-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 0.15rem;
}

.etc-layer-bottom-row .etc-small-button {
    max-width: none !important;
    width: auto !important;
    padding: 0.35rem 0.95rem !important;
    font-size: 0.82rem !important;
    min-height: 32px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

.etc-image-layer-controls {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    background: #fafafa;
}
.etc-image-layer-controls[hidden] {
    display: none;
}
.etc-image-position-controls {
    display: grid;
    grid-template-columns: repeat(4, 2.25rem);
    gap: 0.4rem;
    justify-content: start;
    margin-top: 0.6rem;
}
.etc-image-position-controls .etc-move-btn {
    width: 2.25rem;
    height: 2.25rem;
}

.etc-layer-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.etc-layer-font-select {
    min-width: 120px;
    border-radius: 8px;
}

.etc-move-btn,
.etc-resize-btn,
.etc-order-btn {
    min-width: 32px;
    min-height: 32px;
    padding: 0.3rem 0.5rem;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: #333;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.etc-order-btn {
    padding: 0.25rem 0.6rem;
    font-size: 0.78rem;
    gap: 0.2rem;
}

.etc-move-btn:hover,
.etc-resize-btn:hover,
.etc-order-btn:hover {
    background: #e0e0e0;
    border-color: #999;
}

.etc-layer-item strong {
    word-break: break-word;
}

.etc-layer-editing {
    background: #e8f5e9;
    border-color: #4caf50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.etc-layer-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.etc-small-button {
    max-width: 90px;
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
}

.etc-image-action-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.etc-image-action-row .etc-button {
    flex: 1;
    max-width: none;
    min-width: 120px;
}

.etc-outline-button {
    background: transparent !important;
    color: #1a1a1a !important;
    border: 2px solid #1a1a1a !important;
}

.etc-outline-button:hover {
    background: #f5f5f5 !important;
}

.etc-outline-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.etc-editing-mode {
    background: #4caf50;
}

.etc-editing-mode:hover {
    background: #45a049;
}

.etc-layer-section {
    padding: 0 1rem 1rem 1rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 0.5rem;
}

.etc-section-info {
    background: #f0f0f0;
    border: 2px dashed #999;
    color: #666;
    font-size: 0.9rem;
}

.etc-section-label {
    font-weight: 500;
}

.etc-no-layers {
    color: #999;
    text-align: center;
    padding: 1rem 0;
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    .etc-layer-bottom-row {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .etc-customizer-body {
        grid-template-columns: 1fr !important;
    }
    
    .etc-customizer-preview {
        order: -1;
        max-width: 350px;
        
    }
    
    .etc-preview-canvas {
        max-width: 350px!important;
        min-height: 300px !important;
        flex: 0 0 200px !important;
    }
    
    #etc-texture-preview-canvas {
        min-height: 180px !important;
    }
    
    .etc-customizer-controls {
        max-width: 350px;
    }
    
    .etc-customizer-header {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.3rem 0.75rem;
    }
    
    .etc-customizer-header h2 {
        font-size: 0.79rem;
        font-weight: bold;
        margin: 0;
    }
     .etc-tab-btn-inline {
        padding: 0.2rem 0.5rem !important;
        font-size: 0.7rem !important;
    }
}

@media (min-width: 768px) {
    .etc-tab-nav {
        display: none;
    }

    .etc-customizer-body {
        grid-template-columns: 1.4fr 0.9fr;
    }

    .etc-preview-canvas {
        min-height: 300px;
        flex: 0 0 300px;
    }
    .etc-tab-btn-inline {
        padding: 0.2rem 0.5rem;
        font-size: 0.8rem;
    }
}

@media (min-width: 1100px) {
    .etc-customizer-body {
        grid-template-columns: 1.3fr 1fr;
    }

    .etc-preview-canvas {
        min-height: 400px;
        flex: 1 1 auto;
    }
}

/* Responsive styles for mug template preview */
@media (max-width: 768px) {
    .etc-flat-preview {
        padding: 1rem 0.5rem 0.8rem;
    }
    
    .etc-flat-preview-label {
        margin-bottom: 0.5rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .etc-flat-preview {
        padding: 0.8rem 0.4rem 0.6rem;
    }
    
    #etc-texture-preview-canvas {
        min-height: 100px;
    }
    
    .etc-flat-preview-label {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }
}

/* Customizer Submitting Overlay */
.etc-submitting-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.92);
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    border-radius: 18px;
    animation: etc-fade-in 0.2s ease-out;
}

.etc-submitting-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #111827;
    border-radius: 50%;
    animation: etc-spin 0.75s linear infinite;
    margin-bottom: 16px;
}

.etc-submitting-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 6px 0;
}

.etc-submitting-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}

@keyframes etc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes etc-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}