/* =========================================================
   Bulk Order Catalog – bulk-order-catalog.css
   ========================================================= */

/* --- Wrap & typography ---------------------------------- */
.boc-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #1a1a1a;
    max-width: 960px;
    margin: 0 auto;
}

.boc-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #1a1a1a;
}

.boc-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 20px;
}

/* --- Category accordion --------------------------------- */
.boc-category {
    margin-bottom: 24px;
}

.boc-cat-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    transition: background 0.15s;
}

.boc-cat-toggle:hover {
    background: #e9eaf0;
}

.boc-chevron {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #6b7280;
    transition: transform 0.2s ease;
}

.boc-cat-toggle[aria-expanded="false"] .boc-chevron {
    transform: rotate(-90deg);
}

.boc-cat-name {
    flex: 1;
}

.boc-cat-count {
    background: #d1fae5;
    color: #065f46;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 20px;
}

/* --- Collapsible body ------------------------------------ */
.boc-cat-body {
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.boc-cat-body.boc-collapsed {
    max-height: 0 !important;
}

/* --- Table ---------------------------------------------- */
.boc-table-wrap {
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 6px 6px;
    overflow-x: auto;
}

.boc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.boc-table thead {
    background: #f9fafb;
}

.boc-table th {
    padding: 9px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.boc-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.boc-table tbody tr:last-child td {
    border-bottom: none;
}

.boc-table tbody tr:hover td {
    background: #fafafa;
}

/* Column widths */
.boc-col-product  { min-width: 220px; }
.boc-col-unit     { width: 70px; }
.boc-col-price    { width: 110px; }
.boc-col-minimum  { width: 80px; }
.boc-col-qty      { width: 90px; }
.boc-col-resale   { width: 70px; text-align: center; }

/* --- Product link --------------------------------------- */
.boc-prod-link {
    color: #2e7d32;
    text-decoration: none;
    font-weight: 500;
}

.boc-prod-link:hover {
    text-decoration: underline;
}

/* --- Price --------------------------------------------- */
.boc-price {
    font-weight: 600;
}

.boc-currency {
    color: #9ca3af;
    font-size: 11px;
    margin-left: 2px;
}

/* --- Badges -------------------------------------------- */
.boc-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
    margin-left: 6px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.boc-badge--oos {
    background: #fee2e2;
    color: #991b1b;
}

/* --- Qty input ------------------------------------------ */
.boc-qty {
    width: 64px;
    padding: 5px 8px;
    font-size: 13px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    text-align: center;
    color: #111827;
    transition: border-color 0.15s, box-shadow 0.15s;
    -moz-appearance: textfield;
}

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

.boc-qty:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

.boc-qty:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

/* --- Resale checkbox ------------------------------------ */
.boc-resale {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #2e7d32;
}

/* --- Summary sticky bar --------------------------------- */
.boc-summary {
    position: sticky;
    bottom: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 18px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
    margin-top: 8px;
}

.boc-summary-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.boc-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.boc-stat-label {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.boc-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

/* --- Add to cart button --------------------------------- */
.boc-btn-cart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: #2e7d32;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    white-space: nowrap;
}

.boc-btn-cart svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.boc-btn-cart:hover {
    background: #1b5e20;
}

.boc-btn-cart:active {
    transform: scale(0.97);
}

.boc-btn-cart:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* --- Inline notices ------------------------------------ */
.boc-notice {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    margin-top: 12px;
}

.boc-notice--success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.boc-notice--error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* --- Cart link inside notice --------------------------- */
.boc-cart-link {
    display: inline-block;
    margin-top: 6px;
    color: #065f46;
    font-weight: 600;
    text-decoration: underline;
}

.boc-cart-link:hover {
    color: #047857;
}

/* --- Responsive ---------------------------------------- */
@media ( max-width: 600px ) {
    .boc-table th,
    .boc-table td {
        padding: 8px 10px;
    }

    .boc-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .boc-btn-cart {
        width: 100%;
        justify-content: center;
    }
}
