/* Wholesale demo styles (MOQ variant list, cart bar, cart page). Plain CSS, no build step. */
:root {
    --moq-yellow: #f7b500;
    --moq-yellow-dark: #d99a00;
    --moq-yellow-soft: #fff6d6;
    --moq-ink: #1b1b1b;
    --moq-muted: #6b6b6b;
    --moq-line: #ececec;
    --moq-card: #ffffff;
    --moq-bg: #f6f6f6;
    --moq-radius: 14px;
}

/* ---------- Product page header bits ---------- */
.moq-eyebrow {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--moq-muted);
}

.moq-sold-by {
    margin-top: 2px;
    font-size: 12px;
    color: var(--moq-muted);
}

.moq-sold-by span {
    color: var(--moq-yellow-dark);
    font-weight: 600;
}

.moq-block {
    margin-top: 14px;
    max-width: 560px;
}

.moq-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.moq-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--moq-ink);
}

.moq-pack {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.moq-pack select {
    appearance: none;
    -webkit-appearance: none;
    min-width: 84px;
    padding: 7px 30px 7px 16px;
    border: 1px solid #d6d6d6;
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: var(--moq-ink);
    cursor: pointer;
}

.moq-pack.is-single select {
    padding-right: 16px;
    cursor: default;
    opacity: 1;
}

.moq-pack-caret {
    position: absolute;
    right: 13px;
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--moq-ink);
    border-bottom: 2px solid var(--moq-ink);
    transform: translateY(-2px) rotate(45deg);
    pointer-events: none;
}

.moq-badges {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.moq-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 8px;
    background: var(--moq-yellow-soft);
    font-size: 12px;
    font-weight: 600;
    color: var(--moq-ink);
}

.moq-badge.is-plain {
    background: #f3f3f3;
    border: 0;
    cursor: pointer;
}

.moq-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--moq-yellow);
}

.moq-star {
    color: var(--moq-yellow);
}

/* ---------- Cards ---------- */
.moq-card {
    margin-top: 16px;
    padding: 16px;
    border-radius: var(--moq-radius);
    background: var(--moq-card);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .05);
}

.moq-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.moq-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--moq-ink);
}

.moq-link {
    border: 0;
    background: none;
    font-size: 12px;
    font-weight: 600;
    color: var(--moq-yellow-dark);
    cursor: pointer;
}

.moq-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 6px;
    padding: 10px 12px;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    color: var(--moq-muted);
}

.moq-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--moq-ink);
}

.moq-empty {
    padding: 22px 8px;
    text-align: center;
    font-size: 13px;
    color: var(--moq-muted);
}

/* ---------- Variant rows ---------- */
.moq-rows {
    margin: 0;
    padding: 0;
    list-style: none;
}

.moq-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 12px;
    border: 1px solid var(--moq-line);
    border-radius: 12px;
    background: #fff;
}

.moq-row.is-out {
    opacity: .55;
}

.moq-num {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--moq-yellow-soft);
    font-size: 11px;
    font-weight: 600;
    color: #b98a00;
}

.moq-row-text {
    flex: 1;
    min-width: 0;
}

.moq-row-name {
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.35;
    text-transform: uppercase;
    color: var(--moq-ink);
    word-break: break-word;
}

.moq-row-price {
    margin-top: 3px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--moq-yellow-dark);
}

.moq-row-price span {
    font-weight: 500;
    color: var(--moq-muted);
}

.moq-row-price.is-muted {
    color: var(--moq-muted);
    font-weight: 500;
}

.moq-row-price em {
    margin-left: 6px;
    font-style: normal;
    font-weight: 600;
    color: #c0392b;
}

.moq-row-action {
    flex: none;
}

.moq-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 4px;
    border: 0;
    background: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--moq-ink);
    cursor: pointer;
}

.moq-add-plus,
.moq-stepper button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: var(--moq-yellow);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}

.moq-add:disabled {
    cursor: default;
    opacity: .45;
}

.moq-add:disabled .moq-add-plus {
    background: #cfcfcf;
}

.moq-stepper {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.moq-stepper button {
    border: 0;
    cursor: pointer;
}

.moq-stepper span {
    min-width: 26px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--moq-ink);
}

.moq-stepper.is-busy {
    opacity: .5;
}

.moq-more {
    padding: 14px;
    text-align: center;
    font-size: 12px;
    color: var(--moq-muted);
}

/* ---------- Sticky cart bar ---------- */
.moq-cart-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px max(16px, calc((100vw - 760px) / 2));
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    background: #fff;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, .08);
}

.moq-cart-total {
    font-size: 16px;
    font-weight: 700;
    color: var(--moq-ink);
}

.moq-cart-meta {
    font-size: 12px;
    color: var(--moq-muted);
}

.moq-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    padding: 12px 22px;
    border-radius: 10px;
    background: var(--moq-yellow);
    font-size: 14px;
    font-weight: 700;
    color: #fff !important;
    text-decoration: none;
}

.moq-cart-btn:hover {
    background: var(--moq-yellow-dark);
}

