/* ── Order page styles ─────────────────────────────────────── */

.order-form {
    max-width: 960px;
    margin: 0 auto;
}

.order-products {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 20px;
}

/* ── Product row ── */
.product-row {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 8px 24px rgba(0,0,0,0.04);
    position: relative;
    transition: border-color .2s, box-shadow .2s;
}
.product-row:hover {
    border-color: rgba(0,0,0,0.14);
}

.row-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.row-num {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    font-weight: 900;
    font-size: 34px;
    letter-spacing: 0.02em;
    padding: 8px 18px;
    border-radius: 99px;
    min-width: 58px;
    text-align: center;
    background: var(--gradient-main);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    box-shadow:
        inset 0 0 0 2px rgba(124, 58, 237, 0.28),
        0 2px 10px rgba(124, 58, 237, 0.14);
}
.row-hash {
    font-size: 0.55em;
    font-weight: 700;
    margin-right: 2px;
    background: none;
    -webkit-background-clip: initial;
            background-clip: initial;
    -webkit-text-fill-color: #7c3aed;
    color: #7c3aed;
    opacity: 0.85;
}
.row-index {
    font-size: 1em;
    line-height: 1;
}

.kind-tabs {
    display: inline-flex;
    background: rgba(0,0,0,0.04);
    border-radius: 99px;
    padding: 4px;
    gap: 2px;
}
.kind-tab {
    background: transparent;
    border: 0;
    padding: 10px 22px;
    border-radius: 99px;
    font-size: 17px;
    font-weight: 600;
    color: var(--muted, #6b7280);
    cursor: pointer;
    transition: background .2s, color .2s;
}
.kind-tab:hover {
    color: #111;
}
.kind-tab.active {
    background: #111;
    color: #fff;
}

.row-remove {
    margin-left: auto;
    background: transparent;
    border: 1px solid rgba(0,0,0,0.12);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    color: #6b7280;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s, border-color .2s;
}
.row-remove:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}
.product-row.is-only .row-remove {
    opacity: 0.4;
    pointer-events: none;
}

/* ── Fields ── */
.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.field-wide {
    grid-column: 1 / -1;
}
.field-sm {
    min-width: 0;
}
.field-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted, #6b7280);
}
.field-label em {
    color: #ef4444;
    font-style: normal;
}
.row-file .field-label em {
    display: inline-block;
    margin-left: 3px;
    padding: 0 4px;
    min-width: 10px;
    line-height: 10px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 8px;
    font-weight: 900;
    text-align: center;
    vertical-align: middle;
    animation: vwRequiredPulse 2.4s ease-in-out infinite;
}
@keyframes vwRequiredPulse {
    0%, 100% { opacity: 0.85; }
    50%      { opacity: 1;    }
}
@media (prefers-reduced-motion: reduce) {
    .row-file .field-label em { animation: none; }
}
.field-hint {
    font-size: 12px;
    color: var(--muted, #6b7280);
    line-height: 1.5;
    margin-top: 2px;
}
.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid rgba(0,0,0,0.14);
    border-radius: 10px;
    background: #fff;
    font-family: inherit;
    color: #111;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 1px 3px rgba(16,24,40,0.05);
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}
.field input:hover,
.field select:hover,
.field textarea:hover {
    box-shadow: 0 1px 3px rgba(16,24,40,0.06), 0 2px 5px rgba(16,24,40,0.06);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: 0;
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.06), 0 1px 3px rgba(16,24,40,0.08);
}
/* ── Checkbox field (wallpaper installation) ── */
.field-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin-top: 14px;
    background: linear-gradient(135deg, rgba(255,60,172,0.06), rgba(255,154,60,0.06));
    border: 1px solid rgba(255,60,172,0.18);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .2s, background .2s, transform .15s;
}
.field-check:hover {
    border-color: rgba(255,60,172,0.4);
    transform: translateY(-1px);
}
.field-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.field-check-box {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid rgba(0,0,0,0.25);
    background: #fff;
    position: relative;
    transition: background .2s, border-color .2s;
    margin-top: 1px;
}
.field-check-box::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) scale(0);
    transition: transform .18s cubic-bezier(.2,.8,.3,1.4);
}
.field-check input:checked + .field-check-box {
    background: linear-gradient(135deg, #ff3cac, #c2185b);
    border-color: #c2185b;
}
.field-check input:checked + .field-check-box::after {
    transform: rotate(45deg) scale(1);
}
.field-check-label {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 14px;
    color: #111;
    line-height: 1.45;
}
.field-check-label strong {
    font-weight: 800;
}
.field-check-hint {
    font-size: 12px;
    color: var(--muted, #6b7280);
    font-weight: 500;
}
.field-check-note {
    font-size: 11px;
    color: var(--muted, #9ca3af);
    font-weight: 500;
    font-style: italic;
    margin-top: 2px;
}

.field textarea {
    resize: vertical;
    min-height: 100px;
}
.field input[type=url]:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

.row-pane {
    margin-bottom: 14px;
}
.row-pane.hidden {
    display: none;
}

.row-file {
    margin-top: 14px;
    margin-bottom: 14px;
    padding-top: 14px;
    border-top: 1px dashed rgba(0,0,0,0.08);
}

.row-price {
    padding-top: 14px;
    border-top: 1px solid rgba(0,0,0,0.06);
}
.row-price-summary {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}
.field-check.order-express {
    width: 70%;
    margin-top: 0;
    margin-bottom: 18px;
    margin-left: auto;
    margin-right: auto;
}
@media (max-width: 760px) {
    .field-check.order-express { width: 100%; }
}
.row-price-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted, #6b7280);
}
.row-price-value {
    font-size: 26px;
    font-weight: 900;
    background: var(--gradient-main);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.row-price-warning {
    margin-left: auto;
    font-size: 12px;
    color: #ef4444;
    font-weight: 600;
}

/* ── Add product button ── */
.order-add-row {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}
.btn-add-product {
    padding: 14px 28px;
    font-size: 15px;
}
.btn-add-product .plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0b132b;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
}

/* ── Totals ── */
.order-totals {
    position: relative;
    color: #fff;
    border-radius: 18px;
    padding: 26px 30px;
    margin-bottom: 28px;
    background:
        linear-gradient(135deg, rgba(13,13,13,0.92) 0%, rgba(26,26,26,0.92) 50%, rgba(13,13,13,0.92) 100%),
        linear-gradient(120deg, #ff3cac 0%, #c2185b 20%, #784ba0 40%, #2b86c5 60%, #ff9a3c 80%, #ff3cac 100%);
    background-size: 100% 100%, 300% 300%;
    background-position: 0 0, 0% 50%;
    animation: orderTotalsShift 8s ease-in-out infinite;
    box-shadow:
        0 12px 40px rgba(0,0,0,0.35),
        0 0 0 1px rgba(255,255,255,0.06) inset;
    overflow: hidden;
    isolation: isolate;
}
.order-totals::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: conic-gradient(
        from 0deg,
        #ff3cac, #c2185b, #784ba0, #2b86c5,
        #ff9a3c, #ff3cac
    );
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    animation: orderTotalsSpin 6s linear infinite;
    pointer-events: none;
    z-index: 0;
}
.order-totals::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.10) 50%, transparent 70%);
    background-size: 220% 100%;
    background-position: 200% 0;
    animation: orderTotalsShimmer 4.5s ease-in-out infinite;
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 0;
}
@keyframes orderTotalsShift {
    0%, 100% { background-position: 0 0, 0% 50%; }
    50%      { background-position: 0 0, 100% 50%; }
}
@keyframes orderTotalsSpin {
    to { transform: rotate(360deg); }
}
@keyframes orderTotalsShimmer {
    0%   { background-position: 200% 0; }
    60%  { background-position: -80% 0; }
    100% { background-position: -80% 0; }
}

