/* ═══════════════════════════════════════════════════════════
   KITBUILDER 3D — MODERN LIGHT UI
   ═══════════════════════════════════════════════════════════ */

:root {
    --primary-color: #207d75;
    --primary-dark: #195f59;
    --primary-light: rgba(32, 125, 117, 0.12);
    --primary-glow: rgba(32, 125, 117, 0.2);
    --dark-color: #111;
    --color-2: #f0f0f0;
    --text: #1a1a1a;
    --text-muted: #666;
    --text-dim: #999;
    --surface: #fff;
    --surface-2: #f8f9fa;
    --surface-3: #f0f0f0;
    --border: #e0e0e0;
    --border-dark: #ccc;
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 14px;
}

/* ── Reset ───────────────────────────────────────────────── */
*,
*:before,
*:after {
    box-sizing: border-box;
}

.um-3d-customizer-wrapper {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    width: 100%;
}

/* ── Hidden helpers ─────────────────────────────────────── */
#texture-factory-container,
#svg-pattern-library-container,
#screenshotData {
    position: absolute;
    left: -9999px;
    top: -9999px;
}

.hidden,
[hidden="hidden"] {
    display: none !important;
}

#ttime {
    font-size: 11px;
    color: var(--text-dim);
    display: none;
}

/* ── Layout ─────────────────────────────────────────────── */
.um-main-area {
    display: flex;
    justify-content: space-between;
    padding-top: 58px;
}

.um-container {
    max-width: 1140px;
    margin: auto;
}

.um-container-fluid {
    padding: 0 20px;
}

.um-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

/* ── HEADER ─────────────────────────────────────────────── */
.um-custom-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 13;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.um-custom-header .um-row {
    min-height: 58px;
}

.um-custom-header h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--dark-color);
    letter-spacing: -0.2px;
}

/* ── Header Buttons ─────────────────────────────────────── */
.top-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Back button */
.kd-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 34px;
    padding: 0 12px 0 9px;
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s;
    flex-shrink: 0;
    line-height: 1;
}

.kd-back-btn:hover {
    background: #fff;
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 1px 6px rgba(32, 125, 117, 0.15);
    text-decoration: none;
}

.kd-back-btn svg {
    pointer-events: none;
}

/* Undo / Redo */
.hdr-undo-btn,
.hdr-redo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0;
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    transition: all 0.15s;
}

.hdr-undo-btn:hover:not(:disabled),
.hdr-redo-btn:hover:not(:disabled) {
    background: #fff;
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 1px 6px rgba(32, 125, 117, 0.15);
}

.hdr-undo-btn:disabled,
.hdr-redo-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.hdr-undo-btn svg,
.hdr-redo-btn svg {
    pointer-events: none;
}

.hdr-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 4px;
}

button {
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    border: none;
    padding: 8px 16px;
    transition: all 0.18s ease;
    font-weight: 600;
    line-height: 1;
    background: var(--surface-3);
    color: var(--text);
}

button:hover {
    filter: brightness(0.93);
}

button#requestQuoteBtn {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 8px var(--primary-glow);
    padding: 8px 20px;
    border: none;
    font-weight: 700;
    position: static;
}

button#requestQuoteBtn:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 14px var(--primary-glow);
}

button#downloadBtn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    font-weight: 700;
}

button#downloadBtn:hover {
    background: var(--primary-dark);
}

.hdr-save-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    font-weight: 700;
    padding: 7px 16px;
}

.hdr-save-btn:hover {
    background: var(--primary-dark);
}

.hdr-load-btn {
    background: #fff;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
    font-weight: 700;
    padding: 6px 14px;
}

.hdr-load-btn:hover {
    background: var(--primary-light);
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.um-sidebar-main {
    width: 75px;
    background: #fff;
    border-right: 1px solid var(--border);
    position: relative;
    height: calc(100vh - 58px);
    padding-top: 8px;
    padding-bottom: 8px;
    overflow: visible;
    flex-shrink: 0;
}

.left-sidebar-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    align-items: center;
}

.left-sidebar-menu ul li {
    margin: 0 0 8px;
    text-align: center;
    padding: 0 8px;
}

.left-sidebar-menu li a,
.left-sidebar-menu li button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.2px;
    padding: 6px 2px;
    border-radius: var(--radius-sm);
    transition: color 0.18s;
    width: 100%;
    background: transparent;
    border: none;
    box-shadow: none;
}

.left-sidebar-menu li button {
    background: transparent;
    color: var(--text-muted);
}

.left-sidebar-menu li .icon-conatiner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 38px;
    border-radius: var(--radius-sm);
    transition: background 0.18s, box-shadow 0.18s;
    margin-bottom: 2px;
    padding: 4px 6px 2px;
}

/* default icon fill */
.left-sidebar-menu li .icon-conatiner path,
.left-sidebar-menu li .icon-conatiner circle,
.left-sidebar-menu li .icon-conatiner rect {
    fill: #aaa;
    transition: fill 0.18s;
}

/* hover */
.left-sidebar-menu li:hover a,
.left-sidebar-menu li:hover button {
    color: var(--text);
}

.left-sidebar-menu li:hover .icon-conatiner {
    background: #fff;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
}

.left-sidebar-menu li:hover .icon-conatiner path,
.left-sidebar-menu li:hover .icon-conatiner circle,
.left-sidebar-menu li:hover .icon-conatiner rect {
    fill: var(--primary-color);
}

/* active */
.left-sidebar-menu li.active a,
.left-sidebar-menu li.active button {
    color: var(--primary-color);
}

.left-sidebar-menu li.active .icon-conatiner {
    background: #fff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.left-sidebar-menu li.active .icon-conatiner path,
.left-sidebar-menu li.active .icon-conatiner circle,
.left-sidebar-menu li.active .icon-conatiner rect {
    fill: var(--primary-color);
}

/* ── Sidebar hover content ──────────────────────────────── */
.um-3d-customizer-wrapper .the-sidebar-hover-content {
    background: #fff;
    border-right: 1px solid var(--border);
    bottom: 0;
    left: 75px;
    min-width: 290px;
    opacity: 0;
    padding: 15px;
    position: absolute;
    top: 0;
    visibility: hidden;
    box-shadow: var(--shadow-md);
    transition: opacity 0.18s, visibility 0.18s;
}

.um-sidebar-main .left-sidebar-menu li:hover .the-sidebar-hover-content {
    opacity: 1;
    visibility: visible;
}

/* ── Expanding Patterns Panel ───────────────────────────── */
.um-sidebar-main .patterns-layouts {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 75px;
    overflow-y: auto;
    overflow-x: hidden;
    width: 290px;
    background: #fff;
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    display: none;
    z-index: 10;
    padding: 5px 15px 30px;
    overflow: auto;
}

.um-sidebar-main .active .patterns-layouts {
    display: block;
}

.left-sidebar-menu ul li:hover .patterns-layouts {
    opacity: 1;
    visibility: visible;
}

/* scrollbar */
.um-sidebar-main ::-webkit-scrollbar {
    width: 4px;
    background: transparent;
}

.um-sidebar-main ::-webkit-scrollbar-track {
    background: var(--color-2);
}

.um-sidebar-main ::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

/* ── Panel Titles ───────────────────────────────────────── */
.sidebar-title h3 {
    margin: 12px 0 6px 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

/* ── Design Template Grid ───────────────────────────────── */
select#tabpanel-design-select {
    display: none;
}

#tabpanel-design-container {
    display: flex;
    flex-wrap: wrap;
}

#tabpanel-design-container .template-option {
    cursor: pointer;
    width: calc(50% - 12px);
    margin: 3px 6px;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.18s;
}

#tabpanel-design-container .template-option img {
    width: 100%;
    min-height: 150px;
    object-fit: contain;
    border-radius: 4px;
    display: block;
}

#tabpanel-design-container .template-option input[type="radio"] {
    position: absolute;
    visibility: hidden;
    opacity: 0;
}

#tabpanel-design-container input:checked+img {
    border-color: var(--primary-color);
    box-shadow: 0 0 8px var(--primary-glow);
}

#tabpanel-design-container .template-option:hover {
    border-color: var(--primary-color);
}

.select-patterns ul {
    display: flex;
    flex-wrap: wrap;
    padding: 5px;
}

