/* Wholesale (trade) section */

.ws-shell {
    padding-top: 24px;
    padding-bottom: 96px;
}

.ws-shell .glow-card {
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--line);
}

.ws-shell h2 {
    font-size: 1.15rem;
    margin-bottom: 14px;
}

.ws-code {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    color: var(--muted);
}

/* ---- Landing ---- */

.ws-landing {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.ws-landing h1 {
    font-family: var(--font-display, inherit);
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    line-height: 1.12;
    margin: 6px 0 12px;
}

.ws-lead {
    font-size: 1.08rem;
    color: var(--muted);
    max-width: 60ch;
}

.ws-points {
    list-style: none;
    padding: 0;
    margin: 22px 0;
    display: grid;
    gap: 12px;
}

.ws-points li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.ws-points i {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--brand-soft);
    color: var(--brand);
}

.ws-apply p {
    margin-bottom: 10px;
}

.ws-apply-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-weight: 700;
}

.ws-login {
    position: sticky;
    top: 16px;
}

.ws-login h2 {
    font-size: 1.35rem;
    margin: 6px 0 0;
}

/* ---- Signed-in bar ---- */

.ws-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 20px;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: var(--radius-lg, 12px);
    background: var(--brand);
    color: #fff;
}

.ws-bar-who {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ws-bar-who small {
    opacity: 0.8;
    margin-left: 6px;
}

.ws-bar nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.ws-bar nav a,
.ws-bar nav button {
    color: #fff;
    text-decoration: none;
    background: none;
    border: 0;
    padding: 7px 12px;
    border-radius: 999px;
    font-weight: 600;
    font: inherit;
    cursor: pointer;
}

.ws-bar nav a:hover,
.ws-bar nav button:hover,
.ws-bar nav a.is-active {
    background: rgba(255, 255, 255, 0.16);
}

.ws-bar form {
    margin: 0;
}

.ws-count {
    display: inline-block;
    min-width: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #fff;
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 800;
    text-align: center;
}

/* ---- Price list ---- */

.ws-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px 24px;
    margin-bottom: 18px;
}

.ws-head h1 {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    margin: 4px 0;
}

.ws-filter {
    display: flex;
    gap: 8px;
    flex: 1 1 420px;
    max-width: 620px;
}

.ws-filter input,
.ws-filter select {
    min-width: 0;
    border: 1px solid var(--line-strong, var(--line));
    border-radius: var(--radius-md, 10px);
    padding: 10px 12px;
    background: var(--surface);
}

.ws-filter input {
    flex: 1 1 auto;
}

.ws-filter select {
    flex: 0 1 200px;
}

.ws-list {
    display: grid;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg, 12px);
    background: var(--surface);
    overflow: hidden;
}

.ws-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
}

.ws-row:first-child {
    border-top: 0;
}

.ws-row-img img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.ws-row-info h3 {
    font-size: 1rem;
    margin: 0 0 4px;
}

.ws-row-info p {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin: 0;
    font-size: 0.86rem;
    color: var(--muted);
}

.ws-vat {
    color: var(--brand);
}

