/**
 * B2B Portal Frontend Styles
 */

/* Dashboard Styles */
.b2b-portal-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    background: linear-gradient(135deg, #0A2E6F 0%, #1D5FBF 58%, #18B7D6 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

.dashboard-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(255, 255, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.dashboard-header h1 {
    margin: 0;
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, #0A2E6F 0%, #1D5FBF 58%, #18B7D6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.tier-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.discount-info {
    background: linear-gradient(135deg, #0A2E6F 0%, #1D5FBF 58%, #18B7D6 100%);
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 10px 30px rgba(10, 46, 111, 0.3);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1),
                0 0 0 1px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1D5FBF 0%, #764ba2 100%);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(255, 255, 255, 0.5);
}

.stat-card h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
}

.stat-card .stat-value {
    font-size: 36px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
}

.dashboard-actions {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.dashboard-actions .button,
.dashboard-actions .button-primary {
    position: relative;
    padding: 18px 36px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    cursor: pointer;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.dashboard-actions .button-primary {
    background: linear-gradient(135deg, #0A2E6F 0%, #1D5FBF 58%, #18B7D6 100%);
    color: #fff !important;
    box-shadow:
        0 8px 0 #071d45,
        0 12px 20px rgba(10, 46, 111, 0.3);
}

.dashboard-actions .button-primary:hover {
    transform: translateY(-4px) rotateX(5deg);
    box-shadow:
        0 12px 0 #071d45,
        0 20px 35px rgba(10, 46, 111, 0.5);
}

.dashboard-actions .button-primary:active {
    transform: translateY(2px);
    box-shadow:
        0 4px 0 #071d45,
        0 6px 12px rgba(10, 46, 111, 0.3);
}

.dashboard-actions .button {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    color: #fff !important;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 8px 0 rgba(255, 255, 255, 0.15),
        0 12px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dashboard-actions .button:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.7);
    transform: translateY(-4px) rotateX(5deg);
    box-shadow:
        0 12px 0 rgba(255, 255, 255, 0.2),
        0 20px 35px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.dashboard-actions .button:active {
    transform: translateY(2px);
    box-shadow:
        0 4px 0 rgba(255, 255, 255, 0.15),
        0 6px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.tier-details {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(255, 255, 255, 0.3);
}

.tier-details h2 {
    margin: 0 0 24px 0;
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
}

.tier-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tier-details ul li {
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 16px;
    color: #475569;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tier-details ul li:before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #0A2E6F 0%, #1D5FBF 58%, #18B7D6 100%);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    flex-shrink: 0;
}

.tier-details ul li:last-child {
    border-bottom: none;
}

.recent-orders {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(255, 255, 255, 0.3);
}

.recent-orders h2 {
    margin: 0 0 24px 0;
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
}

.b2b-portal-orders {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

.orders-header {
    margin-bottom: 24px;
}

.orders-filters {
    margin-bottom: 28px;
}

.orders-pagination {
    margin-top: 28px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.b2b-orders-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.b2b-orders-table thead {
    background: linear-gradient(135deg, #0A2E6F 0%, #1D5FBF 58%, #18B7D6 100%);
    color: #fff;
}

.b2b-orders-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.b2b-orders-table th:first-child {
    padding-left: 28px;
}

.b2b-orders-table th:last-child {
    padding-right: 28px;
}

.b2b-orders-table td {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: #475569;
    font-weight: 500;
}

.b2b-orders-table td:first-child {
    padding-left: 28px;
}

.b2b-orders-table td:last-child {
    padding-right: 28px;
}

.b2b-orders-table tbody tr:hover {
    background: rgba(10, 46, 111, 0.05);
}

.b2b-orders-table .button {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    background: linear-gradient(135deg, #0A2E6F 0%, #1D5FBF 58%, #18B7D6 100%);
    color: #fff !important;
    border: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow:
        0 4px 0 #071d45,
        0 6px 15px rgba(10, 46, 111, 0.3);
}

.b2b-orders-table .button:hover {
    transform: translateY(-3px);
    box-shadow:
        0 6px 0 #071d45,
        0 10px 25px rgba(10, 46, 111, 0.5);
}

.b2b-orders-table .button:active {
    transform: translateY(1px);
    box-shadow:
        0 2px 0 #071d45,
        0 4px 10px rgba(10, 46, 111, 0.3);
}

@media (max-width: 768px) {
    .b2b-portal-dashboard {
        padding: 20px 10px;
    }

    .dashboard-header {
        padding: 24px;
    }

    .dashboard-header h1 {
        font-size: 28px;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .dashboard-actions {
        flex-direction: column;
    }

    .dashboard-actions .button,
    .dashboard-actions .button-primary {
        width: 100%;
        text-align: center;
    }

    .tier-details,
    .recent-orders {
        padding: 24px;
    }

    .b2b-portal-orders {
        padding: 24px 16px;
    }

    .b2b-orders-table {
        font-size: 14px;
    }

    .b2b-orders-table th,
    .b2b-orders-table td {
        padding: 12px 12px;
    }

    .b2b-orders-table th:first-child,
    .b2b-orders-table td:first-child {
        padding-left: 16px;
    }

    .b2b-orders-table th:last-child,
    .b2b-orders-table td:last-child {
        padding-right: 16px;
    }
}

/* Variation Grid */
.b2b-variation-grid-wrapper {
    margin: 30px 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}

.b2b-variation-grid-wrapper h3 {
    margin-top: 0;
    color: #333;
    font-size: 20px;
}

.b2b-variation-grid {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.b2b-variation-grid thead {
    background: linear-gradient(135deg, #0A2E6F 0%, #1D5FBF 58%, #18B7D6 100%);
    color: #fff;
}

.b2b-variation-grid th,
.b2b-variation-grid td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.b2b-variation-grid th:first-child,
.b2b-variation-grid td:first-child {
    padding-left: 20px;
}

.b2b-variation-grid th:last-child,
.b2b-variation-grid td:last-child {
    padding-right: 20px;
}

.b2b-variation-grid tbody tr:hover {
    background: #f8f9fa;
}

.variation-qty-wrapper {
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

.variation-qty-minus,
.variation-qty-plus {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    pointer-events: none !important;
}

.variation-qty-input,
.b2b-variation-grid .variation-qty-input,
.b2b-variation-grid-wrapper .variation-qty-input,
.b2b-variation-grid-wrapper input[type="number"].variation-qty-input,
.b2b-variation-grid input[type="number"].variation-qty-input,
input[type="number"].variation-qty-input {
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    height: 36px !important;
    padding: 4px 8px !important;
    border: 1px solid #ccd2d9 !important;
    border-radius: 6px !important;
    text-align: center !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    background: #fff !important;
    background-color: #fff !important;
    color: #1e293b !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.06) !important;
    background-image: none !important;
    -webkit-text-fill-color: #1e293b !important;
    opacity: 1 !important;
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
}

.variation-qty-input:focus,
.b2b-variation-grid .variation-qty-input:focus,
.b2b-variation-grid-wrapper .variation-qty-input:focus,
input[type="number"].variation-qty-input:focus {
    outline: none !important;
    border-color: #18B7D6 !important;
    box-shadow: 0 0 0 2px rgba(24, 183, 214, 0.15) !important;
    color: #1e293b !important;
    -webkit-text-fill-color: #1e293b !important;
}

.variation-grid-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.variation-grid-footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
}

.variation-grid-total {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    text-align: right;
}

.total-amount {
    color: #1D5FBF;
    font-size: 24px;
}

.b2b-add-to-cart-bulk {
    background: linear-gradient(135deg, #0A2E6F 0%, #1D5FBF 58%, #18B7D6 100%);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.b2b-add-to-cart-bulk:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 46, 111, 0.4);
}

.b2b-documents-section,
.b2b-tracking-section {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.b2b-user-tier-badge {
    margin: 0;
    display: inline-block;
}

.tier-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.tier-wholesale {
    background: linear-gradient(135deg, #0A2E6F 0%, #1D5FBF 58%, #18B7D6 100%);
    color: #fff;
}

.tier-distributor {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

.tier-vip {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    color: #fff;
}

.tier-standard {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
}

.b2b-discount-badge {
    margin: 10px 0;
}

.discount-amount {
    display: inline-block;
    background: #ff4757;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
}

.b2b-tiered-pricing {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.tiered-pricing-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.tiered-pricing-table th,
.tiered-pricing-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.tiered-pricing-table thead {
    background: #e9ecef;
}

@media (max-width: 768px) {
    .b2b-variation-grid {
        font-size: 14px;
    }

    .b2b-variation-grid th,
    .b2b-variation-grid td {
        padding: 8px 4px;
    }

    .variation-grid-footer-content {
        flex-direction: column;
        align-items: stretch;
    }

    .b2b-add-to-cart-bulk {
        width: 100%;
    }
}

/* Product Catalog Styles */
.b2b-portal-catalog {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    background: linear-gradient(135deg, #0A2E6F 0%, #1D5FBF 58%, #18B7D6 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

.catalog-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(255, 255, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.catalog-header h1 {
    margin: 0;
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, #0A2E6F 0%, #1D5FBF 58%, #18B7D6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.catalog-filters {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1),
                0 0 0 1px rgba(255, 255, 255, 0.3);
}

.catalog-search {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.catalog-search input[type="text"] {
    flex: 1;
    min-width: 250px;
    padding: 14px 20px;
    border: 2px solid rgba(10, 46, 111, 0.2);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #fff;
}

.catalog-search input[type="text"]:focus {
    outline: none;
    border-color: #1D5FBF;
    box-shadow: 0 0 0 4px rgba(10, 46, 111, 0.1);
}

.catalog-search select {
    padding: 14px 20px;
    border: 2px solid rgba(10, 46, 111, 0.2);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    background: #fff;
    cursor: pointer;
    min-width: 180px;
    transition: all 0.3s ease;
}

.catalog-search select:focus {
    outline: none;
    border-color: #1D5FBF;
    box-shadow: 0 0 0 4px rgba(10, 46, 111, 0.1);
}

.catalog-search .button {
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    background: linear-gradient(135deg, #0A2E6F 0%, #1D5FBF 58%, #18B7D6 100%);
    color: #fff !important;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 6px 0 #071d45,
                0 8px 20px rgba(10, 46, 111, 0.3);
}

.catalog-search .button:hover {
    transform: translateY(-3px);
    box-shadow: 0 9px 0 #071d45,
                0 12px 25px rgba(10, 46, 111, 0.5);
}

.catalog-search .button:active {
    transform: translateY(1px);
    box-shadow: 0 3px 0 #071d45,
                0 5px 12px rgba(10, 46, 111, 0.3);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
    margin-bottom: 40px;
}

.product-card {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(24px);
    border-radius: 32px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 20px 50px rgba(11, 19, 32, 0.08),
                0 8px 20px rgba(43, 120, 184, 0.06),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 70px rgba(11, 19, 32, 0.12),
                0 12px 30px rgba(43, 120, 184, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1e 50%, #1a1a2e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border-radius: 32px 32px 0 0;
}

.product-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(10, 46, 111, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-info {
    padding: 24px;
}

.product-title {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.product-title a {
    background: linear-gradient(135deg, #0A2E6F 0%, #1D5FBF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.product-title a:hover {
    opacity: 0.8;
}

.product-price {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.product-price .regular-price {
    font-size: 16px;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 500;
}

.product-price .sale-price,
.product-price .price {
    font-size: 24px;
    font-weight: 800;
    color: #1e293b;
}

.product-price .savings {
    display: inline-block;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-card form.cart {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.product-card .quantity {
    flex: 0 0 auto;
}

.product-card .quantity input {
    width: 70px;
    padding: 12px;
    border: 2px solid rgba(10, 46, 111, 0.2);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.product-card .quantity input:focus {
    outline: none;
    border-color: #1D5FBF;
    box-shadow: 0 0 0 4px rgba(10, 46, 111, 0.1);
}

.product-card .button {
    flex: 1;
    padding: 16px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    background: linear-gradient(135deg, #0A2E6F 0%, #1D5FBF 58%, #18B7D6 100%);
    color: #fff !important;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(10, 46, 111, 0.25);
    letter-spacing: 0.02em;
}

.product-card .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(10, 46, 111, 0.35);
}

.product-card .button:active {
    transform: translateY(0);
    box-shadow: 0 8px 25px rgba(10, 46, 111, 0.25);
}

.product-card .out-of-stock {
    margin: 0;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-radius: 10px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
}

.catalog-pagination {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1),
                0 0 0 1px rgba(255, 255, 255, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
}

.catalog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    margin: 0 4px;
    padding: 0 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    color: #475569;
    background: #fff;
    border: 2px solid rgba(10, 46, 111, 0.2);
    transition: all 0.3s ease;
}

.catalog-pagination .page-numbers:hover {
    background: rgba(10, 46, 111, 0.1);
    border-color: #1D5FBF;
    color: #1D5FBF;
    transform: translateY(-2px);
}

.catalog-pagination .page-numbers.current {
    background: linear-gradient(135deg, #0A2E6F 0%, #1D5FBF 58%, #18B7D6 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 0 #071d45,
                0 6px 15px rgba(10, 46, 111, 0.3);
}

.catalog-pagination .page-numbers.dots {
    border: none;
    background: transparent;
}

@media (max-width: 1024px) {
    .catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 28px;
    }
}

@media (max-width: 640px) {
    .catalog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Variation Grid in Catalog */
.variation-grid-wrapper {
    margin-top: 16px;
}

.variation-grid-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.variation-grid-table thead {
    background: linear-gradient(135deg, #0A2E6F 0%, #1D5FBF 58%, #18B7D6 100%);
}

.variation-grid-table th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
}

.variation-grid-table tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease;
}

.variation-grid-table tbody tr:hover {
    background-color: rgba(10, 46, 111, 0.05);
}

.variation-grid-table tbody tr:last-child {
    border-bottom: none;
}

.variation-grid-table td {
    padding: 12px 10px;
    font-size: 14px;
    color: #475569;
    vertical-align: middle;
}

.variation-grid-table .variant-name {
    font-weight: 600;
    color: #1e293b;
}

.variation-grid-table .variant-price {
    white-space: nowrap;
}

.variation-grid-table .variant-price .regular-price {
    font-size: 12px;
    color: #94a3b8;
    text-decoration: line-through;
    margin-right: 6px;
}

.variation-grid-table .variant-price .sale-price,
.variation-grid-table .variant-price .price {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.variation-grid-table .in-stock {
    display: inline-block;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.variation-grid-table .out-of-stock-label {
    display: inline-block;
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.variation-grid-table .variation-qty-input,
.variation-grid-table input[type="number"].variation-qty-input {
    width: 60px;
    padding: 8px;
    border: 2px solid rgba(10, 46, 111, 0.2);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    background: #fff !important;
    background-color: #fff !important;
    color: #1e293b !important;
    -webkit-text-fill-color: #1e293b !important;
    opacity: 1 !important;
}

.variation-grid-table .variation-qty-input:focus,
.variation-grid-table input[type="number"].variation-qty-input:focus {
    outline: none;
    border-color: #1D5FBF;
    box-shadow: 0 0 0 3px rgba(10, 46, 111, 0.1);
    color: #1e293b !important;
    -webkit-text-fill-color: #1e293b !important;
}

.variation-grid-table .add-variation-to-cart {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
    background: linear-gradient(135deg, #0A2E6F 0%, #1D5FBF 58%, #18B7D6 100%);
    color: #fff !important;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 3px 0 #071d45,
                0 4px 10px rgba(10, 46, 111, 0.3);
    white-space: nowrap;
}

.variation-grid-table .add-variation-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #071d45,
                0 7px 15px rgba(10, 46, 111, 0.5);
}

.variation-grid-table .add-variation-to-cart:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 #071d45,
                0 3px 8px rgba(10, 46, 111, 0.3);
}

.variation-grid-table .add-variation-to-cart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 768px) {
    .b2b-portal-catalog {
        padding: 20px 10px;
    }

    .catalog-header {
        padding: 24px;
    }

    .catalog-header h1 {
        font-size: 28px;
    }

    .catalog-filters {
        padding: 20px;
    }

    .catalog-search {
        flex-direction: column;
    }

    .catalog-search input[type="text"],
    .catalog-search select,
    .catalog-search .button {
        width: 100%;
    }

    .catalog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .catalog-pagination {
        padding: 16px;
    }

    .catalog-pagination .page-numbers {
        min-width: 36px;
        height: 36px;
        font-size: 14px;
        padding: 0 12px;
    }

    .variation-grid-table {
        font-size: 12px;
    }

    .variation-grid-table th,
    .variation-grid-table td {
        padding: 8px 6px;
    }

    .variation-grid-table th {
        font-size: 10px;
    }

    .variation-grid-table .variation-qty-input {
        width: 50px;
        padding: 6px;
    }

    .variation-grid-table .add-variation-to-cart {
        padding: 6px 12px;
        font-size: 11px;
    }
}

/* Cart Modal */
.b2b-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.b2b-modal-overlay.b2b-modal-visible {
    opacity: 1;
    visibility: visible;
}

.b2b-modal-box {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px 32px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: b2bModalSlideIn 0.3s ease;
}

@keyframes b2bModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.b2b-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    font-size: 20px;
    line-height: 32px;
    color: #64748b;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.b2b-modal-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.b2b-modal-icon {
    margin-bottom: 16px;
}

.b2b-modal-message {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 28px;
    line-height: 1.5;
}

.b2b-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.b2b-modal-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    box-sizing: border-box;
}

.b2b-modal-btn-primary {
    background: linear-gradient(135deg, #0A2E6F 0%, #1D5FBF 58%, #18B7D6 100%);
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(10, 46, 111, 0.25);
}

.b2b-modal-btn-primary:hover {
    box-shadow: 0 6px 20px rgba(10, 46, 111, 0.35);
    transform: translateY(-1px);
}

.b2b-modal-btn-secondary {
    background: #f1f5f9;
    color: #475569 !important;
}

.b2b-modal-btn-secondary:hover {
    background: #e2e8f0;
}

/* Order Status Badges */
.order-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-status.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.order-status.status-pending-review {
    background: #e0f2fe;
    color: #0c4a6e;
}

.order-status.status-approved {
    background: #d1fae5;
    color: #065f46;
}

.order-status.status-sent-fulfillment {
    background: #dbeafe;
    color: #1e40af;
}

.order-status.status-processing {
    background: #ede9fe;
    color: #5b21b6;
}

.order-status.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.order-status.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.order-status.status-on-hold {
    background: #fef3c7;
    color: #92400e;
}

/* Order Detail Info Grid */
.order-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.order-info-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.order-info-card h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.order-info-card p {
    margin: 8px 0;
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
}

.order-info-card p strong {
    color: #1e293b;
}

/* Fulfillment Status Badges */
.fulfillment-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fulfillment-status.status-sent {
    background: #dbeafe;
    color: #1e40af;
}

.fulfillment-status.status-processing {
    background: #fef3c7;
    color: #92400e;
}

.fulfillment-status.status-shipped {
    background: #d1fae5;
    color: #065f46;
}

.fulfillment-status.status-completed {
    background: #d1fae5;
    color: #065f46;
}

/* Tracking link in order detail */
.order-info-card a {
    color: #1D5FBF;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.order-info-card a:hover {
    color: #0A2E6F;
    text-decoration: underline;
}

/* Tracking link in orders list */
.b2b-orders-table td a {
    color: #1D5FBF;
    text-decoration: none;
    font-weight: 600;
}

.b2b-orders-table td a:hover {
    color: #0A2E6F;
    text-decoration: underline;
}

.b2b-orders-table .no-tracking {
    color: #cbd5e1;
}

@media (max-width: 768px) {
    .order-info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.woocommerce-cart .cart-container,
.woocommerce-cart .cart-wrapper,
.woocommerce-page .cart-container,
.woocommerce-page .cart-wrapper,
.woocommerce-checkout .woocommerce,
.woocommerce-checkout .checkout-container,
.woocommerce-checkout .checkout-wrapper,
.woocommerce-order-received .woocommerce,
.woocommerce-order-received .order-container,
.woocommerce-order-received .order-wrapper,
.woocommerce-checkout .entry-content,
.woocommerce-order-received .entry-content,
.woocommerce-checkout .woocommerce > *,
.woocommerce-order-received .woocommerce > * {
    display: block !important;
    flex-wrap: unset !important;
    align-items: unset !important;
    gap: unset !important;
    max-width: 100%;
    width: 100%;
}

.woocommerce-cart table.shop_table,
.woocommerce-cart .shop_table_responsive,
.woocommerce-cart .cart-container,
.woocommerce-cart .cart-wrapper {
    overflow: visible !important;
}

.woocommerce-cart table.shop_table td.product-quantity {
    overflow: visible !important;
    padding-right: 20px;
}

.woocommerce-cart .quantity {
    display: inline-flex !important;
    align-items: center;
    flex-wrap: nowrap;
    overflow: visible !important;
}

.woocommerce-order-received .woocommerce-order,
.woocommerce-checkout .woocommerce-checkout {
    display: block !important;
    flex-wrap: unset !important;
    align-items: unset !important;
    gap: unset !important;
    max-width: 100%;
    width: 100%;
}
