:root { --motion-ease: cubic-bezier(.2,.7,.2,1); }
.specification-editor { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 0; min-width: 0; }
.specification-editor legend { padding-inline: 5px; font-weight: 700; }
.specification-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) 34px; gap: 8px; align-items: end; margin-bottom: 10px; }
.specification-row label { display: grid; gap: 5px; font-size: 12px; color: var(--muted); }
.specification-remove { height: 42px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--paper); font-size: 22px; }
.specification-remove:hover { color: #b42c3e; border-color: currentColor; }
.specification-editor input { width: 100%; min-width: 0; }
.item-specifications { margin-top: 24px; scroll-margin-top: 18px; }
.item-specifications h3 { font-size: 17px; font-weight: 650; }
.button:disabled { cursor: default; opacity: .5; }
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
    body, .header, .subbar, .footer, .product-card, .admin-panel {
        transition: background-color .24s ease, border-color .24s ease, color .24s ease;
    }
    .button, .favorite, .quantity, .chip, .specification-remove {
        transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s var(--motion-ease);
    }
    .button:active, .favorite:active, .quantity:active { transform: scale(.97); }
    .search, .auth-form input, .auth-form textarea, .admin-form input, .admin-form textarea {
        transition: border-color .18s ease, box-shadow .18s ease;
    }
    .search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb,var(--accent) 16%,transparent); }
    .choice-menu[open] .choice-options, .mega:not([hidden]), .review-editor[open] .auth-form {
        animation: menu-enter .2s var(--motion-ease);
    }
    .product-card, .category-tiles > a, .post-card, .promo, .admin-metrics a {
        transition: transform .22s var(--motion-ease), box-shadow .22s ease, border-color .22s ease;
    }
    .gallery-stage button, .promo-arrow { transition: background-color .18s ease, transform .18s ease; }
    .image-dialog[open] { animation: dialog-enter .2s var(--motion-ease); }
    .image-dialog::backdrop { animation: backdrop-enter .2s ease; }
    @media (hover: hover) and (pointer: fine) {
        .product-card:hover, .category-tiles > a:hover, .post-card:hover, .admin-metrics a:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 24px #0000000c;
        }
        .promo:hover .promo-arrow { transform: translateX(2px); }
        .gallery-stage button:hover { background: var(--accent); color: #201900; }
    }
    @keyframes menu-enter { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
    @keyframes dialog-enter { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: scale(1); } }
    @keyframes backdrop-enter { from { opacity: 0; } to { opacity: 1; } }
}
@media (max-width: 480px) {
    .specification-row { grid-template-columns: minmax(0,1fr) 34px; }
    .specification-row label:first-child { grid-column: 1 / -1; }
}