.ws-collect {
    color: var(--accent-dark, #b63b1b);
}

.ws-row-buy {
    display: flex;
    gap: 14px;
}

.ws-buy {
    display: grid;
    gap: 6px;
    justify-items: end;
    padding: 6px 8px;
    border-radius: var(--radius-md, 10px);
}

.ws-buy.has-qty {
    background: var(--brand-soft);
}

.ws-price {
    text-align: right;
    line-height: 1.15;
}

.ws-price strong {
    display: block;
    font-size: 1.08rem;
}

.ws-price small {
    color: var(--muted);
}

.ws-qty {
    display: flex;
    align-items: center;
    border: 1px solid var(--line-strong, var(--line));
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
}

.ws-qty button {
    border: 0;
    background: none;
    width: 34px;
    height: 34px;
    color: var(--brand);
    font-size: 1.1rem;
}

.ws-qty button:hover {
    background: var(--brand-soft);
}

.ws-qty input,
.ws-line-qty {
    width: 52px;
    border: 0;
    text-align: center;
    font-weight: 700;
    -moz-appearance: textfield;
}

.ws-line-qty {
    border: 1px solid var(--line-strong, var(--line));
    border-radius: 8px;
    padding: 6px 4px;
}

.ws-qty input::-webkit-inner-spin-button,
.ws-qty input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ws-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

.ws-summary {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 30;
    width: min(560px, calc(100% - 32px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 12px 12px 20px;
    border-radius: 999px;
    background: var(--text);
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.ws-summary[hidden] {
    display: none;
}

.ws-summary div {
    display: grid;
    line-height: 1.2;
}

.ws-summary span {
    opacity: 0.85;
    font-size: 0.9rem;
}

.ws-empty {
    text-align: center;
    padding: 36px 20px;
    color: var(--muted);
}

.ws-empty i {
    font-size: 2rem;
}

/* ---- Review order ---- */

.ws-basket {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    align-items: start;
}

.ws-basket-side {
    position: sticky;
    top: 16px;
}

.ws-table {
    width: 100%;
    border-collapse: collapse;
}

.ws-table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    padding: 8px;
    text-align: left;
}

.ws-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.ws-table .num {
    text-align: right;
    white-space: nowrap;
}

.ws-remove {
    border: 0;
    background: none;
    color: var(--muted);
    padding: 6px;
}

.ws-remove:hover {
    color: var(--accent-dark, #b63b1b);
}

.ws-problems {
    background: var(--mustard-soft, #fff1d2);
    border-radius: var(--radius-md, 10px);
    padding: 10px 14px;
    margin-bottom: 12px;
}

.ws-problems p {
    margin: 4px 0;
}

.ws-error {
    color: var(--accent-dark, #b63b1b);
    font-weight: 700;
}

.ws-choice {
    display: grid;
    gap: 8px;
}

.ws-choice label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border: 1px solid var(--line);
    border-radius: var(--radius-md, 10px);
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 400;
}

.ws-choice label:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.ws-choice input {
    width: auto;
    margin-top: 4px;
}

.ws-choice span {
    display: grid;
}

.ws-choice small {
    color: var(--muted);
}

.stack-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-weight: 400;
}

.ws-totals {
    display: grid;
    gap: 6px;
    padding-top: 6px;
}

.ws-totals div {
    display: flex;
    justify-content: space-between;
}

.ws-totals-grand {
    font-size: 1.2rem;
    border-top: 1px solid var(--line);
    padding-top: 8px;
}

.ws-totals-end {
    max-width: 320px;
    margin: 14px 0 0 auto;
}

/* ---- Account & orders ---- */

.ws-account {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
}

.ws-account-side {
    display: grid;
    gap: 20px;
}

.ws-details {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 14px;
    margin: 0;
}

.ws-details dt {
    color: var(--muted);
    font-weight: 600;
}

.ws-details dd {
    margin: 0;
}

.ws-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.ws-status.is-pending {
    background: var(--mustard-soft, #fff1d2);
    color: #7a5200;
}

.ws-status.is-synced {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.ws-status.is-failed {
    background: #fdecee;
    color: #a1102a;
}

.ws-status.is-picking {
    background: #e6efff;
    color: #1d4ed8;
}

.ws-status.is-done {
    background: var(--brand);
    color: #fff;
}

.ws-status.is-cancelled {
    background: var(--surface-soft, #f1f1ee);
    color: var(--muted);
}

.ws-order-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.6rem;
    margin: 4px 0;
}

.ws-placed {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 22px;
    border-color: var(--brand) !important;
    background: var(--brand-soft) !important;
}

.ws-placed > i {
    font-size: 2.2rem;
    color: var(--brand);
}

.ws-placed h1 {
    font-size: 1.4rem;
    margin: 0 0 4px;
}

.ws-placed p {
    margin: 0;
}

/* ---- Phones & tablets ---- */

@media (max-width: 992px) {
    .ws-landing,
    .ws-basket,
    .ws-account {
        grid-template-columns: minmax(0, 1fr);
    }

    .ws-login,
    .ws-basket-side {
        position: static;
    }
}

@media (max-width: 640px) {
    .ws-hide-sm {
        display: none;
    }

    .ws-shell .glow-card {
        padding: 16px;
    }

    .ws-filter {
        flex-wrap: wrap;
    }

    .ws-filter input {
        flex: 1 1 100%;
    }

    .ws-filter select {
        flex: 1 1 auto;
    }

    .ws-row {
        grid-template-columns: 48px minmax(0, 1fr);
        padding: 12px;
    }

    .ws-row-img img {
        width: 48px;
        height: 48px;
    }

    .ws-row-buy {
        grid-column: 1 / -1;
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .ws-bar nav {
        width: 100%;
        justify-content: space-between;
    }

    .ws-bar nav a,
    .ws-bar nav button {
        padding: 6px 8px;
        font-size: 0.9rem;
    }

    .ws-table thead {
        display: none;
    }

    .ws-table tr {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 4px 12px;
        padding: 10px 0;
        border-bottom: 1px solid var(--line);
    }

    .ws-table td {
        border: 0;
        padding: 2px 0;
    }

    .ws-table td:first-child {
        grid-column: 1 / -1;
    }
}

/* ---- Order progress ---- */

.ws-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 20px;
    padding: 18px 16px !important;
}

.ws-steps li {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 4px;
    text-align: center;
    color: var(--muted);
}

.ws-steps li::before {
    content: "";
    position: absolute;
    top: 19px;
    right: 50%;
    width: 100%;
    height: 3px;
    background: var(--line);
    z-index: 0;
}

.ws-steps li:first-child::before {
    display: none;
}

.ws-steps li.is-done::before {
    background: var(--brand);
}

.ws-step-dot {
    position: relative;
    z-index: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--surface);
    border: 2px solid var(--line);
    font-size: 1.1rem;
}

.ws-steps li.is-done .ws-step-dot {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.ws-steps li.is-current strong {
    color: var(--text);
}

.ws-steps small {
    font-size: 0.75rem;
}

@media (max-width: 640px) {
    .ws-steps strong {
        font-size: 0.78rem;
    }

    .ws-steps small {
        display: none;
    }
}

/* ---- Visitors (not signed in) ---- */

.ws-guest {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 20px;
    padding: 16px 18px;
    margin-bottom: 20px;
    border-radius: var(--radius-lg, 12px);
    background: var(--brand-soft);
    border: 1px solid var(--line);
}

.ws-guest-text {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.ws-guest-text > i {
    font-size: 1.6rem;
    color: var(--brand);
}

.ws-guest-text div {
    display: grid;
    gap: 2px;
}

.ws-guest-text span {
    color: var(--muted);
}

.ws-guest-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ws-signin-price {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--brand);
    color: var(--brand);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
}

.ws-signin-price:hover {
    background: var(--brand);
    color: #fff;
}
