/* --- Design System & Reset --- */
:root {
    /* Editor Dashboard Colors (Dark/Neon Glass Theme) */
    --editor-bg: #0d0e12;
    --editor-sidebar: rgba(22, 24, 33, 0.85);
    --editor-card: rgba(30, 34, 49, 0.6);
    --editor-border: rgba(255, 255, 255, 0.08);
    --editor-text: #e2e8f0;
    --editor-muted: #94a3b8;
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --accent-success: #10b981;
    --accent-danger: #ef4444;
    --font-ui: 'Outfit', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Live Preview Common Styles (860px canvas) */
    --preview-bg: #f5f6f8;
    --canvas-width: 860px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--editor-bg);
    color: var(--editor-text);
    font-family: var(--font-ui);
    height: 100vh;
    overflow: hidden;
}

/* --- App Layout --- */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* --- Sidebar (Left Editor Panel) --- */
.sidebar {
    width: 420px;
    background: var(--editor-sidebar);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--editor-border);
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 10;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 24px 20px 16px 20px;
    border-bottom: 1px solid var(--editor-border);
}

.logo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #fff;
}

.logo-accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 11px;
    color: var(--editor-muted);
    margin-top: 4px;
}

/* Sidebar Navigation Tabs */
.sidebar-tabs {
    display: flex;
    background: rgba(10, 11, 16, 0.4);
    border-bottom: 1px solid var(--editor-border);
    padding: 6px;
    gap: 4px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--editor-muted);
    padding: 10px 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn i {
    width: 18px;
    height: 18px;
}

.tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    color: #fff;
    background: var(--editor-card);
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.05), 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--editor-border);
    margin: -1px; /* Align border */
}

/* Tab Content Scroll Container */
.tab-content-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Custom Scrollbar for Sidebar */
.tab-content-container::-webkit-scrollbar {
    width: 6px;
}
.tab-content-container::-webkit-scrollbar-track {
    background: transparent;
}
.tab-content-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
.tab-content-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

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

/* --- Control Panel Elements --- */
.control-section {
    background: var(--editor-card);
    border: 1px solid var(--editor-border);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
}

.control-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-title-wrap h3 {
    margin-bottom: 0;
}

.section-desc {
    font-size: 11px;
    color: var(--editor-muted);
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Form Styles */
.form-group {
    margin-bottom: 14px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--editor-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: 100%;
    background: rgba(10, 11, 16, 0.6);
    border: 1px solid var(--editor-border);
    border-radius: 8px;
    color: #fff;
    padding: 10px 12px;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
    resize: vertical;
}

/* Style Margins & Custom Utilities */
.style-margin-top {
    margin-top: 14px;
}

/* Toggle Switch Widget */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .3s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background: var(--accent-gradient);
}

input:checked + .slider:before {
    transform: translateX(18px);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    padding: 10px 16px;
    width: 100%;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.55);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--editor-border);
    color: #fff;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 11px;
}

.btn-lg {
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
}

/* Style presets grid selector */
.style-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.style-option {
    border: 1px solid var(--editor-border);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.2s, background-color 0.2s;
    background: rgba(10, 11, 16, 0.3);
}

.style-option input {
    display: none;
}

.style-option:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.02);
}

.style-option.active {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.08);
}

