/* Estilos para el frontend del plugin de mayoristas */

/* Página de mayorista pendiente */
.mcp-pending-mayorista {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.mcp-pending-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #667eea 100%);
    color: white;
    border-radius: 10px;
}

.mcp-pending-header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
}

.mcp-pending-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.mcp-info-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #2271b1;
}

.mcp-info-card h3 {
    margin: 0 0 15px 0;
    color: #2271b1;
    font-size: 1.2em;
}

.mcp-info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mcp-info-card li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.mcp-info-card li:last-child {
    border-bottom: none;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
}

.mcp-pending-actions {
    text-align: center;
    margin-top: 30px;
}

.mcp-pending-actions .button {
    margin: 0 10px;
    padding: 12px 24px;
    font-size: 1.1em;
}

/* Dashboard de mayorista */
.mcp-mayorista-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.mcp-dashboard-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #667eea 100%);
    color: white;
    border-radius: 10px;
}

.mcp-dashboard-header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
}

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

.mcp-stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    border-left: 4px solid #003e80;
}

.mcp-stat-card h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1em;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #003e80;
    margin-bottom: 10px;
}

.stat-date {
    font-size: 1.2em;
    color: #666;
}

.mcp-dashboard-content h2 {
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* Grid de productos */
.mcp-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

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

.mcp-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.mcp-product-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

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

.mcp-no-image {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    color: #ccc;
}

.mcp-product-info {
    padding: 20px;
}

.mcp-product-title {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    color: #333;
    line-height: 1.3;
}

.mcp-product-sku {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 0.9em;
}

.mcp-product-prices {
    margin-bottom: 20px;
}

.mcp-price-normal,
.mcp-price-mayorista {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 8px 0;
}

.mcp-price-normal {
    border-bottom: 1px solid #f0f0f0;
}

.mcp-price-mayorista {
    background: #e8f5e8;
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
}

.mcp-price-savings {
    text-align: center;
    margin-top: 10px;
}

.mcp-price-savings .savings {
    background: #003e80;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: bold;
}

.mcp-product-actions {
    display: flex;
    gap: 10px;
}

.mcp-product-actions .button {
    flex: 1;
    text-align: center;
    padding: 10px;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.mcp-view-product {
    background: #2271b1;
    color: white;
}

.mcp-view-product:hover {
    background: #135e96;
    color: white;
}

.mcp-add-to-cart {
    background: #003e80;
    color: white;
}

.mcp-add-to-cart:hover {
    background: #007a00;
    color: white;
}

/* Paginación */
.mcp-pagination {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
}

.mcp-pagination .button {
    margin: 0 5px;
    padding: 10px 20px;
}

.mcp-page-info {
    margin: 0 20px;
    color: #666;
    font-weight: bold;
}

/* Sin productos */
.mcp-no-products {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    color: #666;
}

.mcp-no-products p {
    font-size: 1.2em;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .mcp-pending-info,
    .mcp-dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .mcp-products-grid {
        grid-template-columns: 1fr;
    }
    
    .mcp-product-actions {
        flex-direction: column;
    }
    
    .mcp-pending-header h1,
    .mcp-dashboard-header h1 {
        font-size: 2em;
    }
}

/* Estados de carga */
.mcp-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.mcp-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Formulario de registro de mayoristas - Estilos específicos para evitar conflictos */
.mcp-mayorista-registration {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: inherit;
    box-sizing: border-box;
}

/* Asegurar que no interfiera con el header */
.mcp-mayorista-registration * {
    box-sizing: border-box;
}

.mcp-mayorista-registration .mcp-registration-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #667eea 100%);
    color: white;
    border-radius: 10px;
}

.mcp-mayorista-registration .mcp-header-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.mcp-registration-header h1 {
    margin: 0 0 15px 0;
    font-size: 2.5em;
}


.mcp-registration-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.mcp-registration-form h3 {
    margin: 0 0 20px 0;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.mcp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.mcp-form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.mcp-form-group {
    margin-bottom: 20px;
}

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

.mcp-form-group input,
.mcp-form-group select,
.mcp-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.mcp-form-group input:focus,
.mcp-form-group select:focus,
.mcp-form-group textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
}

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

.mcp-form-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.mcp-submit-btn {
    background: #003e80;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.mcp-submit-btn:hover {
    background: #007a00;
}

.mcp-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.mcp-form-note {
    margin-top: 20px;
    padding: 15px;
    background: #e8f4fd;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
}

.mcp-form-note p {
    margin: 0;
    color: #333;
}

.mcp-success-message {
    text-align: center;
    padding: 40px;
    background: #d1ecf1;
    border-radius: 8px;
    border-left: 4px solid #0c5460;
}

.mcp-success-message h3 {
    margin: 0 0 15px 0;
    color: #0c5460;
}

.mcp-already-mayorista,
.mcp-pending-mayorista {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2271b1;
}

.mcp-already-mayorista h2,
.mcp-pending-mayorista h2 {
    margin: 0 0 15px 0;
    color: #2271b1;
}

/* Responsive para formulario */
@media (max-width: 1024px) {
    .mcp-form-row-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .mcp-form-row {
        grid-template-columns: 1fr;
    }
    
    .mcp-form-row-3 {
        grid-template-columns: 1fr;
    }
    
    .mcp-registration-header h1 {
        font-size: 2em;
    }
    
    .mcp-registration-form {
        padding: 20px;
    }
    
    .mcp-header-image {
        margin-bottom: 15px;
    }
    
    .mcp-registration-header {
        padding: 20px;
    }
}

/* Formulario de login de mayoristas */
.mcp-mayorista-login {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.mcp-login-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #667eea 100%);
    color: white;
    border-radius: 10px;
}

.mcp-login-header h1 {
    margin: 0 0 15px 0;
    font-size: 2.5em;
}

.mcp-login-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.mcp-login-form h3 {
    margin: 0 0 20px 0;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.mcp-login-form .mcp-form-group {
    margin-bottom: 20px;
}

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

.mcp-login-form .mcp-form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.mcp-login-form .mcp-form-group input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
}

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

.mcp-login-btn {
    background: #003e80;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.mcp-login-btn:hover {
    background: #007a00;
}

.mcp-login-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.mcp-login-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.mcp-login-links p {
    margin: 10px 0;
}

.mcp-login-links a {
    color: #2271b1;
    text-decoration: none;
}

.mcp-login-links a:hover {
    text-decoration: underline;
}

.mcp-login-info {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #2271b1;
}

.mcp-login-info h3 {
    margin: 0 0 15px 0;
    color: #2271b1;
}

.mcp-login-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mcp-login-info li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.mcp-login-info li:last-child {
    border-bottom: none;
}

.mcp-already-logged-in,
.mcp-pending-mayorista,
.mcp-not-mayorista {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2271b1;
}

.mcp-already-logged-in h2,
.mcp-pending-mayorista h2,
.mcp-not-mayorista h2 {
    margin: 0 0 15px 0;
    color: #2271b1;
}

/* Responsive para login */
@media (max-width: 768px) {
    .mcp-login-header h1 {
        font-size: 2em;
    }
    
    .mcp-login-form {
        padding: 20px;
    }
    
    .mcp-login-header {
        padding: 20px;
    }
}
