/* Product create / edit — reference layout, boutique theme, responsive */

.pf-form {
    max-width: 1280px;
    margin: 0 auto;
}

.pf-alert {
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: var(--pos-radius, 12px);
    background: #fde8ee;
    border: 1px solid #f5c6cb;
    color: #c0392b;
    font-size: 0.85rem;
}

.pf-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

@media (min-width: 1024px) {
    .pf-layout {
        grid-template-columns: minmax(0, 2fr) minmax(280px, 360px);
    }

    .pf-actions-mobile {
        display: none;
    }
}

.pf-actions-mobile {
    display: block;
}

@media (max-width: 1023px) {
    .pf-main {
        order: 1;
    }

    .pf-sidebar {
        order: 2;
    }

    .pf-actions-mobile {
        order: 3;
    }
}

.pf-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.pf-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

@media (min-width: 1024px) {
    .pf-sidebar-inner {
        position: sticky;
        top: 12px;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
}

.pf-card {
    background: var(--pos-card, #fff);
    border: 1px solid var(--pos-border, #eadde4);
    border-radius: var(--pos-radius, 12px);
    padding: 16px 18px;
    box-shadow: var(--pos-shadow, 0 4px 16px rgba(107, 21, 53, 0.06));
}

.pf-card-title {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--pos-maroon, #6b1535);
    margin-bottom: 10px;
}

.pf-card-heading {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pos-maroon, #6b1535);
    margin: 0 0 14px;
    padding-bottom: 0;
    border-bottom: none;
}

.pf-card .pf-data-shell {
    margin: 0;
}

.pf-card .pf-data-shell .pf-type-picker {
    margin-bottom: 4px;
}

.pf-input,
.pf-textarea,
.pf-select,
.pf-form .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--pos-border, #eadde4);
    border-radius: 8px;
    font-size: 0.88rem;
    font-family: inherit;
    color: var(--pos-text, #2a1520);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.pf-input:focus,
.pf-textarea:focus,
.pf-select:focus,
.pf-form .form-control:focus {
    outline: none;
    border-color: var(--pos-pink, #e91e8c);
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.1);
}

.pf-input--title {
    font-size: 1rem;
    font-weight: 600;
}

.pf-permalink {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--pos-border, #eadde4);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.pf-permalink:focus-within {
    border-color: var(--pos-pink, #e91e8c);
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.1);
}

.pf-permalink-prefix {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    background: var(--pos-pink-soft, #fce4ef);
    color: var(--pos-muted, #8a6b78);
    font-size: 0.72rem;
    border-right: 1px solid var(--pos-border, #eadde4);
    white-space: nowrap;
    max-width: 55%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-permalink-input {
    flex: 1;
    min-width: 0;
    border: none;
    padding: 10px 12px;
    font-size: 0.85rem;
    background: transparent;
}

.pf-permalink-input:focus {
    outline: none;
    box-shadow: none;
}

.pf-hint {
    margin: 8px 0 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--pos-muted, #8a6b78);
    word-break: normal;
    overflow-wrap: anywhere;
}

.pf-hint a {
    color: var(--pos-maroon, #6b1535);
    text-decoration: none;
}

.pf-actions-desktop {
    display: none;
    gap: 10px;
    justify-content: flex-end;
}

@media (min-width: 1024px) {
    .pf-actions-desktop {
        display: flex;
    }
}

.pf-actions-mobile {
    display: block;
    margin-top: 0;
}

.pf-actions-mobile .pf-btn-primary {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 0.95rem;
}

.pf-actions-mobile .pf-btn-cancel {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--pos-muted, #8a6b78);
    text-decoration: none;
    border: none;
    background: transparent;
    padding: 0;
}

.pf-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(145deg, var(--pos-maroon, #6b1535), var(--pos-maroon-light, #8a1f47));
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.pf-btn-primary:hover {
    opacity: 0.92;
}

.pf-btn-cancel {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border: 1px solid var(--pos-border, #eadde4);
    border-radius: 8px;
    background: #fff;
    color: var(--pos-maroon, #6b1535);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

.pf-file-name {
    font-size: 0.72rem;
    color: var(--pos-muted, #8a6b78);
    margin: 6px 0 0;
    word-break: break-all;
}

.pf-image-preview {
    position: relative;
    display: none;
    margin-top: 12px;
    border: 1px dashed var(--pos-border, #eadde4);
    border-radius: 8px;
    padding: 8px;
    background: var(--pos-pink-soft, #fce4ef);
    align-items: center;
    justify-content: center;
}

.pf-image-preview.is-visible {
    display: flex;
}

.pf-image-preview img {
    max-width: 100%;
    max-height: 220px;
    border-radius: 6px;
    object-fit: contain;
}

.pf-image-remove,
.pf-gallery-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: rgba(107, 21, 53, 0.85);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.pf-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.pf-gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--pos-border, #eadde4);
    background: var(--pos-pink-soft, #fce4ef);
}

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

.pf-category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    max-height: 220px;
    overflow-y: auto;
}

.pf-category-option {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--pos-text, #2a1520);
    cursor: pointer;
}

.pf-category-option input {
    accent-color: var(--pos-maroon, #6b1535);
    width: 16px;
    height: 16px;
}

.pf-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    margin: 8px 0;
}

.pf-checkbox-row input {
    accent-color: var(--pos-maroon, #6b1535);
}

/* Rich text editor (TinyMCE) */
.pf-editor-wrap .tox-tinymce {
    border-radius: 10px;
    border-color: var(--pos-border, #eadde4) !important;
    overflow: hidden;
}

.pf-editor-wrap .tox .tox-edit-area__iframe {
    background: #fff;
}

.pf-textarea--editor {
    min-height: 280px;
}

/* Legacy quill hooks (safe to remove later) */
.pf-quill-wrap .ql-toolbar.ql-snow {
    border-radius: 8px 8px 0 0;
    border-color: var(--pos-border, #eadde4);
    background: var(--pos-pink-soft, #fce4ef);
}

.pf-quill-wrap .ql-container.ql-snow {
    border-color: var(--pos-border, #eadde4);
    border-radius: 0 0 8px 8px;
    font-size: 0.88rem;
}

.pf-quill-wrap #quill-editor {
    min-height: 240px;
    background: #fff;
}

/* Product data — stacked sections (responsive, not tab-sidebar) */
.pf-data-shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 100%;
}

.pf-type-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

@media (max-width: 400px) {
    .pf-type-picker {
        grid-template-columns: 1fr;
    }
}

.pf-type-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--pos-border, #eadde4);
    border-radius: 12px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.pf-type-card:hover {
    border-color: rgba(158, 42, 66, 0.35);
}

.pf-type-card.is-selected {
    border-color: #9e2a42;
    background: #fffafb;
    box-shadow: 0 4px 16px rgba(107, 21, 53, 0.1);
}

.pf-type-card-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--pos-pink-soft, #fce4ef);
    color: #9e2a42;
    font-size: 1rem;
}

.pf-type-card.is-selected .pf-type-card-icon {
    background: #9e2a42;
    color: #fff;
}

.pf-type-card-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pf-type-card-text strong {
    font-size: 0.92rem;
    color: #3d2a32;
}

.pf-type-card-text small {
    font-size: 0.78rem;
    color: var(--pos-muted, #6b5b63);
}

.pf-type-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    min-width: 1.35rem;
    padding: 0 6px;
    border-radius: 999px;
    background: #9e2a42;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.35rem;
    text-align: center;
}

.pf-data-sections {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.pf-data-section {
    border: 1px solid var(--pos-border, #eadde4);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    margin: 0;
}

.pf-data-section--variations.is-open {
    border-color: rgba(158, 42, 66, 0.25);
}

.pf-section-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    border: none;
    background: #faf8f9;
    font-size: 0.9rem;
    font-weight: 600;
    color: #3d2a32;
    cursor: pointer;
    text-align: left;
}

.pf-data-section.is-open .pf-section-toggle {
    background: var(--pos-pink-soft, #fce4ef);
    color: var(--pos-maroon);
    border-bottom: 1px solid var(--pos-border, #eadde4);
    border-radius: 12px 12px 0 0;
}

.pf-section-toggle-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #fff;
    color: #9e2a42;
    flex-shrink: 0;
}

.pf-section-toggle-label {
    flex: 1;
    min-width: 0;
}

.pf-section-count {
    padding: 2px 8px;
    border-radius: 999px;
    background: #9e2a42;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
}

.pf-section-chevron {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--pos-muted, #6b5b63);
    transition: transform 0.2s;
}

.pf-data-section.is-open .pf-section-chevron {
    transform: rotate(180deg);
}

.pf-section-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease;
    padding: 0 18px;
}

.pf-data-section.is-open .pf-section-body {
    max-height: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 18px 20px 24px;
}

.pf-section-body > *:first-child {
    margin-top: 0;
}

.pf-section-note {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #e8f2fc;
    border: 1px solid #c5daf5;
    font-size: 0.84rem;
    line-height: 1.5;
    color: #2a4a6e;
}

.pf-fields-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px 18px;
}

@media (min-width: 520px) {
    .pf-fields-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    .pf-fields-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.pf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.pf-field--full {
    grid-column: 1 / -1;
}

.pf-field--check {
    justify-content: center;
}

.pf-select--tall {
    min-height: 120px;
    padding: 10px 12px;
    line-height: 1.5;
}

.pf-related-products {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid var(--pos-border, #eadde4);
}

.pf-related-products .pf-field-label {
    margin-bottom: 8px;
}

.pf-related-products .pf-hint {
    margin-top: 10px;
}

@media (max-width: 519px) {
    .pf-section-toggle {
        padding: 12px 14px;
    }

    .pf-data-section.is-open .pf-section-body {
        padding: 16px 16px 20px;
        gap: 18px;
    }
}

.pf-variation-attrs-card {
    padding: 18px 20px;
    margin: 0;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(158, 42, 66, 0.2);
    box-shadow: inset 0 0 0 1px rgba(252, 228, 239, 0.6);
}

.pf-variation-attrs-card .pf-hint {
    margin: 0 0 14px;
    line-height: 1.5;
}

.pf-variation-attrs-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.pf-variation-attrs-card[hidden] {
    display: none !important;
}

.pf-empty-attrs {
    grid-column: 1 / -1;
    padding: 12px;
    text-align: center;
    border-radius: 10px;
    background: var(--pos-pink-soft, #fce4ef);
}

.pf-empty-attrs code {
    font-size: 0.75rem;
    word-break: break-all;
}

.pf-variations-create-steps {
    padding: 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #faf8f9 0%, #fce4ef 100%);
    border: 1px solid rgba(158, 42, 66, 0.15);
}

.pf-steps-list {
    margin: 0 0 10px;
    padding-left: 1.25rem;
    color: #3d2a32;
    font-size: 0.88rem;
    line-height: 1.6;
}

.pf-steps-list li {
    margin-bottom: 4px;
}

.pf-display-attrs-block {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pf-display-attrs-title {
    margin: 0;
}

.pf-card-heading-sm {
    margin: 0;
    font-size: 0.92rem;
    color: var(--pos-maroon);
}

.pf-variation-attr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 12px;
}

.pf-check-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--pos-border, #eadde4);
    cursor: pointer;
    min-height: 56px;
}

.pf-check-card input {
    margin-top: 3px;
}

.pf-check-card strong {
    display: block;
    font-size: 0.86rem;
}

.pf-check-card small {
    color: var(--pos-muted, #6b5b63);
    font-size: 0.75rem;
}

.pf-generate-all-hint {
    margin: 0 0 4px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #f8f4f6;
    border: 1px solid var(--pos-border, #eadde4);
    line-height: 1.5;
}

.pf-sku-assigned {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f0faf3;
    border: 1px solid #c8e6c9;
}

.pf-sku-assigned--inline {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    padding: 0;
    background: transparent;
    border: none;
}

.pf-sku-code {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #c8e6c9;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88rem;
    font-weight: 700;
    color: #2e7d32;
    letter-spacing: 0.02em;
}

.pf-sku-pending {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #faf8f9;
    border: 1px dashed var(--pos-border, #eadde4);
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--pos-muted, #6b5b63);
}

.pf-sku-pending--compact {
    margin: 0;
    padding: 10px 12px;
    min-height: 42px;
    align-items: center;
}

.pf-input--sku {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.pf-sku-scan {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: stretch;
    width: 100%;
}

.pf-sku-scan .pf-input--sku {
    width: 100%;
    min-width: 0;
}

.pf-sku-scan .pos-input-btn--camera {
    min-height: 42px;
    min-width: 44px;
}

.pf-v-sku-preview[readonly] {
    background: #f8f4f6;
    color: #2e7d32;
    font-weight: 600;
    cursor: default;
}

.pf-input--sku.pf-input--has-value,
.pf-v-sku.pf-input--has-value {
    font-weight: 600;
    color: #2e7d32;
}

.pf-variations-manager--draft {
    margin-top: 4px;
}

.pf-variations-manager--draft .pf-hint {
    margin-top: 4px;
}

.pf-variants-empty-state {
    padding: 20px 16px;
    margin-bottom: 8px;
}

.pf-variations-save-first i {
    font-size: 2rem;
    color: #9e2a42;
    margin-bottom: 10px;
}

.pf-variations-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.pf-variants-heading {
    margin: 0 0 4px;
    font-size: 1rem;
    color: var(--pos-maroon);
}

.pf-variants-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 10px 0 4px;
}

.pf-v-text-btn {
    border: 0;
    background: none;
    padding: 0;
    color: var(--pos-pink, #c2185b);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pf-v-text-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.pf-v-text-btn:hover:not(:disabled) {
    text-decoration: underline;
}

.pf-variations-card-head {
    margin-bottom: 8px;
}

.pf-variations-help {
    margin-top: 8px !important;
    max-width: 52rem;
}

.pf-field-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--pos-muted, #6b5b63);
}

.pf-variation-attr-row,
.pf-variation-price-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.pf-variation-stock-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px 24px;
}

.pf-variation-stock-row .pf-field {
    max-width: 220px;
    flex: 1 1 160px;
}

.pf-variation-active {
    margin: 0 0 10px;
    font-weight: 600;
}

@media (min-width: 720px) {
    .pf-variation-attr-row,
    .pf-variation-price-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.pf-variants-form-card summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--pos-maroon);
    list-style: none;
}

.pf-variants-form-card summary::-webkit-details-marker {
    display: none;
}

.pf-variants-form-body {
    margin-top: 12px;
}

.pf-field-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

@media (min-width: 640px) {
    .pf-field-row {
        grid-template-columns: 140px minmax(0, 1fr);
        align-items: center;
        gap: 12px;
    }
}

.pf-field-label {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding: 0 0 2px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pos-muted, #8a6b78);
    text-decoration: none !important;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    background: none !important;
}

.pf-field-label::before,
.pf-field-label::after {
    content: none !important;
    display: none !important;
}

.pf-field {
    text-decoration: none;
}

.pf-data-section.is-open .pf-section-body {
    border-top: none;
}

.pf-empty-attrs a,
.pf-variation-attrs-head a,
.pf-hint a {
    color: var(--pos-maroon, #1e40af);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.pf-empty-attrs a:hover,
.pf-variation-attrs-head a:hover,
.pf-hint a:hover {
    text-decoration-thickness: 2px;
}

.pf-attr-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pf-attr-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--pos-border, #eadde4);
    background: #faf8f9;
}

@media (min-width: 640px) {
    .pf-attr-row {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 10px 12px;
    }

    .pf-attr-row > * {
        flex: 1;
        min-width: 0;
    }

    .pf-attr-row .pf-btn-remove {
        flex: 0 0 auto;
        align-self: center;
    }
}

.pf-btn-outline,
.pf-btn-remove {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--pos-border, #eadde4);
    background: #fff;
    color: var(--pos-maroon, #6b1535);
    white-space: nowrap;
}

.pf-btn-remove {
    color: #c0392b;
    border-color: #f5c6cb;
    background: #fde8ee;
}

.pf-btn-add {
    margin: 0;
    padding: 10px 16px;
    border: 1px dashed var(--pos-pink, #e91e8c);
    border-radius: 8px;
    background: var(--pos-pink-soft, #fce4ef);
    color: var(--pos-maroon, #6b1535);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    align-self: flex-start;
}

.pf-hidden {
    display: none !important;
}

@media (max-width: 639px) {
    .pf-permalink {
        flex-direction: column;
    }

    .pf-permalink-prefix {
        max-width: none;
        border-right: none;
        border-bottom: 1px solid var(--pos-border, #eadde4);
        white-space: normal;
        word-break: break-all;
    }

    .pf-quill-wrap .ql-toolbar.ql-snow {
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ── Product variations tab ─────────────────────────────────────────── */
.pf-variants-shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pf-variants-intro {
    margin: 0;
}

.pf-variants-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 28px 20px;
    text-align: center;
    border-radius: 12px;
    border: 1px dashed rgba(122, 28, 46, 0.25);
    background: var(--pos-pink-soft, #fce4ef);
}

.pf-variants-empty-state i {
    font-size: 1.75rem;
    color: #9e2a42;
}

.pf-variants-empty-state-inline,
.pf-variants-loading {
    margin: 0;
    padding: 16px;
    text-align: center;
    color: var(--pos-muted, #6b5b63);
    font-size: 0.9rem;
}

.pf-variants-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--pos-border, #eadde4);
}

.pf-variants-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.pf-variants-table th,
.pf-variants-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--pos-border, #eadde4);
}

.pf-variants-table th {
    background: var(--pos-pink-soft, #fce4ef);
    color: var(--pos-maroon);
    font-weight: 600;
    font-size: 0.8rem;
}

.pf-variants-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pf-variant-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pf-variant-badge.is-ok {
    background: #e8f5e9;
    color: #2e7d32;
}

.pf-variant-badge.is-danger {
    background: #ffebee;
    color: #c62828;
}

.pf-variant-badge.is-muted {
    background: #f5f5f5;
    color: #757575;
}

.pf-variants-form-card {
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(122, 28, 46, 0.12);
    background: #fff;
    box-shadow: 0 4px 16px rgba(61, 42, 50, 0.05);
}

.pf-variants-form-title {
    margin: 0 0 12px;
    font-size: 1rem;
    color: var(--pos-maroon);
}

.pf-variants-attr-picks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.pf-variants-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.pf-variants-active-row {
    align-self: end;
}

.pf-variants-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 639px) {
    .pf-variants-table thead {
        display: none;
    }

    .pf-variants-table tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid var(--pos-border, #eadde4);
        border-radius: 10px;
        overflow: hidden;
    }

    .pf-variants-table td {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        border-bottom: none;
        padding: 8px 12px;
    }

    .pf-variants-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--pos-maroon);
        flex-shrink: 0;
    }

    .pf-variants-table td:last-child {
        border-bottom: none;
    }
}

/* ── Product variations manager (dynamic rows) ─────────────────────── */
.pf-variations-manager {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pf-variations-manager-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.pf-variations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pf-variations-list-foot {
    margin: 4px 0 0;
    text-align: center;
}

.pf-variation-row {
    border: 1px solid var(--pos-border, #eadde4);
    border-radius: 12px;
    background: #fff;
    padding: 14px 16px;
    box-shadow: 0 2px 10px rgba(61, 42, 50, 0.04);
}

.pf-variation-row-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--pos-border, #eadde4);
}

.pf-variation-row-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--pos-maroon);
}

.pf-variation-row-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pf-variation-row-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 560px) {
    .pf-variation-row-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    .pf-variation-row-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.pf-v-attr-picks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.pf-v-image-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pf-v-image-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pf-v-image-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--pos-border, #eadde4);
}

@media (max-width: 559px) {
    .pf-variations-manager-head .pf-variants-toolbar-actions {
        width: 100%;
    }

    .pf-variations-manager-head .pf-variants-toolbar-actions .pos-chip-btn {
        flex: 1 1 calc(50% - 4px);
        justify-content: center;
    }

    .pf-variation-row-head-actions {
        width: 100%;
    }

    .pf-variation-row-head-actions .pos-chip-btn {
        flex: 1;
        justify-content: center;
    }
}
