/* Scoped for WordPress */
    .content-section {
    	background: black;
    }
    .wine-label-designer-wrapper * {
            box-sizing: border-box;
        }
        
        :root {
            --primary: #7a7a7a;
            --primary-dark: #5a5a5a;
            --primary-light: rgba(122, 122, 122, 0.15);
            --warning: #8a8a8a;
            --warning-light: rgba(138, 138, 138, 0.1);
            --border: #3a3a3a;
            --bg-light: #2a2a2a;
            --text-dark: #e0e0e0;
            --text-muted: #a0a0a0;
            --bg-primary: #1a1a1a;
            --bg-secondary: #252525;
            --surface: #2d2d2d;
            --accent: #6a6a6a;
        }
        
        .wine-label-designer-wrapper {
            background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            margin: 0;
            padding: 0;
            padding-top: 60px;
            font-size: 14px;
            color: var(--text-dark);
        }
        
        footer {
        	background: #000 !important;
        }
        
        #mainNav-shop {
        	display: none !important;
        }
        
        .content-section {
        	padding-top: 0px;
        }
        
        /* Zin Lab Branding Bar - Scrollable */
        .zinlab-brand-bar {
            background: linear-gradient(135deg, #78264C 0%, #5a1d38 100%);
            height: 50px;
            display: flex;
            align-items: center;
            padding: 0 20px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.3);
            margin-bottom: 0;
        }
        
        .zinlab-brand-bar .brand-logo {
            height: 32px;
            width: auto;
            filter: brightness(0) invert(1);
        }
        
        .zinlab-brand-bar .brand-text {
            margin-left: 12px;
            color: white;
            font-size: 18px;
            font-weight: 600;
            letter-spacing: 1.5px;
            text-transform: uppercase;
        }
                
        /* Sticky Toolbar - More Compact */
        .top-toolbar {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            background: var(--bg-secondary);
            border-bottom: 2px solid var(--primary);
            padding: 8px 16px;
            display: flex;
            gap: 8px;
            align-items: center;
            z-index: 1000;
            box-shadow: 0 2px 8px rgba(0,0,0,0.5);
            height: 60px;
        }
        
        .toolbar-section {
            display: flex;
            gap: 4px;
            padding: 0 8px;
            border-right: 1px solid var(--border);
            align-items: center;
        }
        
        .toolbar-section:last-child {
            border-right: none;
        }
        
        /* Compact Icon Buttons */
        .icon-btn {
            width: 36px;
            height: 36px;
            border: 1px solid var(--border);
            background: var(--surface);
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
            color: var(--text-dark);
            font-size: 16px;
        }
        
        .icon-btn:hover {
            background: var(--primary-light);
            border-color: var(--primary);
            transform: translateY(-1px);
        }
        
        .icon-btn:active {
            transform: translateY(0);
        }
        
        .icon-btn.active {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        .icon-btn:disabled {
            opacity: 0.4;
            cursor: not-allowed;
            transform: none;
        }
        
        .icon-btn.primary {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        .icon-btn.primary:hover {
            background: var(--primary-dark);
        }
        
        .icon-btn.success {
            background: #28a745;
            color: white;
            border-color: #28a745;
        }
        
        .icon-btn.danger {
            background: #dc3545;
            color: white;
            border-color: #dc3545;
        }
        
        /* Designer Layout - More Compact */
        .designer-layout {
            display: grid;
            grid-template-columns: 180px 1fr 260px;
            gap: 16px;
            padding: 16px;
            max-width: 2000px;
            margin: 0 auto;
        }
        
        .template-sidebar,
        .controls-sidebar,
        .canvas-area {
            background: var(--surface);
            border-radius: 10px;
            padding: 16px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        }
        
        /* Make only controls sidebar sticky, positioned below the header */
        .controls-sidebar {
            position: sticky;
            top: 76px; /* Below the 60px header + 16px gap */
            max-height: calc(100vh - 92px);
            overflow-y: auto;
            z-index: 10; /* Below the header which is z-index: 1000 */
        }
        
        /* Compact Canvas Area */
        .canvas-area {
            padding: 20px;
            position: relative;
            z-index: 1; /* Base layer */
        }
        
        .canvas-wrapper {
            display: flex;
            justify-content: center;
            margin: 16px 0;
            padding: 20px;
            background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
            border-radius: 12px;
        }
        
        .canvas-container {
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 8px 24px rgba(0,0,0,0.6), 0 2px 8px rgba(0,0,0,0.4);
            transition: box-shadow 0.3s ease;
        }
        
        .canvas-container:hover {
            box-shadow: 0 12px 32px rgba(0,0,0,0.7), 0 4px 12px rgba(0,0,0,0.5);
        }
        
        /* COMPACT Selected Controls - Icon-Driven */
        .selected-object-controls {
            background: linear-gradient(135deg, #323232 0%, #2a2a2a 100%);
            border: 2px solid var(--accent);
            border-radius: 10px;
            padding: 16px;
            margin: 16px 0;
            display: none;
            position: relative;
            z-index: 5; /* Below header and controls sidebar */
        }
        
        .selected-object-controls.active {
            display: block;
            animation: slideIn 0.25s ease;
        }
        
        @keyframes slideIn {
            from { 
                opacity: 0; 
                transform: translateY(-12px) scale(0.98);
            }
            to { 
                opacity: 1; 
                transform: translateY(0) scale(1);
            }
        }
        
        .controls-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            padding-bottom: 8px;
            border-bottom: 2px solid var(--accent);
        }
        
        .controls-header h6 {
            margin: 0;
            font-weight: 700;
            color: var(--text-dark);
            font-size: 13px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        /* Compact Control Rows */
        .control-row {
            display: flex;
            gap: 8px;
            margin-bottom: 10px;
            align-items: center;
        }
        
        .control-row:last-child {
            margin-bottom: 0;
        }
        
        .control-label {
            font-size: 11px;
            color: var(--text-muted);
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            min-width: 60px;
            flex-shrink: 0;
        }
        
        /* Icon Button Group */
        .icon-btn-group {
            display: flex;
            gap: 4px;
            flex-wrap: wrap;
        }
        
        .icon-btn-sm {
            width: 32px;
            height: 32px;
            border: 1px solid var(--border);
            background: var(--surface);
            border-radius: 5px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.15s;
            font-size: 14px;
            color: var(--text-dark);
        }
        
        .icon-btn-sm:hover {
            background: var(--primary-light);
            border-color: var(--primary);
            transform: scale(1.05);
        }
        
        .icon-btn-sm.active {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        /* Compact Font Selector - Icon Grid */
        .font-selector {
            display: flex;
            flex-direction: column;
            gap: 6px;
            flex: 1;
            position: relative; /* For dropdown positioning */
        }
        
        .font-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 4px;
        }
        
        .font-btn {
            padding: 6px 8px;
            border: 1px solid var(--border);
            background: var(--surface);
            color: var(--text-muted);
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.15s;
            font-size: 11px;
            text-align: center;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .font-btn:hover {
            background: var(--primary-light);
            border-color: var(--primary);
            transform: scale(1.02);
        }
        
        .font-btn.active {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
            font-weight: 600;
        }
        
        .font-more-btn {
            grid-column: span 3;
            font-size: 10px;
            text-transform: uppercase;
            font-weight: 600;
            letter-spacing: 0.5px;
            background: var(--bg-secondary);
        }
        
        .font-dropdown {
            display: none;
            position: absolute;
            z-index: 200; /* Above everything except the header */
            background: var(--surface);
            border: 2px solid var(--primary);
            border-radius: 6px;
            padding: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.5);
            max-height: 200px;
            overflow-y: auto;
            width: 100%;
        }
        
        .font-dropdown.active {
            display: block;
        }
        
        .font-dropdown-item {
            padding: 8px 10px;
            cursor: pointer;
            border-radius: 4px;
            margin-bottom: 2px;
            font-size: 13px;
        }
        
        .font-dropdown-item:hover {
            background: var(--primary-light);
        }
        
        /* Text Color Palette Grid */
        .text-color-grid {
            display: grid;
            grid-template-columns: repeat(12, 1fr);
            gap: 4px;
            margin-bottom: 6px;
        }
        
        .text-color-swatch {
            aspect-ratio: 1;
            border-radius: 4px;
            cursor: pointer;
            border: 2px solid transparent;
            transition: all 0.15s;
            position: relative;
        }
        
        .text-color-swatch:hover {
            transform: scale(1.15);
            box-shadow: 0 2px 6px rgba(0,0,0,0.2);
        }
        
        .text-color-swatch.active::after {
            content: '\f00c';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 10px;
            text-shadow: 0 0 2px rgba(0,0,0,0.5);
        }
        
        .shadow-color-swatch {
            aspect-ratio: 1;
            border-radius: 6px;
            border: 2px solid transparent;
            cursor: pointer;
            transition: all 0.2s;
            position: relative;
        }
        
        .shadow-color-swatch:hover {
            transform: scale(1.1);
            border-color: var(--primary);
        }
        
        .shadow-color-swatch.active::after {
            content: '\f00c';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 10px;
            text-shadow: 0 0 2px rgba(0,0,0,0.5);
        }
        
        .text-stroke-swatch {
            aspect-ratio: 1;
            border-radius: 6px;
            border: 2px solid transparent;
            cursor: pointer;
            transition: all 0.2s;
            position: relative;
        }
        
        .text-stroke-swatch:hover {
            transform: scale(1.1);
            border-color: var(--primary);
        }
        
        .text-stroke-swatch.active::after {
            content: '\f00c';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 10px;
            text-shadow: 0 0 2px rgba(0,0,0,0.5);
        }
        
        .shape-fill-swatch {
            aspect-ratio: 1;
            border-radius: 6px;
            border: 2px solid transparent;
            cursor: pointer;
            transition: all 0.2s;
            position: relative;
        }
        
        .shape-fill-swatch:hover {
            transform: scale(1.1);
            border-color: var(--primary);
        }
        
        .shape-fill-swatch.active::after {
            content: '\f00c';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 10px;
            text-shadow: 0 0 2px rgba(0,0,0,0.5);
        }
        
        /* Shapes Grid */
        .shapes-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 6px;
        }
        
        .shape-btn {
            aspect-ratio: 1;
            border: 1px solid var(--border);
            background: var(--surface);
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            color: var(--text-dark);
        }
        
        .shape-btn:hover {
            background: var(--primary-light);
            border-color: var(--primary);
            transform: scale(1.05);
        }
        
        .custom-color-btn {
            aspect-ratio: 1;
            border: 2px dashed var(--border);
            border-radius: 4px;
            background: var(--surface);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            color: var(--text-muted);
            transition: all 0.15s;
        }
        
        .custom-color-btn:hover {
            border-color: var(--primary);
            color: var(--primary);
            transform: scale(1.1);
        }
        
        /* Quick Size Buttons */
        .quick-sizes {
            display: flex;
            gap: 4px;
            margin-bottom: 6px;
        }
        
        .size-quick-btn {
            padding: 4px 8px;
            border: 1px solid var(--border);
            background: var(--surface);
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.15s;
            font-size: 11px;
            font-weight: 600;
            color: var(--text-dark);
        }
        
        .size-quick-btn:hover {
            background: var(--primary-light);
            border-color: var(--primary);
        }
        
        .size-quick-btn.active {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        .font-icon {
            width: 28px;
            height: 28px;
            background: var(--primary-light);
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--primary);
            font-size: 13px;
            flex-shrink: 0;
        }
        
        .font-select {
            flex: 1;
            border: 1px solid var(--border);
            border-radius: 5px;
            padding: 6px 8px;
            font-size: 12px;
            background: var(--surface);
            cursor: pointer;
            outline: none;
        }
        
        .font-select:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 2px var(--primary-light);
        }
        
        /* Color Picker - Compact */
        .color-picker-compact {
            display: flex;
            gap: 6px;
            align-items: center;
        }
        
        .color-preview {
            width: 32px;
            height: 32px;
            border-radius: 5px;
            border: 2px solid var(--border);
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }
        
        .color-preview input[type="color"] {
            position: absolute;
            width: 200%;
            height: 200%;
            top: -50%;
            left: -50%;
            border: none;
            cursor: pointer;
        }
        
        .color-hex {
            width: 80px;
            border: 1px solid var(--border);
            border-radius: 5px;
            padding: 6px 8px;
            font-size: 11px;
            font-family: 'Courier New', monospace;
            text-transform: uppercase;
        }
        
        .color-hex:focus {
            border-color: var(--primary);
            outline: none;
        }
        
        /* Size Slider - More Compact */
        .size-control {
            display: flex;
            align-items: center;
            gap: 8px;
            flex: 1;
        }
        
        .size-display {
            min-width: 38px;
            text-align: center;
            font-weight: 700;
            color: var(--text-dark);
            font-size: 13px;
        }
        
        .size-slider {
            flex: 1;
            height: 4px;
            border-radius: 2px;
            background: var(--accent);
            outline: none;
            -webkit-appearance: none;
        }
        
        .size-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: var(--text-dark);
            cursor: pointer;
            border: 2px solid var(--surface);
            box-shadow: 0 2px 4px rgba(0,0,0,0.3);
        }
        
        .size-slider::-moz-range-thumb {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: var(--text-dark);
            cursor: pointer;
            border: 2px solid var(--surface);
            box-shadow: 0 2px 4px rgba(0,0,0,0.3);
        }
        
        /* Quick Actions - Compact Icon-Only with Groups */
        .quick-actions-grid {
            display: flex;
            gap: 8px;
            align-items: center;
        }
        
        .action-group {
            display: flex;
            gap: 4px;
            padding-right: 8px;
            border-right: 1px solid var(--border);
        }
        
        .action-group:last-child {
            border-right: none;
            padding-right: 0;
        }
        
        .quick-action {
            width: 28px;
            height: 28px;
            border: 1px solid var(--border);
            background: var(--surface);
            border-radius: 5px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.15s;
            position: relative;
        }
        
        .quick-action i {
            font-size: 13px;
            color: var(--text-dark);
        }
        
        .quick-action:hover {
            background: var(--primary-light);
            border-color: var(--primary);
            transform: scale(1.1);
        }
        
        .quick-action.primary {
            border-color: var(--primary);
        }
        
        .quick-action.primary i {
            color: var(--primary);
        }
        
        .quick-action.primary:hover {
            background: var(--primary);
        }
        
        .quick-action.primary:hover i {
            color: white;
        }
        
        .quick-action.danger {
            border-color: #dc3545;
        }
        
        .quick-action.danger i {
            color: #dc3545;
        }
        
        .quick-action.danger:hover {
            background: #dc3545;
        }
        
        .quick-action.danger:hover i {
            color: white;
        }
        
        /* Compact Section Headers */
        .section-header {
            font-weight: 700;
            color: var(--primary);
            margin-bottom: 10px;
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 8px 6px;
            border-bottom: 2px solid var(--primary);
            cursor: pointer;
            user-select: none;
            transition: all 0.2s;
            border-radius: 4px;
        }
        
        .section-header:hover {
            background: var(--primary-light);
        }
        
        .section-header i {
            font-size: 12px;
        }
        
        .section-header .toggle-icon {
            margin-left: auto;
            transition: transform 0.2s;
            font-size: 10px;
        }
        
        .section-header.collapsed .toggle-icon {
            transform: rotate(-90deg);
        }
        
        .section-content {
            overflow: hidden;
            transition: max-height 0.3s ease, opacity 0.2s ease;
            max-height: 1000px;
            opacity: 1;
        }
        
        .section-content.collapsed {
            max-height: 0;
            opacity: 0;
            margin-bottom: 0;
        }
        
        /* Compact Templates */
        .template-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }
        
        .template-thumb {
            border: 2px solid transparent;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
            padding: 6px;
            background: var(--bg-secondary);
        }
        
        .template-thumb:last-child {
            margin-bottom: 0;
        }
        
        .template-thumb:hover {
            border-color: var(--primary);
            transform: scale(1.03);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        
        .template-thumb.active {
            border-color: var(--primary);
            background: var(--primary-light);
            box-shadow: 0 0 12px rgba(120, 38, 76, 0.25);
        }
        
        .template-thumb img {
            width: 100%;
            border-radius: 4px;
        }
        
        .template-name {
            text-align: center;
            font-size: 11px;
            font-weight: 600;
            margin-top: 6px;
            color: var(--text-dark);
        }
        
        /* Compact Orientation */
        .orientation-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            margin-bottom: 16px;
        }
        
        .orientation-option {
            border: 2px solid var(--border);
            border-radius: 6px;
            padding: 10px 6px;
            cursor: pointer;
            transition: all 0.2s;
            text-align: center;
            background: var(--surface);
        }
        
        .orientation-option:hover {
            border-color: var(--primary);
            transform: translateY(-2px);
        }
        
        .orientation-option.active {
            border-color: var(--primary);
            background: var(--primary-light);
        }
        
        .orientation-option i {
            font-size: 20px;
            color: var(--primary);
            display: block;
            margin-bottom: 4px;
        }
        
        .orientation-option .name {
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
        }
        
        .orientation-option .size {
            font-size: 9px;
            color: var(--text-muted);
        }
        
        /* Compact Layer Panel */
        .layer-panel {
            background: var(--bg-secondary);
            border-radius: 6px;
            padding: 8px;
            max-height: 220px;
            min-height: 80px;
            overflow-y: auto;
            border: 1px solid var(--border);
        }
        
        .layer-panel:empty::before {
            content: 'No layers yet';
            display: flex;
            align-items: center;
            justify-content: center;
            height: 64px;
            color: var(--text-muted);
            font-size: 11px;
            font-style: italic;
        }
        
        .layer-item {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 5px;
            padding: 8px 10px;
            margin-bottom: 5px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
            transition: all 0.15s;
            font-size: 12px;
        }
        
        .layer-item:hover {
            background: var(--primary-light);
            border-color: var(--primary);
            transform: translateX(3px);
        }
        
        .layer-item.active {
            background: var(--primary-light);
            border-color: var(--primary);
            font-weight: 600;
        }
        
        .layer-item.locked {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        .layer-item i {
            font-size: 12px;
        }
        
        /* Compact Background Color */
        .color-swatch-grid {
            display: grid;
            grid-template-columns: repeat(6, 1fr);
            gap: 4px;
        }
        
        .color-swatch {
            aspect-ratio: 1;
            border-radius: 4px;
            cursor: pointer;
            border: 2px solid transparent;
            transition: all 0.2s;
        }
        
        .color-swatch:hover {
            transform: scale(1.1);
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        }
        
        .color-swatch.active {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px var(--primary-light);
        }
        
        /* Save Status */
        .save-status {
            margin-left: auto;
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            background: rgba(45, 45, 45, 0.95);
            border-radius: 16px;
            font-size: 11px;
            font-weight: 600;
        }
        
        /* Tooltips */
        .icon-btn[title]:hover::after,
        .icon-btn-sm[title]:hover::after,
        .quick-action[title]:hover::after {
            content: attr(title);
            position: absolute;
            bottom: -28px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0,0,0,0.85);
            color: white;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 11px;
            white-space: nowrap;
            z-index: 1000;
            pointer-events: none;
        }
        
        .icon-btn,
        .icon-btn-sm,
        .quick-action {
            position: relative;
        }
        
        /* Responsive */
        @media (max-width: 1200px) {
            .designer-layout {
                grid-template-columns: 160px 1fr 240px;
                gap: 12px;
            }
        }
        
        @media (max-width: 992px) {
            .designer-layout {
                grid-template-columns: 1fr;
            }
            
            .template-sidebar,
            .controls-sidebar {
                position: static;
                max-height: none;
            }
        }
        
        @media (max-width: 767.98px) {
            .wine-label-designer-wrapper {
                padding-top: 56px;
            }
            
            .top-toolbar {
                padding: 6px 10px;
                height: 56px;
            }
            
            /* Hide desktop toolbar sections on mobile */
            .toolbar-desktop {
                display: none !important;
            }
            
            .icon-btn {
                width: 32px;
                height: 32px;
                font-size: 14px;
            }
        }
        
        /* Mobile Toolbar Menu */
        .mobile-toolbar-menu {
            position: fixed;
            top: 56px;
            left: 0;
            right: 0;
            background: var(--bg-secondary);
            border-bottom: 2px solid var(--primary);
            box-shadow: 0 4px 12px rgba(0,0,0,0.5);
            z-index: 999;
            max-height: calc(100vh - 56px);
            overflow-y: auto;
            padding: 12px;
        }
        
        .mobile-menu-section {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
            margin-bottom: 12px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--border);
        }
        
        .mobile-menu-section:last-child {
            border-bottom: none;
            margin-bottom: 0;
            padding-bottom: 0;
        }
        
        .mobile-menu-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 12px 8px;
            border: 1px solid var(--border);
            background: var(--surface);
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
            color: var(--text-dark);
            font-size: 14px;
        }
        
        .mobile-menu-btn i {
            font-size: 18px;
        }
        
        .mobile-menu-btn span {
            font-size: 11px;
            text-align: center;
        }
        
        .mobile-menu-btn:hover {
            background: var(--primary-light);
            border-color: var(--primary);
        }
        
        .mobile-menu-btn:active {
            transform: scale(0.95);
        }
        
        .mobile-menu-btn:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }
        
        .mobile-menu-btn.primary {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        .mobile-menu-btn.primary:hover {
            background: var(--primary-dark);
        }
        
        .mobile-menu-btn.success {
            background: #065f46;
            color: white;
            border-color: #065f46;
        }
        
        .mobile-menu-btn.success:hover {
            background: #064e3b;
        }
        
        /* Saved Design Items */
        .saved-design-item {
            border: 2px solid var(--border);
            border-radius: 8px;
            padding: 12px;
            cursor: pointer;
            transition: all 0.2s;
            text-align: center;
        }
        
        .saved-design-item:hover {
            border-color: var(--primary);
            background: var(--primary-light);
            transform: translateY(-2px);
        }
        
        .saved-design-thumb {
            width: 100%;
            border-radius: 6px;
            border: 1px solid var(--border);
        }
        
        /* Scrollbar */
        .controls-sidebar::-webkit-scrollbar,
        .layer-panel::-webkit-scrollbar {
            width: 6px;
        }
        
        .controls-sidebar::-webkit-scrollbar-track,
        .layer-panel::-webkit-scrollbar-track {
            background: var(--bg-secondary);
            border-radius: 3px;
        }
        
        .controls-sidebar::-webkit-scrollbar-thumb,
        .layer-panel::-webkit-scrollbar-thumb {
            background: var(--primary);
            border-radius: 3px;
        }
        
        /* AI Gallery Styles */
        .ai-gallery-filters {
            display: flex;
            gap: 4px;
            margin-bottom: 12px;
            flex-wrap: wrap;
        }
        
        .filter-btn {
            flex: 1;
            min-width: 60px;
            padding: 6px 8px;
            border: 1px solid var(--border);
            background: var(--surface);
            color: var(--text-muted);
            border-radius: 4px;
            font-size: 11px;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
        }
        
        .filter-btn:hover {
            border-color: var(--primary);
            background: var(--primary-light);
        }
        
        .filter-btn.active {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        .ai-gallery-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
            max-height: 400px;
            overflow-y: auto;
        }
        
        .ai-gallery-item {
            position: relative;
            aspect-ratio: 3/4;
            border-radius: 6px;
            overflow: hidden;
            cursor: pointer;
            border: 2px solid var(--border);
            transition: all 0.2s;
        }
        
        .ai-gallery-item:hover {
            border-color: var(--primary);
            transform: scale(1.02);
        }
        
        .ai-gallery-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .ai-gallery-item-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(transparent, rgba(0,0,0,0.8));
            padding: 6px;
            opacity: 0;
            transition: opacity 0.2s;
        }
        
        .ai-gallery-item:hover .ai-gallery-item-overlay {
            opacity: 1;
        }
        
        .ai-gallery-item-prompt {
            font-size: 10px;
            color: white;
            line-height: 1.3;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        .ai-gallery-item-actions {
            position: absolute;
            top: 4px;
            right: 4px;
            display: flex;
            gap: 4px;
        }
        
        .ai-gallery-action-btn {
            width: 24px;
            height: 24px;
            border-radius: 4px;
            background: rgba(0,0,0,0.6);
            border: 1px solid rgba(255,255,255,0.2);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 11px;
            transition: all 0.2s;
        }
        
        .ai-gallery-action-btn:hover {
            background: var(--primary);
            border-color: var(--primary);
        }
        
        .ai-gallery-action-btn.starred {
            color: #ffd700;
            background: rgba(255,215,0,0.2);
        }
        
        .ai-gallery-loading {
            grid-column: 1 / -1;
            text-align: center;
            padding: 40px 20px;
            color: var(--text-muted);
        }
        
        .ai-gallery-empty {
            grid-column: 1 / -1;
            text-align: center;
            padding: 40px 20px;
            color: var(--text-muted);
            font-size: 12px;
        }
/* AI Generator Modal Styles */
.ai-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.ai-modal-content {
    position: relative;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    margin: 5% auto;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    animation: slideDown 0.2s ease-out;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

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

.ai-modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.ai-modal-close:hover {
    color: var(--text-dark);
    background: var(--surface);
}

.ai-error-message {
    background: #3d1515;
    border: 1px solid #5a1f1f;
    color: #ff6b6b;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

.ai-example-btn {
    padding: 6px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-dark);
}

.ai-example-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.ai-style-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.ai-style-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 8px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-dark);
    font-size: 11px;
}

.ai-style-btn i {
    font-size: 18px;
    color: var(--text-muted);
}

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

.ai-style-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.ai-style-btn.active i {
    color: white;
}

.ai-enhancement-toggle {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.enhancement-btn {
    padding: 6px 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-dark);
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

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

.enhancement-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.ai-success-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #2d5a2d;
    color: white;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid #4a8a4a;
    z-index: 10001;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease-out;
    font-size: 14px;
}

.ai-success-notification.show {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 768px) {
    .ai-modal-content {
        margin: 10% 5%;
        padding: 20px;
        width: auto;
    }
    
    .ai-example-btn {
        flex: 1 1 calc(50% - 3px);
    }
}