/* B2B Wholesale - Frontend Styles */

/* Reset and Base */
.b2b-login-page,
.b2b-register-page,
.b2b-shop-page {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #f5f5f5;
}

/* Login Page */
.b2b-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.b2b-login-box,
.b2b-register-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 450px;
    width: 100%;
}

.b2b-register-box {
    max-width: 600px;
}

.b2b-logo {
    text-align: center;
    margin-bottom: 30px;
}

.b2b-logo img {
    max-width: 200px;
    height: auto;
}

.b2b-login-box h2,
.b2b-register-box h2 {
    text-align: center;
    margin: 0 0 10px;
    color: #333;
}

.b2b-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

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

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
}

.b2b-register-box h3 {
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
}

.b2b-register-box h3:first-of-type {
    margin-top: 0;
}

/* Buttons */
.b2b-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.b2b-btn-primary {
    background: #0073aa;
    color: white;
}

.b2b-btn-primary:hover {
    background: #005a87;
}

.b2b-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

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

/* Messages */
#b2b-login-message,
#b2b-register-message {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: none;
}

#b2b-login-message.error,
#b2b-register-message.error {
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    color: #991b1b;
    display: block;
}

#b2b-login-message.success,
#b2b-register-message.success {
    background: #f0fdf4;
    border-left: 4px solid #16a34a;
    color: #15803d;
    display: block;
}

/* Footer */
.b2b-login-footer,
.b2b-register-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.b2b-login-footer p,
.b2b-register-footer p {
    margin-bottom: 10px;
    color: #666;
}

/* Shop Page Header */
.b2b-shop-header {
    background: white;
    border-bottom: 1px solid #eee;
    padding: 20px 0;
    margin-bottom: 30px;
}

.b2b-shop-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.b2b-shop-header .b2b-shop-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.b2b-header-left img {
    max-height: 60px;
    width: auto;
}

.b2b-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.b2b-welcome {
    color: #333;
    font-weight: 500;
}

.b2b-logout {
    color: #dc2626;
    text-decoration: none;
    font-weight: 500;
}

.b2b-logout:hover {
    text-decoration: underline;
}

/* Breadcrumb */
.b2b-breadcrumb {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

.b2b-breadcrumb a {
    color: #0073aa;
    text-decoration: none;
}

.b2b-breadcrumb a:hover {
    text-decoration: underline;
}

.b2b-breadcrumb .separator {
    margin: 0 8px;
}

.b2b-page-title {
    margin-bottom: 30px;
    color: #333;
}

/* Category Grid */
.b2b-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.b2b-category-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.b2b-category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.b2b-category-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.b2b-category-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.b2b-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.b2b-category-item:hover .b2b-category-image img {
    transform: scale(1.05);
}

.b2b-category-name {
    padding: 20px;
    margin: 0;
    font-size: 18px;
    color: #333;
}

.b2b-category-count {
    padding: 0 20px 20px;
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Products Grid */
.b2b-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.b2b-product-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.b2b-product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.b2b-product-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f5f5f5;
}

.b2b-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.b2b-product-details {
    padding: 20px;
}

.b2b-product-title {
    margin: 0 0 15px;
    font-size: 16px;
}

.b2b-product-title a {
    color: #333;
    text-decoration: none;
}

.b2b-product-title a:hover {
    color: #0073aa;
}

.b2b-product-price {
    margin-bottom: 15px;
}

.wholesale-price {
    font-size: 20px;
    font-weight: bold;
    color: #16a34a;
}

.min-qty {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.b2b-view-product {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.3s;
}

.b2b-view-product:hover {
    background: #005a87;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .b2b-category-grid,
    .b2b-products-grid {
        grid-template-columns: 1fr;
    }
    
    .b2b-header-right {
        flex-direction: column;
        gap: 10px;
        align-items: flex-end;
    }
}