/* ═══════════════════════════════════════════════════
   SOCVIA BULK MARKET — AccsMarket Exact Design Clone
   Colors: #434343 header, #2fb241 green, #eff3f6 bg
   ═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500;700&family=Open+Sans:wght@300;400;500&display=swap');

/* ── Base ── */
.sbm-marketplace {
    font-family: 'Ubuntu', Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #222;
    background: #eff3f6;
    padding: 10px 0;
    max-width: 100%;
}

/* ── Platform Section (Parent Category) ── */
.sbm-platform-section {
    margin-bottom: 20px;
}

/* ── Category Title Bar ── */
.sbm-soc-title {
    background-color: #434343;
    height: 42px;
    border: 1px solid #aaadae;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 9px;
    margin-bottom: 0;
}

.sbm-cat-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.sbm-platform-icon {
    width: 28px;
    height: 28px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
    font-family: 'Ubuntu', sans-serif;
}

.sbm-cat-name-text {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 42px;
}

.sbm-cat-cols {
    display: flex;
    align-items: center;
    gap: 0;
}

.sbm-col-label {
    font-size: 13px;
    color: #fff;
    text-align: center;
    font-weight: 400;
    font-family: 'Ubuntu', sans-serif;
}

.sbm-col-qty   { width: 90px; }
.sbm-col-price { width: 95px; }
.sbm-col-btn   { width: 100px; }

