/* === Product Editor Styles - 商品编辑器样式 === */

/* Container Query Support for Fluid Responsive Editor */
/* === Container Query Enforcement === */
.product-editor {
    container-type: inline-size !important;
    container-name: editor !important;
    width: 100%;
    /* Visually debug sizing */
    /* border: 2px dashed red; */ 
}

.product-editor .editor-header {
    padding: 0 clamp(12px, 2cqi + 4px, 32px);
    height: clamp(56px, 4cqi + 36px, 84px);
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Fluid Scaling for Editor Elements */
.product-editor .editor-heading {
    font-size: clamp(1.2rem, 2cqi + 0.6rem, 2.5rem);
}

.product-editor .editor-body {
    padding: clamp(12px, 2cqi + 4px, 32px);
}

.product-editor .edit-section {
    margin-bottom: clamp(20px, 2cqi + 12px, 40px);
}

.product-editor .edit-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    margin-bottom: clamp(12px, 1cqi + 4px, 20px);
}

.product-editor .edit-section-label {
    font-size: clamp(14px, 1.5cqi + 8px, 28px);
}

.product-editor .edit-section-tip {
    font-size: clamp(11px, 0.8cqi + 8px, 18px);
}

.product-editor .form-group {
    margin-bottom: clamp(12px, 1.5cqi + 6px, 28px);
}

.product-editor .form-group label, 
.product-editor .control-label, 
.product-editor .item-card-title {
    font-size: clamp(12px, 1cqi + 8px, 22px);
}

.product-editor .form-input, 
.product-editor .form-textarea,
.product-editor .form-select, 
.product-editor .item-title-input {
    font-size: clamp(13px, 1.2cqi + 9px, 20px);
    padding: clamp(8px, 0.8cqi + 4px, 16px) clamp(10px, 1cqi + 6px, 24px);
    border-radius: 5px;
}

.product-editor .item-card, 
.product-editor .compact-modern-card {
    background-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 0.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    padding: clamp(10px, 2cqi + 4px, 24px);
    gap: clamp(12px, 1.5cqi + 6px, 20px);
    margin-bottom: clamp(12px, 1cqi + 4px, 16px);
    transition: all 0.3s ease;
    overflow: visible;
    position: relative;
    background-image: 
        radial-gradient(rgba(255, 255, 255, 0.8) 1px, transparent 1px);
    background-size: 30px 30px;
    background-position: 0 0;
    background-blend-mode: overlay;
}

.product-editor .item-card::after, 
.product-editor .compact-modern-card::after {
    content: "步落";
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    letter-spacing: 1px;
}

.product-editor .item-card:hover,
.product-editor .compact-modern-card:hover {
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03);
}

.product-editor .item-list.tight-list .item-card,
.product-editor .item-list.tight-list .compact-modern-card {
    margin-bottom: 3px !important;
}

.product-editor .compact-card-body {
    display: flex;
    align-items: stretch;
    gap: clamp(12px, 1.5cqi + 6px, 24px);
    margin-top: clamp(12px, 1cqi + 4px, 20px);
}

.product-editor .compact-image-upload {
    width: clamp(80px, 8cqi + 40px, 160px);
    height: clamp(80px, 8cqi + 40px, 160px);
    border-radius: clamp(6px, 0.5cqi + 4px, 12px);
}

.product-editor .compact-image-upload .upload-text {
    font-size: clamp(10px, 0.8cqi + 6px, 18px);
}

.product-editor .compact-image-upload .upload-icon svg {
    width: clamp(16px, 1cqi + 12px, 24px);
    height: clamp(16px, 1cqi + 12px, 24px);
}

.product-editor .compact-form-fields {
    gap: 8px;
    min-height: 0;
}

.product-editor .compact-input, 
.product-editor .compact-textarea, 
.product-editor .compact-select {
    font-size: clamp(13px, 1.2cqi + 9px, 20px);
    padding: 0 clamp(8px, 0.8cqi + 4px, 16px);
    border-radius: 5px;
    height: 40px;
    display: flex;
    align-items: center;
}

.product-editor .compact-textarea {
    resize: none;
    line-height: 1.4;
    padding-top: clamp(6px, 0.6cqi + 4px, 12px);
}