.select-patterns ul li {
    width: 77px;
    border: 1px solid var(--border);
    padding: 2px;
    border-radius: var(--radius-sm);
    margin: 2px;
    list-style: none;
    transition: border-color 0.15s;
}

.select-patterns ul li:hover {
    border-color: var(--dark-color);
}

.select-patterns .template-option input[type="radio"] {
    position: absolute;
    visibility: hidden;
    opacity: 0;
}

.left-sidebar-menu li .select-patterns button {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    margin: 3px;
    font-weight: 600;
    width: auto;
    height: auto;
    padding: 5px 10px;
    font-size: 11px;
    color: var(--color-2);
    flex-direction: row;
}

.left-sidebar-menu li .select-patterns button.hidden {
    display: none;
}

.button-container {
    display: flex;
    flex-wrap: wrap;
}

/* ── 3D Viewport Area ───────────────────────────────────── */
.um-customizer-main-area {
    width: calc(100% - 77px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    touch-action: none;
    /* Prevent mobile scroll when dragging */
}

#viewport {
    position: absolute;
    outline: none;
}

#viewport-container {
    width: 100%;
    height: 100%;
    max-width: 650px;
    border-radius: 13px;
    touch-action: none;
    /* Prevent mobile scroll when interacting with 3D model */
}

div#viewport-container {
    border-radius: 13px;
}

/* ── Text Panel (inline in sidebar) ─────────────────────── */
div#tabpanel-text-controls {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* Add-text input area */
.text-add-area {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 0 8px;
}

.text-add-area button#tabpanel-actions-add-text {
    width: 100%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.text-add-area button#tabpanel-actions-add-text:hover {
    background: var(--primary-dark);
}

.text-add-area select {
    width: 100%;
    padding: 7px 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    margin: 0;
    box-sizing: border-box;
}

.text-color-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.text-color-row label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 38px;
}

.text-color-row input[type="color"] {
    width: 36px;
    height: 32px;
    padding: 1px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    margin: 0;
    box-sizing: border-box;
}

#tabpanel-actions-add-text {
    width: 100%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    margin: 4px 0 0;
}

#tabpanel-actions-add-text:hover {
    background: var(--primary-dark);
}

/* Text edit-mode controls (shown when text selected) */
div#tabpanel-text-controls button {
    height: auto;
    padding: 5px 10px;
    width: auto;
    background: var(--primary-color);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

div#tabpanel-text-controls button:hover {
    background: var(--primary-dark);
}

div#tabpanel-text-controls .hidden {
    display: none;
}

div#tabpanel-text-controls .sec-wrapper {
    margin: 0;
    gap: 6px;
    justify-content: flex-start;
}

.sec-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
}

.sec-wrapper span {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 600;
}

.sec-wrapper input[type="color"] {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    outline: none;
    box-shadow: none;
    padding: 1px;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    margin: 0;
}

/* Text add-area input — visible in sidebar add area */
input#tabpanel-text-input {
    display: block;
    width: 100%;
    padding: 9px 11px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s;
    color: var(--text);
    margin: 0;
}

input#tabpanel-text-input:focus {
    border-color: var(--primary-color);
}

select#tabpanel-text-font-select {
    width: 100%;
    margin: 0;
    padding: 6px 8px;
    height: auto;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    font-size: 12px;
    box-sizing: border-box;
}

input#tabpanel-text-stroke-width-input {
    width: 100%;
    margin: 0;
    height: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    padding: 2px 6px;
    font-size: 12px;
}

input#tabpanel-text-stroke {
    width: auto;
    margin-right: 6px;
}

/* ── Generic inputs ─────────────────────────────────────── */
.um-3d-customizer-wrapper input[type="file"] {
    display: none;
}

.um-3d-customizer-wrapper input[type="text"],
.um-3d-customizer-wrapper input[type="range"],
.um-3d-customizer-wrapper input[type="checkbox"],
.um-3d-customizer-wrapperselect {
    margin: 8px 0;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    box-sizing: border-box;
    font-family: inherit;
    font-size: 13px;
    color: var(--text);
    background: #fff;
}

.um-3d-customizer-wrapper input[type="range"] {
    padding: 0;
    width: 100%;
    accent-color: var(--primary-color);
}

.um-3d-customizer-wrapper input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: var(--primary-color);
}

.um-3d-customizer-wrapper input[type="color"] {
    margin: 8px 0;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    width: calc(100% + 18px);
    box-sizing: border-box;
    height: 36px;
    padding: 2px;
    background: transparent;
    cursor: pointer;
}

hr {
    border: 0;
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

/* ── Upload area ─────────────────────────────────────────── */
#tabpanel-actions-upload-image {
    display: inline-block !important;
    width: auto !important;
    margin: 0 !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

#tabpanel-actions-show-image-library {
    /* visibility controlled by .hidden class */
}

/* ── Info popup (place-on-model) ────────────────────────── */
div#info-popup-for-user {
    position: absolute;
    color: #fff;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    display: none;
    background: rgba(0, 0, 0, 0.45);
    pointer-events: none;
    text-align: right;
}

.um-customizer-main-area {
    position: relative;
}

div#info-popup-for-user .popup-inner {
    position: absolute;
    z-index: 3;
    right: 0;
}

#info-popup-for-user img {
    position: absolute;
    top: 25px;
    max-width: 200px;
    left: -100px;
    transform: rotate(17deg);
    pointer-events: none;
    z-index: -1;
}

/* ── Loader ─────────────────────────────────────────────── */
.kd-loading {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    z-index: 34343434;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 50px;
    gap: 16px;
}

.kd-loading h3 {
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 18px;
    margin: 0;
    color: var(--primary-color);
}

.um-customizer-main-area .loader {
    width: 50px;
    aspect-ratio: 1.154;
    position: relative;
    background: conic-gradient(from 120deg at 50% 64%, #0000, var(--primary-color) 1deg 120deg, #0000 121deg);
    animation: l27-0 1.5s infinite cubic-bezier(0.3, 1, 0, 1);
    margin: auto;
}

.um-customizer-main-area .loader:before,
.um-customizer-main-area .loader:after {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    transform-origin: 50% 66%;
    animation: l27-1 1.5s infinite;
}

.um-customizer-main-area .loader:after {
    --s: -1;
}

@keyframes l27-0 {

    0%,
    30% {
        transform: rotate(0)
    }

    70% {
        transform: rotate(120deg)
    }

    70.01%,
    100% {
        transform: rotate(360deg)
    }
}

@keyframes l27-1 {
    0% {
        transform: rotate(calc(var(--s, 1)*120deg)) translate(0)
    }

    30%,
    70% {
        transform: rotate(calc(var(--s, 1)*120deg)) translate(calc(var(--s, 1)*-5px), 10px)
    }

    100% {
        transform: rotate(calc(var(--s, 1)*120deg)) translate(0)
    }
}

/* ── Zoom Controls ─────────────────────────────────────── */
div#zoom-controls {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 7px;
    z-index: 5;
}

div#zoom-controls button {
    padding: 0;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

div#zoom-controls button:hover {
    background: #fff;
    box-shadow: var(--shadow-md);
}

div#zoom-controls button svg {
    width: 22px;
}

div#zoom-controls button#rotate-right svg {
    width: 34px;
    padding: 6px 0;
}

#zoom-controls .pause .pause-button {
    display: none;
}

#zoom-controls .play .play-button {
    display: none;
}

/* ── Dialogs ─────────────────────────────────────────────── */
#dialogs {
    position: absolute;
    z-index: 99;
}

.dialog-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 14;
}

.dialog-backdrop.active {
    display: block;
}

[role="dialog"] {
    padding: 22px;
    border: 1px solid var(--border);
    background: #fff;
    position: absolute;
    display: block;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    color: var(--text);
}

#dialog-image-library>[role="dialog"],
#dialog-pattern-library>[role="dialog"] {
    width: 75vw;
    height: 75vh;
}

.dialog-image-list {
    overflow-y: auto;
    height: calc(100% - 49px);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.dialog-image-list-item {
    padding: 10px 5px;
}

#dialog-image-library .dialog-image-list-item {
    max-width: 170px;
}

.dialog-image-list-preview {
    width: 136px;
    height: 136px;
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background-size: cover !important;
}

