/* === Product Form Styles - 表单样式 === */
.edit-section {
    margin-bottom: 24px;
}

.edit-section:last-child {
    margin-bottom: 0;
}

.edit-section-label {
    font-size: 13px;
    font-weight: normal;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.edit-section-tip {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.edit-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 0;
}

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

.add-item-btn:hover {
    background: var(--bg-hover, #f8fafc);
    border-color: var(--accent-color, #C084FC);
    color: var(--accent-color, #C084FC);
}

.item-card.compact-modern-card {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

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

.item-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.item-card-title {
    font-size: 12px;
    font-weight: normal;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

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

.item-remove-btn:hover {
    background: var(--bg-hover, #f8fafc);
    border-color: var(--accent-color, #C084FC);
    color: var(--accent-color, #C084FC);
}

.item-remove-btn svg {
    width: 14px;
    height: 14px;
    display: block;
    pointer-events: none;
}

/* Custom Select & Icon Picker in Cards */
.card-icon-picker {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    position: relative;
}

.product-editor .card-icon-trigger {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    border: 0.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--macaron-hot-pink);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.product-editor .card-icon-trigger span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
}

.card-icon-trigger:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.card-icon-dropdown {
    position: absolute;
    top: 50%;
    left: calc(100% + 12px);
    width: auto;
    white-space: nowrap;
    background: transparent;
    padding: 6px;
    display: flex;
    flex-direction: row;
    gap: 5px;
    z-index: 1000;
    transform-origin: left center;
    transform: translateY(-50%);
    animation: dropdownExpandRight 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownExpandRight {
    from { opacity: 0; transform: translateY(-50%) scale(0.8) translateX(-15px); }
    to { opacity: 1; transform: translateY(-50%) scale(1) translateX(0); }
}

.card-icon-option {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.card-icon-option:hover {
    background: rgba(255, 255, 255, 0.6);
    color: var(--macaron-hot-pink);
    transform: scale(1.1);
}

.card-icon-option.active {
    background: #ffffff;
    color: var(--macaron-hot-pink);
    box-shadow: 0 2px 8px rgba(244, 143, 177, 0.2);
}

.add-item-btn svg {
    width: 14px;
    height: 14px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group.half {
    flex: 1;
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: normal;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    height: 40px;
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 0.3px solid rgba(0, 0, 0, 0.15);
    border-radius: 5px;
    font-size: 13px;
    color: var(--text-primary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.form-textarea {
    height: auto;
    min-height: 40px;
    resize: none;
    overflow-y: hidden;
    line-height: 1.5;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--accent-color);
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(103, 119, 141, 0.08);
}

.form-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vertical-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.full-width {
    width: 100% !important;
}

.item-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-label {
    font-size: 11px;
    font-weight: normal;
    color: var(--text-muted);
}

.color-picker-input {
    width: 100%;
    height: 36px;
    padding: 2px;
    border: 0.3px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.color-picker-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-input::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

.color-picker-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 0.3px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 4px;
    transition: all 0.2s;
}

.color-picker-wrapper:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.color-picker-wrapper .color-picker-input {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 4px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1) inset;
}

.color-picker-wrapper .color-picker-input::-webkit-color-swatch {
    border-radius: 4px;
}

.color-picker-wrapper .color-value {
    font-family: var(--font-mono, monospace);
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    padding-right: 8px;
}

.element-style-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.control-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: normal;
}

.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 0.3px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-primary);
    background: #fff;
    transition: all 0.2s;
}

.form-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.segmented-control {
    display: flex;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
}

.segmented-control .segment {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    color: #64748b;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.segmented-control .segment svg {
    width: 16px;
    height: 16px;
}

.segmented-control .segment:hover {
    color: var(--text-primary);
}

.segmented-control .segment.active {
    background: #ffffff;
    color: var(--accent-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-weight: 500;
}

/* Tag List */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tag-input {
    padding: 8px 12px;
    border: 0.3px solid rgba(0, 0, 0, 0.15);
    border-radius: 20px;
    font-size: 12px;
    width: 120px;
}

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

.tag-remove {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fee2e2;
    color: #ef4444;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.tag-remove svg {
    width: 12px;
    height: 12px;
}