/* Responsive Icon Select for Product Advantage */
.product-editor .custom-select-container {
    width: clamp(60px, 4cqi + 40px, 100px) !important;
}

.product-editor .custom-select-trigger {
    padding: clamp(6px, 0.6cqi + 4px, 12px) clamp(8px, 0.8cqi + 4px, 16px) !important;
    border-radius: clamp(6px, 0.4cqi + 4px, 10px) !important;
}

.product-editor .custom-select-trigger span:first-child {
    width: clamp(16px, 1cqi + 12px, 24px) !important;
    height: clamp(16px, 1cqi + 12px, 24px) !important;
}

.product-editor .custom-select-trigger span:last-child {
    width: clamp(12px, 0.8cqi + 8px, 18px) !important;
    height: clamp(12px, 0.8cqi + 8px, 18px) !important;
}

.product-editor .compact-row {
    display: flex;
    gap: clamp(8px, 1cqi + 4px, 16px);
    margin-bottom: clamp(8px, 1cqi + 4px, 16px);
    align-items: stretch;
}

.product-editor .compact-row .compact-input {
    flex: 1;
}

.product-editor .custom-select-container {
    position: relative;
    display: flex;
    width: clamp(80px, 8cqi + 40px, 120px);
}

.product-editor .custom-select-trigger {
    padding: clamp(6px, 0.6cqi + 4px, 12px);
    border-radius: 6px;
    width: 100%;
    border: 1px solid var(--border-color);
    background-color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-editor .select-icon {
    width: clamp(16px, 1cqi + 12px, 24px);
    height: clamp(16px, 1cqi + 12px, 24px);
}

.product-editor .select-arrow {
    width: clamp(12px, 0.8cqi + 8px, 18px);
    height: clamp(12px, 0.8cqi + 8px, 18px);
}

.product-editor .custom-select-trigger:hover {
    border-color: var(--accent-color);
    background-color: #f8fafc;
}

.product-editor .select-icon, 
.product-editor .select-option-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.product-editor .select-arrow {
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-editor .custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-top: 4px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px;
}

.product-editor .custom-select-option {
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
    color: var(--text-primary);
}

.product-editor .compact-align-toggle {
    padding: clamp(2px, 0.2cqi + 1px, 4px);
    border-radius: clamp(6px, 0.4cqi + 4px, 10px);
}

.product-editor .compact-align-toggle .align-btn {
    width: clamp(24px, 1cqi + 20px, 36px);
    height: clamp(24px, 1cqi + 20px, 36px);
    border-radius: clamp(4px, 0.3cqi + 2px, 8px);
}

.product-editor .compact-align-toggle .align-btn svg {
    width: clamp(14px, 0.6cqi + 11px, 20px);
    height: clamp(14px, 0.6cqi + 11px, 20px);
}

.product-editor .item-list {
    gap: clamp(12px, 1.5cqi + 6px, 24px);
}

/* 内联行列表：行无卡片包裹，需要与 edit-section-header 相同的左右 padding 保证对齐 */
.product-editor .item-list.inline-row-list {
    padding: 0;
}

.product-editor .header-right-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* Card Header Action Alignment - Pull outward to align with section buttons */
.product-editor .item-card .header-right-controls,
.product-editor .compact-modern-card .header-right-controls {
    margin-right: calc(-1 * clamp(10px, 2cqi + 4px, 24px) + 16px); 
}

.product-editor .select-option-icon {
    width: clamp(16px, 1cqi + 12px, 24px) !important;
    height: clamp(16px, 1cqi + 12px, 24px) !important;
}

.product-editor .custom-select-option {
    padding: clamp(6px, 0.6cqi + 4px, 12px) !important;
}

.product-editor .custom-select-dropdown {
    margin-top: clamp(4px, 0.4cqi + 2px, 8px) !important;
    gap: clamp(4px, 0.4cqi + 2px, 8px) !important;
    padding: clamp(4px, 0.4cqi + 2px, 8px) !important;
}

.product-editor .compact-image-upload + .compact-form-fields .compact-input,
.product-editor .compact-image-upload + .compact-form-fields .compact-textarea {
    height: auto;
    flex: 1;
    min-height: 0;
    resize: none;
    padding: clamp(4px, 0.4cqi + 2px, 8px) clamp(6px, 0.6cqi + 4px, 12px);
    font-size: clamp(11px, 0.8cqi + 6px, 16px);
}

.product-editor .item-list.tight-list {
    gap: 3px;
}

.product-editor .item-desc-input {
    font-size: clamp(13px, 1.2cqi + 9px, 20px);
    padding: clamp(8px, 0.6cqi + 4px, 14px) clamp(10px, 0.8cqi + 6px, 20px);
}

.product-editor .add-item-btn, 
.product-editor .item-remove-btn,
.product-editor .plus-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
    border-radius: 6px;
    background: var(--bg-main, #ffffff);
    color: var(--text-secondary, #64748b);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
}

.product-editor .add-item-btn:hover, 
.product-editor .item-remove-btn:hover,
.product-editor .plus-add-btn:hover {
    background: var(--bg-hover, #f8fafc);
    border-color: var(--accent-color, #C084FC);
    color: var(--accent-color, #C084FC);
    transform: none;
}

.product-editor .add-item-btn svg, 
.product-editor .item-remove-btn svg,
.product-editor .plus-add-btn svg {
    width: 14px;
    height: 14px;
    display: block;
}

.product-editor .notice-card-item {
    font-size: clamp(16px, 1.5cqi + 10px, 32px);
    gap: clamp(10px, 1cqi + 6px, 20px);
}

.product-editor .ql-editor, 
.product-editor .ql-editor.ql-blank::before {
    font-size: clamp(13px, 1.2cqi + 9px, 26px);
}

.product-editor .image-upload-area.large .upload-placeholder {
    height: clamp(180px, 15cqi + 100px, 360px);
}

.product-editor .element-style-controls {
    gap: clamp(12px, 1.5cqi + 6px, 28px);
}

.product-editor .color-picker-wrapper {
    padding: clamp(4px, 0.5cqi + 2px, 10px);
}

.product-editor .color-picker-wrapper .color-value {
    font-size: clamp(12px, 1cqi + 8px, 22px);
}

.product-editor .unified-add-buttons {
    padding: 0.25rem clamp(10px, 2cqi + 4px, 32px) 0;
}

/* Editor Notice List */
.product-editor .editor-notice-list {
    display: flex;
    flex-direction: column;
    border: 0.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
.product-editor .editor-notice-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: clamp(8px, 0.8cqi + 4px, 14px) clamp(12px, 1cqi + 6px, 20px);
    transition: background-color 0.15s ease;
}
.product-editor .editor-notice-item:not(:last-child) {
    border-bottom: 1px solid #f1f5f9;
}
.product-editor .editor-notice-item:hover {
    background-color: #f8fafc;
}
.product-editor .editor-notice-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
}
.product-editor .editor-notice-icon svg {
    width: 18px;
    height: 18px;
}
.product-editor .editor-notice-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    outline: none;
    font-size: clamp(13px, 1.2cqi + 9px, 20px);
    color: var(--text-primary);
    font-family: 'AiDianQuYaYuan', sans-serif;
    font-weight: 400;
    padding: 0;
    min-width: 0;
    height: auto;
    line-height: 1.5;
    box-shadow: none !important;
}
.product-editor .editor-notice-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}
.product-editor .editor-notice-input:focus {
    color: var(--accent-color);
}
.product-editor .editor-notice-remove {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.15s ease;
    padding: 0;
}
.product-editor .editor-notice-item:hover .editor-notice-remove {
    opacity: 0.5;
}
.product-editor .editor-notice-remove:hover {
    opacity: 1 !important;
    background-color: var(--error-bg);
    color: var(--error-text);
}
.product-editor .editor-notice-remove svg {
    width: 12px;
    height: 12px;
}

/* === Icon Picker (Guarantee Editor) === */
.product-editor .icon-picker {
    position: relative;
    width: clamp(40px, 3cqi + 28px, 64px);
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0 clamp(6px, 0.4cqi + 4px, 12px);
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: clamp(6px, 0.4cqi + 4px, 10px);
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.product-editor .icon-picker:hover {
    border-color: var(--accent-color, #C084FC);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.1);
}
.product-editor .icon-picker-selected {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color, #C084FC);
}
.product-editor .icon-picker-selected svg {
    width: clamp(16px, 1cqi + 12px, 24px);
    height: clamp(16px, 1cqi + 12px, 24px);
}
.product-editor .icon-picker-arrow {
    color: rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    transition: transform 0.2s;
}

.product-editor .icon-picker-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    animation: iconPickerIn 0.15s ease;
}
@keyframes iconPickerIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.product-editor .icon-picker-option {
    width: 100%;
    height: clamp(30px, 2.5cqi + 18px, 42px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.4);
    transition: all 0.15s ease;
}
.product-editor .icon-picker-option:hover {
    background: rgba(192, 132, 252, 0.1);
    color: var(--accent-color, #C084FC);
}
.product-editor .icon-picker-option.active {
    background: var(--accent-color, #C084FC);
    color: #fff;
    box-shadow: 0 2px 8px rgba(192, 132, 252, 0.35);
}
.product-editor .icon-picker-option svg {
    width: clamp(16px, 1cqi + 10px, 22px);
    height: clamp(16px, 1cqi + 10px, 22px);
}

/* === Review Editor Card === */
/* Inherit fluid font-size for all children */
.product-editor .review-editor-card * {
    font-size: inherit;
}

.product-editor .review-editor-card {
    padding: clamp(16px, 3cqi, 48px);
    gap: clamp(8px, 1cqi, 20px);
    margin-bottom: clamp(12px, 2cqi, 32px);
    border-radius: clamp(8px, 0.5cqi, 20px);
    background: #fff;
    border: 0.5px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    /* Set base font-size for inheritance */
    font-size: clamp(14px, 1.2cqi, 22px); 
}

.product-editor .review-editor-header {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.5cqi, 24px);
    padding-bottom: clamp(10px, 1cqi, 24px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: clamp(12px, 1.5cqi, 24px);
}

.product-editor .review-avatar-circle {
    width: clamp(24px, 2cqi + 16px, 36px);
    height: clamp(24px, 2cqi + 16px, 36px);
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    border: 1.5px dashed rgba(0, 0, 0, 0.15);
    color: rgba(0, 0, 0, 0.25);
    background: rgba(255, 255, 255, 0.6);
    transition: all 0.2s;
}

.product-editor .review-avatar-circle:hover {
    border-color: var(--accent-color, #C084FC);
    color: var(--accent-color, #C084FC);
    background: rgba(192, 132, 252, 0.05);
    box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.1);
}

.product-editor .review-avatar-circle svg {
    width: clamp(12px, 0.6cqi + 8px, 18px);
    height: clamp(12px, 0.6cqi + 8px, 18px);
}

.product-editor .review-avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.product-editor .review-header-name-input {
    flex: 1;
    min-width: 0;
    font-size: clamp(14px, 1.5cqi, 24px);
    font-weight: 600;
    color: var(--text-primary, #1a1a2e);
    border: none;
    border-bottom: 1.5px solid rgba(0, 0, 0, 0.06);
    background: transparent;
    padding: clamp(4px, 0.5cqi, 8px) 0;
    outline: none;
    transition: border-color 0.2s;
}

.product-editor .review-header-name-input:focus {
    border-bottom-color: var(--accent-color, #C084FC);
}

.product-editor .review-header-name-input::placeholder {
    color: rgba(0, 0, 0, 0.25);
    font-weight: 400;
}

.product-editor .review-editor-body {
    display: flex;
    flex-direction: column;
}

.product-editor .review-editor-row {
    display: flex;
    gap: clamp(12px, 2cqi, 32px);
    align-items: flex-end;
}

.product-editor .review-editor-field {
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 0.5cqi, 12px);
}

.product-editor .review-editor-label {
    font-size: clamp(11px, 0.8cqi, 16px);
    font-weight: 500;
    color: rgba(0, 0, 0, 0.4);
    letter-spacing: 0.02em;
    padding-left: 2px;
}

.product-editor .review-input {
    font-size: clamp(14px, 1.2cqi, 22px) !important;
    padding: clamp(8px, 0.8cqi, 16px) clamp(12px, 1cqi, 24px) !important;
    border-radius: clamp(6px, 0.5cqi, 12px) !important;
    border: 1.5px solid rgba(0, 0, 0, 0.08) !important;
    background: rgba(255, 255, 255, 0.8) !important;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s !important;
    height: auto !important;
}

.product-editor .review-input:focus {
    border-color: var(--accent-color, #C084FC) !important;
    box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.1) !important;
    background: #fff !important;
    outline: none !important;
}

.product-editor .review-rating-input {
    text-align: center;
    font-weight: 600;
}

.product-editor .review-date-input {
    color: var(--text-primary, #1a1a2e);
    border: 1.5px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.8) !important;
    font-size: clamp(14px, 1.2cqi, 22px) !important;
    padding: clamp(8px, 0.8cqi, 16px) clamp(12px, 1cqi, 24px) !important;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s !important;
}

.product-editor .review-date-input:focus {
    border-color: var(--accent-color, #C084FC) !important;
    box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.1) !important;
    background: #fff !important;
    outline: none !important;
}

.product-editor .review-textarea {
    width: 100%;
    font-size: clamp(14px, 1.2cqi, 22px) !important;
    padding: clamp(8px, 0.8cqi, 16px) clamp(12px, 1cqi, 24px) !important;
    border-radius: clamp(6px, 0.5cqi, 12px) !important;
    border: 1.5px solid rgba(0, 0, 0, 0.08) !important;
    background: rgba(255, 255, 255, 0.8) !important;
    resize: vertical;
    min-height: clamp(60px, 6cqi, 120px);
    line-height: 1.5;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s !important;
}


.product-editor .review-textarea:focus {
    border-color: var(--accent-color, #C084FC) !important;
    box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.1) !important;
    background: #fff !important;
    outline: none !important;
}

/* Align Editor and Section header controls with inner content */
.product-editor .editor-header .header-right-controls,
.product-editor .edit-section-header .header-right-controls {
    margin-right: 18px;
}

.width-slider-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.slider-label {
    font-size: 12px;
    color: #64748B;
}

/* === Ingredient Editor Card (Sweet Ingredients) — ultra compact === */
.product-editor .ingredient-editor-card {
    position: relative;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    padding: 0;
    margin-bottom: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.product-editor .ingredient-editor-card:hover {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.product-editor .ingredient-editor-body {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    align-items: center;
}

/* 左侧：图片上传 + 对齐按钮 */
.product-editor .ingredient-editor-thumb-wrap {
    position: relative;
    flex: 0 0 80px;
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

/* 对齐按钮行（图片下方，间距5px） */
.product-editor .ingredient-editor-align {
    display: flex;
    gap: 1px;
    background: #f0f0f0;
    border-radius: 4px;
    padding: 1px;
    margin-top: 5px;
}
.product-editor .ingredient-editor-align .align-btn {
    width: 24px;
    height: 20px;
    border: none;
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    transition: all 0.15s;
    padding: 0;
}
.product-editor .ingredient-editor-align .align-btn:hover {
    color: #6366f1;
}
.product-editor .ingredient-editor-align .align-btn.active {
    background: #fff;
    color: #6366f1;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.product-editor .ingredient-editor-align .align-btn svg {
    width: 12px;
    height: 12px;
}

/* 右侧表单区 */
.product-editor .ingredient-editor-fields {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.product-editor .ingredient-editor-fields .form-field.compact {
    margin-bottom: 0;
}
.product-editor .ingredient-editor-fields .form-field.compact .form-input {
    font-size: 12px;
    padding: 5px 8px;
    border-radius: 5px;
    border: 1px solid rgba(0,0,0,0.07);
    background: rgba(255,255,255,0.8);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.product-editor .ingredient-editor-fields .form-field.compact .form-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99,102,241,0.08);
    outline: none;
}

/* 名称字段：内嵌删除按钮 */
.product-editor .ingredient-editor-fields .name-field {
    position: relative;
}
.product-editor .ingredient-editor-fields .name-field .form-input {
    padding-right: 28px;
}
.product-editor .inline-remove-btn {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    padding: 0;
    transition: color 0.15s, background 0.15s;
}
.product-editor .inline-remove-btn:hover {
    color: #e53935;
    background: transparent;
}
.product-editor .inline-remove-btn svg {
    width: 14px;
    height: 14px;
}

/* Sweet Poses Gallery Item Hover */
.image-upload-area:hover .hover-overlay {
    opacity: 1 !important;
}