.dialog-image-list-item button {
    width: 100%;
    padding: 8px 6px;
    margin: 0;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
}

#dialog-image-library .dialog-image-list-item button {
    background: var(--primary-color);
    color: #fff;
    width: 49%;
    margin-right: 2%;
    border: none;
    padding: 6px;
    border-radius: 0;
    font-weight: bold;
}

#dialog-image-library .dialog-image-list-item button:last-child {
    margin-right: 0;
}

#dialog-image-library .dialog-image-list {
    justify-content: flex-start;
    align-items: flex-start;
}

.dialog-image-list .dialog-image-list-item-image {
    width: 100%;
    object-fit: contain;
    background: var(--color-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.dialog-pattern-preview {
    width: 600px;
    height: 400px;
    background: var(--color-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.dialog-pattern-editor img {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.dialog-form {
    margin: 10px 0;
}

.dialog-form-actions {
    text-align: right;
    margin-bottom: 20px;
}

button.dialog-action-close {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 6px 14px;
}

.pattern-dialog {
    top: 0;
    max-height: 100vh;
    bottom: 0;
    overflow: auto;
    transform: translateX(-50%);
}

#dialog-pattern-editor input[type="color"] {
    width: 50px;
    height: 50px;
    padding: 0;
    background: transparent;
    outline: none;
    border: none;
    box-shadow: none;
}

/* ── Color Panel ─────────────────────────────────────────── */
#tabpanel-colors-container .color-container {
    position: relative;
}

#tabpanel-colors-container .color-container .collapsible-header {
    text-align: left;
    background: var(--color-2);
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
    cursor: pointer;
    color: var(--text);
    line-height: 2;
    position: relative;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}

#tabpanel-colors-container .color-container .collapsible-header:hover {
    background: #e4e4e4;
}

#tabpanel-colors-container .color-container.active .collapsible-header {
    background: #e4e4e4;
}

#tabpanel-colors-container .color-container .collapsible-header:after {
    content: "";
    width: 5px;
    height: 5px;
    position: absolute;
    border-left: 2px solid #888;
    border-bottom: 2px solid #888;
    top: 50%;
    right: 10px;
    transform: translateY(-65%) rotate(-45deg);
    transition: transform 0.2s;
}

#tabpanel-colors-container .color-container.active .collapsible-header:after {
    transform: translateY(-20%) rotate(135deg);
}

#tabpanel-colors-container .color-container .collapsible-content {}

/* Palette swatches */
#tabpanel-colors-container .color-palette {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 8px 0;
    gap: 3px;
}

.color-palette .color-swatch {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
    border: 2px solid transparent;
    transition: transform 0.1s, box-shadow 0.1s;
    cursor: pointer;
}

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

.color-palette .color-swatch.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

#tabpanel-colors-container .color-palette .swatch-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 4px;
    cursor: pointer;
    width: calc(16.6% - 8px);
}

#tabpanel-colors-container .color-palette .swatch-container span {
    position: absolute;
    top: 115%;
    background: var(--dark-color);
    color: #fff;
    font-size: 11px;
    min-width: 35px;
    padding: 3px 6px;
    z-index: 2;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    white-space: nowrap;
}

#tabpanel-colors-container .color-palette .swatch-container:hover span {
    opacity: 1;
    visibility: visible;
}

#tabpanel-colors-container .color-palette .swatch-container span:before {
    content: "";
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
    border-bottom: 4px solid var(--dark-color);
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    width: 8px;
    margin: auto;
}

#viewport-container {
    max-width: 650px;
}

/* Pattern buttons in color panel */
#tabpanel-colors-container .pattern-container {
    position: relative;
}

#tabpanel-colors-container .pattern-container .add-pattern-btn {
    position: absolute;
    top: 4px;
    right: 5px;
    font-size: 10px;
    white-space: nowrap;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 3px 8px;
    border-radius: 10px;
}

/* ── Gradient Toggle ─────────────────────────────────────── */
.gradient-toggle-btn {
    margin-top: 10px;
    width: 100%;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background: var(--surface-2);
    font-size: 12px;
    color: var(--text);
    cursor: pointer;
    font-weight: 600;
    text-align: left;
    transition: all 0.15s;
    font-family: inherit;
}

.gradient-toggle-btn:hover {
    background: var(--color-2);
}

.gradient-toggle-btn--on {
    background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f);
    color: #fff;
    border-color: transparent;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* ── Gradient Editor ─────────────────────────────────────── */
.gradient-editor-wrap {
    margin-top: 8px;
}

.grad-editor {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.grad-angle-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

.grad-angle-row label {
    min-width: 38px;
}

.grad-angle-slider {
    flex: 1;
}

.grad-angle-row span {
    min-width: 34px;
    text-align: right;
    font-weight: 700;
    color: var(--text);
}

.grad-bar-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.grad-bar-track {
    height: 22px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: crosshair;
    background: linear-gradient(to right, #ff0000, #ffffff);
}

.grad-handles-row {
    position: relative;
    height: 16px;
    margin-top: 2px;
}

.grad-stop-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1.5px #888, 0 2px 4px rgba(0, 0, 0, 0.3);
    transform: translateX(-50%);
    cursor: grab;
    padding: 0;
    background: var(--stop-color, #ff0000);
    transition: box-shadow 0.1s;
}

.grad-stop-handle--sel {
    box-shadow: 0 0 0 2px var(--primary-color), 0 2px 6px rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.grad-stop-edit {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--border);
}

.grad-stop-color {
    width: 100%;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    padding: 2px;
    background: transparent;
}

.grad-pos-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

.grad-pos-row label {
    min-width: 52px;
}

.grad-pos-row input[type=range] {
    flex: 1;
}

.grad-pos-row span {
    min-width: 34px;
    text-align: right;
    font-weight: 700;
    color: var(--text);
}

.grad-stop-del-btn {
    width: 100%;
    padding: 5px;
    font-size: 11px;
    border: 1px solid #f88;
    border-radius: var(--radius-sm);
    background: #fff5f5;
    color: #c00;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
}

.grad-stop-del-btn:hover {
    background: #ffe5e5;
}

.grad-stop-del-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

/* ── LAYERS PANEL ─────────────────────────────────────────── */
#layers-panel {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 4px 0;
}

.layers-empty-msg {
    font-size: 12px;
    color: var(--text-dim);
    text-align: center;
    padding: 20px 10px;
    margin: 0;
}

.layer-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: var(--surface-2);
    border: 1px solid var(--border);
    transition: background 0.15s, border-color 0.15s;
    user-select: none;
}

.layer-item:hover {
    background: #eef3ff;
    border-color: #aac4ff;
}

.layer-item--selected {
    background: #dde9ff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.layer-type-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: var(--text-dim);
}

.layer-label {
    flex: 1;
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.layer-actions {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}

.layer-btn {
    width: 22px;
    height: 22px;
    padding: 0;
    font-size: 11px;
    line-height: 1;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s;
    font-family: inherit;
}

.layer-btn:hover {
    background: var(--color-2);
    border-color: #999;
    color: #333;
}

.layer-btn-clone:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.layer-btn-delete:hover {
    background: #ffe5e5;
    border-color: #f88;
    color: #c00;
}

.layer-item--dragging {
    opacity: 0.4;
    border-style: dashed;
}

.layer-item--drop-above {
    border-top: 2px solid var(--primary-color);
}

.layer-item--drop-below {
    border-bottom: 2px solid var(--primary-color);
}

/* ── Quote popup ─────────────────────────────────────────── */
div#quotePopup {
    position: fixed;
    inset: 0;
    overflow: auto;
    z-index: 34533;
    display: none;
}

div#quotePopup .overlay {
    position: fixed;
    background: rgba(0, 0, 0, 0.8);
    inset: 0;
}

div#quotePopup .popup {
    position: absolute;
    padding: 20px 0;
    left: 0;
    right: 0;
}

div#quotePopup .popup .popup-content {
    background: #fff;
    max-width: 550px;
    margin: auto;
    padding: 26px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
}

#quoteForm input[type="text"],
#quoteForm input[type="email"],
#quoteForm input[type="phone"],
#quoteForm input[type="number"],
#quoteForm input[type="url"],
#quoteForm textarea {
    height: 40px;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    margin-top: 6px;
    padding: 0 10px;
    font-family: inherit;
}