.style-preview {
    height: 32px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Styled color circles inside option buttons */
.style-preview.modern { background: #2b2b2b; }
.style-preview.soft-blue { background: #f0f7ff; }
.style-preview.warm-sand { background: #faf7f2; }
.style-preview.alert-orange { background: #fffaf0; }

.style-label {
    font-size: 11px;
    text-align: center;
    color: var(--editor-text);
}

/* Bullet list input groups */
.bullet-list-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.bullet-input-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.bullet-input-row input {
    flex: 1;
    background: rgba(10, 11, 16, 0.6);
    border: 1px solid var(--editor-border);
    border-radius: 8px;
    color: #fff;
    padding: 8px 10px;
    font-size: 12px;
}

.bullet-input-row input:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--editor-border);
    border-radius: 8px;
    color: var(--editor-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-icon:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.btn-icon-danger:hover {
    color: #fff;
    background: var(--accent-danger);
    border-color: var(--accent-danger);
}

/* Upload dropzone styling */
.upload-dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    background: rgba(10, 11, 16, 0.2);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.upload-dropzone:hover, .upload-dropzone.dragging {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.05);
}

.upload-icon {
    width: 36px;
    height: 36px;
    color: var(--accent);
    margin-bottom: 8px;
    opacity: 0.8;
}

.upload-dropzone p {
    font-size: 12px;
    color: #fff;
    margin-bottom: 4px;
    font-weight: 500;
}

.upload-info {
    font-size: 10px;
    color: var(--editor-muted);
    display: block;
}

/* Preset grids in Tab-Specs */
.preset-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

/* Spec table inputs */
.spec-row-input {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    align-items: center;
}

.spec-row-input input {
    background: rgba(10, 11, 16, 0.6);
    border: 1px solid var(--editor-border);
    border-radius: 6px;
    color: #fff;
    padding: 8px 10px;
    font-size: 12px;
}

.spec-row-input .spec-key {
    width: 35%;
}

.spec-row-input .spec-val {
    flex: 1;
}

/* Layout section / Order configuration elements */
.layout-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.empty-state {
    padding: 30px 20px;
    text-align: center;
    border: 1px dashed var(--editor-border);
    border-radius: 8px;
    color: var(--editor-muted);
}

.empty-state i {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
    opacity: 0.6;
}

.empty-state p {
    font-size: 11px;
}

/* Dynamic list item inside layout section */
.layout-item {
    background: rgba(10, 11, 16, 0.4);
    border: 1px solid var(--editor-border);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s, background-color 0.2s;
}

.layout-item.dragging {
    opacity: 0.5;
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent);
}

.item-drag-handle {
    cursor: grab;
    color: var(--editor-muted);
    display: flex;
    align-items: center;
}

.item-drag-handle:active {
    cursor: grabbing;
}

.item-preview {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--editor-border);
    flex-shrink: 0;
}

.item-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-preview i {
    color: var(--accent);
    width: 20px;
    height: 20px;
}

.item-details {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-subtitle {
    font-size: 10px;
    color: var(--editor-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Custom styles for layout-item-text configuration details */
.layout-text-editor {
    width: 100%;
    margin-top: 6px;
}

.layout-text-editor input[type="text"] {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--editor-border);
    border-radius: 4px;
    color: #fff;
    padding: 6px 8px;
    font-size: 11px;
    width: 100%;
    margin-bottom: 4px;
}

.layout-text-editor textarea {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--editor-border);
    border-radius: 4px;
    color: #fff;
    padding: 6px 8px;
    font-size: 11px;
    width: 100%;
    resize: vertical;
}

.layout-item-controls {
    display: flex;
    gap: 4px;
}

.actions-section {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.export-note {
    font-size: 10px;
    color: var(--editor-muted);
    line-height: 1.4;
    text-align: center;
    margin-top: 10px;
}


/* --- Right Preview Area --- */
.preview-area {
    flex: 1;
    background: var(--preview-bg);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.preview-toolbar {
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    z-index: 5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.toolbar-title {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.15s;
}

.zoom-btn:hover {
    color: #0f172a;
    background: #f8fafc;
    border-color: #cbd5e1;
}

.zoom-btn i {
    width: 16px;
    height: 16px;
}

.zoom-level {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    min-width: 42px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Canvas Wrapper Scroll Panel */
.preview-canvas-wrapper {
    flex: 1;
    overflow: auto;
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    scroll-behavior: smooth;
}

/* --- The actual detail page render block (860px) --- */
.detail-page-canvas {
    width: var(--canvas-width);
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transform-origin: top center;
    transition: transform 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
    box-sizing: border-box;
    /* User set font */
    font-family: 'Noto Sans KR', sans-serif;
    color: #333333;
}

/* Canvas Sections */
.canvas-section {
    width: 100%;
    position: relative;
    box-sizing: border-box;
}

.canvas-header-notice {
    padding: 50px 40px;
}

.canvas-footer-notice {
    padding: 60px 40px;
}

.canvas-spec-table {
    padding: 40px;
    background: #ffffff;
}

/* Notice Container Common Design */
.notice-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-radius: 16px;
    padding: 40px 35px;
    border-width: 2px;
    border-style: solid;
    box-sizing: border-box;
}

.notice-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.notice-main-icon {
    width: 32px;
    height: 32px;
}

.notice-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.notice-divider {
    width: 40px;
    height: 3px;
    border-radius: 2px;
    margin-bottom: 16px;
}

.notice-description {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
    white-space: pre-line;
    word-break: keep-all;
}

.notice-bullets {
    list-style: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    max-width: 680px;
}

.notice-bullets li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13.5px;
    line-height: 1.55;
    background: rgba(255, 255, 255, 0.4);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.notice-bullets li i {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Custom text highlight for important information (e.g. shipping time) */
.text-highlight {
    font-weight: 800;
    color: #e11d48;
    background: rgba(225, 29, 72, 0.05);
    padding: 1px 4px;
    border-radius: 4px;
    border: 1px dashed rgba(225, 29, 72, 0.25);
    font-size: 1.08em;
}

/* Customer Service Contact Card */
.cs-card {
    width: 100%;
    max-width: 680px;
    border-radius: 12px;
    margin-top: 32px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.cs-header {
    background: rgba(0, 0, 0, 0.04);
    padding: 12px 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cs-header i {
    width: 14px;
    height: 14px;
}

.cs-body {
    padding: 16px 20px;
    font-size: 13px;
    line-height: 1.6;
    text-align: left;
    background: #ffffff;
    white-space: pre-line;
}

/* Notice Styling Themes */
/* 1. Theme: Modern Charcoal */
.detail-page-canvas.style-modern .notice-container {
    background-color: #fafafa;
    border-color: #2b2b2b;
}
.detail-page-canvas.style-modern .notice-icon-wrap {
    background: #2b2b2b;
    color: #ffffff;
}
.detail-page-canvas.style-modern .notice-title {
    color: #1a1a1a;
}
.detail-page-canvas.style-modern .notice-divider {
    background-color: #2b2b2b;
}
.detail-page-canvas.style-modern .notice-description {
    color: #4a4a4a;
}
.detail-page-canvas.style-modern .notice-bullets li {
    border-left: 3px solid #2b2b2b;
    color: #333333;
}
.detail-page-canvas.style-modern .notice-bullets li i {
    color: #2b2b2b;
}
.detail-page-canvas.style-modern .cs-card {
    border-color: #2b2b2b;
}
.detail-page-canvas.style-modern .cs-header {
    background-color: #2b2b2b;
    color: #ffffff;
}

/* 2. Theme: Soft Blue */
.detail-page-canvas.style-soft-blue .notice-container {
    background-color: #f0f7ff;
    border-color: #a5d0ff;
}
.detail-page-canvas.style-soft-blue .notice-icon-wrap {
    background: #3b82f6;
    color: #ffffff;
}
.detail-page-canvas.style-soft-blue .notice-title {
    color: #1e3a8a;
}
.detail-page-canvas.style-soft-blue .notice-divider {
    background-color: #3b82f6;
}
.detail-page-canvas.style-soft-blue .notice-description {
    color: #1e40af;
}
.detail-page-canvas.style-soft-blue .notice-bullets li {
    border-left: 3px solid #3b82f6;
    color: #1e3a8a;
    background: rgba(255, 255, 255, 0.7);
}
.detail-page-canvas.style-soft-blue .notice-bullets li i {
    color: #3b82f6;
}
.detail-page-canvas.style-soft-blue .cs-card {
    border-color: #a5d0ff;
}
.detail-page-canvas.style-soft-blue .cs-header {
    background-color: #3b82f6;
    color: #ffffff;
}

/* 3. Theme: Warm Sand */
.detail-page-canvas.style-warm-sand .notice-container {
    background-color: #faf7f2;
    border-color: #d4c5b3;
}
.detail-page-canvas.style-warm-sand .notice-icon-wrap {
    background: #8c7860;
    color: #ffffff;
}
.detail-page-canvas.style-warm-sand .notice-title {
    color: #4a3e31;
}
.detail-page-canvas.style-warm-sand .notice-divider {
    background-color: #8c7860;
}
.detail-page-canvas.style-warm-sand .notice-description {
    color: #5c4d3c;
}
.detail-page-canvas.style-warm-sand .notice-bullets li {
    border-left: 3px solid #8c7860;
    color: #4a3e31;
    background: rgba(255, 255, 255, 0.7);
}
.detail-page-canvas.style-warm-sand .notice-bullets li i {
    color: #8c7860;
}
.detail-page-canvas.style-warm-sand .cs-card {
    border-color: #d4c5b3;
}
.detail-page-canvas.style-warm-sand .cs-header {
    background-color: #8c7860;
    color: #ffffff;
}

/* 4. Theme: Alert Orange */
.detail-page-canvas.style-alert-orange .notice-container {
    background-color: #fffaf0;
    border-color: #fbd38d;
}
.detail-page-canvas.style-alert-orange .notice-icon-wrap {
    background: #dd6b20;
    color: #ffffff;
}
.detail-page-canvas.style-alert-orange .notice-title {
    color: #7b341e;
}
.detail-page-canvas.style-alert-orange .notice-divider {
    background-color: #dd6b20;
}
.detail-page-canvas.style-alert-orange .notice-description {
    color: #7b341e;
}
.detail-page-canvas.style-alert-orange .notice-bullets li {
    border-left: 3px solid #dd6b20;
    color: #7b341e;
    background: rgba(255, 255, 255, 0.7);
}
.detail-page-canvas.style-alert-orange .notice-bullets li i {
    color: #dd6b20;
}
.detail-page-canvas.style-alert-orange .cs-card {
    border-color: #fbd38d;
}
.detail-page-canvas.style-alert-orange .cs-header {
    background-color: #dd6b20;
    color: #ffffff;
}

/* Content Container Body Styling */
.canvas-main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Inside detail-page-canvas main contents */
.canvas-image-block {
    width: 100%;
    display: block;
}

.canvas-image-block img {
    width: 100%;
    height: auto;
    display: block;
}

.canvas-text-block {
    width: 100%;
    padding: 50px 60px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #ffffff;
}

.canvas-text-block.align-left {
    align-items: flex-start;
    text-align: left;
}

.canvas-text-block.align-right {
    align-items: flex-end;
    text-align: right;
}

.canvas-text-block h3 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 14px;
    line-height: 1.4;
    word-break: keep-all;
}

.canvas-text-block p {
    font-size: 15px;
    line-height: 1.7;
    color: #4b5563;
    white-space: pre-line;
    word-break: keep-all;
}

/* Empty Canvas Placeholder */
.canvas-placeholder {
    width: 100%;
    padding: 80px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    border-top: 1px dashed #e2e8f0;
    border-bottom: 1px dashed #e2e8f0;
    color: #64748b;
    text-align: center;
}

.placeholder-icon {
    width: 48px;
    height: 48px;
    color: #94a3b8;
    margin-bottom: 16px;
}

.canvas-placeholder h3 {
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.canvas-placeholder p {
    font-size: 12px;
    color: #94a3b8;
}

/* Spec Table styling */
.spec-table-container {
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    border-top: 2px solid #334155;
}

.spec-table-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    padding: 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.spec-table-title i {
    width: 18px;
    height: 18px;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    border-bottom: 1px solid #e2e8f0;
}

.spec-table td {
    padding: 12px 16px;
    border-top: 1px solid #e2e8f0;
    line-height: 1.5;
}

.spec-table .spec-td-key {
    width: 160px;
    font-weight: 600;
    color: #475569;
    background: #f8fafc;
}

.spec-table .spec-td-val {
    color: #0f172a;
}

/* --- Export Overlay --- */
.export-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 11, 16, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.export-modal-overlay.active {
    display: flex;
}

.export-modal-content {
    background: #1e2231;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 440px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    margin: 0 auto 20px auto;
    animation: spin 1s linear infinite;
}

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

.export-modal-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.export-modal-content p {
    font-size: 12px;
    color: var(--editor-muted);
    line-height: 1.5;
    margin-bottom: 20px;
}

.export-progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.export-progress-bar {
    width: 0%;
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.export-status-text {
    font-size: 11px;
    color: var(--accent);
    font-weight: 500;
}

/* --- QR Code for Custom Clearance Card --- */
.clearance-qr-wrap {
    display: flex;
    align-items: center;
    gap: 18px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 16px;
    margin-top: 24px;
    max-width: 680px;
    width: 100%;
    text-align: left;
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.qr-box {
    width: 76px;
    height: 76px;
    border-radius: 8px;
    background: #ffffff;
    padding: 5px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.qr-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-text-wrap {
    flex: 1;
    min-width: 0;
}

.qr-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.qr-desc {
    font-size: 12px;
    line-height: 1.5;
    color: #4b5563;
}

/* --- Brand Intro Banner Styles --- */
.canvas-brand-banner {
    padding: 60px 40px 30px 40px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.brand-banner-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 780px;
    margin: 0 auto;
}

.brand-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.brand-logo {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: #1e293b;
    margin-bottom: 10px;
}

.brand-slogan {
    font-size: 14px;
    font-weight: 400;
    color: #64748b;
    margin-bottom: 36px;
    max-width: 500px;
    line-height: 1.6;
}

.brand-badges-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    border-top: 1px solid #f1f5f9;
    padding-top: 30px;
}

.brand-badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.brand-badge-item i {
    width: 24px;
    height: 24px;
    margin-bottom: 12px;
}

.brand-badge-item strong {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}

.brand-badge-item span {
    font-size: 11px;
    line-height: 1.45;
    color: #64748b;
    word-break: keep-all;
}

/* Theme color mappings for brand banner elements */
.detail-page-canvas.style-modern .brand-tag,
.detail-page-canvas.style-modern .brand-logo span,
.detail-page-canvas.style-modern .brand-badge-item i {
    color: #2b2b2b;
}

.detail-page-canvas.style-soft-blue .brand-tag,
.detail-page-canvas.style-soft-blue .brand-logo span,
.detail-page-canvas.style-soft-blue .brand-badge-item i {
    color: #3b82f6;
}

.detail-page-canvas.style-warm-sand .brand-tag,
.detail-page-canvas.style-warm-sand .brand-logo span,
.detail-page-canvas.style-warm-sand .brand-badge-item i {
    color: #8c7860;
}

.detail-page-canvas.style-alert-orange .brand-tag,
.detail-page-canvas.style-alert-orange .brand-logo span,
.detail-page-canvas.style-alert-orange .brand-badge-item i {
    color: #dd6b20;
}

/* --- Review Event Banner Styles --- */
.canvas-review-banner {
    padding: 30px 40px;
    background: #ffffff;
}

.review-banner-container {
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    background: #fafafa;
    border-radius: 16px;
    padding: 30px;
    border: 1px dashed rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.review-title-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
}

.review-badge {
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.review-main-title {
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 6px;
}

.review-sub-title {
    font-size: 12.5px;
    color: #64748b;
}

/* Coupon design */
.review-coupons-wrap {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: 100%;
    max-width: 680px;
    margin-bottom: 20px;
}

.coupon-card {
    height: 100px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.coupon-card::before,
.coupon-card::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fafafa; /* Matches container background */
    border: 1px solid rgba(0, 0, 0, 0.08);
    left: 70%;
    margin-left: -6px;
    z-index: 2;
}

.coupon-card::before {
    top: -7px;
}

.coupon-card::after {
    bottom: -7px;
}

.coupon-left {
    width: 70%;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    box-sizing: border-box;
}

.coupon-type {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 4px;
}

.coupon-discount {
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.1;
}

.coupon-discount strong {
    font-size: 26px;
    font-weight: 900;
}

.coupon-condition {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 4px;
}

.coupon-divider {
    width: 0;
    border-left: 1px dashed rgba(0, 0, 0, 0.1);
    height: 100%;
    position: relative;
    z-index: 1;
}

.coupon-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}

/* Bonus Box */
.review-bonus-box {
    width: 100%;
    max-width: 680px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    text-align: left;
}

.review-bonus-box i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.review-bonus-box span {
    font-size: 11.5px;
    line-height: 1.5;
    color: #475569;
}

.review-bonus-box span strong {
    font-weight: 700;
}

/* Theme mappings for review banner elements */
.detail-page-canvas.style-modern .review-badge,
.detail-page-canvas.style-modern .coupon-right,
.detail-page-canvas.style-modern .coupon-discount,
.detail-page-canvas.style-modern .review-bonus-box i,
.detail-page-canvas.style-modern .review-bonus-box strong {
    color: #2b2b2b;
}
.detail-page-canvas.style-modern .review-badge {
    background-color: #2b2b2b;
    color: #ffffff;
}
.detail-page-canvas.style-modern .coupon-right {
    background-color: #f1f5f9;
}

.detail-page-canvas.style-soft-blue .review-badge,
.detail-page-canvas.style-soft-blue .coupon-right,
.detail-page-canvas.style-soft-blue .coupon-discount,
.detail-page-canvas.style-soft-blue .review-bonus-box i,
.detail-page-canvas.style-soft-blue .review-bonus-box strong {
    color: #3b82f6;
}
.detail-page-canvas.style-soft-blue .review-badge {
    background-color: #3b82f6;
    color: #ffffff;
}
.detail-page-canvas.style-soft-blue .coupon-right {
    background-color: #eff6ff;
}

.detail-page-canvas.style-warm-sand .review-badge,
.detail-page-canvas.style-warm-sand .coupon-right,
.detail-page-canvas.style-warm-sand .coupon-discount,
.detail-page-canvas.style-warm-sand .review-bonus-box i,
.detail-page-canvas.style-warm-sand .review-bonus-box strong {
    color: #8c7860;
}
.detail-page-canvas.style-warm-sand .review-badge {
    background-color: #8c7860;
    color: #ffffff;
}
.detail-page-canvas.style-warm-sand .coupon-right {
    background-color: #fdfbf7;
}

.detail-page-canvas.style-alert-orange .review-badge,
.detail-page-canvas.style-alert-orange .coupon-right,
.detail-page-canvas.style-alert-orange .coupon-discount,
.detail-page-canvas.style-alert-orange .review-bonus-box i,
.detail-page-canvas.style-alert-orange .review-bonus-box strong {
    color: #dd6b20;
}
.detail-page-canvas.style-alert-orange .review-badge {
    background-color: #dd6b20;
    color: #ffffff;
}
.detail-page-canvas.style-alert-orange .coupon-right {
    background-color: #fff7ed;
}



