/* ─── Roberto's Wholesale — Public Styles ─────────────────────────────────── */

/* ─── Wholesale Price Display ────────────────────────────────────────────────── */
.rw-wholesale-price {
    display: block;
    margin: 4px 0;
    font-size: 1.1em;
}

.rw-ws-label {
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #27ae60;
    display: inline-block;
    margin-right: 4px;
}

.rw-wholesale-price .woocommerce-Price-amount {
    color: #27ae60;
    font-weight: 700;
}

/* ─── Restriction Notice ─────────────────────────────────────────────────────── */
.rw-restriction-notice {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 14px 18px;
    margin: 16px 0;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    line-height: 1.6;
}

.rw-restriction-notice a {
    color: #1a1a2e;
    font-weight: 600;
    text-decoration: underline;
}

/* ─── Restricted Button ──────────────────────────────────────────────────────── */
.rw-restricted-btn {
    background: #f0f0f0 !important;
    color: #888 !important;
    border-color: #ddd !important;
    cursor: not-allowed !important;
    font-size: 13px !important;
}

/* ─── Min Qty Notice ─────────────────────────────────────────────────────────── */
.rw-min-qty-notice {
    background: #e8f4f8;
    border-left: 4px solid #3498db;
    padding: 8px 14px;
    font-size: 13px;
    margin: 8px 0;
    border-radius: 0 4px 4px 0;
}

/* ─── Cart Savings ───────────────────────────────────────────────────────────── */
.rw-savings-row th,
.rw-savings-row td {
    color: #27ae60;
    font-weight: 600;
}

/* ─── Become Wholesale Notice ────────────────────────────────────────────────── */
.rw-become-wholesale-notice {
    background: #f8f9ff;
    border: 1px dashed #3498db;
    padding: 10px 14px;
    margin: 12px 0;
    border-radius: 6px;
    font-size: 13px;
}

.rw-become-wholesale-notice a {
    color: #1a1a2e;
    font-weight: 700;
    margin-left: 6px;
}

/* ─── Account Badge ──────────────────────────────────────────────────────────── */
.rw-account-badge {
    background: #f0f6fc;
    border: 1px solid #d0e4f5;
    padding: 8px 14px;
    margin-bottom: 12px;
    border-radius: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rw-role-badge {
    display: inline-block;
    background: #1a1a2e;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* ─── Application Form ───────────────────────────────────────────────────────── */
.rw-application-wrap {
    max-width: 720px;
    margin: 0 auto;
}

.rw-form-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 28px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #1a1a2e;
}

.rw-application-form {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.rw-form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.rw-form-row-half > .rw-form-group {
    flex: 1 1 calc(50% - 8px);
    min-width: 220px;
}

.rw-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.rw-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.rw-form-group input,
.rw-form-group select,
.rw-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: #fafafa;
    transition: border-color .2s, background .2s;
    box-sizing: border-box;
}

.rw-form-group input:focus,
.rw-form-group select:focus,
.rw-form-group textarea:focus {
    outline: none;
    border-color: #1a1a2e;
    background: #fff;
}

.rw-form-group .required { color: #e74c3c; }

.rw-form-submit {
    margin-top: 24px;
    text-align: center;
}

.rw-submit-btn {
    background: #1a1a2e;
    color: #fff;
    border: none;
    padding: 14px 40px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background .2s, transform .1s;
}

.rw-submit-btn:hover {
    background: #2c2c4e;
    transform: translateY(-1px);
}

.rw-submit-btn:active {
    transform: translateY(0);
}

.rw-form-disclaimer {
    font-size: 11px;
    color: #aaa;
    margin-top: 10px;
}

.rw-form-success {
    background: #d1eddd;
    border-left: 4px solid #27ae60;
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    font-size: 15px;
    margin: 20px 0;
}

.rw-form-errors {
    background: #f8d7da;
    border-left: 4px solid #e74c3c;
    padding: 14px 20px;
    border-radius: 0 8px 8px 0;
    margin: 16px 0;
}

.rw-form-errors ul {
    margin: 0;
    padding-left: 18px;
}

.rw-form-errors li {
    font-size: 13px;
    color: #721c24;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .rw-application-form { padding: 20px; }
    .rw-form-row-half > .rw-form-group { flex: 1 1 100%; }
    .rw-submit-btn { width: 100%; }
}

/* ─── My Account — Orders ────────────────────────────────────────────────────── */
.rw-my-orders { padding: 4px 0; }

.rw-orders-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--color-text-secondary);
}
.rw-orders-empty-icon { font-size: 48px; margin-bottom: 12px; }
.rw-orders-empty h3 { font-size: 18px; font-weight: 500; margin: 0 0 8px; color: var(--color-text-primary); }
.rw-orders-empty p { margin: 0 0 20px; font-size: 14px; }

.rw-orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.rw-orders-table th {
    text-align: left;
    padding: 10px 12px;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-secondary);
    border-bottom: 2px solid var(--color-border-tertiary);
}
.rw-orders-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--color-border-tertiary);
    vertical-align: middle;
    color: var(--color-text-primary);
}
.rw-order-row:hover td { background: var(--color-background-secondary); }