.total-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}
.total-label {
    font-size: 46px;
    line-height: 1.05;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: linear-gradient(90deg, #fff 0%, #ffd6ef 50%, #fff 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: orderLabelShift 3.5s ease-in-out infinite;
}
@keyframes orderLabelShift {
    0%, 100% { background-position: 0% 0; }
    50%      { background-position: 100% 0; }
}
.total-value {
    font-size: 46px;
    line-height: 1.05;
    font-weight: 900;
    background: linear-gradient(90deg, #ff3cac 0%, #ff9a3c 35%, #fff75e 55%, #ff9a3c 75%, #ff3cac 100%);
    background-size: 250% 100%;
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: orderValueShift 3.5s ease-in-out infinite;
    filter: drop-shadow(0 2px 10px rgba(255, 60, 172, 0.35));
}
@keyframes orderValueShift {
    0%, 100% { background-position: 0% 0; }
    50%      { background-position: 100% 0; }
}
.total-hint {
    position: relative;
    z-index: 1;
    margin: 12px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255,255,255,0.82);
    font-weight: 500;
    letter-spacing: 0.01em;
}
@media (prefers-reduced-motion: reduce) {
    .order-totals,
    .order-totals::before,
    .order-totals::after,
    .total-label,
    .total-value { animation: none !important; }
}

/* ── Customer fieldset ── */
.order-customer {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 16px;
    padding: 24px 26px;
    margin: 48px 0 24px;
}
.order-customer legend {
    width: 100%;
    padding: 0 10px;
    font-size: 34px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: center;
    color: var(--muted, #6b7280);
}

/* ── Submit ── */
.order-submit-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
}
#submitOrderBtn {
    min-width: 260px;
    padding: 18px 40px;
    font-size: 16px;
}
#submitOrderBtn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}
.submit-hint {
    font-size: 12px;
    color: var(--muted, #6b7280);
    margin: 0;
    text-align: center;
}
.vat-note {
    margin: 4px 0 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted, #9ca3af);
    text-align: center;
}

@media (max-width: 640px) {
    .product-row { padding: 16px; }
    .row-head { gap: 10px; }
    .kind-tab { padding: 7px 14px; font-size: 13px; }
    .total-label { font-size: 30px; }
    .total-value { font-size: 30px; }
    .row-index { font-size: 0.85em; }
    .kind-tab { font-size: 19.5px; padding: 10px 20px; }
    .order-totals::before { display: none; }
    .order-customer { padding: 18px; }
}