#quoteForm textarea {
    height: 100px;
    padding: 8px 10px;
}

/* ── My Designs / Save Design modals ────────────────────── */
#saved-designs-overlay,
#save-design-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 999;
    align-items: center;
    justify-content: center;
}

#saved-designs-overlay.open,
#save-design-overlay.open {
    display: flex;
}

.designs-modal,
.save-modal {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 26px;
    width: 480px;
    max-width: 95vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.designs-modal h3,
.save-modal h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.designs-list {
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.design-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    transition: border-color 0.15s;
}

.design-item:hover {
    border-color: var(--primary-color);
}

.design-item-name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.design-item-date {
    font-size: 10px;
    color: var(--text-dim);
}

.design-item button {
    padding: 5px 12px;
    font-size: 11px;
    border-radius: var(--radius-sm);
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
    border: none;
}

.design-item button.del-btn {
    background: #fff;
    border: 1px solid #f88;
    color: #c00;
}

.design-item button.del-btn:hover {
    background: #ffe5e5;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.modal-footer button {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
}

.modal-footer .btn-cancel {
    background: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.modal-footer .btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.modal-footer .btn-primary:hover {
    background: var(--primary-dark);
}

.save-name-input {
    width: 100%;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
}

.save-name-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-light);
}

/* ── Misc ────────────────────────────────────────────────── */
.color-light {
    color: #fff;
}

.pr-customizer,
.pr-customizer * {
    box-sizing: border-box;
}

span.close-btn {
    cursor: pointer;
}

#ui {
    width: 280px;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    z-index: 2;
    padding: 20px;
    overflow: auto;
}

/* ── Responsive ──────────────────────────────────────────── */
@media(max-width: 1100px) and (min-width: 768px) {
    div#tabpanel-text-controls {
        transform: none;
        flex-direction: column;
        right: 0;
        width: 120px;
        margin: 0;
        left: initial;
        top: 0;
        bottom: 0;
    }
}

@media(max-width: 1100px) {
    .um-customizer-main-area {
        width: calc(100% - 342px);
    }

    div#tabpanel-text-controls button {
        width: 100%;
        margin: 0;
    }

    div#tabpanel-text-controls .sec-wrapper {
        margin: 0;
        flex-direction: column;
    }

    .sec-wrapper span {
        margin-right: 0;
        margin-top: 8px;
    }

    input#tabpanel-text-stroke-width-input {
        width: 98px;
        margin: 0;
    }

    div#tabpanel-text-controls .sec-wrapper {
        flex-direction: column;
    }
}

/* ── Colors step-view panel ───────────────────────────────── */
.clr-list-view {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.clr-list-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 8px;
    transition: background .15s;
}

.clr-list-row:hover {
    background: #f4f4f4;
}

.clr-row-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(0, 0, 0, .1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}

.clr-row-name {
    flex: 1;
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

.clr-row-arrow {
    color: #bbb;
    font-size: 16px;
}

.clr-detail-view {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.clr-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 6px 0;
    cursor: pointer;
    color: #555;
    font-size: 13px;
    font-weight: 500;
}

.clr-back-btn:hover {
    color: #111;
}

.clr-detail-title {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin: 0;
}

.clr-current-preview {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, .12);
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}

.clr-current-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.clr-current-label {
    font-size: 12px;
    color: #666;
}

.clr-round-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}

.clr-round-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform .15s, border-color .15s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
    position: relative;
}

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

/* Tooltip for color swatches and pattern tiles */
[data-kd-tip] {
    position: relative;
}

[data-kd-tip]::after {
    content: attr(data-kd-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    padding: 3px 7px;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s;
    z-index: 9999;
    line-height: 1.5;
}

[data-kd-tip]:hover::after {
    opacity: 1;
}

.clr-round-swatch.active {
    border-color: #333;
    transform: scale(1.1);
}

.clr-custom-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px dashed #bbb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #888;
    transition: transform .15s;
    background: #fff;
    position: relative;
    overflow: hidden;
}

.clr-custom-swatch input[type="color"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

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

.clr-section-label {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.clr-grad-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.clr-grad-stop {
    display: flex;
    align-items: center;
    gap: 8px;
}

.clr-grad-stop-label {
    font-size: 12px;
    color: #555;
    width: 34px;
    flex-shrink: 0;
}

.clr-grad-mini-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.clr-grad-swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
    transition: transform .12s, border-color .12s;
}

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

.clr-grad-swatch.active {
    border-color: #333;
}

.clr-grad-custom {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px dashed #bbb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #888;
    background: #fff;
    position: relative;
    overflow: hidden;
}

.clr-grad-custom input[type="color"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

/* ── Colors accordion panel ───────────────────────────────── */
.clr-tabs-bar {
    display: flex;
    gap: 0;
    margin-bottom: 10px;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 3px;
}

.clr-tab-btn {
    flex: 1;
    padding: 7px 0;
    font-size: 13px;
    font-weight: 600;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #64748b;
    transition: background .15s, color .15s;
}

.clr-tab-btn.active {
    background: #fff;
    color: #1a1a1a;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
}

.clr-accordion {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

.clr-acc-row {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2px;
}

.clr-acc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 8px;
    transition: background .15s;
    user-select: none;
}

.clr-acc-header:hover {
    background: #f4f4f4;
}

.clr-acc-arrow {
    color: #bbb;
    transition: transform .2s;
    display: flex;
    align-items: center;
}

.clr-acc-arrow.open {
    transform: rotate(90deg);
}

.clr-acc-body {
    padding: 10px 12px 14px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    border-radius: 0 0 8px 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Custom color picker in accordion */
.clr-custom-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.clr-custom-full-input {
    width: 100%;
    height: 44px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    padding: 2px 4px;
}

.clr-hex-text-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    font-family: monospace;
    color: #1a1a1a;
    letter-spacing: .05em;
}

.clr-hex-text-input:focus {
    outline: none;
    border-color: #207d75;
}

/* Inline pattern section inside accordion */
.clr-inline-pattern-sect {
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: 2px;
}

.clr-inline-pattern-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.clr-pat-tile {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    transition: border-color .15s, transform .12s;
    flex-shrink: 0;
}

.clr-pat-tile:hover {
    border-color: #94a3b8;
    transform: scale(1.05);
}

.clr-pat-tile.active {
    border-color: #207d75;
    box-shadow: 0 0 0 1px #207d75;
}

.clr-pat-tile--none {
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: .04em;
}

/* ── Icon color picker modal ──────────────────────────────── */
#icon-color-picker-modal {
    animation: fadeInModal 0.15s ease;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#icon-color-picker-panel {
    padding: 0;
}

#icon-color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0 10px;
}

#icon-place-btn:hover {
    background: #195f59;
}

#icon-picker-cancel:hover {
    background: #f1f5f9;
}


/* ══════════════════════════════════════════════════════════
   TEXT PANEL — clean row-based UI
   ══════════════════════════════════════════════════════════ */

/* Add text view */
.txt-add-view {
    padding: 4px 0 8px;
}

.sidebar-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin: 2px 0 0;
}

.txt-main-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    outline: none;
    transition: border-color 0.15s;
}

.txt-main-input:focus {
    border-color: var(--primary-color);
}

.txt-add-btn {
    width: 100%;
    margin-top: 10px;
    padding: 11px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.txt-add-btn:hover {
    background: var(--primary-dark);
}

/* Edit controls header */
.txt-edit-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.txt-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    color: var(--text);
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}

.txt-back-btn:hover {
    background: var(--surface-2);
    border-color: var(--border-dark);
}

.txt-edit-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

/* Text input field area */
.txt-field-wrap {
    padding: 8px 0;
}

/* Clickable control rows */
.txt-ctrl-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    gap: 8px;
    transition: background 0.1s;
}

.txt-ctrl-row:hover {
    background: var(--surface-2);
    margin: 0 -12px;
    padding: 11px 12px;
    border-radius: 0;
}

.txt-row-dim,
.txt-row-angle,
.txt-action-row {
    cursor: default;
}

.txt-row-dim:hover,
.txt-row-angle:hover,
.txt-action-row:hover {
    background: transparent;
    margin: 0;
    padding: 11px 0;
}

.txt-row-label {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
    flex-shrink: 0;
    white-space: nowrap;
}

