/* ============================================================
   TCE Wholesale Bulk Pricing — Stylesheet
   ============================================================ */

/* ── Pricing Table on Product Pages ───────────────────────── */

.tce-bulk-pricing-table {
    margin: 20px 0 24px;
    border: 2px solid #e8c84a;
    border-radius: 10px;
    overflow: hidden;
    font-family: inherit;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
}

.tce-bulk-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e8c84a;
    padding: 12px 18px;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: .3px;
}

.tce-tiers-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.tce-tiers-table thead tr {
    background: #f7f7f7;
    border-bottom: 2px solid #e8c84a;
}

.tce-tiers-table thead th {
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #555;
    text-align: left;
}

.tce-tier-row {
    transition: background .2s;
    border-bottom: 1px solid #f0f0f0;
}

.tce-tier-row:last-child {
    border-bottom: none;
}

.tce-tier-row td {
    padding: 10px 14px;
    font-size: 14px;
    vertical-align: middle;
}

.tce-tier-row.tce-tier-active {
    background: #fffbea;
    border-left: 4px solid #e8c84a;
}

.tce-tier-row.tce-tier-active td:first-child {
    padding-left: 10px;
}

.tce-tier-qty { color: #333; font-weight: 500; }

.tce-tier-price strong { color: #1a1a2e; font-size: 16px; }

.tce-retail-badge,
.tce-wholesale-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    margin-left: 6px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.tce-retail-badge    { background: #e3f0ff; color: #1a6cc7; }
.tce-wholesale-badge { background: #e8c84a; color: #1a1a2e; }

.tce-save-pct {
    background: #e6f9ee;
    color: #178a4e;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
}

.tce-mixed-note {
    margin: 0;
    padding: 10px 14px;
    background: #f5f5f5;
    font-size: 12.5px;
    color: #666;
    border-top: 1px solid #ececec;
}

/* ── Live Price Display ────────────────────────────────────── */

.tce-live-price-wrap {
    font-size: 13px;
    color: #555;
    margin: -6px 0 14px;
}

#tce-live-price { color: #1a1a2e; font-size: 15px; }

.tce-upsell-inline {
    background: #fff8dc;
    border: 1px solid #e8c84a;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    color: #7a5c00;
    margin-left: 8px;
}

/* ── Cart Savings Notice ───────────────────────────────────── */

.tce-bulk-savings-row td { padding: 0 !important; }

.tce-cart-savings-notice {
    background: linear-gradient(90deg, #fffbea 0%, #fff8dc 100%);
    border: 1px solid #e8c84a;
    border-radius: 6px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 13.5px;
    margin: 6px 0;
}

.tce-tier-badge {
    background: #1a1a2e;
    color: #e8c84a;
    border-radius: 4px;
    padding: 3px 10px;
    font-weight: 700;
    font-size: 12px;
    white-space: nowrap;
}

.tce-savings-amount { color: #178a4e; font-size: 14px; }
.tce-upsell         { color: #7a5c00; }

.tce-tier-label-cart { color: #888; }

.tce-cart-active-tier {
    background: #f0f6ff;
    border-left: 4px solid #1a6cc7;
    padding: 8px 14px;
    font-size: 13px;
    margin-bottom: 12px;
    border-radius: 0 4px 4px 0;
}

/* ── Wholesale Registration Form ──────────────────────────── */

.tce-wholesale-register-wrap {
    max-width: 680px;
    margin: 0 auto;
    font-family: inherit;
}

.tce-wholesale-header {
    text-align: center;
    margin-bottom: 30px;
}

.tce-wholesale-header h2 { font-size: 26px; margin-bottom: 8px; }
.tce-wholesale-header p  { color: #555; font-size: 15px; }

/* Tier cards */

.tce-pricing-preview { margin-bottom: 36px; }
.tce-pricing-preview h3 { font-size: 16px; margin-bottom: 14px; }

.tce-tier-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 640px) {
    .tce-tier-cards { grid-template-columns: repeat(2, 1fr); }
}

.tce-tier-card {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 16px 10px;
    text-align: center;
    position: relative;
    background: #fafafa;
    transition: border-color .2s;
}

.tce-tier-card-best {
    border-color: #e8c84a;
    background: #fffbea;
}

.tce-best-value {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: #e8c84a;
    color: #1a1a2e;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 20px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.tce-tier-qty-label  { font-size: 12px; color: #777; margin-bottom: 6px; }
.tce-tier-price-big  { font-size: 26px; font-weight: 800; color: #1a1a2e; line-height: 1.1; }
.tce-tier-price-sub  { font-size: 11px; color: #888; }

/* Form */

.tce-wholesale-form {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 16px rgba(0,0,0,.06);
}

.tce-form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 520px) {
    .tce-form-row-2col { grid-template-columns: 1fr; }
}

.tce-form-group {
    margin-bottom: 18px;
}

.tce-form-group label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.tce-form-group label .required { color: #e03; }

.tce-form-group input[type="text"],
.tce-form-group input[type="email"],
.tce-form-group input[type="tel"],
.tce-form-group input[type="password"],
.tce-form-group select,
.tce-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #222;
    background: #fafafa;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}

.tce-form-group input:focus,
.tce-form-group select:focus,
.tce-form-group textarea:focus {
    outline: none;
    border-color: #e8c84a;
    box-shadow: 0 0 0 3px rgba(232,200,74,.18);
    background: #fff;
}

.tce-form-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    font-size: 13px;
    cursor: pointer;
}

.tce-form-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #e8c84a;
}

.tce-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e8c84a;
    border: none;
    border-radius: 8px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .4px;
    transition: opacity .2s, transform .1s;
    margin-top: 6px;
}

.tce-submit-btn:hover  { opacity: .9; }
.tce-submit-btn:active { transform: scale(.99); }
.tce-submit-btn:disabled { opacity: .6; cursor: not-allowed; }

.tce-form-message {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 14px;
}

.tce-form-message.success { background: #e6f9ee; color: #178a4e; border: 1px solid #b2e8cc; }
.tce-form-message.error   { background: #fff0f0; color: #c0392b; border: 1px solid #f5c6cb; }

/* My Account wholesale info */

.tce-wholesale-account-info { padding: 20px 0; }

.tce-wholesale-approved,
.tce-wholesale-pending {
    border-radius: 10px;
    padding: 20px 24px;
}

.tce-wholesale-approved { background: #e6f9ee; border: 1px solid #b2e8cc; }
.tce-wholesale-pending  { background: #fff8dc; border: 1px solid #e8c84a; }

.tce-already-wholesale,
.tce-pending-notice {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
}

.tce-already-wholesale { background: #e6f9ee; border: 1px solid #b2e8cc; }
.tce-pending-notice    { background: #fff8dc; border: 1px solid #e8c84a; }

.tce-wholesale-reg-link {
    margin-top: 10px;
    font-size: 13px;
    color: #555;
}