.moq-cart-btn.is-disabled {
    background: #d4d4d4;
    pointer-events: none;
}

body.has-moq-cart-bar {
    padding-bottom: 84px;
}

/* ---------- Category / product cards ---------- */
.moq-per-unit {
    font-weight: 500;
    color: var(--moq-muted);
    font-size: .85em;
}

.moq-final {
    white-space: nowrap;
}

/* Let the card's price row wrap so "139 options · MOQ 10" sits on its own line */
:has(> .moq-card-meta) {
    flex-wrap: wrap;
    row-gap: 0;
}

.moq-card-meta {
    flex-basis: 100%;
    width: 100%;
    margin-top: 2px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--moq-yellow-dark);
}

/* ---------- Cart page ---------- */
.moq-cart-page {
    min-height: 100vh;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 16px 24px;
    background: var(--moq-bg);
}

.moq-cart-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 -16px;
    padding: 14px 16px;
    background: #fff;
    border-bottom: 1px solid var(--moq-line);
}

.moq-cart-header h1 {
    font-size: 17px;
    font-weight: 600;
    color: var(--moq-ink);
}

.moq-back {
    display: inline-flex;
    width: 32px;
    font-size: 22px;
    color: var(--moq-ink);
    text-decoration: none;
}

.moq-back.is-ghost {
    visibility: hidden;
}

.moq-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding-left: 10px;
    border-left: 4px solid var(--moq-yellow);
}

.moq-section-head.is-split {
    justify-content: space-between;
}

.moq-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--moq-ink);
}

.moq-section-sub {
    font-size: 12px;
    color: var(--moq-muted);
}

.moq-outline-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border: 1.5px solid var(--moq-yellow);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--moq-yellow-dark);
    text-decoration: none;
}

.moq-sparkle {
    color: var(--moq-yellow);
}

.moq-cart-lines {
    margin: 0;
    padding: 0;
    list-style: none;
}

.moq-cart-line {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--moq-line);
}

.moq-cart-line:last-child {
    border-bottom: 0;
}

.moq-thumb {
    flex: none;
    width: 64px;
    height: 64px;
    overflow: hidden;
    border-radius: 10px;
    background: #f2f2f2;
}

.moq-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.moq-cart-line-text {
    flex: 1;
    min-width: 0;
}

.moq-cart-line-side {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.moq-line-total {
    font-size: 14px;
    font-weight: 700;
    color: var(--moq-ink);
}

.moq-bill div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    font-size: 13.5px;
    color: var(--moq-muted);
}

.moq-bill dd {
    color: var(--moq-ink);
    font-weight: 600;
}

.moq-bill dd.is-green {
    color: #1e8e3e;
}

.moq-bill .is-total {
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px dashed #dcdcdc;
    font-size: 15px;
    font-weight: 700;
    color: var(--moq-ink);
}

.moq-alert {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff4e5;
    font-size: 13px;
    color: #8a5300;
}

.moq-empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 40px 16px;
    text-align: center;
    color: var(--moq-muted);
}

@media (min-width: 1024px) {
    .moq-cart-bar.is-checkout {
        position: sticky;
        margin: 16px -16px 0;
        border-radius: var(--moq-radius);
    }
}

/* Minimum order value bar (cart page) */
.moq-minimum { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #FFF6D6; color: #5b4300; font-size: 13px; font-weight: 500; }
.moq-minimum p { margin: 0 0 8px; }
.moq-minimum-track { height: 6px; border-radius: 6px; background: #F1E2A6; overflow: hidden; }
.moq-minimum-track span { display: block; height: 100%; background: #F5B700; border-radius: 6px; transition: width .3s ease; }

/* Order stage tracker (customer order page) */
.gw-tracker { margin: 0 0 20px; padding: 16px; border: 1px solid #e4e4e7; border-radius: 12px; background: #fff; }
.gw-steps { display: flex; list-style: none; margin: 0; padding: 0; gap: 4px; }
.gw-steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; font-size: 12px; color: #a1a1aa; text-align: center; }
.gw-steps li::before { content: ""; position: absolute; top: 6px; left: -50%; width: 100%; height: 2px; background: #e4e4e7; z-index: 0; }
.gw-steps li:first-child::before { display: none; }
.gw-steps li.is-done::before { background: #F5B700; }
.gw-dot { width: 14px; height: 14px; border-radius: 50%; background: #e4e4e7; position: relative; z-index: 1; }
.gw-steps li.is-done .gw-dot { background: #F5B700; }
.gw-steps li.is-current .gw-dot { box-shadow: 0 0 0 4px #F5B70040; }
.gw-steps li.is-done { color: #18181b; }
.gw-steps li.is-current .gw-step-label { font-weight: 700; }
.gw-tracker-cancelled { margin: 0; color: #dc2626; font-weight: 600; }
.gw-history { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px dashed #e4e4e7; display: grid; gap: 8px; font-size: 13px; }
.gw-history li { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.gw-history span { color: #71717a; }
.gw-history em { flex-basis: 100%; font-style: normal; color: #3f3f46; }