.txt-row-dim .txt-row-label,
.txt-row-angle .txt-row-label {
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.txt-row-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
}

.txt-row-val {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.txt-row-chevron {
    width: 14px;
    height: 14px;
    color: var(--text-dim);
    flex-shrink: 0;
    transition: transform 0.2s;
}

.txt-ctrl-row.txt-row-open .txt-row-chevron {
    transform: rotate(90deg);
}

.txt-row-swatch {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

/* Expand panels */
.txt-row-expand {
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 4px;
    border: 1px solid var(--border);
}

.txt-expand-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: block;
}

.txt-select {
    width: 100%;
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    outline: none;
}

/* Font preview list */
.txt-font-list {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    padding: 4px;
    scrollbar-width: thin;
}

.txt-font-list::-webkit-scrollbar {
    width: 4px;
}

.txt-font-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.txt-font-item {
    padding: 8px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
    transition: background 0.12s, color 0.12s;
    line-height: 1.3;
}

.txt-font-item:hover {
    background: var(--surface-2);
}

.txt-font-item.active {
    background: rgba(20, 100, 255, 0.08);
    color: var(--primary-color);
}

.txt-color-input {
    width: 44px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 2px;
    cursor: pointer;
    background: none;
}

/* Color expand inner rows */
.txt-color-row-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

.txt-color-row-inner:last-child {
    border-bottom: none;
}

/* Toggle (stroke on/off) */
.txt-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.txt-toggle-inp {
    display: none;
}

.txt-toggle-track {
    position: relative;
    width: 36px;
    height: 20px;
    background: var(--border-dark);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.txt-toggle-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: left 0.2s;
}

.txt-toggle-inp:checked+.txt-toggle-track {
    background: var(--primary-color);
}

.txt-toggle-inp:checked+.txt-toggle-track::after {
    left: 19px;
}

/* Spinner (size inputs) */
.txt-dim-pair {
    gap: 4px;
    flex-shrink: 1;
    min-width: 0;
}

.txt-spinner-wrap {
    display: flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
}

.txt-spinner {
    width: 50px;
    min-width: 0;
    padding: 6px 4px;
    font-size: 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    text-align: center;
    outline: none;
}

.txt-spinner:focus {
    border-color: var(--primary-color);
}

.txt-spinner-unit {
    font-size: 11px;
    color: var(--text-muted);
}

.txt-asp-lock {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Angle / slider rows */
.txt-angle-right {
    gap: 8px;
}

.txt-angle-slider {
    flex: 1;
    height: 4px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.txt-slider {
    flex: 1;
    height: 4px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.txt-angle-val,
.txt-angle-num {
    font-size: 12px;
    color: var(--text-muted);
    width: 48px;
    text-align: right;
}

.txt-angle-num {
    padding: 4px 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    outline: none;
}

.txt-angle-num:focus {
    border-color: var(--primary-color);
}

/* Action buttons row */
.txt-action-row {
    cursor: default;
}

.txt-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    color: var(--text);
    transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0;
}

.txt-icon-btn:hover {
    background: var(--surface-2);
    border-color: var(--border-dark);
}

.txt-lock-toggle {
    display: flex;
}

.txt-locked .txt-lock-icon-open {
    display: none;
}

.txt-locked .txt-lock-icon-closed {
    display: block;
}

.txt-lock-icon-closed {
    display: none;
}

.txt-delete-btn {
    width: 100%;
    padding: 10px;
    background: #fff0f0;
    color: #c0392b;
    border: 1px solid #f5c6c6;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.txt-delete-btn:hover {
    background: #ffe0e0;
}

/* ══════════════════════════════════════════════════════════
   PATTERNS PANEL — area rows with toggle + inline grid
   ══════════════════════════════════════════════════════════ */

.pat-area-row {
    border-bottom: 1px solid var(--border);
}

.pat-area-row:last-child {
    border-bottom: none;
}

.pat-area-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
}

.pat-area-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.pat-area-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    flex: 1;
}

/* Toggle switch for pattern areas */
.pat-toggle {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

.pat-toggle input {
    display: none;
}

.pat-toggle-track {
    position: absolute;
    inset: 0;
    background: var(--border-dark);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.pat-toggle-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: left 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.pat-toggle input:checked+.pat-toggle-track {
    background: var(--primary-color);
}

.pat-toggle input:checked+.pat-toggle-track::after {
    left: 19px;
}

/* Pattern area body (grid + color editor) */
.pat-area-body {
    padding: 8px 0 12px 24px;
}

.pat-area-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.pat-area-tile {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
    flex-shrink: 0;
}

.pat-area-tile:hover {
    border-color: var(--border-dark);
}

.pat-area-tile.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.pat-area-tile--none {
    background: var(--surface-3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Pattern color editor */
.pat-color-editor {
    margin-top: 4px;
}

.pat-color-editor-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.pat-color-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.pat-color-row label {
    font-size: 12px;
    color: var(--text);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pat-color-inp {
    width: 44px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 2px;
    cursor: pointer;
    background: none;
    flex-shrink: 0;
}

.pat-hex-inp {
    width: 80px;
    padding: 5px 8px;
    font-size: 12px;
    font-family: monospace;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    outline: none;
    flex-shrink: 0;
}

.pat-hex-inp:focus {
    border-color: var(--primary-color);
}

#layers-panel .layer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    cursor: grab;
    background: #fff;
    border-radius: 4px;
    margin-bottom: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s;
}

#layers-panel .layer-item:active {
    cursor: grabbing;
}

#layers-panel .layer-item.ghost {
    opacity: 0.4;
}

#layers-panel .layer-label {
    flex: 1;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px;
}

#layers-panel .layer-icons {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

#layers-panel .layer-vis-btn,
#layers-panel .layer-del-btn {
    background: none;
    border: none;
    padding: 2px 4px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: #666;
    box-shadow: none;
    margin: 0;
}

#layers-panel .layer-del-btn {
    color: #e05;
}

#layers-panel .layers-empty-msg {
    color: #999;
    font-size: 13px;
    padding: 10px 0;
}

/* ── Gradient toggle switch ── */
.grad-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.grad-switch input[type=checkbox] {
    display: none;
}

.grad-switch-track {
    width: 32px;
    height: 18px;
    background: #64748b;
    border-radius: 9px;
    transition: background 0.2s;
    position: relative;
    display: block;
}

.grad-switch-track::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
}

.grad-switch input:checked+.grad-switch-track {
    background: #22c55e;
}

.grad-switch input:checked+.grad-switch-track::after {
    transform: translateX(14px);
}

/* ── Gradient panel (inline accordion) ── */
.gradient-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 12px;
    margin-top: 10px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #e2e8f0;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.gradient-btn:hover {
    background: linear-gradient(135deg, #0f3460, #533483);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* grad panel card */
.grad-panel-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    margin-top: 6px;
}

.grad-preview-bar {
    height: 14px;
    border-radius: 6px;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
    background: #ddd;
    transition: background 0.25s;
}

.grad-type-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.grad-type-pill {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
    background: #fff;
}

.grad-type-pill input[type=radio] {
    display: none;
}

.grad-type-pill.active {
    border-color: #0f3460;
    background: #0f3460;
    color: #fff;
}

.grad-colors-row {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.grad-color-slot {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 4px;
}

.grad-color-slot input[type=color] {
    width: 36px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: none;
}

.grad-color-slot span {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
}

.grad-slider-row {
    margin-bottom: 8px;
}

.grad-slider-row label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
}

.grad-slider-row input[type=range] {
    width: 100%;
    height: 4px;
    accent-color: #0f3460;
}

.grad-remove-btn {
    width: 100%;
    padding: 6px;
    margin-top: 6px;
    background: #fff;
    border: 1.5px solid #fca5a5;
    border-radius: 6px;
    color: #ef4444;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.grad-remove-btn:hover {
    background: #fef2f2;
}

/* ── Element controls (rotation, size, flip) ── */
.ctrl-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    flex-wrap: wrap;
}

.ctrl-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    min-width: 52px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.ctrl-slider {
    flex: 1;
    height: 4px;
    accent-color: #0f3460;
    min-width: 60px;
}

.ctrl-val {
    font-size: 11px;
    color: #0f3460;
    font-weight: 700;
    min-width: 32px;
    text-align: right;
}