/* ── Subcategory Header ── */
.sbm-subcategory-header {
    background: #f9f9f9;
    border: 1px solid #e3e3e3;
    border-top: none;
    padding: 7px 10px 7px 46px;
    font-size: 13px;
    font-weight: 700;
    color: #434343;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ── Listing Card (.soc-body style) ── */
.sbm-listing-card {
    background: #fff;
    display: flex;
    align-items: center;
    padding: 8px 9px;
    border: 1px solid #e3e3e3;
    border-top: none;
    min-height: 50px;
    transition: background 0.15s;
    gap: 0;
}

.sbm-listing-card:hover { background: #fafafa; }

/* Left: Icon */
.sbm-card-icon {
    width: 28px;
    height: 28px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
    margin-right: 8px;
}

/* Middle: Description */
.sbm-card-text {
    flex: 1;
    min-width: 0;
    padding: 0 8px 0 0;
}

.sbm-card-text p {
    margin: 0 0 5px;
    font-size: 13px;
    color: #222;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Badges ── */
.sbm-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    margin-top: 4px;
}

.sbm-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 500;
    padding: 3px 5px;
    height: 20px;
    gap: 2px;
    white-space: nowrap;
    font-family: 'Ubuntu', sans-serif;
}

/* Guarantee / delivery badge — green */
.sbm-badge-delivery {
    background: #e2ffe6;
    color: #2fb241;
    width: 53px;
}

/* Star / rating badge — yellow */
.sbm-badge-rating {
    background: #fff5d5;
    color: #e9ab00;
    width: 49px;
    font-weight: 700;
}

/* Repeat / rejects badge — green */
.sbm-badge-repeat {
    background: #e2ffe6;
    color: #2fb241;
    width: 50px;
    font-weight: 700;
}

/* Orders / sold badge — gray */
.sbm-badge-sold {
    color: #9eaeb7;
    font-weight: 700;
    width: 53px;
    opacity: 70%;
}

/* NEW badge — purple */
.sbm-badge-new {
    background: #e5deff;
    color: #a488ff;
    font-weight: 700;
    padding: 3px 6px;
    width: 38px;
}

/* HOT badge — orange */
.sbm-badge-hot {
    background: #fff0e0;
    color: #ff6b00;
    font-weight: 700;
    padding: 3px 6px;
    width: 38px;
}

/* More link */
.sbm-more-link {
    font-size: 12px;
    color: #2fb241;
    text-decoration: none;
    display: inline-block;
    margin-top: 3px;
}
.sbm-more-link:hover { text-decoration: underline; }

/* Right columns */
.sbm-card-qty {
    width: 90px;
    text-align: center;
    flex-shrink: 0;
}

.sbm-card-qty strong {
    display: block;
    font-size: 13px;
    color: #222;
    font-weight: 700;
}

.sbm-card-qty small {
    display: block;
    font-size: 12px;
    color: #8e8e8e;
}

.sbm-out-of-stock {
    font-size: 12px;
    color: #d52823;
    font-weight: 700;
}

.sbm-card-price {
    width: 95px;
    text-align: center;
    flex-shrink: 0;
}

.sbm-card-price strong {
    display: block;
    font-size: 13px;
    color: #222;
    font-weight: 700;
}

.sbm-card-price small {
    display: block;
    font-size: 11px;
    color: #8e8e8e;
}

.sbm-card-btn {
    width: 100px;
    text-align: center;
    flex-shrink: 0;
}

/* ── BUY Button ── */
.sbm-buy-btn {
    position: relative;
    display: inline-block;
    background: #2fb241;
    border: 1px solid #1b962c;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    font-family: 'Ubuntu', sans-serif;
    padding: 0 5px;
    line-height: 27px;
    height: 27px;
    width: 80px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    vertical-align: middle;
}

.sbm-buy-btn:before {
    content: '';
    position: absolute;
    display: block;
    top: -1px;
    left: 2px;
    right: 2px;
    height: 1px;
    width: calc(100% - 4px);
    background: #70bd7b;
}

.sbm-buy-btn:after {
    content: '';
    position: absolute;
    display: block;
    bottom: -1px;
    left: 2px;
    right: 2px;
    width: calc(100% - 4px);
    height: 1px;
    background: #67b972;
}

.sbm-buy-btn:hover:not(:disabled) { background: #03a819; }
.sbm-buy-btn:disabled { background: #ccc; border-color: #ccc; cursor: not-allowed; }
.sbm-buy-btn:disabled::before, .sbm-buy-btn:disabled::after { display: none; }

/* Expand subcategory button */
.sbm-expand-btn {
    width: 100%;
    height: 27px;
    border-radius: 3px;
    border: 1px solid #2fb241;
    background: transparent;
    color: #2fb241;
    margin: 6px 0;
    font-size: 13px;
    font-family: 'Ubuntu', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}
.sbm-expand-btn:hover { background: #2fb241; color: #fff; }

/* Empty state */
.sbm-empty {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 14px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #e3e3e3;
}

/* ═══════════════════════════════════════════════════
   BUY MODAL — AccsMarket style
   ═══════════════════════════════════════════════════ */
.sbm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(55, 55, 55, 0.3);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.sbm-modal {
    background: #fff;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
    border-radius: 0;
    font-family: Arial, 'Ubuntu', Helvetica, sans-serif;
}

.sbm-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 10px;
    border-bottom: 1px solid #ddd;
    margin: 20px 20px 0;
    text-transform: uppercase;
}

.sbm-modal-title {
    font-size: 13px;
    font-weight: 400;
    color: #333;
}

.sbm-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    width: 24px;
    height: 24px;
    font-size: 16px;
    color: #666;
    padding: 0;
    line-height: 24px;
}

.sbm-modal-close:hover { color: #000; }

#sbm-item-name {
    font-size: 12px;
    font-weight: 700;
    color: #333;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    font-family: Arial, sans-serif;
}

/* Steps bar — exact AccsMarket style */
.sbm-steps-bar {
    display: flex;
    margin: 14px 20px 0;
    position: relative;
}

.sbm-step-1 {
    background: #2fb241;
    border: 1px solid #2fb241;
    border-radius: 2px 0 0 2px;
    height: 40px;
    width: calc(50% - 10px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 13px;
    color: #fff;
    font-family: Arial, sans-serif;
}

.sbm-step-1::after {
    display: block;
    position: absolute;
    margin-left: calc(48% - 4px);
    content: '';
    width: 0;
    height: 0;
    border-top: 20px solid transparent;
    border-left: 12px solid #2fb241;
    border-bottom: 20px solid transparent;
    right: -12px;
    top: -1px;
    z-index: 1;
}

.sbm-step-1.done {
    background: #fff;
    color: #2fb241;
}

.sbm-step-1.done::after {
    border-left-color: #fff;
}

.sbm-step-done-icon {
    display: none;
    vertical-align: middle;
    margin-right: 4px;
    color: #2fb241;
}

.sbm-step-1.done .sbm-step-done-icon { display: inline; }

.sbm-step-2 {
    background: #fff;
    border: 1px solid #b4b4b4;
    border-left: none;
    border-radius: 0 2px 2px 0;
    height: 40px;
    width: 50.6%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #555;
    position: relative;
    font-family: Arial, sans-serif;
}

.sbm-step-2::before {
    display: block;
    position: absolute;
    content: '';
    width: 0;
    height: 0;
    border-top: 20px solid transparent;
    border-left: 12px solid #b4b4b4;
    border-bottom: 20px solid transparent;
    right: -12px;
    top: -1px;
}

.sbm-step-2::after {
    display: block;
    position: absolute;
    content: '';
    width: 0;
    height: 0;
    border-top: 20px solid transparent;
    border-left: 12px solid #fff;
    border-bottom: 20px solid transparent;
    right: -10px;
    top: -1px;
}

.sbm-step-2.active {
    background: #2fb241;
    border-color: #2fb241;
    color: #fff;
}

.sbm-step-2.active::after { border-left-color: #2fb241; }
.sbm-step-2.active::before { border-left-color: #2fb241; }

/* Step content */
.sbm-step-content { padding: 10px 20px; }

/* Vendor list */
#item_partners {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

#item_partners li {
    border: 1px solid #2fb241;
    margin: 5px 0;
    padding: 12px 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
    border-radius: 2px;
    font-size: 13px;
    font-family: Arial, sans-serif;
}

#item_partners li .text-muted { color: #8e8e8e; }

#item_partners li.active,
#item_partners li:hover {
    background: #2fb241;
    color: #fff;
}

#item_partners li.active .text-muted,
#item_partners li:hover .text-muted { color: #fff; }

/* Form */
.sbm-form {
    font-size: 13px;
    font-family: Arial, sans-serif;
}

.sbm-form table { width: 100%; border-collapse: separate; border-spacing: 0; }
.sbm-form td { padding: 4px; vertical-align: middle; }
.sbm-form td:first-child { width: 35%; font-size: 13px; color: #333; white-space: nowrap; }

.sbm-form input[type=email],
.sbm-form input[type=number],
.sbm-form input[type=text],
.sbm-form select {
    border: 1px solid #dadada;
    color: #6f6f6f;
    box-shadow: 0 0 2px #e5e5e5 inset;
    background: #fafafa;
    border-radius: 3px;
    width: 100%;
    padding: 0 5px;
    line-height: 25px;
    height: 25px;
    font-size: 13px;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

.sbm-form input:focus,
.sbm-form select:focus { border-color: #ff4e00; outline: none; }

/* Price display */
.sbm-price-row { font-weight: 700; }
#sbm-price-display { color: #00b23c; font-size: 14px; font-weight: 700; }

/* Errors */
.sbm-errors {
    color: #d52823;
    font-size: 12px;
    margin: 5px 0;
}

/* Checkboxes */
.sbm-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 5px 0;
    font-size: 12px;
    color: #333;
    cursor: pointer;
    font-family: Arial, sans-serif;
}

.sbm-checkbox-row a { color: #2fb241; }

/* Pay button */
.sbm-pay-btn {
    background: #2fb241;
    border: 1px solid #1b962c;
    border-radius: 3px;
    color: #fff;
    font-size: 13px;
    font-family: Arial, sans-serif;
    cursor: pointer;
    padding: 5px 0;
    width: 100%;
    margin: 12px 0 5px;
    position: relative;
    transition: background 0.2s;
}

.sbm-pay-btn:hover:not(:disabled) { background: #03a819; }
.sbm-pay-btn:disabled { background: #ccc; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 767px) {
    .sbm-col-qty, .sbm-col-price { display: none; }
    .sbm-card-qty, .sbm-card-price { display: none; }
    .sbm-col-label { display: none; }
    .sbm-listing-card { flex-wrap: wrap; }
    .sbm-card-text { width: calc(100% - 40px); }
    .sbm-card-btn { margin-left: auto; width: auto; }
}

@media (max-width: 480px) {
    .sbm-modal { border-radius: 0; }
    .sbm-modal-overlay { padding: 0; align-items: flex-end; }
    .sbm-modal { max-height: 85vh; }
}