.rw-order-number a {
    font-weight: 500;
    color: var(--color-text-primary);
    text-decoration: none;
}
.rw-order-number a:hover { text-decoration: underline; }

.rw-order-date small,
.rw-order-items small {
    display: block;
    color: var(--color-text-secondary);
    font-size: 12px;
    margin-top: 2px;
}

.rw-order-items span {
    display: block;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Order status badges ────────────────────────────────────────────────────── */
.rw-order-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.rw-status-completed   { background: #d1eddd; color: #155724; }
.rw-status-processing  { background: #cce5ff; color: #004085; }
.rw-status-pending     { background: #fff3cd; color: #856404; }
.rw-status-hold        { background: #e2d9f3; color: #432874; }
.rw-status-cancelled   { background: #f8d7da; color: #721c24; }
.rw-status-refunded    { background: #d1ecf1; color: #0c5460; }
.rw-status-failed      { background: #f8d7da; color: #721c24; }

/* ── Order action buttons ───────────────────────────────────────────────────── */
.rw-order-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}
.rw-reorder-form { display: inline; margin: 0; }

.rw-btn-small {
    padding: 5px 12px !important;
    font-size: 12px !important;
    height: auto !important;
    line-height: 1.4 !important;
}
.rw-btn-outline {
    background: transparent !important;
    border: 1px solid var(--color-border-primary) !important;
    color: var(--color-text-primary) !important;
}
.rw-btn-outline:hover {
    background: var(--color-background-secondary) !important;
}
.rw-btn-primary {
    background: #1a1a2e !important;
    color: #fff !important;
    border-color: #1a1a2e !important;
}
.rw-btn-primary:hover { background: #2c2c4e !important; }

.rw-btn-reorder {
    background: #f0f6fc !important;
    color: #1a1a2e !important;
    border: 1px solid #3498db !important;
}
.rw-btn-reorder:hover {
    background: #3498db !important;
    color: #fff !important;
}

/* ── Pagination ─────────────────────────────────────────────────────────────── */
.rw-orders-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    font-size: 13px;
}
.rw-page-info { color: var(--color-text-secondary); }

/* ── Cart savings amount ────────────────────────────────────────────────────── */
.rw-savings-amount { color: #27ae60; }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .rw-orders-table thead { display: none; }
    .rw-orders-table td {
        display: block;
        padding: 6px 12px;
        border-bottom: none;
    }
    .rw-orders-table td::before {
        content: attr(data-label);
        font-weight: 500;
        font-size: 11px;
        text-transform: uppercase;
        display: block;
        color: var(--color-text-secondary);
        margin-bottom: 2px;
    }
    .rw-order-row { border-bottom: 2px solid var(--color-border-tertiary); display: block; padding: 8px 0; }
    .rw-order-items span { max-width: 100%; }
    .rw-orders-pagination { flex-direction: column; gap: 10px; }
}

/* ─── Single product — wholesale price display ───────────────────────────────── */
.rw-price-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 4px 0 12px;
}

/* Retail row */
.rw-retail-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--color-text-secondary);
}
.rw-retail-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-secondary);
    min-width: 90px;
}
.rw-retail-price {
    color: var(--color-text-secondary);
    text-decoration: line-through;
    font-size: 15px;
}

/* Wholesale row */
.rw-ws-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.rw-ws-badge {
    display: inline-block;
    background: #1a1a2e;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
}
.rw-ws-badge-sm {
    font-size: 10px;
    padding: 2px 7px;
}
.rw-ws-price {
    font-size: 26px;
    font-weight: 700;
    color: #27ae60;
    line-height: 1;
}
.rw-ws-price .woocommerce-Price-amount { color: inherit; }

/* Savings row */
.rw-savings-row-price {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eafaf1;
    border: 1px solid #a9dfbf;
    color: #1e8449;
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 20px;
    width: fit-content;
}
.rw-savings-pct {
    font-weight: 700;
    font-size: 12px;
}

/* Shop loop compact */
.rw-loop-price { display: block; }
.rw-loop-retail {
    font-size: 12px;
    color: var(--color-text-secondary);
    text-decoration: line-through;
    display: block;
    margin-bottom: 2px;
}
.rw-loop-ws {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    font-style: normal;
}
.rw-loop-ws .woocommerce-Price-amount { color: #27ae60; font-weight: 700; }

/* ─── Single product — restriction banner ────────────────────────────────────── */
.rw-product-restriction-banner {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: #fafafa;
    border: 1.5px solid #e0e0e0;
    border-left: 5px solid #1a1a2e;
    border-radius: 0 10px 10px 0;
    padding: 20px 24px;
    margin: 16px 0 24px;
}
.rw-prb-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}
.rw-prb-body { flex: 1; }

.rw-prb-message {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text-primary, #333);
}
.rw-prb-message a {
    color: #1a1a2e;
    font-weight: 600;
    text-decoration: underline;
}
.rw-prb-message a:hover { color: #3498db; }

.rw-prb-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.rw-prb-btn-primary {
    background: #1a1a2e !important;
    color: #fff !important;
    border-color: #1a1a2e !important;
    padding: 10px 22px !important;
    font-size: 14px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
}
.rw-prb-btn-primary:hover {
    background: #2c2c4e !important;
    color: #fff !important;
}
.rw-prb-btn-secondary {
    background: transparent !important;
    color: #1a1a2e !important;
    border: 1.5px solid #1a1a2e !important;
    padding: 10px 22px !important;
    font-size: 14px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
}
.rw-prb-btn-secondary:hover {
    background: #f0f0f0 !important;
}

@media (max-width: 600px) {
    .rw-product-restriction-banner { flex-direction: column; gap: 10px; }
    .rw-prb-actions { flex-direction: column; }
    .rw-prb-btn-primary, .rw-prb-btn-secondary { text-align: center; }
    .rw-ws-price { font-size: 22px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HOMEPAGE SHORTCODE — [roberto_products]
   ═══════════════════════════════════════════════════════════════════════════ */

.rw-products-shortcode { width: 100%; }

.rw-sc-heading {
    font-size: 26px;
    font-weight: 700;
    color: var(--color-text-primary, #1a1a2e);
    margin: 0 0 24px;
}

/* Locked card — no price, no button */
.rw-sc-locked .woocommerce-loop-product__link {
    cursor: default;
    pointer-events: none;
}
.rw-sc-locked a.woocommerce-LoopProduct-link {
    pointer-events: all; /* link goes to login */
    cursor: pointer;
}

/* Price hidden label */
.rw-sc-price-hidden {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #888;
    padding: 6px 0;
}
.rw-sc-lock-icon { font-size: 14px; }

/* Wholesale price in grid */
.rw-sc-ws-price { color: #27ae60 !important; font-weight: 700; }

/* Load more row */
.rw-sc-loadmore-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 32px 0 16px;
    flex-wrap: wrap;
}

.rw-sc-loadmore {
    background: #1a1a2e !important;
    color: #fff !important;
    border-color: #1a1a2e !important;
    padding: 12px 36px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: background .2s !important;
}
.rw-sc-loadmore:hover { background: #2c2c4e !important; }
.rw-sc-loadmore.rw-loading { opacity: .7; cursor: wait !important; }
.rw-sc-loadmore.rw-btn-done {
    background: #f0f0f0 !important;
    color: #888 !important;
    border-color: #ddd !important;
    cursor: default !important;
}

.rw-sc-count {
    font-size: 13px;
    color: #888;
}

.rw-sc-empty { color: #888; padding: 20px 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   CUSTOM SHOP PAGE — Left sidebar + product grid
   ═══════════════════════════════════════════════════════════════════════════ */

.rw-shop-wrap-outer { max-width: 100%; }

.rw-shop-wrap {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: start;
    margin: 0 auto;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.rw-shop-sidebar {
    position: sticky;
    top: 100px;
}

.rw-sidebar-widget {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.rw-sidebar-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #1a1a2e;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1a1a2e;
}

.rw-cat-list,
.rw-sort-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rw-cat-item a,
.rw-sort-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 14px;
    color: #444;
    text-decoration: none;
    transition: background .15s, color .15s;
}

.rw-cat-item a:hover,
.rw-sort-item a:hover {
    background: #f0f0f0;
    color: #1a1a2e;
}

.rw-cat-item.rw-cat-active a,
.rw-sort-item.rw-sort-active a {
    background: #1a1a2e;
    color: #fff;
    font-weight: 600;
}

.rw-cat-count {
    display: inline-block;
    background: rgba(0,0,0,.08);
    border-radius: 20px;
    font-size: 11px;
    padding: 1px 7px;
    min-width: 22px;
    text-align: center;
}

.rw-cat-item.rw-cat-active .rw-cat-count {
    background: rgba(255,255,255,.25);
    color: #fff;
}

/* ── Main area ───────────────────────────────────────────────────────────── */
.rw-shop-main { min-width: 0; }

.rw-shop-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e8e8e8;
}

.rw-shop-result-count {
    font-size: 15px;
    font-weight: 500;
    color: #1a1a2e;
}

.rw-active-cat {
    font-weight: 700;
    color: #1a1a2e;
}

.rw-total-count {
    font-weight: 400;
    color: #888;
    margin-left: 4px;
    font-size: 14px;
}

.rw-shop-empty {
    padding: 40px 0;
    text-align: center;
    color: #888;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .rw-shop-wrap {
        grid-template-columns: 1fr;
    }
    .rw-shop-sidebar {
        position: static;
    }
    .rw-sidebar-widget { margin-bottom: 12px; }
    .rw-cat-list { flex-direction: row; flex-wrap: wrap; gap: 6px; }
    .rw-cat-item a, .rw-sort-item a { padding: 6px 12px; font-size: 13px; }
}