.ctrl-num-input {
    width: 52px;
    font-size: 11px;
    font-weight: 700;
    color: #0f3460;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 2px 4px;
    text-align: center;
    background: #f8fafc;
    -moz-appearance: textfield;
    appearance: textfield;
}

.ctrl-num-input::-webkit-inner-spin-button,
.ctrl-num-input::-webkit-outer-spin-button {
    opacity: 1;
}

.ctrl-num-input:focus {
    outline: none;
    border-color: #0f3460;
    background: #fff;
}

.ctrl-dim-pair {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #64748b;
}

.ctrl-dim-input {
    width: 52px;
    padding: 3px 5px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font-size: 12px;
    text-align: center;
}

.ctrl-aspect-lock {
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 2px;
}

.ctrl-aspect-lock input {
    display: none;
}

.ctrl-action-btn {
    padding: 5px 10px;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.ctrl-action-btn:hover {
    border-color: #207d75;
    color: #207d75;
    background: #f0faf9;
}

/* ── Modern Upload area ── */
.logo-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upload-drop-area {
    border: 2px dashed #b2d8d5;
    border-radius: 12px;
    background: #f6fafa;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-drop-area:hover {
    border-color: #207d75;
    background: #edf7f6;
}

.upload-drop-area.drag-over {
    border-color: #207d75;
    background: #d4efed;
}

.upload-drop-title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #1e3a38;
}

.upload-drop-sub {
    margin: 0;
    font-size: 11px;
    color: #94a3b8;
}

.upload-browse-btn {
    margin-top: 4px;
    padding: 7px 18px;
    background: #207d75;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.upload-browse-btn:hover {
    background: #195f59;
}

.use-existing-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    padding: 8px 14px;
    border: 1.5px solid #b2d8d5;
    border-radius: 8px;
    background: #fff;
    color: #207d75;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    width: 100%;
}

.use-existing-btn:hover {
    border-color: #207d75;
    background: #f0faf9;
}

.use-existing-btn.hidden {
    display: none !important;
}

/* ── Icons inline panel ── */
.icon-cats-inline {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.icon-cat-btn {
    padding: 4px 10px;
    border-radius: 20px;
    border: 1.5px solid #cbd5e1;
    background: #fff;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.icon-cat-btn.active {
    background: #207d75;
    border-color: #207d75;
    color: #fff;
}

.icon-grid-inline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 8px 0;
    max-height: 420px;
    overflow-y: auto;
}

.icon-tile {
    aspect-ratio: 1;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    transition: all 0.15s;
    padding: 6px;
    color: #334155;
    /* currentColor fallback for SVG paths */
}

.icon-tile:hover {
    border-color: #207d75;
    background: #f0faf9;
    transform: scale(1.05);
}

.icon-tile svg {
    width: 34px;
    height: 34px;
}

.icon-tile span {
    font-size: 8px;
    color: #94a3b8;
    text-align: center;
    line-height: 1.2;
}

/* ── Header action buttons ── */
.hdr-save-btn,
.hdr-load-btn {
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    font-family: inherit;
}

.hdr-save-btn {
    background: #207d75;
    color: #fff;
}

.hdr-save-btn:hover {
    background: #195f59;
}

.hdr-load-btn {
    background: #fff;
    color: #207d75;
    border: 1.5px solid #207d75;
}

.hdr-load-btn:hover {
    background: #f0faf9;
}

.hdr-reset-btn {
    background: #fff;
    color: #94a3b8;
    border: 1.5px solid #cbd5e1;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.hdr-reset-btn:hover {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fca5a5;
}

/* ── Saved Designs modal ── */
#saved-designs-overlay,
#save-design-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

#saved-designs-overlay.active,
#save-design-overlay.active {
    display: flex;
}

#saved-designs-box,
#save-design-box {
    background: #fff;
    border-radius: 16px;
    width: 520px;
    max-width: 96vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

#saved-designs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #e2e8f0;
    background: #207d75;
    flex-shrink: 0;
}

#saved-designs-header h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

#saved-designs-close,
#save-design-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 2px 8px;
    line-height: 1;
    border-radius: 6px;
    transition: background 0.15s;
}

#saved-designs-close:hover,
#save-design-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

#saved-designs-list {
    padding: 12px 18px;
    overflow-y: auto;
    flex: 1;
}

#saved-designs-empty {
    padding: 40px 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#saved-designs-empty::before {
    content: '📂';
    font-size: 36px;
}

.saved-design-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    margin-bottom: 8px;
    gap: 10px;
    transition: all 0.15s;
    background: #fafafa;
}

.saved-design-row:hover {
    border-color: #207d75;
    background: #f6fafa;
    box-shadow: 0 2px 8px rgba(32, 125, 117, 0.08);
}

.saved-design-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.saved-design-name {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.saved-design-name:hover {
    color: #207d75;
    text-decoration: underline;
}

.saved-design-date {
    font-size: 11px;
    color: #94a3b8;
}

.saved-design-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.sdm-btn {
    padding: 6px 14px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    font-family: inherit;
}

.sdm-load {
    background: #207d75;
    color: #fff;
}

.sdm-load:hover {
    background: #195f59;
}

.sdm-delete {
    background: #fee2e2;
    color: #dc2626;
}

.sdm-delete:hover {
    background: #fca5a5;
}

/* ── Save Design input modal ── */
#save-design-body {
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#save-design-body h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.save-design-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.save-design-input {
    padding: 11px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 9px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

.save-design-input:focus {
    border-color: #207d75;
    box-shadow: 0 0 0 3px rgba(32, 125, 117, 0.12);
}

.save-design-btn {
    padding: 11px;
    background: #207d75;
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}

.save-design-btn:hover {
    background: #195f59;
}

/* ── Pattern editor (color + size controls) ── */
.pat-editor-section-title {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 10px 0 6px;
}

.pat-scale-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1.5px solid #cbd5e1;
    background: #fff;
    color: #334155;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
    line-height: 1;
}

.pat-scale-btn:hover {
    border-color: #207d75;
    color: #207d75;
    background: #f0faf9;
}


/* ═══════════════════════════════════════════════════════════
   MOBILE LAYOUT — Sidebar becomes bottom tab bar
   Max panel height: 200px, all content horizontal scroll
   ═══════════════════════════════════════════════════════════ */
@media(max-width: 767px) {

    /* ── Header ──────────────────────────────────────────── */
    .um-custom-header .um-row {
        min-height: 50px;
    }

    .um-custom-header .um-row .col {
        width: 100%;
    }

    .um-3d-customizer-wrapper :is(.btn, .button, button, [type=submit],
        .um-3d-customizer-wrapper [type=button]) {
        min-height: 0;
    }

    .top-buttons #resetDesignBtn,
    .top-buttons #saveDesignBtn,
    .top-buttons #savedDesignsBtn {
        display: none;
    }

    button#requestQuoteBtn,
    button#downloadBtn {
        padding: 8px 9px;
        font-size: 11px;
    }

    .um-custom-header {
        padding: 10px 0;
    }

    .top-buttons {
        gap: 4px;
        justify-content: space-between;
        width: 100%;
        ;
    }

    #undo-btn,
    #redo-btn {
        width: 30px;
        height: 30px;
        padding: 4px;
    }

    .hdr-reset-btn,
    .hdr-load-btn,
    .hdr-save-btn {
        padding: 5px 8px;
        font-size: 11px;
    }

    /* ── Main layout ─────────────────────────────────────── */
    .um-main-area {
        flex-direction: column;
        padding-top: 50px;
        padding-bottom: 320px;
        /* header(50) + tab-bar(62) + panel(250) + buffer */
        overflow: hidden;
    }

    /* ── 3D canvas ───────────────────────────────────────── */
    .um-customizer-main-area {
        width: 100%;
        height: calc(100vh - 370px);
        min-height: 180px;
        border-bottom: 1px solid var(--border);
    }

    /* ── Sidebar = fixed bottom tab bar ──────────────────── */
    .um-sidebar-main {
        width: 100%;
        height: auto;
        border-right: none;
        border-top: 1px solid var(--border);
        background: #fff;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 500;
        padding: 0;
        flex-shrink: 0;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12);
    }

    /* ── Tab icons row ───────────────────────────────────── */
    .left-sidebar-menu ul {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        align-items: stretch;
        width: 100%;
        height: 56px;
        overflow: visible;
    }

    .left-sidebar-menu ul li {
        flex: 1;
        margin: 0;
        padding: 0;
        text-align: center;
        display: flex;
        align-items: stretch;
    }

    .left-sidebar-menu li a,
    .left-sidebar-menu li button {
        flex: 1;
        flex-direction: column;
        padding: 5px 2px 3px;
        justify-content: center;
        font-size: 9px;
        border-radius: 0;
    }

    .left-sidebar-menu li .icon-conatiner {
        width: 28px;
        height: 24px;
        margin: 0 auto 1px;
        padding: 2px;
    }

    .left-sidebar-menu li .icon-conatiner svg {
        width: 20px;
        height: 20px;
    }

    /* ── Tab bar — slightly taller + cleaner ────────────── */
    .um-sidebar-main {
        box-shadow: 0 -1px 0 var(--border), 0 -4px 16px rgba(0, 0, 0, 0.08);
    }

    .left-sidebar-menu ul {
        height: 62px;
    }

    .left-sidebar-menu li a,
    .left-sidebar-menu li button {
        font-size: 10px;
        font-weight: 600;
        color: #888;
    }

    /* .left-sidebar-menu li.active a,
    .left-sidebar-menu li.active button {
        color: var(--primary-color);
    } */

    .left-sidebar-menu li .icon-conatiner {
        width: 26px;
        height: 26px;
    }

    .left-sidebar-menu li .icon-conatiner svg {
        width: 22px;
        height: 22px;
    }

    /* ── Slide-up panel — 250px ─────────────────────────── */
    .um-sidebar-main .patterns-layouts {
        position: fixed;
        bottom: 62px;
        left: 0;
        right: 0;
        width: 100%;
        height: 250px;
        max-height: 250px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-right: none;
        border-top: 1px solid var(--border);
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
        padding: 12px 14px 8px;
        z-index: 49;
        background: #fff;
        display: none;
        top: initial;
    }

    .um-sidebar-main .active .patterns-layouts {
        display: block;
    }

    /* ── Inner panel: no extra padding from select-patterns ─ */
    .um-sidebar-main .patterns-layouts .select-patterns {
        height: 100%;
        overflow: hidden;
        padding: 0;
    }

    .um-sidebar-main .patterns-layouts .sidebar-title {
        display: none;
    }

    /* ═══ DESIGN — horizontal thumbnail slider ══════════════ */
    #tabpanel-design-container {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 10px;
        height: 220px;
        align-items: center;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    #tabpanel-design-container::-webkit-scrollbar {
        display: none;
    }

    #tabpanel-design-container .template-option {
        flex-shrink: 0;
        width: 120px;
        max-width: 120px;
        scroll-snap-align: start;
        border-radius: 10px;
        overflow: hidden;
    }

    #tabpanel-design-container .template-option img {
        min-height: 100px;
    }

    /* ═══ COLORS panel ══════════════════════════════════════ */
    #tabpanel-colors-container .color-palette {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        height: 100%;
        align-items: center;
        -webkit-overflow-scrolling: touch;
    }

    #tabpanel-colors-container .color-palette .swatch-container {
        flex-shrink: 0;
        width: auto;
    }

    /* ── Colors tab: underline-style tabs ───────────────── */
    .clr-tabs-bar {
        background: transparent;
        border-bottom: 1.5px solid var(--border);
        border-radius: 0;
        padding: 0;
        margin-bottom: 14px;
        gap: 0;
    }

    .clr-tab-btn {
        border-radius: 0;
        padding: 10px 4px;
        font-size: 14px;
        font-weight: 600;
        color: #999;
        border-bottom: 2.5px solid transparent;
        margin-bottom: -1.5px;
    }

    .clr-tab-btn.active {
        color: var(--primary-color) !important;
        border-bottom-color: var(--primary-color);
        background: transparent !important;
        box-shadow: none !important;
    }

    /* ── Color zone list: bigger circles + better labels ── */
    .clr-accordion {
        gap: 0;
    }

    .clr-acc-body {
        padding: 8px 4px 10px;
    }

    .clr-inline-pattern-grid {
        gap: 4px;
    }

    .clr-pat-tile {
        width: 44px;
        height: 44px;
    }

    .clr-list-view {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 6px;
        align-items: flex-start;
        -webkit-overflow-scrolling: touch;
        padding: 4px 0 8px;
        scrollbar-width: none;
    }

    .clr-list-view::-webkit-scrollbar {
        display: none;
    }

    .clr-list-row {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 10px 4px;
        min-width: 0;
        text-align: center;
        border-radius: 12px;
        background: #f8f9fa;
    }

    .clr-list-row:hover {
        background: #f0f0f0;
    }

    .clr-list-row.active-zone {
        background: rgba(32, 125, 117, 0.08);
    }

    .clr-row-dot {
        width: 40px;
        height: 40px;
    }

    .clr-row-name {
        font-size: 11px;
        font-weight: 500;
        white-space: nowrap;
        color: #444;
    }

    .clr-row-arrow {
        display: none;
    }

    .clr-detail-view {
        height: 200px;
        overflow-y: auto;
    }

    /* ── Color panel height ──────────────────────────────── */
    #tabpanel-colors-container {
        height: 218px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* ── Palette swatches: larger + card style + checkmark ─ */
    .clr-round-palette {
        display: flex;
        flex-wrap: nowrap;
        flex-direction: row;
        overflow-x: auto;
        gap: 10px;
        padding: 6px 0 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .clr-round-palette::-webkit-scrollbar {
        display: none;
    }

    .clr-round-swatch {
        width: 38px;
        height: 38px;
        flex-shrink: 0;
        border: 3px solid transparent;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
        position: relative;
    }

    .clr-round-swatch:hover {
        transform: scale(1.08);
    }

    .clr-round-swatch.active {
        border-color: #1464ff;
        transform: scale(1.05);
    }

    .clr-round-swatch.active::after {
        content: '✓';
        position: absolute;
        bottom: -4px;
        right: -4px;
        width: 15px;
        height: 15px;
        background: #1464ff;
        border: 2px solid #fff;
        border-radius: 50%;
        font-size: 8px;
        font-weight: 700;
        color: #fff;
        line-height: 11px;
        text-align: center;
        display: block;
    }

    .clr-custom-swatch {
        width: 38px;
        height: 38px;
        flex-shrink: 0;
    }

    .clr-current-preview {
        width: 36px;
        height: 36px;
    }

    /* ═══ SVG COLORS — horizontal ════════════════════════════ */
    #tabpanel-svgcolors-container {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 10px;
        height: 180px;
        align-items: center;
        -webkit-overflow-scrolling: touch;
    }

    /* ═══ TEXT — compact single row ═════════════════════════ */
    .text-add-area {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
        height: 220px;
        justify-content: center;
        padding: 0 4px;
    }

    #tabpanel-text-input {
        flex: 1;
        font-size: 14px;
        padding: 9px 10px;
    }

    #tabpanel-text-input,
    #tabpanel-text-edit-input {
        font-size: 16px;
        padding: 12px 14px;
        border-radius: 10px;
    }

    #tabpanel-actions-add-text {
        white-space: nowrap;
        font-size: 12px;
        padding: 9px 12px;
    }

    /* Show edit controls on mobile */
    #tabpanel-text-controls {
        display: block !important;
        padding-bottom: 20px;
    }

    /* ═══ LOGO — select-patterns as flex column ════════════ */
    /* Make entire logo panel a flex column so upload + cats + grid stack */
    .um-sidebar-main .patterns-layouts .select-patterns {
        display: flex;
        flex-direction: column;
        height: auto;
        overflow: hidden;
        gap: 8px;
    }

    /* Upload area collapses to just the button */
    .um-sidebar-main .patterns-layouts .logo-wrapper {
        flex-shrink: 0;
        overflow: visible;
        height: auto;
    }

    .upload-drop-area {
        padding: 10px;
        border: 1.5px dashed var(--border);
        background: #f8fafc;
        border-radius: 8px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        min-height: 0;
        text-align: center;
    }

    .upload-drop-area p,
    .upload-drop-area svg {
        display: block;
    }

    #tabpanel-actions-upload-image {
        display: inline-block;
        width: auto;
        padding: 7px 14px;
        font-size: 12px;
        font-weight: 700;
        background: var(--primary-color);
        color: #fff;
        border-radius: 8px;
        border: none;
        cursor: pointer;
        white-space: nowrap;
    }

    /* Icon categories — horizontal pill row */
    .icon-cats-inline {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 5px;
        flex-shrink: 0;
        -webkit-overflow-scrolling: touch;
        padding: 2px 0;
    }

    /* Icon grid — horizontal tile slider, takes remaining height */
    .icon-grid-inline {
        display: flex !important;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        flex: 1;
        min-height: 0;
        align-items: center;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .icon-grid-inline::-webkit-scrollbar {
        display: none;
    }

    .icon-tile {
        flex-shrink: 0;
        width: 68px;
        height: 68px;
        scroll-snap-align: start;
        border-radius: 12px;
    }

    .icon-tile svg {
        width: 36px;
        height: 36px;
    }

    .icon-tile span {
        font-size: 8px;
    }

    /* Hide logo edit controls and extra sections on mobile */
    #tabpanel-logo-controls {
        display: none !important;
    }

    .um-sidebar-main .patterns-layouts .sidebar-title {
        display: none;
    }

    .use-existing-btn {
        display: none !important;
    }

    /* ═══ LAYERS — horizontal item slider ════════════════════ */
    #layers-panel {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        height: 220px;
        align-items: center;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    #layers-panel::-webkit-scrollbar {
        display: none;
    }

    #layers-panel .layer-item {
        flex-shrink: 0;
        width: 88px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 10px 6px;
        font-size: 11px;
        height: auto;
        border-radius: 12px;
    }

    #layers-panel .layer-label {
        font-size: 10px;
        text-align: center;
    }

    #layers-panel .layer-icons {
        gap: 4px;
    }

    /* ── Gradient panel on mobile ────────────────────────── */
    .grad-panel-card {
        padding: 0;
    }

    .grad-preview-bar {
        height: 32px;
        border-radius: 8px;
        margin-bottom: 10px;
    }

    .grad-type-row {
        gap: 6px;
        margin-bottom: 8px;
    }

    .grad-type-pill {
        padding: 7px 12px;
        font-size: 13px;
    }

    .grad-slider-row {
        margin-bottom: 8px;
    }

    .grad-remove-btn {
        margin-top: 8px;
        padding: 8px;
        font-size: 12px;
    }

    /* ── Patterns inline grid ────────────────────────────── */
    .clr-inline-pattern-grid {
        gap: 6px;
    }

    .clr-pat-tile {
        width: 52px;
        height: 52px;
        border-radius: 10px;
    }

    /* ── Color zone accordion: 3-per-row grid, vertical scroll ─ */
    .clr-accordion {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 6px;
        padding: 4px 2px 8px;
        max-height: 100%;
    }

    .clr-accordion::-webkit-scrollbar {
        display: none;
    }

    .clr-acc-row {
        margin-bottom: 0;
        border-radius: 12px;
    }

    .clr-acc-body {
        display: none;
    }

    /* ── Gradient toggle row: vertical alignment ────────── */
    .grad-toggle-row {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        text-align: center;
    }

    .grad-toggle-row label {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }

    /* ── Mobile step overlay ─────────────────────────────── */
    .clr-mobile-step {
        display: none;
        flex-direction: column;
        position: fixed;
        bottom: 62px;
        left: 0;
        right: 0;
        height: 250px;
        background: #fff;
        z-index: 50;
        border-radius: 16px 16px 0 0;
        border-top: 1px solid var(--border);
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
        overflow: hidden;
    }

    .clr-mobile-step-header {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 14px 8px;
        border-bottom: 1px solid var(--border);
        flex-shrink: 0;
        background: #fff;
    }

    .clr-mobile-back-btn {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        max-width: 103px;
        height: 30px;
        padding: 0 10px;
        gap: 4px;
        background: #fff;
        border: 1.5px solid var(--border);
        border-radius: 8px;
        cursor: pointer;
        color: var(--text);
        flex-shrink: 0;
        font-size: 13px;
        font-weight: 500;
        white-space: nowrap;
    }

    .clr-mobile-step-title {
        font-size: 14px;
        font-weight: 600;
        color: var(--text);
        margin: 0;
    }

    .clr-mobile-step-body {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 10px 14px;
        -webkit-overflow-scrolling: touch;
    }

    /* ── Scroll arrows for horizontal lists ──────────────── */
    .clr-scroll-wrap {
        position: relative;
        display: flex;
        align-items: center;
    }

    .clr-scroll-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fff;
        border: 1.5px solid var(--border);
        border-radius: 50%;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        cursor: pointer;
        color: var(--text);
        padding: 0;
        flex-shrink: 0;
    }

    .clr-scroll-btn svg {
        width: 14px;
        height: 14px;
    }

    .clr-scroll-prev {
        left: 2px;
    }

    .clr-scroll-next {
        right: 2px;
    }

    .clr-scroll-btn:hover {
        background: var(--surface-2);
        border-color: var(--border-dark);
    }

    div#tabpanel-patterns-container {
        height: 100%;
        overflow: auto;
    }
}

button.clr-scroll-btn.clr-scroll-prev {
    display: none;
}

button.clr-scroll-btn.clr-scroll-next {
    display: none;
}

.kd-detail-page {
    max-width: 1320px;
    margin: 0 auto;
    padding: 32px 24px 80px;
    font-family: inherit
}

.kd-detail-breadcrumb {
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 28px
}

.kd-detail-breadcrumb a {
    color: #207d75;
    text-decoration: none
}

.kd-detail-breadcrumb a:hover {
    text-decoration: underline
}

.kd-detail-layout {
    display: grid;
    grid-template-columns: 88px 1fr 360px;
    gap: 20px;
    align-items: start
}

@media(max-width:1024px) {
    .kd-detail-layout {
        grid-template-columns: 72px 1fr 300px;
        gap: 14px
    }
}

@media(max-width:768px) {
    .kd-detail-layout {
        grid-template-columns: 1fr
    }

    .kd-detail-thumbs {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px
    }
}

.kd-detail-thumbs {
    display: flex;
    flex-direction: column;
    gap: 8px
}

.kd-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color .15s;
    flex-shrink: 0;
    background: #f3f4f6
}

.kd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block
}

.kd-thumb.active {
    border-color: #207d75
}

.kd-thumb:hover {
    border-color: #a7c4c1
}

.kd-detail-main {
    position: relative
}

.kd-main-img-wrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f9fafb;
    aspect-ratio: 3/2
}

.kd-main-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: opacity .2s
}

.kd-3d-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(0, 0, 0, .75);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 5px
}

.kd-main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 14px
}

.kd-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
    transition: background .15s, border-color .15s
}

.kd-nav-btn:hover {
    background: #207d75;
    border-color: #207d75;
    color: #fff
}

.kd-nav-counter {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    min-width: 90px;
    text-align: center
}

.kd-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 10px
}

.kd-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: background .15s
}

.kd-dot.active {
    background: #207d75
}

.kd-detail-info {
    padding-top: 4px
}

.kd-info-brand {
    font-size: 11px;
    font-weight: 700;
    color: #207d75;
    letter-spacing: .07em;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px
}

.kd-info-title {
    font-size: 24px;
    font-weight: 700;
    color: #111;
    margin: 0 0 14px;
    line-height: 1.25
}

.kd-info-desc {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 20px
}

.kd-show-more-btn {
    background: none;
    border: none;
    color: #207d75;
    font-size: 14px;
    cursor: pointer;
    padding: 0 0 20px;
    display: block;
    text-decoration: underline
}

.kd-design-count-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 20px
}

.kd-design-count-tag strong {
    color: #111
}

.kd-customize-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: #111;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background .15s;
    margin-bottom: 16px;
    box-sizing: border-box
}

.kd-customize-btn:hover {
    background: #207d75;
    color: #fff
}

.kd-trust-badges {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.kd-trust-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #f3f4f6
}

.kd-trust-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: #e6f0ef;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #207d75
}

.kd-trust-text strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #111;
    margin-bottom: 2px
}

.kd-trust-text span {
    font-size: 12px;
    color: #6b7280
}